← Back to section · Standards & Specifications

From Dilithium to ML-DSA: What the FIPS 204 Final Version Changed

The differences between ML-DSA and the Dilithium submission live at the interface layer: a new context-string parameter, pre-hash signing written into the standard proper, parameter domain separation in key generation, and hedged signing as the default posture. An item-by-item comparison.

Published 22 November 2026 · 5 min read · PQ Frontier

From Dilithium to ML-DSA: What the FIPS 204 Final Version Changed
AI-generated site artwork
Video explainer · Version Comparison: signatures across versions

As with ML-KEM, the changes from Dilithium to ML-DSA (FIPS 204, published August 2024) are mostly not in the mathematics but in the interface and usage rules: signing takes one more parameter, the message passes through a domain-separation step before it is signed, and key generation hashes two extra numbers into its seed expansion. Individually none of these looks dramatic, but together they make the two versions incompatible — an ML-DSA signature will not verify under Dilithium, and vice versa.

Change 1: Context strings and message domain separation

In the Dilithium submission, the signing input was essentially the message itself. FIPS 204 adds a context string parameter (ctx, at most 255 bytes) to both the signing and verification interfaces, and specifies that what actually enters the signing core is not the raw message but a domain-separated representation: a byte distinguishing “pure” from “pre-hash” mode, then the context length and context, and only then the message (or its digest).

This serves the same purpose as the ad-hoc domain-separation tricks that protocols such as TLS and certificate systems invented for themselves: preventing signature bytes produced by one key in one protocol from being replayed or confused across contexts. The cost is that the interface is no longer “just sign this” — applications must choose their context value, and verifiers must use exactly the same context or verification fails. That strictness is deliberate in the final standard.

Change 2: HashML-DSA, the pre-hash mode, enters the standard

The submitted Dilithium defined only signing over the complete message. A large class of real systems — file signing, firmware release, timestamping services — deals with data too large to move around whole, or with workflows that must compute the digest externally first. For these, FIPS 204 formally includes pre-hash signing as HashML-DSA: the object signed is the message digest, and the message representation embeds the object identifier (OID) of the hash function used, so a “signature over a SHA-256 digest” and a “signature over a SHA-512 digest” are cryptographically non-interchangeable.

The standard is equally explicit that the pure mode is preferred where it can be used, because pre-hash security additionally depends on the strength of the chosen hash function. This “include it, but with a warning” posture is a direct result of industry feedback during the draft comment period.

A concrete workflow makes this tangible: a firmware release system signs hundreds of images a day, each gigabytes in size. In pure mode, the signing machine must ingest every byte of every image. With HashML-DSA, the build pipeline computes digests on ordinary servers first, and only the few dozen bytes of each digest enter the isolated signing machine, which writes the hash algorithm’s OID into the message representation and completes the signature. A verifier seeing the OID knows under which hash the digest was computed and will not accept a SHA-256 digest misrepresented as a SHA-512 one — this “binding of digest to algorithm” is exactly what the submission left blank and the final standard filled in.

Change 3: Domain separation in key generation, and signing randomness

Following the same pattern as ML-KEM, FIPS 204 key generation writes the parameter dimensions k and l into the hash input of the seed expansion (H(ξ‖k‖l)), so the same seed produces unrelated key material under ML-DSA-44, -65, and -87. The submission had no such step, so key-generation test vectors for the two versions differ from the very first byte.

On signing randomness, the submitted Dilithium described deterministic signing as the default, with randomized signing as an option. FIPS 204 writes the internal signing algorithm to take an explicit 32-byte randomness input rnd and clearly recommends hedged signing: when rnd is genuine randomness, it provides an extra layer of masking should the signing process be subjected to fault injection; when rnd is all zeros, the algorithm degenerates to the deterministic mode, which survives only as an internal option. This flipping of the default posture reflects the weight given to fault-attack research during standardization.

Change 4: Separation of the external and internal interfaces

One more structural change is the most developer-friendly of all, and the easiest to overlook: FIPS 204 explicitly separates external functions from internal functions. Applications call the external signing/verification interface, which assembles the domain-separated message representation and performs length and format checks; the internal functions receive the already-preprocessed digest quantity μ together with explicit randomness inputs and concentrate on the lattice arithmetic. The submission had no such formal layering — message preprocessing and the signing core were intertwined, and different implementations could easily diverge in subtle understandings of “exactly how the message is fed in”, precisely the class of divergence that is hardest to hunt down in interoperability testing. With the layering in place, protocol designers get a well-defined junction point: advanced usages that manage the message representation themselves (for example, pre-computing μ in a distributed signing setup) can use the internal interface, while ordinary applications always go through the external one and never need to care about the byte layout of domain separation.

A checklist of what stayed and what moved

Unchanged: the lattice dimensions, challenge entropy, hint mechanism, and other core parameters of the three parameter sets; the sizes of public keys, private keys, and signatures (an ML-DSA-44 signature is 2420 bytes, and so on) match the submission item for item; and the commit–challenge–response Fiat–Shamir skeleton with rejection sampling is preserved as-is.

One easily missed category of change: the final standard states explicit requirements for input-length and encoding-validity checks on keys and signatures, and splits the algorithm into internal forms with explicit randomness inputs for validatability — exactly the same restructuring approach as FIPS 203. That all three FIPS standards do this in lockstep shows it is not an idiosyncrasy of one algorithm but NIST’s uniform requirement for a testable standard.

Summary

ML-DSA’s changes relative to Dilithium compress into three sentences: the signed object changed from a bare message to a domain-separated representation carrying a context; pre-hash signing moved from folk practice into the standard’s text; and the randomness sources for key generation and signing were made explicit and parameterized. An implementer who simply renames Dilithium code to ML-DSA will almost certainly fail interoperability testing and validation. In the next article we look at SLH-DSA, whose finalization took the most distinctive path of the three.

Tags: ML-DSADilithiumFIPS 204Version Comparison