← Back to section · Post-Quantum Cryptography
ML-DSA Explained: NIST's Post-Quantum Digital Signature Standard (FIPS 204)
From Dilithium to FIPS 204: how ML-DSA's lattice signatures work, the three parameter sets, why the signatures are large, and where the scheme fits in certificates and code signing.
If ML-KEM answers “how does a key arrive safely,” ML-DSA answers “how do you know this message really came from me” — digital signatures. Signatures are the harder half of the migration: firmware signatures, code signing and issued certificates live for a decade or more, and anything signed today must still be trustworthy after a cryptographically relevant quantum computer exists.
From Dilithium to ML-DSA
ML-DSA (Module-Lattice Digital Signature Algorithm) derives from CRYSTALS-Dilithium and was published as FIPS 204 on 13 August 2024, alongside FIPS 203 (ML-KEM) and FIPS 205 (SLH-DSA). Its security rests on two lattice problems — Module-LWE and Module-SIS — the same family as ML-KEM, which is deliberate: implementations, analysis and hardware acceleration share much of their groundwork.
The construction follows Fiat–Shamir with aborts. The signer builds a commitment from the private key and a random mask, hashes the message to obtain a challenge, and computes a response. If that response’s distribution would leak information about the key, the signer simply aborts and retries — this rejection sampling continues until the response is statistically independent of the secret. The verifier only checks that the challenge is self-consistent with the public key, message and signature.
What is inside a signature
An ML-DSA signature consists of three parts: the challenge hash c̃ (a few dozen bytes), the response vector z (the bulk of the size), and a set of hints h. Verification roughly proceeds as follows: the verifier uses the public matrix, z and c̃ to reconstruct the high-order bits of the commitment, then recomputes the challenge; if the two agree, the signature passes. The hints exist because signing discards the low-order bits of the commitment — doing so keeps z’s distribution from leaking the key — and the verifier needs those hints to realign the high bits. Understanding this trio explains where the signature size comes from: every coefficient of z is packed at a fixed bit width, and both the coefficient count and the width grow with the security category, which is why an ML-DSA-87 signature is nearly twice an ML-DSA-44 one. That growth is not waste; it is the security margin, itemized.
The three parameter sets
| Set | Public key (bytes) | Private key (bytes) | Signature (bytes) | Target category |
|---|---|---|---|---|
| ML-DSA-44 | 1,312 | 2,560 | 2,420 | ≈ 2 (≈ SHA-256 collision) |
| ML-DSA-65 | 1,952 | 4,032 | 3,309 | ≈ 3 (≈ AES-192) |
| ML-DSA-87 | 2,592 | 4,896 | 4,627 | ≈ 5 (≈ AES-256) |
Against RSA-2048’s 256-byte signatures or ECDSA P-256’s 64 bytes, ML-DSA signatures are 10–70× larger. That is the most concrete migration cost: certificate chains, TLS handshakes and signed packages all grow measurably (our article on post-quantum PKI does the arithmetic in detail).
The key numbers behind the parameter table
ML-DSA works modulo q = 8,380,417 (that is, 2^23 − 2^13 + 1). The value is chosen in an NTT-friendly shape: the polynomial ring Z_q[X]/(X^256 + 1) admits a complete Number Theoretic Transform at this modulus, making polynomial multiplication fast and implementation straightforward — a direct dividend of sharing ML-KEM’s engineering groundwork. The secret vectors consist of small coefficients (the small-secret parameter η is 2 or 4 depending on the set), while the challenge is a sparse polynomial with exactly τ coefficients equal to ±1 and the rest zero, with τ taking the values 39, 49 and 60 across the three sets.
Together these unglamorous numbers determine the expected number of rejection-sampling retries — on the order of a handful — which drives signing speed and shapes the timing side channel. The designers had to land precisely between “reject too often and signing is slow” and “sample secrets too widely and security suffers”; the parameter table is that balance, frozen. When reading a parameter set, the more instructive exercise is not memorizing key and signature sizes, but seeing how these numbers pull speed, security and size into equilibrium.
Three implementation pitfalls
Randomness and determinism. FIPS 204 allows randomized, deterministic and — recommended — hedged signing, where the per-signature randomness is derived from the message and key together with fresh entropy. Do not invent your own nonce scheme.
Rejection-sampling timing. The number of retries depends on the key and message; if an implementation lets retry counts leak through timing, it opens a side channel. Serious implementations (liboqs, OpenSSL 3.5, BoringSSL) are written or audited with this in mind — prefer them.
Fault attacks. Glitching a signing device can make a single faulty signature leak the key. For offline signers (root CAs, firmware signing machines), verify-after-sign is cheap insurance: verify every signature with the public key before releasing it.
Context strings and pre-hashing: two interface details
FIPS 204 leaves two easily overlooked designs at the interface layer, both with direct security consequences. The first is the context string: signing and verification may attach a context of up to 255 bytes, which enters the hash together with the message. Its purpose is domain separation — the same key signing in a “firmware update” protocol and a “payment authorization” protocol produces signatures that cannot be transplanted between the two once different contexts are used.
The second is pre-hash mode (PreHash ML-DSA): when a message is very long, or its hash has already been computed externally, a prescribed external hashing step can precede signing. Pre-hash mode uses a different domain-separation prefix from the pure mode, and the two modes’ signatures are not interchangeable in verification. Integrating an ML-DSA implementation therefore takes more than asking “does it support ML-DSA-87”: how the context is passed and which path pre-hashing takes must match too. Get the interface wrong and the mild outcome is signatures that fail to verify; the serious one is domain separation that silently does not exist.
Where it will be used
- TLS and certificates — server certificates and intermediates moving to ML-DSA, often via composite certificates during transition;
- Code and firmware signing — CNSA 2.0 makes firmware signing the earliest, hardest deadline in the whole migration;
- Documents and identity — contracts, package signing, and identity credentials.
ML-DSA is not the only answer: SLH-DSA (next article) offers hash-only assumptions for conservative use cases, and FN-DSA (Falcon, covered in Research) targets size-sensitive signing. But as the general-purpose default for the next decade of signature migration, ML-DSA is where every migration inventory starts.
Sources and further reading
- NIST, FIPS 204: Module-Lattice-Based Digital Signature Standard, 2024-08-13. https://doi.org/10.6028/NIST.FIPS.204
- Ducas et al., CRYSTALS-Dilithium Algorithm Specifications and Supporting Documentation, 2021. https://pq-crystals.org/dilithium/
- NIST PQC Standardization Project. https://csrc.nist.gov/projects/post-quantum-cryptography
Tags: ML-DSAFIPS 204digital signatureslattice cryptography