Chapter 6ML-DSA

Schnorr and Fiat-Shamir

August 25, 20264 min readbeginner

ML-DSA descends from a construction that predates lattices entirely. This note builds it in its original setting, where it is easy to follow, before the next note tries to move it.

ML-DSA descends from a construction that predates lattices entirely. This note builds it in its original setting, where it is easy to follow, before the next note tries to move it.

01.Proving you know something without revealing it

Start with a different problem from signing. Alice wants to convince Bob that she knows a secret, without telling him what it is.

Concretely, in the discrete-logarithm setting from Chapter 2: the public values are a prime pp, a generator gg, and t=gs mod pt = g^s \bmod p. Alice knows ss and wants to prove it. Bob knows only tt.

She cannot simply send ss, since then Bob knows it too and can impersonate her forever.

02.The Schnorr protocol

Three messages.

Commit. Alice picks a random yy, computes w=gyw = g^y, and sends ww. She keeps yy.

Challenge. Bob picks a random cc and sends it.

Respond. Alice computes z=y+csz = y + cs and sends zz.

Check. Bob accepts if

gz  =  w⋅tc.g^z \;=\; w \cdot t^c .

The check works because

gz  =  gy+cs  =  gy⋅(gs)c  =  w⋅tc.g^z \;=\; g^{y + cs} \;=\; g^y \cdot (g^s)^c \;=\; w \cdot t^c .

Two properties make this a proof rather than a ritual.

Alice cannot cheat. Suppose she does not know ss. She commits to ww before seeing cc, so she cannot tailor ww to the challenge. If she could answer two different challenges cc and c′c' for the same ww, then subtracting the two responses gives z−z′=(c−c′)sz - z' = (c - c')s, so she could compute ss herself. Being able to answer everything therefore means knowing the secret.

Bob learns nothing. The value z=y+csz = y + cs is ss masked by the fresh random yy. Since yy is uniform and independent, zz is uniform too, and it reveals nothing about ss on its own.

That second property is the one that will break when we move to lattices, and it is worth noticing exactly why it holds here: yy is uniform over the whole group, so adding cscs to it wraps around and produces something still exactly uniform. Nothing sticks out.

03.Turning a proof into a signature

The protocol above is interactive. Bob has to be present to issue the challenge. A signature has to work with nobody present, since the verifier may read it years later.

The Fiat-Shamir transform removes the interaction with one substitution:

Replace the verifier's random challenge with a hash of the commitment and the message:

c  =  H(w ∥ m).c \;=\; H(w \,\|\, m).

Now Alice generates the challenge herself, and the signature is the pair (c,z)(c, z), or equivalently (w,z)(w, z).

The reason this is sound is that HH behaves unpredictably. Alice must fix ww before she can compute cc, exactly as she had to commit before seeing Bob's challenge. She cannot choose ww to produce a convenient cc, because changing ww changes cc unpredictably.

Including mm in the hash is what ties the proof to a specific message. Without it, a proof of knowledge on one message would be a valid proof on every message.

This is the origin of a large family of deployed schemes, including Schnorr signatures, DSA, ECDSA and EdDSA. It is also the skeleton of ML-DSA.

04.The pieces to carry forward

Four things transfer directly to the lattice setting, and it is worth naming them now because the next notes use the same words.

The commitment ww, computed from fresh randomness yy.

The challenge cc, a hash of the commitment and the message.

The response z=y+csz = y + cs, which combines the randomness with the secret under the challenge.

The verification equation, which recomputes the commitment from the response and the public key.

What does not transfer is the argument that zz leaks nothing. That argument relied on yy being uniform over a group where addition wraps cleanly. Lattice secrets are small, lattice randomness is bounded, and there is no wraparound to hide behind.

The next note shows exactly how badly that fails.

FeedbackBook mode
post-quantum-cryptographycryptographymathematics