ML-DSA (FIPS 204) and SLH-DSA (FIPS 205)
Compare CRYSTALS-Dilithium lattice signatures with SPHINCS+ hash-based signatures and their trade-offs.
ML-DSA (FIPS 204) and SLH-DSA (FIPS 205) is a free Cryptology Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cryptology Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
ML-DSA Origins
ML-DSA (Module-Lattice-based Digital Signature Algorithm), standardized as FIPS 204, is derived from CRYSTALS-Dilithium. Dilithium was designed by Ducas, Kiltz, Lepoint, Lyubashevsky, Schwabe, Seiler, and Stehle and submitted to NIST in 2017. It uses the Fiat-Shamir with aborts framework applied to Module-LWE, producing a practical signature scheme with strong security proofs.
Fiat-Shamir with Aborts
Classical Fiat-Shamir transforms interactive identification protocols into signatures. For lattice schemes, a direct application leaks information about the secret key through the response vector. The "with aborts" technique by Lyubashevsky adds rejection sampling: the signer checks if the response would reveal information and aborts and retries if so. This adds a small signing overhead but is essential for security.
ML-DSA Signing Process
To sign, ML-DSA samples a masking vector y from a uniform distribution, computes a commitment w = Ay, hashes (message, w) to get a challenge polynomial c, and computes response z = y + cs. Rejection sampling checks if z reveals information about s. If the check passes, the signature is (c, z) along with a hint for efficient verification. If not, the process repeats.
ML-DSA Parameter Sets
ML-DSA defines three parameter sets: ML-DSA-44 (NIST security level 2, ~128-bit), ML-DSA-65 (level 3, ~192-bit), and ML-DSA-87 (level 5, ~256-bit). The numbers refer to module ranks in the scheme. Public key sizes are 1312, 1952, and 2592 bytes respectively. ML-DSA-65 signature size is 3293 bytes, compared to 64 bytes for Ed25519 at 128-bit security.
ML-DSA Signature Size Trade-off
The most significant disadvantage of ML-DSA compared to ECDSA or EdDSA is signature size. ML-DSA-65 signatures are 3293 bytes versus 64 bytes for Ed25519. For protocols that transmit many signatures (TLS certificate chains, code signing), this increases bandwidth. However, ML-DSA signing and verification are very fast (comparable to or faster than ECDSA), so the trade-off is primarily in communication cost.
SLH-DSA Origins and Design
SLH-DSA (Stateless Hash-Based Digital Signature Algorithm), standardized as FIPS 205, is derived from SPHINCS+. Unlike lattice schemes, SLH-DSA's security relies only on the collision resistance and second-preimage resistance of the underlying hash function (SHA-256 or SHAKE-256). This makes SLH-DSA extremely conservative: it remains secure even if lattice assumptions are broken.
WOTS+ One-Time Signatures
SLH-DSA builds on WOTS+ (Winternitz One-Time Signature), a hash-based scheme where the private key is a set of random strings and the public key is obtained by repeatedly hashing each. Signing involves partially hashing based on the message bits. WOTS+ can only be used once per key pair safely; using it twice leaks information. SLH-DSA builds many-time signing on top of WOTS+ via trees.
Merkle Trees for Many-Time Signing
SLH-DSA uses a hypertree: a tree of Merkle trees. Each leaf is the public key of a WOTS+ instance. The root is the SLH-DSA public key. A signature consists of the WOTS+ signature for the message and the authentication path from the leaf to the root. The hypertree structure allows many signatures from a single key pair by using different WOTS+ leaves.
SLH-DSA Parameter Sets
SLH-DSA has 12 parameter sets combining hash function (SHA-256 or SHAKE-256), security level (128s/128f, 192s/192f, 256s/256f), and optimization (s = small signatures, f = fast signing). The 128f variant has 7856-byte signatures with fast signing; 128s has 7856 bytes but slower. All are much larger than ML-DSA but have the strongest possible security assumption.
When to Choose SLH-DSA vs ML-DSA
ML-DSA is preferred when performance and bandwidth matter and lattice assumptions are trusted. SLH-DSA is preferred for extremely conservative deployments where only hash function security is trusted, or for future-proofing against potential lattice breaks. Certificate authorities and government systems that sign rarely but need maximum assurance might favor SLH-DSA, while TLS servers signing frequently would prefer ML-DSA.
FN-DSA (FALCON): Another Lattice Signature
FN-DSA (FIPS 206, based on FALCON) offers smaller signatures than ML-DSA (897 bytes for FALCON-512 at 128-bit security) using NTRU lattices and Gaussian sampling. However, FALCON requires careful constant-time implementation to avoid side-channel attacks from the Gaussian sampler. FIPS 206 is expected to be standardized after FIPS 203-205 and will provide a high-performance option for resource-constrained environments.
ML-DSA vs SLH-DSA Quiz
What is the primary security advantage of SLH-DSA over ML-DSA?
ML-DSA and SLH-DSA Recap
ML-DSA (FIPS 204) uses Fiat-Shamir with aborts over Module-LWE, offering fast signing with 3-KB signatures (at 192-bit security). SLH-DSA (FIPS 205) uses hash-based Merkle trees (WOTS+), relying only on hash function security with 7-50 KB signatures. ML-DSA is preferred for performance-sensitive applications; SLH-DSA for maximum conservatism. FN-DSA (FALCON, FIPS 206) will add a smaller-signature lattice option.
Frequently asked questions
Is the “ML-DSA (FIPS 204) and SLH-DSA (FIPS 205)” lesson free?
Yes — the full text of “ML-DSA (FIPS 204) and SLH-DSA (FIPS 205)” is free to read here on the web, and the Cryptology Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cryptology Academy course, upgrade to CoddyKit PRO.
What will I learn in “ML-DSA (FIPS 204) and SLH-DSA (FIPS 205)”?
Compare CRYSTALS-Dilithium lattice signatures with SPHINCS+ hash-based signatures and their trade-offs. You practise Cryptology Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cryptology Academy?
No prior experience is required. Cryptology Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “ML-DSA (FIPS 204) and SLH-DSA (FIPS 205)” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cryptology Academy lesson?
Yes. Every Cryptology Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- The NIST PQC Competition: Process and Criteria
- ML-KEM (FIPS 203): CRYSTALS-Kyber Standardized
- ML-DSA (FIPS 204) and SLH-DSA (FIPS 205)
- Planning Your Migration to Post-Quantum Standards