Back to DashboardSoftware InfrastructureFoundationsadvanced45 min

SLH-DSA: Stateless Hash Signatures (FIPS 205)

Master FIPS 205 SLH-DSA — stateless hash-based signatures with no state management burden. Covers WOTS+, FORS, hypertree architecture, parameter trade-offs, context strings, and deterministic signing.

Why this matters: SLH-DSA trades signature size for security that rests only on hash-function properties (BSI TR-02102-1 section 5.3.4; FIPS 205 section 1.1), with no number-theoretic assumption to second-guess — which matters when the whole point of PQC is not trusting today's assumptions.

Start here: Turn on Live WASM mode, pick one of the 12 FIPS 205 parameter sets, then Generate Key Pair, Sign Message and Verify Signature: public key, signature and verdict come from a real in-browser HSM.

For your role

Developer / Engineer
Generate SLH-DSA key pairs across all twelve FIPS 205 parameter sets, sign in Pure and HashSLH-DSA modes, explore context strings and deterministic signing, and compare LMS, XMSS and SLH-DSA side by side.
Security Architect
The parameter explorer shows the size-versus-speed trade-off across the twelve sets, and the LMS/XMSS/SLH-DSA comparison says when a stateless scheme is worth its signature size.
Researcher / Academic
FIPS 205 §9.2 context strings for domain separation and the deterministic mode are explored directly; the Algorithm checks area replays eight published NIST ACVP sigVer cases, valid and invalid, through the in-browser engine, and keeps the sign-and-verify rows apart as functional round trips, not known-answer tests.
Certification & Validation Engineer
Generate keys across all twelve FIPS 205 parameter sets and sign in Pure and HashSLH-DSA modes, then run the NIST sigVer sample under Algorithm checks (in Workshop Step 1, use Go to Algorithm checks): eight published ACVP cases that the engine must accept or reject exactly as NIST expects (the sign-and-verify rows there are functional round trips, not known-answer tests). Parameter set, interface, pure or pre-hash and deterministic mode are what an algorithm test has to name; the HashSLH-DSA Modes Learn step, What the lab tests, lists them with the IG 10.3.A self-tests and the CNSA 2.0 position.
Practice in the Simulation

What is SLH-DSA?

SLH-DSA (Stateless Hash-Based Digital Signature Algorithm) is the NIST-standardized post-quantum signature scheme published as FIPS 205 in August 2024. It is the standardized form of SPHINCS+, the hash-based signature scheme selected by NIST in Round 3 of the PQC competition.

FIPS 205 §1: its security “relies on the presumed difficulty of finding preimages for hash functions as well as several related properties of the same hash functions” — no new hardness assumptions beyond what we already rely on for HMAC and TLS.

Stateless vs Stateful: The Key Difference

Stateful (LMS / XMSS)
  • Each signing operation consumes a one-time key leaf
  • Signing state (leaf index) must be persisted and never reused
  • Key exhaustion = catastrophic failure (no more valid signatures)
  • Cannot be used in stateless or distributed environments safely
  • Approved in NIST SP 800-208; specified in RFC 8554 (LMS) and RFC 8391 (XMSS), both Informational RFCs
Stateless (SLH-DSA)
  • No per-key leaf counter; this does not mean unlimited signatures
  • No persistent state to manage, back up, or synchronize
  • Safe for serverless, distributed, and HSM-pooled environments
  • Hedged (randomized) signing is the default, recommended where side-channel attacks are a concern (§9.2)
  • Standardized in FIPS 205 (Aug 2024)

For the 12 parameter sets in FIPS 205 §11, the security claims assume at most 2^64 messages signed with one key pair. This is a limit assumed by the security analysis, not a leaf counter that must be saved after every signature as in LMS or XMSS. It does not predict an immediate failure on the next signature beyond that limit. Keep planned use within this bound. For scale, even one billion signatures per second with the same key would take about 585 years to reach 2^64.

Technical enforcement is a separate challenge: a counter on one HSM does not account for signatures made by other copies of the same key. An exact cutoff would need coordinated accounting across devices and protection against resetting the count through backup restore or rollback. This lesson does not establish that an HSM counts these signatures or enforces a cutoff. A practical planning approach is to bound total signing volume across all key copies over the key lifetime and keep it far below the analysis limit. This is not a recommendation to add an LMS/XMSS-style per-signature counter to SLH-DSA.

