SLH-DSA (SPHINCS+) Signature Demo
NewRun SLH-DSA (SPHINCS+, FIPS 205) online: generate SHA2 parameter sets, sign and verify messages, and compare huge signatures with ML-DSA and Ed25519.
Generate key pair
Makes a fresh SLH-DSA-SHA2-128s key pair: public key 32 B, secret key 64 B. Signatures are about 7,856 B (small / slower sign).
Public key
Secret key
Demo secret. Keep it private and never use it for real data.
| Algorithm | Public key | Signature |
|---|---|---|
| SLH-DSA-SHA2-128s | 32 B | 7,856 B |
| Ed25519 | 32 B | 64 B |
| RSA-3072 | 384 B | 384 B |
SLH-DSA-SHA2-128s: public key 32 B · secret key 64 B · signature 7,856 B. Security level: about AES-128.
How to read this demo
SLH-DSA (SPHINCS+, FIPS 205) is a hash-based signature with a conservative security story and very large signatures. It suits long-lived roots and firmware where size is acceptable and signing latency can be higher.
Unlike ML-DSA, SLH-DSA has no optional context string in this demo — the message bytes alone are signed. Do not use these demo keys for real data.
Processed on your device — nothing is uploaded.
How to use SLH-DSA (SPHINCS+)
- 1Choose a parameter set (SLH-DSA-SHA2-128s is a sensible default) and generate a key pair.
- 2Enter a message and sign it — signing can take a second or two in the browser.
- 3Verify with the public key; alter the message to see Invalid.
What this page covers
- FIPS 205 SHA2 sets: 128s, 128f, 192s and 256s
- Shows the signature-size trade against ML-DSA and Ed25519
- Hex and Base64 export with copy and download
- All processing stays on your device
- Explains when hash-based signatures beat lattice ones
About SLH-DSA (SPHINCS+)
SLH-DSA is the NIST hash-based signature standard (FIPS 205), descended from SPHINCS+. Public keys stay tiny while signatures grow into kilobytes — a deliberate trade for a conservative security story that does not rely on lattices. This demo runs common SHA2 parameter sets locally so you can feel the size and signing cost before you pick it for firmware or root keys.
Common uses
- Decide whether firmware or secure-boot roots can afford multi-kilobyte signatures.
- Compare SLH-DSA with ML-DSA before writing a signing RFC for your product.
- Teach the difference between lattice and hash-based post-quantum signatures.
- Generate sample vectors for an offline verifier under test.
Example
Input
SLH-DSA-SHA2-128s
Result
SLH-DSA-SHA2-128s: public key 32 B · secret key 64 B · signature 7,856 B
Good to know
- Signing SLH-DSA in JavaScript is slower than ML-DSA; the “s” sets are smaller but slower to sign, while “f” sets flip that trade. Larger sets may take several seconds.
- Do not use these demo keys for real roots of trust. Match the exact FIPS 205 parameter name your verifier expects.
- SLH-DSA complements ML-DSA: many programmes use ML-DSA for everyday signatures and SLH-DSA for long-lived trust anchors.
SLH-DSA (SPHINCS+) FAQ
How is SLH-DSA different from ML-DSA?
ML-DSA is lattice-based with moderate-sized signatures. SLH-DSA is hash-based: keys are tiny, signatures are much larger, and the security argument rests on hash functions rather than lattice problems.
What do the s and f suffixes mean?
In FIPS 205, “s” emphasises smaller signatures at slower signing speed, and “f” emphasises faster signing with larger signatures. Verifiers must use the same parameter set as the signer.
Why is signing slow in the browser?
Hash-based signatures perform many hash operations. A pure-JavaScript demo on a laptop often needs about one to a few seconds for 128s; larger sets take longer. Verification is comparatively quick.
When should I choose SLH-DSA?
When you want a hash-based NIST standard and can afford large signatures — classic cases are firmware signing, software updates and high-assurance roots rather than tiny network tokens.