← Back to section · Research & Analysis
An Engineering History of Stateful Hash-Based Signatures: From Merkle Trees to Firmware Signing
Hash-based signatures rest only on the security of hash functions — the most conservative assumption among post-quantum signatures. This report traces their engineering history from the one-time signatures of 1979 to the standardisation of XMSS and LMS, and takes stock of state management, their core difficulty.
Scope: The Most Conservative Signature Line
This report covers hash-function-based digital signatures, especially their stateful branch. Its starting point predates the very concept of post-quantum cryptography: in 1979 Lamport proposed one-time signatures, revealing or withholding a set of hash preimages to sign a single message; the same year, Merkle proposed organising many one-time keys into a hash tree, with the tree root as the public key. The unique value of this line is the minimalism of its security assumptions — it needs only the preimage and collision resistance of hash functions, depending on no algebraic structure, and is therefore regarded among all post-quantum signatures as the most conservative option, the least likely to be overturned overnight by a mathematical breakthrough.
The price was written in from the beginning: a one-time key can sign only once. Signing a second message with a Lamport key leaks enough preimage information to make forgery possible. The Merkle tree magnifies “once” to a power of two, but the essential constraint is unchanged — the signer must remember precisely which leaves have been used. This is the origin of the “state” problem, and the main thread of this report.
From Papers to Standards: Forty Years of Progress
For more than twenty years after their proposal, hash-based signatures remained largely at textbook level: each signature consumed a leaf and signatures measured in kilobytes could not compete in the age of RSA and ECDSA. The turn came from two directions: the quantum threat made conservative assumptions valuable again, and in 2011 Buchmann and colleagues proposed XMSS, using Winternitz one-time signatures (WOTS+) to compress signature sizes and tree-chaining structures to support multiple tree layers, advancing practicality by a large step.
Standardisation followed. In 2018, the IETF published RFC 8391 specifying XMSS and its multi-tree variant XMSS^MT; in 2019, RFC 8554 specified LMS, originating in the US national security community, and its hierarchical variant HSS. In 2020, NIST published SP 800-208, formally approving these two families of stateful hash-based signatures for use in specific scenarios, with strict constraints on parameters and usage. The wording of the approval deserves attention: NIST did not list them as general-purpose signature algorithms, but restricted them to scenarios where “the number of signatures is controllable and state is manageable” — firmware and software update signing is the canonical application, and the CNSA 2.0 suite likewise names LMS/XMSS as the preferred choice for firmware signing.
State Management: The Core Difficulty of Deployment
All the risk of stateful signatures concentrates in one operational fact: sign two different messages with the same leaf, and security collapses. On paper this is a simple discipline; in real systems it is a systematic trap.
The first trap is backup and restoration. Private-key state lives on disk; restore the system from yesterday’s backup and the counter rolls back with it — used leaves are treated as unused, and the disaster happens without the signer ever knowing. The second is virtualisation: VM snapshots, cloning and live migration naturally copy state, and two clones signing in parallel constitute reuse. The third is high-availability architecture: when several signing servers share one key, race conditions in state synchronisation are extremely hard to eliminate. Engineering responses include writing counters into the monotonic counters of hardware security modules, using multi-tree structures to assign independent subtrees to different devices, and placing a centralised state arbiter in front of the signing service — each makes an explicit trade among cost, availability and security.
This also explains why stateless SLH-DSA (FIPS 205) is still necessary: at the price of larger signatures (roughly 8 to 50 kilobytes) and slower speed, it buys back the operational freedom of “no state to remember”. The division of labour between the two lines — stateful for controlled scenarios, stateless for general ones — is the final sediment of forty years of engineering trade-offs.
The Engineering Ledger of Size and Performance
Lay out this line’s engineering ledger and its trade-offs are plain to see. LMS and XMSS signature sizes sit in the kilobyte range, depending on tree height and Winternitz parameters: the taller the tree and the more signatures it supports, the longer each signature’s authentication path. The public key, by contrast, is astonishingly small — essentially a tree root of one hash output’s length plus parameter identifiers, a decisive advantage for scenarios where the public key must be burned into firmware or distributed in print. Signing speed consists of thousands of hash operations, no burden on modern processors; verification likewise needs only hashes — which is precisely what makes this the only post-quantum signature deployable on legacy hardware with no new arithmetic units.
Parameter selection is in substance a three-way trade: total number of signatures (tree height), per-signature size, and key generation time. The approved parameter combinations listed in SP 800-208 essentially fix the points of this trade space that have been thoroughly analysed, forbidding deployers from improvising — because in stateful signatures, a misconfigured parameter does not cost a little performance, it raises the risk of state exhaustion or reuse. The other side of the ledger is key generation: building a tall tree requires generating every leaf key, and key generation for large tree heights can take minutes, which shapes the production-line design of factory provisioning.
Current State and Open Questions
Taking stock: stateful hash-based signatures have entered compliant deployment in low-frequency, high-value scenarios such as firmware and code signing; their standards, reference implementations and hardware support are all in place. But in large-scale distributed signing services, most organisations still regard them as a high-risk option.
Open questions concentrate at the systems-engineering level of state: there is still no standard solution for cross-data-centre state consistency protocols; unified planning tools for matching hardware monotonic counter lifetimes against tree heights are lacking; and should a state-reuse incident occur, post-hoc detection and key-rotation emergency procedures remain blank in most organisations. The mathematics of hash-based signatures has long ceased to be the problem; the problem remains people, backups and virtual machines — the long-term assignment this line leaves to engineering.
Tags: Hash-Based SignaturesXMSSLMSSpecial Report