Practical example: organizational controls

  • Set a maximum signing-key lifetime and rotate keys on schedule.
  • Record where each key is deployed, including copies and backups.
  • Estimate total signing volume across all deployments over that lifetime, with a generous safety margin. Revisit the estimate when volume or deployments change.
  • Preserve the original key's retirement date when restoring a backup: restoring the same key does not start a new usage lifetime.

These controls support a documented estimate that expected use stays far below the analysis bound. They do not enforce an exact signature count. This is a practical planning example, not a claim that FIPS 205 prescribes this checklist or that it alone establishes certification compliance.

The tradeoff: SLH-DSA signatures are significantly larger (7,856 to 49,856 bytes, FIPS 205 Table 2, against about 0.8 to 9 KB for LMS across the SP 800-208 parameter sets, by the RFC 8554 byte layout) and signing is slower due to the hypertree traversal. Whether the stateless design is worth that cost depends on the deployment: a signing key that is used from several places, or restored from a backup, makes a leaf counter hard to keep safe. The three lists below are planning heuristics drawn from the sizes and speeds above, not requirements of FIPS 205 or of any policy.

Deployment Context

Where the trade-offs are usually acceptable
  • Code signing
  • Certificate issuance
  • Firmware attestation
  • Long-lived root CAs
  • Low-frequency signing
Consider carefully
  • High-throughput APIs (signing speed)
  • Bandwidth-constrained channels (sig size)
  • TLS handshakes (latency)
Where ML-DSA is usually the better match
  • Real-time signing (e.g. TLS)
  • IoT with tiny payloads
  • Interactive protocols requiring small sigs

National security systems: this list does not apply. NSA's CNSA 2.0 FAQ (version 2.2, October 2026) says SLH-DSA “is not part of CNSA and is not approved for any use in NSS”. See “What the lab tests” in the HashSLH-DSA Modes step.

FIPS 205 §§5–8: The Three Building Blocks

SLH-DSA stacks three primitives. Understanding them explains why signatures are large, why some parameter sets are slow, and what's actually inside a 7,856-byte signature.

1

WOTS+ — Winternitz One-Time Signature (§5)

WOTS+ signs a single n-byte hash value by representing it as a sequence of base-w digits and computing a hash chain of length up to w for each digit. The signer walks down the chain (easy); the verifier walks up (also easy); forging requires inverting the hash (infeasible).

sk_i → H(sk_i) → H²(sk_i) → … → H^(w−1)(sk_i) = pk_i
Sign digit d: output chain[d]. Verify: apply w−1−d more hashes and compare to pk_i.
lg_w = 4 (all FIPS 205 sets)

Winternitz parameter w = 2^lg_w = 16. Each WOTS+ digit is 4 bits. Larger w → fewer chains needed → smaller sig, but each chain is longer → slower.

One-time property

WOTS+ is one-time: each key may sign one message, and forgeries become feasible if a key is used twice (FIPS 205 §6, §8). In the hypertree each WOTS+ key signs one fixed value: a FORS public key at the lowest layer, or an XMSS public key of the layer below (§7).

2

FORS — Forest of Random Subsets (§8)

FORS is a few-time signature scheme. It holds k binary trees each of height a, giving k × 2^a leaf secret values. To sign, the message digest selects one leaf per tree; the signature reveals those leaves plus authentication paths.

k
Number of FORS trees
SHA2-128s: k=14
a
Height of each tree
SHA2-128s: a=12 → 4,096 leaves
k × a
Bits of the message index
14 × 12 = 168 bits

FORS provides few-time security: revealing up to q signatures is safe as long as k and a are chosen so that the probability of a collision in any tree position is negligible. FORS signs the message digest and produces a FORS public key, which is then signed by the hypertree.

3

HT — Hypertree (§7)

The hypertree is a d-layer stack of XMSS trees, each of height h/d. Each layer authenticates the root of the layer below using a WOTS+ signature. The top root (PK.root), together with PK.seed, is the SLH-DSA public key.

PK.root (layer d−1 XMSS root)
↑ signed by WOTS+ at layer d−1
layer d−2 XMSS root
↑ signed by WOTS+ at layer d−2
…
layer 0 XMSS root
↑ signed by WOTS+ at layer 0
FORS public key
↑ signed by FORS
message M
-s variants (small, slow)

