HSM / PKCS#11 / SLH-DSA Sign & Verify
What you will do: Pick one of the 12 FIPS 205 parameter sets and a pre-hash mode, then Generate Key Pair, Sign Message and Verify Signature on a real PKCS#11 v3.2 HSM emulator in the browser.
Worked example: With the default SHA2-128s set the 32-byte public key appears, the message signs into a 7,856 B (7.7 KB) signature, Verify Signature reports Signature Valid, and the PKCS#11 call log lists every call.
Runtime and privacy: The cryptographic exercise runs in this browser. Review the site privacy terms before entering sensitive material; use synthetic inputs for learning and evaluation.
Browse all Crypto Lab tools · Learn with SLH-DSA: Stateless Hash Signatures
For your role
- Developer / Engineer
- Pick a parameter set from the twelve FIPS 205 variants, keep Pure mode (the recommended default), then run 1. Generate Key Pair, 2. Sign Message and 3. Verify Signature: the PKCS#11 call log shows the exact C_GenerateKeyPair, C_Sign and C_Verify sequence your code would issue.
- Security Architect
- Compare SHA2-128s against the f variants and the 192/256 levels: the same message signs to very different signature sizes, and the Stateful vs Stateless comparison panel says when a stateless scheme is worth that size over LMS or XMSS.
- Researcher / Academic
- Open Algorithm checks to see the SLH-DSA sign and verify round trips (functional, no external expected value), a SHA-256 NIST reference sample and the NIST SLH-DSA sigVer reference cases run in-browser, then switch between Pure and pre-hash mode to see what changes on the wire.
- Certification & Validation Engineer
- Pick a parameter set from the twelve FIPS 205 variants, keep Pure mode, then run 1. Generate Key Pair, 2. Sign Message and 3. Verify Signature: the PKCS#11 call log is the exact sequence a test harness drives through the module interface.
Initializing SoftHSM…
C_Initialize → C_InitToken → C_OpenSession → C_Login
SLH-DSA Live Demo (FIPS 205)
Generate SLH-DSA key pairs, sign messages, and verify signatures using a real PKCS#11 v3.2 HSM emulator in-browser. SLH-DSA (standardized as FIPS 205, August 2024) is the NIST name for SPHINCS+. SLH-DSA is stateless: unlike LMS and XMSS (see the Stateful Hash Signatures module) there is no leaf counter to protect.
Enable Live WASM Mode above to generate real SLH-DSA keys, sign, and verify using the SoftHSM3 PKCS#11 v3.2 emulator.
Stateful vs Stateless Signature Comparison
- Standard
- LMS
- SP 800-208 / RFC 8554
- SLH-DSA
- FIPS 205
- ML-DSA
- FIPS 204
- Basis
- LMS
- Hash function
- SLH-DSA
- Hash function
- ML-DSA
- Lattice
- Parameter set shown in the size rows
- LMS
- LMS_SHA256_M24_H10 / LMOTS_SHA256_N24_W4
- SLH-DSA
- SLH-DSA-SHA2-192s (category 3)
- ML-DSA
- ML-DSA-65 (category 3) and ML-DSA-87 (category 5)
- Statefulness
- LMS
- Stateful
- SLH-DSA
- Stateless
- ML-DSA
- Stateless
- Signing capacity / analysis scope
- LMS
- Bounded (2^h = 1,024 for h = 10)
- SLH-DSA
- At most 2^64 messages/key in the FIPS 205 §11 security analysis; no leaf counter
- ML-DSA
- No leaf-exhaustion counter (not an unlimited-use claim)
- Public key
- LMS
- 48 B
- SLH-DSA
- 48 B
- ML-DSA
- 1,952 B (-65); 2,592 B (-87)
- Signature
- LMS
- 1,500 B
- SLH-DSA
- 16,224 B
- ML-DSA
- 3,309 B (-65); 4,627 B (-87)
- Signing speed
- LMS
- Fast
- SLH-DSA
- Slow
- ML-DSA
- Fast
- CNSA 2.0
- LMS
- Single-tree LMS approved for firmware and software signing; LMS SHA-256/192 recommended; multi-tree HSS and XMSSMT not allowed (CNSA 2.0 FAQ)
- SLH-DSA
- Not approved for any use in NSS
- ML-DSA
- ML-DSA-87 only (the CNSA 2.0 table lists no other ML-DSA set)
- Best use
- LMS
- Firmware, code signing (CNSA 2.0)
- SLH-DSA
- CA roots, stateless contexts, no persistent state
- ML-DSA
- TLS, general-purpose signing
| Property | LMS | SLH-DSA | ML-DSA |
|---|---|---|---|
| Standard | SP 800-208 / RFC 8554 | FIPS 205 | FIPS 204 |
| Basis | Hash function | Hash function | Lattice |
| Parameter set shown in the size rows | LMS_SHA256_M24_H10 / LMOTS_SHA256_N24_W4 | SLH-DSA-SHA2-192s (category 3) | ML-DSA-65 (category 3) and ML-DSA-87 (category 5) |
| Statefulness | Stateful | Stateless | Stateless |
| Signing capacity / analysis scope | Bounded (2^h = 1,024 for h = 10) | At most 2^64 messages/key in the FIPS 205 §11 security analysis; no leaf counter | No leaf-exhaustion counter (not an unlimited-use claim) |
| Public key | 48 B | 48 B | 1,952 B (-65); 2,592 B (-87) |
| Signature | 1,500 B | 16,224 B | 3,309 B (-65); 4,627 B (-87) |
| Signing speed | Fast | Slow | Fast |
| CNSA 2.0 | Single-tree LMS approved for firmware and software signing; LMS SHA-256/192 recommended; multi-tree HSS and XMSSMT not allowed (CNSA 2.0 FAQ) | Not approved for any use in NSS | ML-DSA-87 only (the CNSA 2.0 table lists no other ML-DSA set) |
| Best use | Firmware, code signing (CNSA 2.0) | CA roots, stateless contexts, no persistent state | TLS, general-purpose signing |
The size rows compare named parameter sets of a similar size class, not equal security: SP 800-208 assigns no NIST security category to LMS. LMS sizes follow the RFC 8554 layouts (public key 4 + 4 + 16 + m bytes; signature 12 + n(p + 1) + m·h bytes) with the SP 800-208 SHA-256/192 parameters n = m = 24, p = 51, h = 10. An HSS key with one level, which is what the PKCS#11 engine signs with, adds 4 bytes to the public key and to each signature.
Why is SLH-DSA stateless? SLH-DSA keeps no counter. A key pair is a very large set of few-time FORS keys; each signature hashes the message with a randomizer, uses part of the digest to select one of them, and authenticates it through the hypertree. A FORS key can be selected again, and its security degrades gradually; the parameter sets are designed for up to 2^64 signatures per key. Because SLH-DSA keeps no counter, a copy of the private key cannot cause the one-time key reuse that NIST SP 800-208 section 9.1 warns about for LMS and XMSS. Signatures made by all copies of a key still count towards the same limit of 2^64 signatures per key (FIPS 205 section 11). FIPS 205 gives no rules for backing up or replicating keys, so follow your module's key-management requirements.
The cost of statefulness elimination: SLH-DSA (FIPS 205, formerly SPHINCS+) signs with a Merkle hypertree whose path proof must be included in full — producing signatures of 7–49 KB depending on the parameter set, versus 1.3–9.3 KB for LMS. The "s" variants optimize for smaller signatures; the "f" variants optimize for faster signing at the expense of larger output. Enable Live WASM Mode above for browser-sandbox cryptographic operations. Generated keys are for educational purposes only; validate key protection, signing-mode policy, and ACVP/CMVP compliance in your production hardware.
Algorithm checks: SLH-DSA
A known-answer check compares the engine's output with a value fixed in advance by a standard or by NIST. A functional round trip signs and verifies with the same engine, so it shows the pieces work together and nothing more.
Known-answer check: SHA-256
FIPS 180-4
Click Run reference sample to run 1 use-case scenario. Evidence in this set: NIST ACVP-Server reference sample — Expected values copied from the public NIST ACVP-Server repository with immutable source identity.
Reference samples from the public NIST ACVP-Server repository · FIPS 180-4 · Generated keys are for educational use only.
SLH-DSA signature verification: NIST ACVP reference sample
FIPS 205 · public NIST ACVP-Server sigVer cases · evidence level: NIST ACVP sample
Verifies a small set of published NIST SLH-DSA sigVer cases (valid signatures, and signatures NIST says must be rejected) with the in-browser engine and compares each answer with NIST's expected result.
Source: public NIST ACVP-Server, SLH-DSA-sigVer-FIPS205 (commit 975de31). Eight cases from two of its 36 test groups (SLH-DSA-SHA2-128s and SLH-DSA-SHAKE-128s, pure, external interface). Pre-hash, internal-interface, key-generation and signature-generation vectors are not run here. These are reference samples, not vectors issued by an ACVTS test session: passing them establishes no validation.
Functional round trips (not known-answer tests)
FIPS 205 · each row signs and verifies with this engine, so a pass shows no external correctness claim
Click Run functional tests to run 2 use-case scenarios. Evidence in this set: Functional round-trip — Output produced by an implementation is consumed by the same or paired implementation.
FIPS 205 · each row signs and verifies with this engine, so a pass shows no external correctness claim · Generated keys are for educational use only.
Production Tool Capabilities & Verification Requirements
What this sample check establishes: Runs real NIST FIPS 205 SLH-DSA key generation, signing, and verification across SHA2/SHAKE `-s` (small) and `-f` (fast) parameter sets in WASM.
Browser sandbox limitation (non-certification boundary): Browser WASM timing depends on host CPU/JIT and does not establish hardware throughput or side-channel fault immunity.
What to require and test in your production tools:
- CAVP-validated FIPS 205 `SLH-DSA` implementation supporting the SLH-DSA SHA2/SHAKE parameter sets your policy needs (`128s/f`, `192s/f`, `256s/f`) and RFC 9909 OIDs.
- Context-string (`ctx`, 0–255 bytes, default empty) support per FIPS 205 §10.2.1 for domain separation.
- Transport and storage buffers sized for 7,856 B (`128s`) up to 49,856 B (`256f`) signatures.
Try it
- 1. Predict before you run it.
- 2. Run or change the tool above.
- 3. Explain what the result shows.
Sign the same message with SHA2-128s and then a 128f variant. What changes?
A sample firmware signature was made with Pure SLH-DSA under the context update-v1. The release verifier requires update-v2. Which verification result should the release engineer expect?
Next step
Keep learning: SOC Implementation for PQCSOC Implementation for PQC follows SLH-DSA: Stateless Hash Signatures, the module this tool practises, in the Software Infrastructure track.
Related content
Next in HSM / PKCS#11