← Back to section · Post-Quantum Cryptography
Stateless versus Stateful: The Fundamental Split between SLH-DSA and XMSS/LMS
All three are hash-based signatures, but XMSS and LMS require the signer to rigorously maintain a one-time-key counter while SLH-DSA abolishes state altogether. This article contrasts the two contracts, the operational scenarios where state fails, and the corner where stateful schemes still win.
Inside the hash-based signature family there is one fundamental dividing line: whether the signing key must “remember” how many times it has signed. XMSS and LMS stand on the stateful side — they matured earlier and were standardized earlier. SLH-DSA stands on the stateless side and is what NIST ultimately chose as the general-purpose scheme in FIPS 205. Understanding this line clarifies the positioning of all three better than any single parameter comparison.
The stateful contract: efficient, but state is the throat
XMSS (RFC 8391, 2018) and LMS (RFC 8554, 2019) are not complicated: a Merkle tree over many WOTS-style one-time keys, consumed in order as the counter increments. Their signatures are typically only a few kilobytes — an order of magnitude smaller than SLH-DSA’s — and signing is faster. NIST approved both schemes for specific use cases in SP 800-208 (2020), which is why they are still seriously considered in areas such as firmware signing.
But the approval comes with one non-negotiable condition: state must be managed rigorously. The counter must advance monotonically, be stored rollback-proof, and every use of the key must be atomically bound to an update of the state. The reason is plain: sign two messages with one one-time key and two positions leak on its WOTS chains, opening the forgery space; once state repeats, the key’s security does not degrade — it collapses. Much of SP 800-208’s bulk is devoted to how state must be generated, stored, and backed up — in effect, using standards text to draw red lines around operations.
Why state keeps failing in operators’ hands
The trouble is that the default moves of modern IT infrastructure are nearly all enemies of state:
- Backup and restore: restore yesterday’s backup and the key file comes back — with yesterday’s counter. Every signature after the restore reuses one-time keys.
- VM snapshots and clones: a virtual machine that has signed gets cloned into two; both continue from the same counter, and the forked state is reuse.
- Active-active and failover: two systems disagreeing about state at the failover instant is a classic distributed-systems problem; with one-time keys it is a catastrophe.
- Counter persistence failure: the signature went out but the counter write did not survive; after a power loss the system resumes from the old value. Atomicity is far harder in engineering than on paper.
None of these are hypothetical; they are operational routine. A stateful scheme mortgages the security of the cryptographic system to the correct behavior of every backup script, every disaster-recovery drill, and every virtualization platform. The larger and more complex the organization, the riskier that mortgage. This is precisely why NIST would not accept a stateful scheme for the general-purpose signature standard (FIPS 205): a general standard must survive uncontrolled deployment environments.
SLH-DSA’s answer: trade state for probability
SLH-DSA’s response is twofold. First, leaf indices are not dealt out by a counter but derived pseudorandomly from the message digest and the key — there is no “next”, only “the one this message maps to”, so indices are inherently independent of state. Second, and more importantly, the component that handles the digest, FORS, is designed as a few-time signature: if two messages occasionally land on the same leaf set, that is one reuse inside a probability budget, not a collapse. The hypertree’s gigantic leaf space keeps such coincidences rare enough. Backups, clones, and rollbacks are therefore all harmless to SLH-DSA: in the worst case it has merely “signed a few more messages”, which is exactly the margin it was designed with.
The price is printed in the parameter table: for statelessness, SLH-DSA’s signatures are several times to an order of magnitude larger than XMSS/LMS signatures, and signing is slower. Statelessness is not free; it is operational safety bought with size and speed.
What ground remains for stateful schemes
None of this makes XMSS or LMS obsolete. In a single, controlled environment with a fully auditable signing path — say a dedicated signing appliance that is never cloned, never snapshotted, and keeps its state in rollback-resistant hardware — state genuinely can be managed, and there the stateful schemes’ smaller signatures and faster signing are real advantages. SP 800-208’s approval targets exactly such settings, and CNSA 2.0’s reliance on hash-based signatures for firmware signing includes this kind of controlled deployment in its calculus.
Self-improvement on the stateful side: multi-tree structures
In fairness, the stateful camp has not stood still. The multi-tree variant of XMSS, XMSS^MT, replaces one huge tree with several layers: leaves of the top tree sign the roots of trees below, state needs to be maintained only for the top tree, and both tree size and key-generation cost drop — readers will notice this is the same layering idea as SLH-DSA’s hypertree. Layered variants on the LMS side do the same thing. Multi-tree structure genuinely relieves two stateful pain points: key generation no longer has to build an astronomical number of leaves at once, and state advancement gains flexibility.
But it relieves cost, not the contract. However many layers the trees have, the bottom one-time keys may still be used only once, the counter must still be monotonic, rollback-proof, and atomically bound to every signature; backup restores and clone forks remain exactly as dangerous. In other words, multi-tree designs make stateful schemes “cheaper at being stateful” without making them “able to ignore state”. The divergence from SLH-DSA is thereby thrown into sharper relief: one line of work optimizes within the framework of state, the other deletes state from the framework and accepts larger signatures and dependence on FORS’s probabilistic bounds. Both philosophies are rational engineering choices; they simply bet on different things — one on operational discipline being perfectible, the other on probability margins being wide enough.
The selection rule is therefore clear: the more open, distributed, and cloud-dependent the signing environment, the stronger the case for stateless SLH-DSA; the more the signer is locked inside one controlled device with tight size limits, the more stateful schemes remain a legitimate option. The dividing line is not cryptography — it is how much you trust your own operations.
Sources and further reading
- Leighton-Micali, RFC 8554: Leighton-Micali Hash-Based Signatures, 2019.
- Hülsing et al., RFC 8391: XMSS: eXtended Merkle Signature Scheme, 2018.
- NIST, SP 800-208: Recommendation for Stateful Hash-Based Signature Schemes, 2020.
- NIST, FIPS 205: Stateless Hash-Based Digital Signature Standard, 2024.
- On this site: “FORS: The One-Time Signature You May Use a Few Times — SLH-DSA’s Last Stateless Puzzle Piece”
Tags: SLH-DSAXMSSLMSstateful signatures