Fewer layers (d small, e.g. 7) and taller per-layer trees (h/d large, e.g. 9). Each XMSS tree has more leaves and needs more hash rounds to traverse; fewer layers means fewer WOTS+ signatures, so the total signature is smaller (a hypertree signature is (h + d · len) · n bytes, §7.1).

-f variants (fast, large)

More layers (d large, e.g. 22) and shorter per-layer trees (h/dsmall, e.g. 3). Each XMSS tree is shallow → fast traversal per layer, but the additional WOTS+ signatures for each extra layer add to signature size.

What's Inside a Signature?

A SHA2-128s signature (7,856 B) contains: randomness R (16 B) + FORS signature (k × (a+1) × n B) + HT signature (d × WOTS+_sig + auth_path per layer). The dominant cost is the FORS trees + HT auth paths, all scaled by n (hash output size in bytes).

FIPS 205 §11 — Parameter Sets

FIPS 205 defines 12 parameter sets (6 SHA-2 variants shown, each has a SHAKE counterpart with identical parameters). Every set uses lg_w = 4 (Winternitz parameter w = 16).

  • SHA2-128s
    n
    16
    h
    63
    d
    7
    h/d
    9
    a
    12
    k
    14
    Sig (B)
    7,856
    NIST category
    1
    Note
    Smallest sig
  • SHA2-128f
    n
    16
    h
    66
    d
    22
    h/d
    3
    a
    6
    k
    33
    Sig (B)
    17,088
    NIST category
    1
    Note
    Fastest sign
  • SHA2-192s
    n
    24
    h
    63
    d
    7
    h/d
    9
    a
    14
    k
    17
    Sig (B)
    16,224
    NIST category
    3
    Note
    Smallest sig
  • SHA2-192f
    n
    24
    h
    66
    d
    22
    h/d
    3
    a
    8
    k
    33
    Sig (B)
    35,664
    NIST category
    3
    Note
    Fastest sign
  • SHA2-256s
    n
    32
    h
    64
    d
    8
    h/d
    8
    a
    14
    k
    22
    Sig (B)
    29,792
    NIST category
    5
    Note
    Smallest sig
  • SHA2-256f
    n
    32
    h
    68
    d
    17
    h/d
    4
    a
    9
    k
    35
    Sig (B)
    49,856
    NIST category
    5
    Note
    Fastest sign

SHAKE variants (SHAKE-128s/f, SHAKE-192s/f, SHAKE-256s/f) use identical (n,h,d,a,k) values but replace SHA-2 with SHAKE-256 as the tree hash function.

SHA-2 vs SHAKE — Which to Choose?

SHA-2 variants (SHA2-*)
  • Built from SHA-256, with SHA-512 added for security categories 3 and 5 (FIPS 205 section 11.2)
  • Widest hardware support (existing HSMs, Intel SHA-NI)
  • Good default for most deployments today
SHAKE variants (SHAKE-*)
  • Every function is instantiated with SHAKE256 (FIPS 205 section 11.1)
  • Preferred where SHA-3 is the primary hash primitive
  • Same security category as the matching SHA2 parameter set (FIPS 205 Table 2)

Choosing -s vs -f for Your Use Case

-s (small signature, slower signing)
  • Code signing artifacts (minimize download size)
  • Long-term archival (minimize storage)
  • Root CA certificates (signed infrequently)

Avoid for: High-throughput signing systems

-f (fast signing, larger signature)
  • Intermediate CA operations (moderate frequency)
  • OCSP responders
  • Systems where signing speed matters more than bandwidth

Avoid for: Bandwidth-constrained channels or IoT

Pure SLH-DSA vs HashSLH-DSA (§10.2.1 vs §10.2.2)

Pure SLH-DSA (CKM_SLH_DSA)
  • Hashes the raw message M internally
  • Context strings (§10.2.1) are supported
  • Deterministic mode (§10) is supported
  • Best for most applications
HashSLH-DSA (CKM_HASH_SLH_DSA_*)
  • Pre-hashes M with an external hash function before signing
  • Pre-hash examples (§10.2.2): SHA-256, SHA-512, SHAKE128 and SHAKE256. SHA-256 and SHAKE128 are appropriate only for category 1 parameter sets.
  • Context strings (0–255 bytes) are supported, identically to pure SLH-DSA
  • Use when the protocol mandates pre-hashing (e.g. legacy interop)
HashSLH-DSA message construction (§10.2.2): M' = 0x01 ‖ len(ctx) ‖ ctx ‖ OID_DER ‖ H(M). The OID identifies the pre-hash algorithm; example DER encodings appear in Algorithm 23.

