SPHINCS+ is a digital signature scheme whose security rests on one assumption: that the underlying hash function behaves well. No factoring, no discrete logs, no lattices. NIST standardised it in August 2024 as SLH-DSA (Stateless Hash-Based Digital Signature Algorithm) in FIPS 205.
I worked closely with it as CPO of Quranium, which chose SLH-DSA as its quantum-secure signature. This page is the explanation I wish I'd had on day one.
Why hash-based signatures survive quantum computers
Shor's algorithm breaks RSA and elliptic curves because they hide a secret inside a group with periodic structure, and quantum computers are very good at finding periods. A good hash function has no such structure.
The best known quantum attack on a hash is Grover's algorithm, which only gives a square-root speed-up: finding a preimage of an n-bit hash drops from about 2ⁿ to about 2ⁿ/² work. So a 256-bit hash still gives roughly 128-bit security against a quantum attacker. That's why SLH-DSA is considered the most conservative post-quantum choice: if hash functions fall, we have far bigger problems than signatures.
The building blocks
SLH-DSA is three ideas stacked on top of each other.
1. WOTS+: a one-time signature
A Winternitz One-Time Signature starts with random secret values and hashes each one many times to form a chain. The public key is the end of every chain. To sign, you reveal an intermediate point on each chain chosen by the message digest. Anyone can hash forward to check it reaches the public key. A checksum stops an attacker from simply hashing your values further to forge a different message.
The catch: sign two messages with the same WOTS+ key and an attacker can combine the revealed points to forge. It's strictly one-time.
2. XMSS trees: many one-time keys under one root
Put 2ʰ WOTS+ public keys at the leaves of a Merkle tree. The root becomes a single public key, and each signature is "one WOTS+ signature plus the authentication path to the root". Now you can sign 2ʰ times. But plain XMSS is stateful: you must remember which leaves you've used. Lose that state (restore a VM snapshot, clone a hardware module) and you may reuse a leaf. That's catastrophic.
3. Hypertree + FORS: removing the state
SPHINCS+ removes the need for state with two tricks:
- A hypertree: layers of XMSS trees, where each tree signs the root of the tree below. The total height is huge (63 to 68 levels), so there are astronomically many leaves.
- FORS (Forest Of Random Subsets): a few-time signature at the bottom, which tolerates the occasional leaf collision.
The leaf to use is picked pseudo-randomly from the message itself. With that many leaves, accidentally picking the same one twice is so unlikely it can be ignored, and FORS limits the damage even if it happens. No state to keep.
flowchart TB PK["Public key = root of top XMSS tree<br/>(+ public seed)"] PK --> L1["Layer d-1: XMSS tree"] L1 -->|"WOTS+ signs root of"| L2["Layer d-2: XMSS tree"] L2 -->|"..."| L0["Layer 0: XMSS tree"] L0 -->|"WOTS+ signs"| F["FORS few-time key<br/>(chosen pseudo-randomly from the message)"] F -->|"signs"| M["Message digest"]
A signature therefore contains: a randomiser, a FORS signature, and d WOTS+ signatures each with an authentication path. That's why it's big.
Parameter sets (FIPS 205)
FIPS 205 defines 12 parameter sets: SHA2 or SHAKE, three security levels, and "s" (small) or "f" (fast) variants.
| Parameter set | Security category | Public key | Signature | Trade-off |
|---|---|---|---|---|
| SLH-DSA-*-128s | 1 (≈ AES-128) | 32 B | 7,856 B | Smaller signatures, slower signing |
| SLH-DSA-*-128f | 1 | 32 B | 17,088 B | Faster signing, larger signatures |
| SLH-DSA-*-192s | 3 (≈ AES-192) | 48 B | 16,224 B | |
| SLH-DSA-*-192f | 3 | 48 B | 35,664 B | |
| SLH-DSA-*-256s | 5 (≈ AES-256) | 64 B | 29,792 B | |
| SLH-DSA-*-256f | 5 | 64 B | 49,856 B |
Notice the shape: tiny public keys, huge signatures. Compare that with Schnorr signatures on secp256k1 (32 B key, 64 B signature) or ML-DSA-44 (1,312 B key, 2,420 B signature).
Where SLH-DSA fits
| Use it when… | Think twice when… |
|---|---|
| Security must hold for decades (firmware roots, archival signatures, root CAs) | Signatures travel over constrained links (IoT radios, satellite uplinks) |
| You want a hedge that doesn't depend on lattice assumptions | Every byte is paid for (blockchain transactions, high-volume TLS handshakes) |
| Verification happens rarely but must be trustworthy | Signing latency matters (128f helps, but it's still heavier than ML-DSA) |
A common pattern is hybrid by role: ML-DSA for everyday, high-volume signing, and SLH-DSA for long-lived roots of trust where conservative assumptions matter most.
Lessons from using it in a blockchain
- Size is an economic decision, not just an engineering one. A ~7.9 KB signature changes block capacity, fee markets and bandwidth costs. Architecture (aggregation, separate data layers, signature compression at the consensus layer) has to absorb it.
- Public-key compactness is a real advantage. 32-byte public keys keep addresses and state small even when signatures are large.
- Stateless matters for operations. Validators and custodians restore from backups, run active-active setups and clone HSMs. A stateful scheme (XMSS, LMS) punishes all of that. SLH-DSA doesn't.
- Plan for crypto-agility anyway. Keep the signature scheme behind an interface and version your address formats, so you can add FN-DSA or ML-DSA later without a painful migration.
Pitfalls
- Don't confuse SLH-DSA with XMSS/LMS. The stateful schemes (NIST SP 800-208) are faster and smaller, but key-state management failures are fatal.
- Pick SHA2 vs SHAKE by platform. SHA2 variants are faster where SHA-256 hardware acceleration exists. SHAKE variants are cleaner where Keccak is native (e.g. Ethereum tooling).
- Use the pre-hash variant carefully. FIPS 205 defines both "pure" and "HashSLH-DSA" signing. Mixing them up breaks interoperability.
References
- NIST, FIPS 205: Stateless Hash-Based Digital Signature Standard (Aug 2024). https://csrc.nist.gov/pubs/fips/205/final
- Bernstein, Hülsing, Kölbl, Niederhagen, Rijneveld, Schwabe. The SPHINCS+ Signature Framework (ACM CCS 2019). https://sphincs.org
- NIST SP 800-208, Recommendation for Stateful Hash-Based Signature Schemes (2020). https://csrc.nist.gov/pubs/sp/800/208/final
- Related: ECC vs SLH-DSA · Falcon / FN-DSA · Quantum Computer