Skip to main content

Hash-based signatures

Question this answers: why are there two kinds of hash-based signature, and why are some of them only for firmware? Background: Post-quantum algorithms, Signatures, certificates, and trust.

Why hash-based​

Hash-based signatures build a signature scheme from a hash function such as SHA-256 or SHAKE. Their appeal is that their security rests on hash functions, which, as NIST IR 8547 (October 2026, §4.1.3) notes, are significantly less vulnerable to known quantum attacks than today's public-key algorithms. They are an alternative to the lattice-based ML-DSA that does not depend on lattice assumptions.

The cost is size. The UK NCSC's Next steps whitepaper (August 2024) notes that hash-based signatures are large and therefore not suitable for general-purpose use.

Stateful and stateless​

The building block is a one-time signature: a key pair that can safely sign one message only. Signing two different messages with the same one-time key leaks enough information for an attacker to forge signatures. Practical schemes bundle very many one-time keys under a single public key.

Stateful: LMS, HSS, XMSS, XMSS^MTStateless: SLH-DSA
StandardSP 800-208, October 2020FIPS 205, August 13, 2024
How one-time keys are chosenThe signer tracks which ones have been used and must never reuse oneChosen in a way that makes reuse risk negligible without tracking
Operational burdenHigh: state must be stored, protected, and never rolled back or clonedLow: behaves like an ordinary signature key
Intended use (NIST IR 8547)Not for general use; may suit software and firmware signingGeneral use where its size is acceptable

NIST IR 8547 (§2.1.1) describes the stateful private key as a large set of one-time keys and states that security relies on the signer ensuring no one-time key ever signs more than one message. Because that requires strict operational controls to track signature indices across distributed systems, stateful schemes are not intended for general use. The NCSC whitepaper says LMS and XMSS should only be used where state can be managed in a trusted manner.

What can go wrong with state​

The state is a counter of used one-time keys. Ordinary operational events can corrupt it:

  • restoring a signing server or HSM from a backup taken before the latest signatures;
  • cloning a virtual machine or key so two signers share one key;
  • running signing jobs in parallel without a single authority over the counter;
  • a failure between producing a signature and saving the updated state.

Each can cause a one-time key to be reused. This is why the handbook treats "how is state controlled?" as a required question on Firmware and secure boot and Code and software signing when a stateful scheme is chosen.

Why firmware signing is the sweet spot​

Firmware and boot code are signed rarely, by a small, tightly controlled team, often in an offline HSM — exactly the setting where state can be managed, and NIST IR 8547 (§2.1.1) names software and firmware signing as the uses where stateful schemes may be useful. The UK NCSC's migration timelines (March 20, 2025) list LMS and XMSS for a more limited set of uses and note that some vendors have already developed secure boot solutions based on them.

NIST's draft SP 800-230 (April 13, 2026) proposes additional SLH-DSA parameter sets for limited-signature uses, establishing a strict limit of 2^24 signatures per key; if finalized, it would offer another option for the same niche without stateful tracking.

What to take away​

  • Stateless SLH-DSA is an ordinary, if large, signature scheme.
  • Stateful LMS and XMSS demand rigorous state management; treat them as specialist tools for firmware and similar tightly controlled signing.
  • If a supplier proposes a stateful scheme, ask how state is protected against backup restores, cloning, and parallel signing.

Sources​

  • NIST, Transition to Post-Quantum Cryptography Standards, NIST IR 8547, October 2026 (§2.1.1, §4.1.3). NIST IR 8547
  • NIST, Recommendation for Stateful Hash-Based Signature Schemes, SP 800-208, October 2020. SP 800-208
  • NIST, Stateless Hash-Based Digital Signature Standard, FIPS 205, August 13, 2024. FIPS 205
  • NIST, Additional SLH-DSA Parameter Sets for Limited Signature Use Cases, SP 800-230 (initial public draft), April 13, 2026. SP 800-230 draft
  • UK National Cyber Security Centre, Next steps in preparing for post-quantum cryptography, version 2.0, August 2024. NCSC whitepaper
  • UK National Cyber Security Centre, Timelines for migration to post-quantum cryptography, published March 20, 2025. UK NCSC timelines