Context Strings — FIPS 205 §§10.2–10.3

The live demo provides separate signing and verification contexts for pure and pre-hash modes. Leave both empty for zero bytes, or use the same label in both fields. Change only the verification context to test rejection. A space is not empty. An engine error does not demonstrate correct rejection; it means the test did not complete successfully.

A context string is an optional 0–255 byte value passed at sign and verify time. It binds the signature to a specific protocol or application context, preventing cross-context signature replay attacks.

Example: A CA signs both OCSP responses and firmware blobs with the same key. By using context "ca:ocsp" for one and "ca:firmware" for the other, a valid OCSP signature cannot be repurposed as a firmware signature — verification returns CKR_SIGNATURE_INVALID.

  • Supported in both pure SLH-DSA and HashSLH-DSA (Algorithm 23 takes ctx)
  • Context must be supplied identically at both sign and verify time
  • Empty context (0 bytes) is the default — most applications use this
  • PKCS#11 v3.2: passed via CK_SIGN_ADDITIONAL_CONTEXT.pContext

Why can two signatures of the same message differ?

SLH-DSA offers two signing modes:

Deterministic: signing the same message with the same key, context and settings produces the same signature.

Hedged: signing adds fresh randomness, so repeating the operation normally produces a different signature. Both signatures should still verify.

What should you learn from the test?

Sign the same inputs twice and compare the results. Identical signatures are expected in deterministic mode; different signatures are normally expected in hedged mode.

This demonstrates the difference between signing modes. It does not prove that the random generator is good or that the implementation resists attacks.

Deterministic signing does not need fresh randomness for each signature, but generating the key still requires randomness.

Technical note: in deterministic SLH-DSA, opt_rand uses PK.seed, a public value belonging to the key, not zeros. See FIPS 205 §9.2. In the existing demo, select a signing mode and use “Sign twice and compare” to inspect both signatures and their verification results with identical inputs.

PKCS#11 v3.2: set hedgeVariant = CKH_DETERMINISTIC_REQUIRED in the CK_SIGN_ADDITIONAL_CONTEXT parameter.

What the lab tests

A validated SLH-DSA module is checked in three separate ways, and none of them replaces another: algorithm tests, the module's own self-tests, and the certificate path. A fourth question, whether the algorithm may be used at all, is answered by CNSA 2.0 for national security systems.

1. Algorithm tests (ACVP, draft of 2 October 2026)
  • SLH-DSA has three ACVP modes: keyGen, sigGen and sigVer, all against FIPS 205. Each has one test type, AFT (Algorithm Functional Test).
  • keyGen: the implementation generates a key pair from the provided seed and key values (SK.seed, SK.prf and PK.seed). The server provides at least 10 tests for each combination of capabilities. sigGen: it generates a valid signature from the provided private key, message, context (external interface) and randomness (non-deterministic signing), with at least 13 tests for each combination.
  • sigVer: the server makes its tests by modifying a valid signature: a modified message, modified signature R, SIGFORS or SIGHT parts, a signature that is too long or too short, plus the valid case. The workshop's NIST sigVer panel replays a few published cases of this kind.
  • Not tested by ACVP, in the specification's words: “that fresh seed values are used for fresh invocations of key generation, that approved deterministic random bit generators (DRBGs) are used with the correct security strengths, that sensitive data is destroyed, that key validation is performed, and that floating point arithmetic is not used.”
What a vendor registers: the ACVP capability options
  • parameterSets: any of the 12 names, from SLH-DSA-SHA2-128s to SLH-DSA-SHAKE-256f.
  • signatureInterfaces: “internal”, “external”, or both.
  • preHash: “pure”, “preHash” (described as “Whether SLH-DSA or HashSLH-DSA are supported”). hashAlgs is used if preHash.
  • deterministic (sigGen only): “A value of ‘true’ indicates that deterministic signature generation is supported and a value of ‘false’ indicates that non-deterministic signature generation is supported.” sigVer has signatureInterfaces and preHash but no deterministic field.
  • messageLength (8 to 65536 bits, step 8) and contextLength (0 to 2040, step 8) as ranges.
