Skip to content

keytools: document stateful LMS/XMSS signing as demo/development only - #982

Merged
anhu merged 1 commit into
wolfSSL:masterfrom
danielinux:document-stateful-sign
Nov 11, 2026
Merged

anhu merged 1 commit into
wolfSSL:masterfrom
danielinux:document-stateful-sign

Conversation

@danielinux

Copy link
Copy Markdown
Member

LMS/HSS and XMSS/XMSS^MT are stateful hash-based signature schemes: each signature consumes one-time key material, and reusing it breaks the whole key. The key tools store the private key in a plain local file and sign rewrites it in place, a pattern that does not meet production storage requirements (atomic, durable, protected).

  • keygen: print a warning after generating an LMS/XMSS key
  • sign: print a warning (once per run) after a successful LMS/XMSS signature; other algorithms are unaffected
  • docs/Signing.md: new "Stateful signatures" section explaining the statefulness, the file-based demo/development pattern, and the production guidance (stateless algorithm, or protected storage)

Verification:

  • make -C tools/keytools: builds clean
  • keygen --lms / --xmss: warning printed, rc=0; keygen --ed25519: none
  • sign --lms / --xmss: warning printed once, rc=0; sign --ed25519: none
  • sign --lms --delta (two signatures per run): warning printed once
  • make -C tools/unit-tests run: exit 0

LMS/HSS and XMSS/XMSS^MT are stateful hash-based signature schemes: each
signature consumes one-time key material, and reusing it breaks the whole
key. The key tools store the private key in a plain local file and sign
rewrites it in place, a pattern that does not meet production storage
requirements (atomic, durable, protected).

- keygen: print a warning after generating an LMS/XMSS key
- sign: print a warning (once per run) after a successful LMS/XMSS
  signature; other algorithms are unaffected
- docs/Signing.md: new "Stateful signatures" section explaining the
  statefulness, the file-based demo/development pattern, and the
  production guidance (stateless algorithm, or protected storage)

Verification:
- make -C tools/keytools: builds clean
- keygen --lms / --xmss: warning printed, rc=0; keygen --ed25519: none
- sign --lms / --xmss: warning printed once, rc=0; sign --ed25519: none
- sign --lms --delta (two signatures per run): warning printed once
- make -C tools/unit-tests run: exit 0
Copilot AI balanced review requested due to automatic review settings November 11, 2026 15:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@danielinux
danielinux requested a review from anhu November 11, 2026 15:44
@anhu
anhu merged commit 226a2c7 into wolfSSL:master Nov 11, 2026
572 of 578 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants