SPHINCS+ Hash-Based Signatures: How SLH-DSA Works and Why It Matters

SPHINCS+ hash-based signatures represent one of the most conservatively designed post-quantum cryptographic primitives standardised by NIST, now formalised as SLH-DSA under FIPS 205. Unlike lattice or code-based schemes, SPHINCS+ derives its entire security argument from the collision resistance and preimage resistance of well-studied hash functions, with no algebraic structure that a quantum adversary can exploit. This article explains the mechanics of the scheme, its stateless architecture, the parameter sets available, the concrete tradeoffs against lattice-based alternatives such as ML-DSA (Dilithium), and where SPHINCS+ fits in a practical post-quantum deployment.

Why Hash-Based Signatures Exist

Classical digital signature schemes, including ECDSA and RSA, depend on mathematical hardness assumptions, specifically the elliptic-curve discrete logarithm problem and integer factorisation. Shor's algorithm running on a sufficiently large fault-tolerant quantum computer can solve both problems in polynomial time, rendering every wallet, certificate, and signed document protected by those schemes vulnerable.

Hash functions face a different threat profile. Grover's algorithm provides only a quadratic speedup against preimage search, meaning a 256-bit hash retains roughly 128 bits of quantum security, a level that remains practically unbreakable with foreseeable hardware. Hash-based signatures exploit this property: if the underlying hash function is secure, the signature scheme is secure. That is an unusually clean, auditable security reduction.

The earliest practical hash-based scheme was the Lamport one-time signature (1979), extended by Merkle into a tree-based scheme that allowed signing multiple messages. Modern constructions such as XMSS, LMS, and ultimately SPHINCS+ have refined that lineage into deployable standards.

---

The Architecture of SPHINCS+

SPHINCS+ is a stateless hash-based signature scheme, which distinguishes it from its predecessors XMSS and LMS. Understanding why statefulness is a problem clarifies what SPHINCS+ solves.

The Statefulness Problem

XMSS and LMS are stateful: the signer must maintain and update a counter tracking which one-time key pairs have already been used. Reusing a leaf node catastrophically breaks security. In distributed systems, cloud signing services, or hardware that can be reset, guaranteeing state consistency is operationally difficult. A signer that loses its state or is forked (for example, a virtual machine snapshot restored) may inadvertently reuse keys.

SPHINCS+ eliminates this requirement entirely. It selects the leaf to use via a randomised or deterministic index derived from the message and a secret seed, making every signing operation independent. No state needs to be stored between signatures.

The Hypertree Structure

SPHINCS+ builds its signing keys around a hypertree: a sequence of *d* layers of XMSS trees, where the top-level tree's root forms the public key. Each internal-layer tree signs the root of the tree directly below it, and the bottom-layer trees sign individual messages.

The message itself is not signed directly. Instead, it is hashed to select a FORS (Forest of Random Subsets) key pair, a few-times signature construction that provides an additional layer of security amplification. The FORS public key is then fed into the hypertree for signing.

At a high level, producing a SPHINCS+ signature involves:

  1. Randomise or determinise a leaf index using the private seed and the message.
  2. Sign with FORS: hash the message to derive indices into the FORS trees, reveal the selected leaves and their authentication paths.
  3. Sign the FORS root using the bottom-layer XMSS tree.
  4. Chain upward through each hypertree layer, with each layer's tree signing the root of the layer below.
  5. Concatenate all authentication paths, FORS signatures, and WOTS+ signatures into the final output.

Within each XMSS tree, leaf signatures use WOTS+ (Winternitz One-Time Signature Plus), a chain-based construction that compresses signature size at the cost of computation, controlled by the Winternitz parameter *w*.

Hash Function Choices

SPHINCS+ is parameterised over a hash function family. The three supported instantiations in the NIST standard are:

---

Parameter Sets and the Speed/Size Tradeoff