2. Module self-tests (FIPS 140-3 IG 10.3.A, item 16)
  • For each of signature generation, signature verification and key generation that the module implements, IG 10.3.A requires a cryptographic algorithm self-test (CAST), run before the algorithm's first use in the approved mode. The signature generation CAST is a known-answer test: fixed values go in and the output is compared with a pre-computed signature (SIG). The verification CAST checks that a known signature verifies (returns true). The key generation CAST uses fixed SK.seed, SK.prf and PK.seed and compares the private key; the public key need not be compared, “as the private key contains a copy of the public key”.
  • Pure and pre-hash (Notes 27 and 28): if both are implemented and “they both share the same underlying cryptographic implementations, a CAST on either one of them is sufficient to meet the CAST requirements for both”. This holds for signature generation and, separately, for verification.
  • Hash families (Note 29): a module that supports both SHA2 and SHAKE parameter sets in the approved mode must run the CASTs on at least two parameter sets, one SHA2 and one SHAKE. A module with only one family needs at least one. It is recommended, but not required, to test at least one “s” and one “f” set if both are implemented.
  • Tree height (Note 30): the CASTs need only exercise the smallest parameter set (lowest height trees) the module supports.
  • Pairwise consistency test: for FIPS 205 keys it “may be limited to confirming the same key identifier (I in the case of LMS, SEED in the case of XMSS and PK.SEED for SLH-DSA) is shared by the resulting public and private key following generation”.
3. The certificate path, and 4. CNSA 2.0 status
  • NIST's CAVP page: “Cryptographic algorithm validation is a prerequisite of cryptographic module validation.” But “a product or implementation does not meet the FIPS 140 module validation requirements by simply implementing an Approved security function and acquiring validations for each of the implemented algorithms.”
  • ACVTS testing “is entirely black-box. The implementation is never provided to NIST or the CAVP in order to receive a validation certificate”, and CAVP “is not responsible for running those test vectors through the implementation”. The CASTs above are a FIPS 140-3 module requirement set by CMVP guidance (IG 10.3.A), separate from the ACVP tests.
  • CNSA 2.0 (NSA FAQ, version 2.2, October 2026): “While SLH-DSA is hash-based, it is not part of CNSA and is not approved for any use in NSS.” The CNSA 2.0 algorithm table lists ML-DSA-87 for digital signatures and LMS and XMSS (NIST SP 800-208) for signing firmware and software. See the stateful signatures module for how those are validated.

Sources: NIST ACVP draft specification for SLH-DSA (2 October 2026); CMVP Implementation Guidance for FIPS PUB 140-3, IG 10.3.A (document updated 19 August 2026); NIST CAVP overview; NSA CNSA 2.0 FAQ version 2.2. Guidance and test coverage change, so check the current versions. How labs run these steps: FIPS 140-3 Certification and ACVP Lab Workflow; the stateful hash-based schemes: Stateful Hash Signatures.

Further Reading

Generate real SLH-DSA keys, sign with context strings, and toggle deterministic mode.

In the Industry Landscape

Check your understanding

8 questions on SLH-DSA: Stateless Hash Signatures, each with its answer and the reason.

Take the quiz

Next step

Practice it: SLH-DSA Sign & Verify

SLH-DSA Sign & Verify is the hands-on version of this module: the same ideas, run in your browser.

Production Tool Capabilities & Verification Checklist

Capabilities to require in your production tools:

  • NIST FIPS 205 `SLH-DSA` support across SHA2 and SHAKE parameter sets (`128s`, `128f`, `192s`, `192f`, `256s`, `256f`) with RFC 9909 X.509 OIDs.
  • Profile selection matching workload constraints: `-s` (small signature: 7,856–29,792 B, slower signing) vs `-f` (fast signing: 17,088–49,856 B signature) for root CAs and code signing.
  • Pure vs pre-hash (`HashSLH-DSA`) mode selection and context-string binding per FIPS 205 §10.2–§10.3.

How to evaluate in your environment

Generate `SLH-DSA-SHA2-128s` and `SLH-DSA-SHA2-128f` signatures in OpenSSL 3.5+ / HSM, compare signing latency and wire size, and verify deterministic KAT vectors.

Production evidence to collect

OpenSSL/HSM `SLH-DSA` benchmark comparison table, RFC 9909 OID certificate dump, and ACVP KAT verification log.

Completing this Hub module and its browser-based sample exercises teaches the technical and governance decision criteria for your role; it does not test, validate, or certify your deployed production systems.

Learning module content can be inaccurate. Please double-check its information. Report inaccuracies in PQC Today GitHub Discussions.