Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

How does SLH-DSA sign using only hashes?

To prove later that you know a value, you can publish its hash first and reveal the original value when asked. The verifier only needs to compute the hash once. After you reveal the value, anyone can present it. SPHINCS+, the predecessor of SLH-DSA, combines many small signatures with limited uses so that a verifier can check them all with one public key. FIPS 205

Combining four leaves into one root

Consider a tree with leaves A, B, C, and D in that order. Hash adjacent leaves in pairs to form their parents. The left parent is H(A || B) and the right parent is H(C || D). Hash the two parents together to get the root. To show that B belongs to the tree for a published root, send A and the right parent along with B. The verifier can then recompute the root. Those sibling values form the authentication path. Even as the tree grows, the path carries just one value per level.

ComponentWhat the signature containsWhat the verifier obtains
FORS (several small trees)Secret values for the leaves selected by the message digest and the authentication path for each leafA FORS public key derived from the roots of those trees
WOTS+ (a signature based on hash chains)An intermediate value from each chain, selected by a digit of the value being signed or of its checksumA WOTS+ public key derived by advancing each chain to its endpoint
Hypertree (layers of XMSS trees)A WOTS+ signature and authentication path at each layerThe bottom layer authenticates the FORS public key. Each higher layer authenticates the root directly below it until the verifier reaches the top root.

WOTS+ chains rely on hashes being easy to compute in one direction and hard to reverse. For a chain with 15 steps, if the signature contains the value at step 6, the verifier applies 9 more steps to reach the endpoint. The verification includes checksum chains, which make it hard to adapt a signature to different content by advancing only some of the chains. The hash inputs also include addresses that distinguish positions in the trees and other parts of the computation.

Why the signer can work without a record of used leaves

The signature includes a per-message value R. In pure SLH-DSA, the message is formatted with its context under FIPS 205 §10.2.1. The signer computes a digest from R, the public key, and that formatted message. R is transmitted so the verifier can reconstruct the same digest. Bits of the digest select the FORS leaves and a position in the hypertree. The signer can regenerate the required secret values from a secret seed and their positions, avoiding the need to store entire trees or a record of used leaf indices. The tree sizes and other parameters account for the possibility that positions will repeat. Verification ends by checking the reconstructed root against the root in the trusted public key.

SLH-DSA signature generation and verification

FORS, WOTS+, and XMSS hashes use the public seed and an address that identifies the operation and its position.

  1. Signer · Generate RApply PRFmsg to the secret SK.prf, fresh randomness (public seed for deterministic signing), and the message formatted with its context.
  2. Compute the digest and select positionsHash R, the public seed and root, and the formatted message with Hmsg to select the FORS leaves and the hypertree position.
  3. Create the FORS signatureRecord the selected leaf secrets derived from the secret seed and their authentication paths. Compute the FORS public key.
  4. Create the hypertree signatureSign the FORS public key at the bottom layer and the root below at each higher layer. Include a WOTS+ signature and an authentication path per layer.
  5. Assemble the signatureR || FORS signature || hypertree signature
  6. Verifier · Message and contextFormat the message for pure SLH-DSA.
    Verifier · Received signatureReject a signature of the wrong length. Otherwise read R, the FORS signature, and the hypertree signature.
  7. Recompute the digestHash R, the trusted public key’s seed and root, and the formatted message with Hmsg.
  8. FORS leaf indicesUse the first part of the digest to select one leaf in each FORS tree.
    Hypertree positionRead the tree and leaf indices from the rest of the digest to locate the bottom XMSS leaf and the associated FORS trees.
  9. Reconstruct the selected FORS leavesHash the leaf secrets carried in the FORS signature.
  10. Rebuild each FORS rootAt each level, the low bit of the node index puts the node first (0) or its path sibling first (1) in the hash input.
  11. Derive the FORS public keyHash the FORS roots together. Use the resulting key as the bottom layer’s WOTS+ input.
  12. Complete the layer’s WOTS+ hash chainsUse the digits of the current input and its checksum to advance the signature values to their endpoints.
  13. XMSS leafHash the WOTS+ endpoints into the public key for this leaf.
    XMSS authentication pathTake one sibling per level from this layer’s signature.
  14. Rebuild the XMSS rootStart at the leaf. At each level, the low bit of the node index determines the left and right inputs to the hash.
  15. Move up the hypertreeAt each higher position, repeat WOTS+ recovery and path hashing with the root from the layer below as the new WOTS+ input.
  16. Compare the top rootAccept if the reconstructed root equals the root in the trusted public key. Otherwise reject.

QuantAegis’s SHAKE parameter sets vary in how they allocate tree height across layers, even at the same security level. The s variants prioritize smaller signatures, while the f variants prioritize faster signing. The sizes in the usage table reflect how many chain values and authentication path nodes appear in each signature. Supported parameter sets and usage · FIPS 205 §11, Table 2