Chapter 6ML-DSA

Why the Naive Version Leaks

August 25, 20264 min readbeginner

The obvious thing to try is translating Schnorr into the module setting piece by piece. This note does that, and then breaks it.

The obvious thing to try is translating Schnorr into the module setting piece by piece. This note does that, and then breaks it.

01.The direct translation

Replace the group by RqℓR_q^\ell, the exponentiation by matrix multiplication, and t=gst = g^s by t=As1\mathbf{t} = A\mathbf{s}_1. The protocol becomes:

  1. Commit. Sample y∈Rqℓ\mathbf{y} \in R_q^\ell with small coefficients, send w=Ay\mathbf{w} = A\mathbf{y}.
  2. Challenge. Receive a small c∈Rqc \in R_q.
  3. Respond. Send z=y+cs1\mathbf{z} = \mathbf{y} + c\mathbf{s}_1.

The verifier checks Az−ct=wA\mathbf{z} - c\mathbf{t} = \mathbf{w}, which holds because

Az−ct  =  A(y+cs1)−cAs1  =  Ay  =  w.A\mathbf{z} - c\mathbf{t} \;=\; A(\mathbf{y} + c\mathbf{s}_1) - cA\mathbf{s}_1 \;=\; A\mathbf{y} \;=\; \mathbf{w}.

Algebraically this is fine. It is the exact lattice analogue of gz=w⋅tcg^z = w \cdot t^c, and every equation balances.

It also hands over the secret key.

02.The leak, in one line

z−y  =  c s1.\mathbf{z} - \mathbf{y} \;=\; c\,\mathbf{s}_1 .

Every signature releases z\mathbf{z}, which is the secret multiplied by a known challenge and hidden under a mask y\mathbf{y} that has bounded size. Averaging over many signatures pulls the secret out of the mask.

This is the point where the group argument fails. In Schnorr, yy was uniform over the whole group, so y+csy + cs was still exactly uniform and the shift was invisible. Here y\mathbf{y} has small coefficients drawn from a bounded range, so y+cs1\mathbf{y} + c\mathbf{s}_1 is that same bounded range shifted. The shift is exactly cs1c\mathbf{s}_1, and a shifted distribution is distinguishable from an unshifted one.

03.Watching it happen

Forget the ring for a moment and work with a single integer secret, which makes the arithmetic legible.

Take s=3s = 3. Let the challenge cc be +1+1 or −1-1 at random, and let yy be uniform on [−100,100][-100, 100]. The released value is z=y+csz = y + cs.

When c=+1c = +1, zz is uniform on [−97,103][-97, 103], whose mean is +3+3.

When c=−1c = -1, zz is uniform on [−103,97][-103, 97], whose mean is −3-3.

So an attacker who collects signatures, separates them by which challenge was used, and takes the mean of each group, will see the two means separated by exactly 2s2s.

Simulating that with 400,000 signatures:

mean(z∣c=+1)  =  +3.269,mean(z∣c=−1)  =  −3.033.\text{mean}(z \mid c = +1) \;=\; +3.269, \qquad \text{mean}(z \mid c = -1) \;=\; -3.033 .

Half the difference is

3.269−(−3.033)2  =  3.151,\frac{3.269 - (-3.033)}{2} \;=\; 3.151 ,

against a true secret of 33. The attacker has recovered it to within rounding, using nothing but arithmetic means.

This is not a side-channel attack and it does not depend on any implementation flaw. It is an algebraic property of the construction. The released values are a shifted distribution and the shift is the secret.

04.Why more noise does not fix it

The natural first response is to make y\mathbf{y} much larger, so the shift is proportionally smaller and harder to detect.

That helps only slowly. The statistical detectability of a shift of size ss in a distribution of width γ\gamma, given NN samples, grows like sN/γs\sqrt{N}/\gamma. So doubling γ\gamma forces the attacker to quadruple NN, and NN is free to them under EUF-CMA, where they may request unlimited signatures.

Meanwhile γ\gamma cannot grow without bound. It sets the size of z\mathbf{z}, which is most of the signature, so doubling it costs a bit per coefficient across ℓ⋅256\ell \cdot 256 coefficients on every signature ever sent. Buying security this way is paying continuously to make the attacker's job merely tedious.

What is needed is not a bigger mask. It is a construction where the released values carry no shift at all, regardless of the secret.

That exists, and it is the subject of the next note.

FeedbackBook mode
post-quantum-cryptographycryptographymathematics