XMSS

Also known as: eXtended Merkle Signature Scheme

On this page 7

XMSS, the eXtended Merkle Signature Scheme, is a stateful hash-based digital signature scheme that builds many one-time signature keys into a Merkle tree and signs each message with a fresh leaf. In quantum security, XMSS is valued because its security rests only on the properties of a hash function, which quantum computers weaken but do not break, unlike RSA and elliptic curve signatures that fall to Shor’s algorithm.

XMSS is specified in RFC 8391 and approved for government use in NIST SP 800-208 together with its multi-tree variant XMSS^MT and the related LMS scheme. Its defining constraint is state management: the signer must never use the same leaf twice.

How XMSS builds signatures from a Merkle tree

XMSS starts from a one-time signature scheme called WOTS+, the Winternitz one-time signature with improvements. A WOTS+ key pair consists of short hash chains; signing a message reveals an intermediate point on each chain, and verifying completes the chains to the public key. Such a key is safe for exactly one message.

To sign many messages, XMSS generates 2^h WOTS+ key pairs, where h is the tree height, and hashes their public keys into the leaves of a binary Merkle tree. The root of the tree is the XMSS public key. A signature contains the leaf index, the WOTS+ signature and the authentication path, the h sibling hashes needed to recompute the root.

The verifier recomputes the WOTS+ public key from the signature, climbs the tree with the authentication path and compares the result with the stored root. The table below names the main components of the scheme.

ComponentRoleSize or count
WOTS+ key pairSigns a single message digest67 hash values for 256-bit security
Merkle treeBinds all one-time keys to one root2^h leaves
Root (public key)Long-term verification key32-byte root plus 32-byte seed
Authentication pathProves a leaf belongs to the treeh hash values
Leaf index (state)Records the next unused keyMust only move forward
Components of an XMSS signature system

Parameter sets and performance

The tree height fixes the maximum number of signatures for a key pair and drives key generation cost, because the signer must compute every leaf to obtain the root. Signature size grows only linearly with h, so even large trees keep signatures below 3 KB for single-tree XMSS with SHA-256.

Parameter setSignatures per keySignature size
XMSS-SHA2_10_2561,024About 2.5 KB
XMSS-SHA2_16_25665,536About 2.7 KB
XMSS-SHA2_20_256About 1 millionAbout 2.8 KB
Typical XMSS parameter sets with SHA-256 and n = 32

XMSS^MT stacks several smaller trees in layers, so that upper trees sign the roots of lower trees. This makes key generation practical for very large signature budgets such as 2^40 or 2^60 signatures, at the cost of signatures that contain several WOTS+ signatures and authentication paths and therefore grow to roughly 5 to 30 KB.

Public keys remain tiny, about 64 bytes, and verification is fast because it needs only a few thousand hash calls. Signing is also efficient when the implementation caches tree nodes with traversal algorithms such as the BDS algorithm.

XMSS compared with other post-quantum signatures

XMSS belongs to the family of hash-based signatures, which also includes LMS and the stateless SLH-DSA. Lattice schemes such as ML-DSA and FN-DSA rely on different assumptions. The table compares the options most often considered in quantum-safe migration.

SchemeBasisState requiredTypical signature size
XMSSHash functionsYesAbout 2.5-2.8 KB
LMSHash functionsYesAbout 1.5-5 KB
SLH-DSAHash functionsNoAbout 8-50 KB
ML-DSAModule latticesNoAbout 2.4-4.6 KB
XMSS and related post-quantum signature schemes

Against LMS, XMSS offers a tighter security proof and slightly smaller signatures for some parameters, while LMS is simpler to implement and has seen wider hardware adoption. Against SLH-DSA, XMSS trades statelessness for much smaller signatures. The conservative security assumption of hash-based schemes is their main advantage over lattice signatures.

Where XMSS is used and how to deploy it

Stateful hash-based signatures fit situations with a small number of signatures, a long verification lifetime and a tightly controlled signer. The most common case is firmware and software signing, where a vendor signs a few thousand releases over a decade and devices must verify them long after quantum computers might appear. CNSA 2.0 in the United States requires LMS or XMSS for this purpose.

NIST SP 800-208 requires that key generation and signing happen in hardware cryptographic modules, and that private keys are not exported in a way that could duplicate state. The decision table below summarizes when XMSS is a good choice.

SituationRecommendationReason
Firmware signing in a hardware moduleUse XMSS or LMSFew signatures and strict state control
High-volume TLS server signingPrefer ML-DSAState handling across servers is risky
Distributed or cloud signersPrefer SLH-DSA or ML-DSANo shared state to synchronize
Very large signature budgetUse XMSS^MTFast key generation with layered trees
Deciding whether to use XMSS

State management risks and common mistakes

The defining weakness of XMSS is that reusing a one-time key breaks security. If two different messages are signed with the same WOTS+ leaf, an attacker can combine the revealed chain values and forge signatures for other messages. State errors are therefore not a performance issue but a direct security failure.

  • Restoring a backup of the private key can roll the leaf index back and cause reuse.
  • Cloning a virtual machine that holds the key duplicates the state silently.
  • Writing the signature before saving the new index risks reuse after a crash; the index must be updated first.
  • Running out of leaves ends the key pair, so the signature budget must be planned with a safety margin.

Careful implementations reserve blocks of indices in advance, store state in nonvolatile memory with atomic updates and monitor the remaining signature count, which keeps XMSS safe in practice.

A plain-language summary

XMSS is a way to sign digital files that quantum computers cannot break. It relies only on hash functions, a very well studied building block.

Imagine a book of single-use signature stamps. Each stamp may be used only once. The signer must always know which stamp comes next. Using the same stamp twice lets a forger copy the signature. That is why XMSS suits careful signers who sign rarely.

An example from practice

A manufacturer of industrial control units must ship devices that verify firmware updates for 20 years. Because the devices may still be in service when large quantum computers exist, the security team replaces RSA firmware signatures with XMSS and embeds the 64-byte public key in the device boot ROM.

The team estimates about 4,000 releases across all product lines over the lifetime of the key and selects a tree height of 16, which allows 65,536 signatures. The private key lives in a hardware security module that advances the leaf index before releasing each signature and refuses backups that could roll the state back. Each firmware image gains about 2.7 KB of signature data, and the boot loader verifies it in a few milliseconds. The result is a quantum-resistant update chain with a large safety margin and no reliance on new mathematical assumptions.