SPHINCS+ exposes three dimensions of choice: security level (128, 192, or 256-bit classical / 64, 96, 128-bit post-quantum), signing speed (the *s* — simple — versus *f* — fast — variants), and signature size. The *f* variants halve signing time by using a larger FORS structure but produce larger signatures. The *s* variants produce smaller signatures at the cost of more computation.

Parameter SetSecurity Level (PQ bits)Public Key (bytes)Signature (bytes)Sign Time (relative)
SLH-DSA-SHA2-128s128327,856Slow
SLH-DSA-SHA2-128f1283217,088Fast
SLH-DSA-SHA2-192s1924816,224Slow
SLH-DSA-SHA2-192f1924835,664Fast
SLH-DSA-SHA2-256s2566429,792Slow
SLH-DSA-SHA2-256f2566449,856Fast

*Figures from NIST FIPS 205 (August 2024). SHAKE-based parameter sets have near-identical sizes.*

The most immediately striking property is the signature size. At 7,856 bytes for the smallest parameter set, SPHINCS+ signatures are one to two orders of magnitude larger than an ML-DSA (Dilithium) Level 2 signature of 2,420 bytes or an ECDSA P-256 signature of 64 bytes. This is a real constraint in bandwidth-sensitive protocols.

---

SPHINCS+ vs Lattice-Based Schemes: A Direct Comparison

Choosing between SPHINCS+ (SLH-DSA) and ML-DSA (Dilithium) or Falcon is an architectural decision, not simply a performance benchmark. The following table captures the principal tradeoffs.

PropertySPHINCS+ (SLH-DSA)ML-DSA (Dilithium)Falcon
Security assumptionHash function security onlyModule-LWE / Module-SISNTRU lattice, GPV framework
Statefulness requiredNoNoNo
Signature size8–50 KB2.4–4.6 KB0.7–1.3 KB
Public key size32–64 bytes1.3–2.6 KB0.9–1.8 KB
Signing speedModerate to slowFastFast (but Gaussian sampling complex)
Verification speedFastFastFast
Side-channel attack surfaceLow (no arithmetic over rings)ModerateHigher (Gaussian sampling)
Constant-time implementationStraightforwardAchievableRequires careful engineering
NIST FIPS standardFIPS 205FIPS 204FIPS 206
Primary deployment fitCertificates, root CAs, rare signingTLS, JWT, general purposeIoT, compact signatures needed

The conservative security assumption of SPHINCS+ is its strongest argument. Lattice schemes rest on the hardness of LWE and related problems. These are believed to be quantum-resistant, but the mathematical community has studied them for a shorter period than hash function security, and cryptanalytic progress (even classical) continues. If a breakthrough against LWE were discovered, every ML-DSA and Falcon deployment would be exposed simultaneously. SPHINCS+ is not subject to that correlated risk.

Where SPHINCS+ Excels

Where SPHINCS+ Is Challenged

---

SLH-DSA: The Standardised Form

NIST published FIPS 205, the *Stateless Hash-Based Digital Signature Standard*, in August 2024. It formally standardises SPHINCS+ under the name SLH-DSA, with minor procedural differences from the round-3 submission:

Existing SPHINCS+ implementations require only modest modifications to comply with FIPS 205, and several open-source libraries (liboqs, pqclean, BouncyCastle 2.x) have already published FIPS-205-compliant releases.

---

Implementation Considerations

Performance Optimisation

SPHINCS+ signing involves hundreds to thousands of hash function calls depending on the parameter set. On modern CPUs with SHA-NI or AES-NI extensions, this is manageable, but developers should profile before assuming desktop benchmarks apply to their target hardware.

Key optimisations include:

Library Support

Production-ready, audited implementations are available in:

Key Storage

Despite small public key sizes (32–64 bytes), private keys are also compact (64–128 bytes). This is a meaningful advantage over some lattice schemes where private keys run to several kilobytes.

---

Post-Quantum Cryptography in Context

SPHINCS+ occupies a specific niche within the broader post-quantum cryptography landscape. NIST's final portfolio includes ML-KEM (FIPS 203) for key encapsulation, ML-DSA (FIPS 204) as the primary signature scheme for most use cases, Falcon (FIPS 206) for compact-signature scenarios, and SLH-DSA (FIPS 205) as the conservative hash-only alternative.

