⚛ Quantum & Post-Quantum

ML-DSA (Dilithium): Post-Quantum Digital Signatures Explained

ML-DSA, standardized in FIPS 204 and derived from CRYSTALS-Dilithium, is the primary NIST-selected post-quantum digital signature scheme. Digital signatures authenticate software updates, TLS certificates, documents, and code, so they must remain unforgeable even against an adversary with a quantum computer. Because Shor's algorithm breaks the RSA and elliptic-curve signatures in wide use, ML-DSA provides a lattice-based replacement whose security does not depend on factoring or discrete logarithms. This article explains its building blocks and how signing and verification work.

Digital Signatures and the Quantum Threat

A digital signature scheme lets a signer use a private key to produce a signature that anyone can check with the corresponding public key, guaranteeing authenticity and integrity. Classical schemes such as RSA, ECDSA, and EdDSA all rely on problems that Shor's algorithm solves efficiently, so a cryptographically relevant quantum computer could forge signatures at will. Signatures anchor the chains of trust in public-key infrastructure, TLS certificates, and software supply chains, so a forgery capability would let an attacker impersonate any authority whose private key it could derive from a public key. That would let attackers sign malware as if it were a trusted vendor, making signature migration a defensive priority.

The Building Blocks: Module-LWE and Module-SIS

ML-DSA rests on two hard lattice problems, both structured variants of lattice assumptions:

  • Module-LWE hides the secret key inside noisy linear relations, ensuring the public key reveals nothing usable about the secret.
  • Module-SIS (Short Integer Solution) guarantees that forging a valid signature would require finding a short solution to a random linear system, which is computationally infeasible.

Both operate over a polynomial ring, giving compact keys and fast arithmetic through the Number Theoretic Transform.

Fiat-Shamir With Aborts

ML-DSA is constructed with the Fiat-Shamir with aborts paradigm. The classic Fiat-Shamir transform turns an interactive identification protocol into a signature by replacing the verifier's random challenge with the output of a hash function applied to the message and the signer's commitment. The "with aborts" refinement, specific to lattices, addresses a subtle leak: a naive signature would reveal information about the secret through its distribution. To prevent this, the signer uses rejection sampling, discarding and retrying any candidate signature whose values fall outside a safe range, so that published signatures are statistically independent of the secret key.

How ML-DSA Works

Key Generation

Key generation samples a public matrix A of ring elements and short secret vectors s1 and s2, then computes t = A·s1 + s2. The public key is (A, t) and the secret key holds s1, s2, and related data.

Signing

Signing is a loop that repeats until a candidate passes all safety checks.

# ML-DSA signing (simplified)
do:
    y = sample short masking vector          # fresh randomness each attempt
    w = HighBits(A * y)                       # commitment
    c = H(message, w)                         # challenge from the hash
    z = y + c * s1                            # response
while z is too large OR hint checks fail:     # rejection sampling: retry
return signature (c, z, hint)

The masking vector y hides the secret in z, and the rejection condition ensures z never strays into a region that would leak s1. Because attempts can fail, signing takes a variable number of iterations, but the expected count is small.

Verification

The verifier recomputes the commitment from the public key, z, and c, using the hint to correct rounding, then hashes it with the message and confirms it matches c. A valid signature also requires z to be short, which only a legitimate signer holding s1 can achieve. Because verification uses only public values, anyone can check a signature offline, and the shortness requirement is what binds a valid signature to knowledge of the secret rather than to lucky guessing.

Parameter Sets

ML-DSA defines three parameter sets, commonly labeled ML-DSA-44, ML-DSA-65, and ML-DSA-87, spanning increasing security categories. Higher levels enlarge keys and signatures and add computation, letting deployments match the sensitivity and required longevity of what they protect.

Implementation Considerations

  • Deterministic or hedged randomness. ML-DSA supports deterministic signing from a seed, but hedged variants mix in fresh randomness to reduce exposure to fault attacks.
  • Constant-time rejection sampling. The accept/reject decision must not leak timing information about the secret.
  • Larger artifacts. Signatures and public keys are bigger than those of ECDSA, which affects certificate sizes and protocols carrying many signatures.
  • Hybrid signing. During the post-quantum migration, pairing ML-DSA with a classical signature hedges against an unforeseen weakness in either scheme.

Key Takeaways

  • ML-DSA (FIPS 204), derived from Dilithium, is the standardized lattice-based post-quantum signature scheme.
  • Its security relies on Module-LWE to protect the key and Module-SIS to prevent forgery.
  • Fiat-Shamir with aborts uses rejection sampling so signatures leak no information about the secret key.
  • Signing loops until a candidate passes size and hint checks, giving variable-time but efficient operation.
  • Constant-time implementation, careful randomness, and hybrid signing support a safe transition from classical signatures.
ml-dsadilithiumdigital-signaturespost-quantumlattice-cryptography

Frequently asked questions

What is ML-DSA?

ML-DSA, standardized in FIPS 204 and derived from CRYSTALS-Dilithium, is the primary NIST-selected post-quantum digital signature scheme. It provides a lattice-based replacement for RSA and elliptic-curve signatures, whose security Shor's algorithm breaks, so signatures stay unforgeable even against an adversary with a quantum computer. Digital signatures authenticate software updates, TLS certificates, documents, and code.

Is ML-DSA the same as Dilithium?

ML-DSA is the NIST standard derived from CRYSTALS-Dilithium, so they are closely related but not identical. Dilithium was the algorithm submitted to and selected in the NIST post-quantum competition, while ML-DSA is the finalized version published as FIPS 204. ML-DSA is the name to use for the official standard.

What hard problems is ML-DSA based on?

ML-DSA rests on two structured lattice problems. Module-LWE hides the secret key inside noisy linear relations so the public key reveals nothing usable about the secret, and Module-SIS, the Short Integer Solution problem, ensures that forging a valid signature would require finding a short solution to a random linear system, which is computationally infeasible. Both operate over a polynomial ring for compact keys and fast arithmetic.

What is Fiat-Shamir with aborts in ML-DSA?

Fiat-Shamir with aborts is the paradigm used to construct ML-DSA. The Fiat-Shamir transform turns an interactive identification protocol into a signature by deriving the challenge from a hash of the message and the signer's commitment. The with-aborts refinement uses rejection sampling to discard and retry any candidate signature whose values fall outside a safe range, so published signatures are statistically independent of the secret key and leak no information about it.

How does ML-DSA signing work?

Signing is a loop that samples a fresh short masking vector, forms a commitment, derives a challenge by hashing the message with the commitment, and computes a response that combines the masking vector with the secret. If the candidate signature is too large or fails hint checks, the signer discards it and retries, a rejection-sampling step that prevents leakage of the secret. Because attempts can fail, signing takes a variable but small number of iterations.

What are the trade-offs of using ML-DSA?

ML-DSA signatures and public keys are larger than those of ECDSA, which affects certificate sizes and protocols that carry many signatures. Implementations must keep the accept-or-reject decision in rejection sampling constant-time so it does not leak information about the secret. It supports deterministic signing from a seed, though hedged variants mix in fresh randomness to reduce exposure to fault attacks, and it is often paired with a classical signature during migration.

Try it hands-on

K0G is an open toolkit of browser-based security utilities — hashing, encoding, JWT, certificates, crypto and more, all running locally in your browser.

Explore the tools →