← Back to section · Education & Knowledge Base
Hash-Based Signatures Entry: The Signature Family That Depends Only on Hash Functions
Hash-based signatures are a family of signature schemes rooted solely in hash functions, from Lamport one-time signatures and Merkle trees to the stateful XMSS/LMS and the stateless SLH-DSA. This entry covers the family's lineage, mechanisms, the state problem, and common points of confusion.
Hash-based signatures are a class of digital signature schemes whose security is rooted solely in hash functions. Their history is nearly as long as public-key cryptography itself: when Lamport proposed one-time signatures in 1979, RSA had only just appeared. Over the following four decades the family evolved around one core question — how to sign many times safely — and in the post-quantum era it has become the irreplaceable conservative route in the standard suite: while every other scheme’s security depends on some algebraic problem, hash-based signatures need only the hash function to hold.
The Starting Point: One-Time Signatures and Merkle Trees
Lamport’s one-time signature idea is extremely simple: for each bit of the message, pre-generate a pair of secret values and publish their hashes; to sign, reveal the secret corresponding to each message bit, and the verifier checks the hashes. Its security is transparent — a forger must find a preimage of some hash value. But it can safely sign only once. Merkle trees contribute the scaling mechanism: organize a vast number of one-time keys into a hash tree, where each leaf is a one-time public key, hashed layer by layer up to a single root that serves as the overall public key; a signature includes the authentication path for its leaf. The taller the tree, the more signatures it supports — the basic scaling mechanism of the whole family.
The Stateful Route: XMSS and LMS
Turning Merkle trees into deployable standards yields XMSS (RFC 8391) and LMS (RFC 8554): internally they use Winternitz one-time signatures (WOTS+) to compress sizes, and multi-layer trees (hypertrees) push the number of signatures to astronomical levels. The cost is “state”: each one-time key may be used only once, and the signer must reliably record which positions have been used. This sounds simple but is one of the most dangerous operational requirements in cryptographic engineering — virtual machine snapshot rollbacks, hot-standby synchronization failures, and backup restorations can all rewind the counter, causing the same one-time key to be used twice and collapsing security. In SP 800-208, NIST approved stateful schemes for controlled environments such as firmware signing, with strict rules on state management.
The Stateless Route: From SPHINCS to SLH-DSA
The way to eliminate state is to let the signing process itself randomly decide which one-time key to use, while driving collision probability to negligible: SPHINCS (2015) and SPHINCS+ use the few-time signature FORS to sign messages, with a hypertree certifying FORS public keys layer by layer. Because the space of selectable keys is enormous, random selection almost never repeats, and the signer maintains no state at all. In 2024, SPHINCS+ became FIPS 205 under the name SLH-DSA. Statelessness is not free: signatures swell to thousands or tens of thousands of bytes, and signing is slower than both stateful schemes and lattice signatures — the explicit price paid for operational safety.
Why This Route Is the Most “Stable”
The temporal robustness of hash-based signatures comes from two facts. First, the properties it relies on (preimage resistance, second-preimage resistance) are among the most basic assumptions in cryptography, attacked for half a century and still standing, and tied to no particular mathematical structure. Second, the best generic quantum attack on hash functions is Grover search, whose speedup is only quadratic: lengthening the hash output from 256 bits restores the security margin. By contrast, while routes such as lattices and codes are also believed to resist quantum attacks, their hardness records are all much younger than that of hash functions. For this reason, migration guides in many countries generally list hash-based signatures as the first choice for long-term trust roots.
Engineering Properties: Size, Speed, and Parameter Trade-Offs
The engineering parameters of hash-based family members differ greatly, and selection should look at three trade-offs. First, signature count versus signature size: the taller the Merkle tree, the more signatures it doubles — but the authentication path grows and so does the signature; multi-layer tree structures (hypertrees) trade verification time for a nearly unlimited count. Second, the internal parameters of one-time signatures: WOTS+ uses hash chains to compress many secret values into one public key, and the chain-length parameter fixes the exact balance point between signature size and computation. Third, key generation cost: generating a large tree for a stateful scheme requires computing enormous numbers of hashes, and in practice lazy strategies that generate leaves on demand are common. Compared with lattice signatures, hash-based signatures have extremely short public and private keys (usually only a few dozen bytes — the private key is essentially a seed), a major advantage on storage-constrained devices; signature size (a few kilobytes stateful, up to tens of thousands of bytes stateless) and signing speed are the main weaknesses. Mapping these three trade-offs onto the concrete scenario — how many signatures, on what device, and where signatures will be stored — is the whole substance of hash-based signature selection.
Where It Fits and Where It Does Not
The applicability boundary of hash-based signatures is set by their structure. They best fit scenarios with a limited number of signatures, high value per signature, and many verifiers: firmware and software releases, root certificates and timestamps, and long-term judicial and archival attestation are textbook fits. They do not fit high-frequency online signing: TLS handshakes involve thousands of signatures per second, where hash-based signature size and speed both become bottlenecks — that is ML-DSA’s territory. Nor do they natively support advanced features such as threshold or aggregate signatures — tree structures are far less compatible with such constructions than algebraic signatures. Real systems are therefore almost always mixed: lattice signatures for online channels, hash-based signatures for offline trust roots, the two routes divided by scenario. Seeing this boundary clearly avoids the pseudo-question of “which route wins overall” in selection debates.
Points of Confusion
First, hash-based signatures are not shorthand for “signing with a hash”: the textbook shorthand of “hash the message and encrypt with the private key” as a rough metaphor for RSA signatures has nothing to do with this entry’s Merkle tree constructions. Second, the difference between stateful and stateless is not a performance footnote but a deployment red line: choosing XMSS/LMS in a system that cannot guarantee state monotonicity is a selection accident. Third, the signature count limit is a hard constraint fixed by tree height; when the count is exhausted the key is dead, so selection must budget for business volume. Fourth, hash-based signatures have tiny public keys (a few dozen bytes) but large signatures — exactly the opposite of lattice signatures — so the two routes’ pain points in protocol adaptation are entirely different.
In the encyclopedia’s entry network, this entry is the parent family entry for SLH-DSA and interlinks with application entries such as firmware signing and long-term archiving, forming the most assumption-conservative pole of the PQC signature landscape.
Tags: Hash-Based SignaturesXMSSMerkle TreesSLH-DSA