XMSS: Stateful Hash-Based Signatures
XMSS (the eXtended Merkle Signature Scheme), specified in RFC 8391, is the stateful hash-based signature scheme: WOTS+ one-time signatures at the leaves of a Merkle tree, with a persisted counter tracking which leaf comes next. NIST endorses XMSS and LMS in SP 800-208 for firmware signing and other constrained, single-signer uses.
How it works
An XMSS key pair spans 2^h WOTS+ one-time key pairs (h is the tree height, typically 10 to 20). Each message is signed with the next unused leaf, and the signature includes that leaf’s WOTS+ signature plus the Merkle authentication path that certifies it against the root, which anchors the public key.
The signature sizes stay small: a WOTS+ signature (~2.1 KB) plus an authentication path of h hashes. For h = 16, a signature is roughly 2.7 KB with a 64-byte public key (the Merkle root plus a seed). Multi-tree variants (XMSS^MT) stack several layers to get up to billions of signatures with slightly larger signatures.
The state discipline
XMSS is stateful: the signer must persist the one-time leaf counter and never reuse a leaf. Signing two different messages with the same leaf reveals enough chain values for an attacker to forge signatures from it. This is the scheme’s defining operational property:
- The counter must live in non-volatile, tamper-resistant storage (an HSM is the standard home).
- A rollback of the state, a restored backup, or a cloned device leads directly to key compromise.
- Tree height limits the total number of signatures forever.
SLH-DSA (SPHINCS+) is the stateless answer to this: pseudo-random leaf selection removes the counter at the cost of much larger signatures.
Where it fits
- The Quantum Resistant Ledger has used XMSS signatures since its 2018 launch, the longest-running blockchain deployment of XMSS.
- Firmware and secure boot chains use XMSS/LMS where a single authoritative signer, low signature volume, and strict state control make the statefulness manageable.
- NIST SP 800-208 endorses it for exactly these patterns, with explicit warnings about state management.
XMSS is not a natural fit for multi-device wallets or blockchains where many clients sign concurrently without shared state. For those, the stateless schemes win despite their sizes.
Related
- WOTS+ (Winternitz One-Time Signatures): the one-time scheme at XMSS’s leaves
- SLH-DSA (SPHINCS+): the stateless hash-based alternative
- Post-Quantum Solutions for Blockchains and Cryptocurrencies