← Back to section · Post-Quantum Cryptography

Anatomy of an SLH-DSA Signature: What a Message Goes Through on Its Way to Tens of Kilobytes

Follow one message through the whole SLH-DSA pipeline: the four seed components of the key, how the randomized digest yields both the FORS input and the tree indices, the FORS-to-hypertree relay, and how verification re-derives the public root — plus where every chunk of the signature's size is spent.

Published 22 November 2026 · 5 min read · PQ Frontier

Anatomy of an SLH-DSA Signature: What a Message Goes Through on Its Way to Tens of Kilobytes
AI-generated site artwork
Video explainer · SLH-DSA: hash-tree signatures

Earlier articles in this series took SLH-DSA’s components apart one by one: WOTS+ hash chains, the FORS forest, the layered hypertree. This one puts them back into a single machine and follows one message from key generation all the way to a finished verification — locating each component in the real signing flow, and answering the perennial question along the way: what exactly makes up a signature of tens of kilobytes?

The starting point: four seeds are the whole key

An SLH-DSA key is remarkably “empty”. The private key holds two secret seeds among four n-byte components: SK.seed drives the derivation of every WOTS+ secret value and every FORS leaf secret, and SK.prf exists solely to generate the randomizer during signing. The public key holds PK.seed and PK.root: a public derivation seed, and the root of the hypertree’s topmost subtree.

Key generation does exactly one piece of real work: starting from the seeds, it builds the topmost XMSS subtree in full and takes its root as PK.root. Every other subtree and leaf is absent at generation time — they are rebuilt on demand at the signing site, from seeds and addresses. That is why SLH-DSA key generation is fast and keys are small while signing is slow: the cost did not vanish, it moved from generation time to signing time.

Step one: randomization and the keyed digest

Signing opens with a pseudorandom function evaluation of the message under SK.prf (optionally mixed with external randomness), producing a randomizer R that will be published as part of the signature. It serves two purposes: two signatures on the same message land on different leaf positions, spreading the indices; and the digest computation depends on R, so an attacker cannot mount large-scale precomputation against a fixed digest in advance.

Next, a keyed hash over the message — keyed with R, PK.seed, and PK.root — produces output that is split into three parts: one part is the message digest handed to FORS, one selects which bottom-layer subtree of the hypertree to use, and one selects which leaf within that subtree. Note the design decision in this step: where to sign is determined not by a counter but jointly by message and key — this is the origin of statelessness. Anyone holding key and message can recompute the indices, yet nobody knows in advance where the next message will land.

Step two: FORS signs the digest, the hypertree signs FORS

With the digest in hand, FORS moves first: the digest segment is split into k indices, and each small FORS tree reveals, per its index, one leaf’s secret value and authentication path. Together these let a verifier later recompute the FORS public key — but at this moment it is only an intermediate value that still needs authentication.

The hypertree takes over the relay. The chosen leaf of the chosen bottom subtree (a WOTS+ key pair) signs that FORS public key and provides the leaf’s authentication path within its subtree, from which the subtree root can be computed; the corresponding leaf of the layer above signs that root, with its path — and so on, layer by layer, up to the root of the top subtree. The final signature is assembled from three parts: the randomizer R, the FORS signature (k secret values with their paths), and the hypertree signature (d WOTS+ signatures with their paths).

Verification: derive backward, rebuild nothing

Verification mirrors signing at a fraction of the cost. The verifier recomputes the digest and indices from the R in the signature and the public key; from the FORS signature’s secret values and paths it recomputes each tree root and hashes them into the FORS public key; then it climbs the hypertree with the hypertree signature — each layer’s WOTS+ signature yields a leaf, each path yields a subtree root — until the computed top root is compared byte for byte against PK.root in the public key. Equal means valid; anything else is rejected.

The crux is that verification never “grows” a tree: it hashes only where the paths lead, a small number of hashes per step. This explains SLH-DSA’s speed profile — verification is typically a matter of milliseconds, while signing must first regrow the involved subtrees from seed and is markedly slower under the s parameter sets. Making verification cheap and leaving the cost on the infrequent signing side is a deliberate allocation built into the structure.

Sign the same message twice, and what do you get?

A natural question: sign the same message twice with the same key — are the two signatures identical? Under the default FIPS 205 flow, no: the randomizer R comes from a randomness source at signing time, so the two runs derive different digests and indices, land on different FORS and hypertree leaves, and the signatures differ throughout. This randomization is not cosmetic: it keeps the index distribution unpredictable to attackers and sidesteps some known risks that deterministic signing faces under fault-injection and similar side-channel conditions.

The standard also keeps a second route open: replace the randomness source with a value deterministically derived from the message under SK.prf (often called hedged signing). Signatures on the same message then become reproducible — convenient for testing and audit — while the derivation, holding a secret seed, still keeps the indices unpredictable to attackers. The two modes are equivalent in the security argument; the choice turns on how much the deployment trusts its randomness source: use randomization where the source is sound, and the derived, hedged mode where it is suspect — insufficient entropy at cold boot in embedded devices is the classic case. This detail is itself a mark of SLH-DSA’s engineering maturity: it pre-answers even “what if the randomness at the signing site cannot be trusted?”

Where the bytes go

Finally, the size question. The bulk of an SLH-DSA signature is two kinds of “paths and chains”: FORS’s k bundles (secret value plus authentication path), and, in the hypertree, one full WOTS+ signature per layer — each WOTS+ signature is itself a set of dozens of hash-chain intermediate values, the single largest component. The more layers d, the more times that large component appears, which is exactly why f-set signatures are so much bigger than s-set ones; and the larger n, the fatter every component, which is why level-256 signatures are the fattest of all. Seen through its composition, the signature’s size is not waste: it is the unavoidable price of carrying the existence proofs of many trees along with it. The verifier holds only a 32–64-byte public key — every other proof has to travel inside the signature itself.

Sources and further reading

  • NIST, FIPS 205: Stateless Hash-Based Digital Signature Standard, 2024 (Chapters 9–10: key generation, signing, and verification algorithms). https://doi.org/10.6028/NIST.FIPS.205
  • Bernstein et al., SPHINCS+ Specification. https://sphincs.org/
  • On this site: “FORS: The One-Time Signature You May Use a Few Times”; “The Hypertree: How SLH-DSA Stacks Many Hash Trees into One”

Tags: SLH-DSAsigning processFIPS 205verification