Practitioners designing systems today should treat SPHINCS+ as a strategic hedge and a natural choice for high-assurance infrequent-signing roles, while deploying ML-DSA or Falcon for high-frequency signature operations. The two families are not in competition; they are complementary layers in a well-architected post-quantum security model.

Projects actively building quantum-resistant infrastructure at the protocol level, including wallets and token systems that must survive the transition to the post-quantum era, increasingly incorporate both lattice and hash-based primitives. BMIC.ai, for example, explicitly aligns its post-quantum wallet architecture with NIST PQC standards, acknowledging that conservative hash-based assumptions provide a meaningful backstop against correlated lattice failures.

---

Summary: Key Takeaways

Frequently Asked Questions

What is SPHINCS+ and how does it differ from ECDSA?

SPHINCS+ is a post-quantum digital signature scheme whose security rests solely on the resistance of hash functions to preimage and collision attacks. ECDSA relies on the elliptic-curve discrete logarithm problem, which Shor's algorithm running on a large quantum computer can solve efficiently. SPHINCS+ does not use any algebraic structure vulnerable to Shor's algorithm, making it quantum-resistant. The main practical tradeoff is that SPHINCS+ signatures are significantly larger, ranging from roughly 8 KB to 50 KB, compared to the 64 bytes of an ECDSA signature.

What does 'stateless' mean in the context of SPHINCS+?

A stateless signature scheme requires no persistent counter or index to be maintained between signing operations. Earlier hash-based schemes such as XMSS and LMS are stateful: the signer must track which one-time keys have been used and never reuse them, which is operationally hazardous in distributed or fault-tolerant systems. SPHINCS+ selects its signing leaf via a value derived from the message and a secret seed, so each signing operation is independent. There is nothing to store, synchronise, or lose between signatures.

Is SPHINCS+ an official NIST standard?

Yes. NIST published FIPS 205, titled the Stateless Hash-Based Digital Signature Standard, in August 2024. Under this standard, SPHINCS+ is renamed SLH-DSA (Stateless Hash-Based Digital Signature Algorithm). FIPS 205 specifies 12 parameter sets at three security levels using SHA-2 and SHAKE hash function families, along with context string support and both randomised and deterministic signing modes.

How does SPHINCS+ compare to ML-DSA (Dilithium) for everyday use?

ML-DSA (FIPS 204) produces much smaller signatures, around 2.4–4.6 KB versus 8–50 KB for SPHINCS+, and signs significantly faster. For high-frequency use cases such as TLS connections, API authentication, or blockchain transactions, ML-DSA is generally preferred. SPHINCS+ is the stronger choice when signature size is not a constraint and long-term security conservatism is paramount, for example in root certificate authorities, firmware signing, or hybrid signature constructions that hedge against correlated cryptographic breaks.

Which hash functions can be used with SPHINCS+?

The FIPS 205 standard specifies two families: SHA2-based (using SHA-256 and SHA-512) and SHAKE-based (using SHAKE-128 and SHAKE-256 from the SHA-3 family). The SHA2 instantiation is well-suited to environments requiring FIPS 140 compliance and benefits from SHA-NI hardware acceleration on modern x86 and ARM processors. The SHAKE instantiation offers clean domain separation and efficient Keccak-native hardware. A third instantiation, SPHINCS+-Haraka, uses AES-based compression and is available in the round-3 submission but is not part of FIPS 205.

Can SPHINCS+ and ML-DSA be used together in the same system?

Yes, and this is recommended practice for high-assurance applications. A hybrid signature requires that both the SPHINCS+ (hash-based) and ML-DSA (lattice-based) components verify successfully before a signature is accepted. This approach hedges against the unlikely but non-zero scenario that a cryptanalytic breakthrough weakens one family. Root CAs and long-lived certificates are natural candidates for hybrid schemes, as the combined signature size overhead is more acceptable when signing happens infrequently.