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 , a generator , and . Alice knows and wants to prove it. Bob knows only .
She cannot simply send , since then Bob knows it too and can impersonate her forever.
02.The Schnorr protocol
Three messages.
Commit. Alice picks a random , computes , and sends . She keeps .
Challenge. Bob picks a random and sends it.
Respond. Alice computes and sends .
Check. Bob accepts if
The check works because
Two properties make this a proof rather than a ritual.
Alice cannot cheat. Suppose she does not know . She commits to before seeing , so she cannot tailor to the challenge. If she could answer two different challenges and for the same , then subtracting the two responses gives , so she could compute herself. Being able to answer everything therefore means knowing the secret.
Bob learns nothing. The value is masked by the fresh random . Since is uniform and independent, is uniform too, and it reveals nothing about 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: is uniform over the whole group, so adding 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:
Now Alice generates the challenge herself, and the signature is the pair , or equivalently .
The reason this is sound is that behaves unpredictably. Alice must fix before she can compute , exactly as she had to commit before seeing Bob's challenge. She cannot choose to produce a convenient , because changing changes unpredictably.
Including 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 , computed from fresh randomness .
The challenge , a hash of the commitment and the message.
The response , 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 leaks nothing. That argument relied on 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.