← Back to section · Post-Quantum Cryptography

The Hypertree: How SLH-DSA Stacks Many Hash Trees into One

A single Merkle tree cannot hold enough one-time keys, so SLH-DSA layers them: leaves of an upper tree sign the roots of trees below. This article unpacks the hypertree, seed derivation, and the layer-by-layer authentication path of one signature.

Published 22 November 2026 · 5 min read · PQ Frontier

The Hypertree: How SLH-DSA Stacks Many Hash Trees into One
AI-generated site artwork
Video explainer · SLH-DSA: hash-tree signatures

SLH-DSA builds its signing power from a plain combination: one-time signatures (WOTS+) provide an atom that is unconditionally safe for a single use, and Merkle trees compress many one-time public keys into one root. But gluing the two together directly runs into a scaling wall — the hypertree is the layered structure designed to dismantle that wall, and it is the key to every trade-off SLH-DSA makes.

Why one tree is not enough

Suppose one key must sign many messages without maintaining state. That takes an enormous number of one-time keys: the total leaf count must be so large that even random selection almost never repeats. Put them all in a single Merkle tree and the tree must be dozens of levels tall, with 2-to-the-dozens leaves. The problem is key generation: producing the root means generating every leaf, and the work grows exponentially with the leaf count — a tree big enough to hold enough leaves can never actually be “grown”. Even if it could, the authentication path in each signature would climb the full height, and path length and one-time signature size would both blow up. A single tree binds capacity, generation cost, and signature size to one and the same height.

Layering: trees that sign trees

The hypertree replaces “one tall tree” with “a stack of short trees”. The whole structure is divided into d layers, each layer an XMSS subtree of modest height. Adjacent layers are related not by parent-child nodes but by signatures: every leaf of an upper subtree is a WOTS+ key pair whose public key forms that leaf, and what it signs is the root of one subtree in the layer below. Leaves of the bottom layer, in turn, sign the public key of FORS — the component that directly handles the message digest.

Total capacity is still the product of the layers’ leaf counts, so the addressable leaf space at the bottom remains on the order of 2 raised to several dozen. But each individual subtree is short, and the cost of generating one depends only on its own height. Key generation only has to actually build the topmost subtree and compute its root — that root becomes part of the public key (PK.root). All other subtrees are generated on demand during signing and discarded afterwards.

Seeds: everything can be rebuilt on demand

Layering works because of deterministic derivation. An SLH-DSA private key is essentially a few random seeds: SK.seed and PK.seed jointly determine every WOTS+ leaf and every node of every subtree. Given the seeds and an “address” — a structured index describing layer, tree, and leaf position — any key material or tree node can be recomputed; no tree ever needs to be stored. Addresses also provide domain separation: hash invocations for different purposes (leaf generation, node merging, message hashing, and so on) are kept apart by a type field in the address, preventing cross-purpose collision tricks.

This resolves an apparent paradox: public keys of 32–64 bytes and private keys of 64–128 bytes that somehow “contain” an astronomical number of one-time keys. The key does not store the trees — it stores the seeds the trees grow from.

How one signature walks the hypertree

When signing, the message digest determines two coordinates: which FORS leaf set handles the digest (via a FORS signature), and which leaf of which bottom-layer subtree signs the FORS public key. Authentication then relays upward. A WOTS+ leaf in layer 0 signs the FORS public key, and the signature carries that leaf’s authentication path within the layer-0 subtree, so the verifier can compute the layer-0 root. The corresponding leaf in layer 1 signs exactly that layer-0 root, again with its path — and so on, relay-style, until the computed value matches PK.root in the public key.

A hypertree signature is therefore d bundles of (WOTS+ signature + authentication path). The more layers d, the shorter each path but the more bundles and the more WOTS+ signatures — signature size and signing time are dominated by this product. The s/f parameter split in FIPS 205 is, at heart, different ways of cutting the hypertree’s layer count against subtree height: the s variants use fewer layers to shrink signatures, at the price of taller subtrees that signing must rebuild on the spot, hence slower signing; the f variants do the opposite. It also explains why SLH-DSA signing is markedly slower than verification: verification only hashes along given paths, while signing must first regrow the involved subtrees from seed.

Layers versus height: a multiplication problem

The hypertree’s parameters reduce to one multiplication: with total height h split into d layers, each subtree has height h/d, and the total number of addressable bottom leaves is 2 to the power h — capacity depends only on the product h, not on how it is split. Cost, however, depends entirely on the split. A larger d makes each subtree shorter, so rebuilding any one subtree during signing is cheaper — but the number of WOTS+ signatures a signature must carry equals d, and more of them means a larger signature. A smaller d reverses everything: fewer WOTS+ components, but taller subtrees whose leaves and nodes multiply the rebuilding work, so signing slows down.

Key generation touches only the top subtree’s cost, which also shifts with the split, but as a one-time expense it rarely decides anything. What truly sets the s/f character is where this multiplication lands between “signature size” and “signing time”: the s sets choose small d and accept slowness; the f sets choose large d and accept bulk. Each s/f pair among the twelve FIPS 205 parameter sets is two different answers to the same multiplication problem. For engineering selection there is no need to memorize numbers, only directions: for smaller signatures reduce the layers, for faster signing increase them — while total capacity is identical either way. That is the elegance of layering: it turns two things that could not be had at once into a knob that slides.

With the hypertree understood, the SLH-DSA picture is complete: layering decouples capacity from per-signature cost, seed derivation compresses storage to the limit, and the price — rebuilding several subtrees for every signature — is a bargain in any setting where signing is infrequent.

Sources and further reading

  • NIST, FIPS 205: Stateless Hash-Based Digital Signature Standard, 2024. https://doi.org/10.6028/NIST.FIPS.205
  • Bernstein et al., SPHINCS+ Specification (design notes on the hypertree and address structure). https://sphincs.org/
  • On this site: “SLH-DSA: The Conservative, Hash-Only Signature (FIPS 205)”

Tags: SLH-DSAhypertreeXMSSMerkle tree