← Back to section · Research & Analysis
Stateful vs. Stateless Hash-Based Signatures: State Risk Against Size Cost
XMSS and LMS trade state for compact signatures; SLH-DSA trades size for a stateless safety margin. The divide between the two hash-based sub-routes is not cryptographic strength but operational discipline and failure mode: state reuse is catastrophic and irreversible, while size growth is merely a computable engineering cost.
Inside the hash-based signature family runs a deep route divide: stateful versus stateless. XMSS (RFC 8391) and LMS (RFC 8554) organize large numbers of one-time signing keys in Merkle trees; each signature consumes one leaf index and advances the state. SLH-DSA (FIPS 205) uses a multi-layer tree with few-time signature structures so that each signature chooses its position near-independently at random, and no counter is maintained at all. Both share the same trust root — hash-function security — and their disagreement lies entirely at the engineering and operations level, which is exactly the class of problem most worth unfolding in route comparison.
The stateful route: security wagered on operational discipline
The stateful size account looks attractive: LMS signatures run to a few thousand bytes, key generation and verification are fast, and the security argument is direct and simple. The cost hides in the state semantics: once a one-time key index is reused for two different messages, an attacker can combine them into a forgery, and security does not decline gradually but falls off a cliff. In real systems, the paths that trigger state reuse are not rare: virtual-machine snapshot rollbacks, backup restores, active-active nodes each advancing their own counters, and state-synchronization delays across HSM clusters can all cause the same state to be signed with twice. SP 800-208 therefore attaches strict conditions of use to stateful schemes, requiring state to be centrally managed inside hardware and keys to be non-exportable and non-clonable. In other words, the stateful route’s security boundary is set by the operations system, not by cryptography.
The stateless route: risk converted into a computable cost
SLH-DSA’s design philosophy is the opposite: it assumes the signing environment is uncontrollable and uses structural complexity to eliminate state. Its price is equally explicit: signature sizes from about 7,856 bytes (the 128s parameter set) to about 49,856 bytes (the 256f parameter set), signing that requires large numbers of hash invocations and runs one to two orders of magnitude slower than stateful schemes, against public keys as small as 32 or 64 bytes. But note the nature of this bill: bandwidth, storage, and compute are engineering costs that can be budgeted, load-tested, and amortized as hardware improves; they do not drop to zero because of a single operational mistake. The stateless route moves risk out of the uncontrollable domain of human and system faults and into the controllable domain of resources.
Historical coordinates: why the stateful schemes were standardized first
Understanding the divide also requires the timeline: XMSS and LMS were standardized (RFC 8391, RFC 8554, and SP 800-208) years before SLH-DSA, for no mysterious reason — before stateless sizes and speeds were optimized into an acceptable range, stateful schemes were the only form in which hash-based signatures could be deployed at all, their compactness bought by a direct trade of state for structure. Early industrial firmware-signing practice also formed in this period, and the engineering norms accumulated around state custody remain in service today. SLH-DSA’s arrival does not retroactively invalidate those deployments; it gives new systems an option that no longer requires signing the state contract. The coexistence of old and new routes is a reminder that route conclusions are time-dependent: today’s judgement rests on today’s optimization levels and hardware costs, and the evaluation framework itself should build in review points.
Scenario matching: the line is whether state can be centrally custodied
The applicability boundary between the two routes can be drawn sharply. If signing happens in a closed, countable environment — firmware released a few times a year, signing machines held offline, state maintained exclusively by a single HSM — the stateful constraints are fully satisfiable, and its compactness and efficiency are pure gain; this is why SP 800-208 preserves a formal place for it. Conversely, if signers are numerous and geographically dispersed, if the signing service needs horizontal scaling and disaster-recovery failover, or if signing logic is embedded in endpoints that cannot be uniformly governed, globally coordinating state is almost impossible to prove reliable in engineering terms, and the stateless route should be the default. Middle ground such as an enterprise CA calls for assessing the real probability of state rollback during disaster-recovery drills rather than deciding from the size table alone.
Engineering mitigations and their limits
Engineers have designed a number of mitigations for the stateful route, and any evaluation of that route should count them together with their limits. The first is layered trees and key sharding: split one large tree hierarchically across signing nodes, each shard maintaining its own state, shrinking the blast radius of a single reuse — but this only shrinks rather than eliminates the risk, and sharding-boundary management errors can still create overlap. The second is state reservation and monotonic-counter hardware: anchor the state with anti-rollback counters, one-time-programmable storage, or TPM monotonic counters so that snapshot restores cannot rewind the index; coverage of virtualized environments is incomplete, however, and migration and cloning scenarios need additional design. The third is to confine signing capability to a single HSM and forbid key export, architecturally precluding multiple copies advancing state independently; this is currently the only approach that systematically satisfies SP 800-208’s conditions, at the price of throughput ceilings and single-point availability concerns, and it presumes scenarios where signing volume is genuinely small.
The stateless route has its own engineering agenda: slow signing means high-concurrency verification scenarios (such as certificate transparency logs and software distribution) must reserve substantial compute for SLH-DSA, and parameter-set choice (between the s and f families) is itself a further trade between signature size and signing speed. But these are capacity-planning problems, for which mature methodologies exist. Set side by side, the essence of the route choice is choosing which class of problem you are better at managing: state-consistency problems, or capacity problems.
Conclusion
There is no cryptographic winner in this contest: both routes’ security reductions have the same source, and they differ in where trust is placed. The stateful route trusts the operations system never to err; the stateless route trusts only the hash function and the budget spreadsheet. This article’s judgement: until an organization can prove its state custody meets SP 800-208’s conditions, the default posture should be stateless first; only when size and performance constraints are genuinely unbearable, and state-custody conditions are auditable, should one switch to the stateful route. Trading catastrophic risk for linear cost is usually a good bargain in security engineering.
Tags: XMSSLMSSLH-DSAstate management