Documentation

CslibFrontier.Crypto.Computational.SchnorrGuessing

Guessing attacks on Schnorr identification #

This module formalizes the word-level guessing impersonator against Schnorr identification ([BS23], Section 19.1.1). Given a challenge-length schedule m : ℕ → ℕ, the impersonator runs the word-level transcript simulator schnorrSimulatedTranscript on a uniform m n-bit challenge, outputs the resulting commitment, stores the simulated response, and returns it for every challenge.

Main definitions #

Main results #

References #

The guessing impersonator against Schnorr identification ([BS23], Section 19.1.1) with k n-bit challenges: prepare a simulated conversation (t, c, z) for a uniform k n-bit challenge c, send t, keep z as the state, and answer every challenge with z.

The guessing impersonator succeeds with probability at least 1 / 2 ^ k n ([BS23], Section 19.1.1) whenever the prepared-challenge length satisfies m n ≤ k n (proved here as a lower bound where Exercise 19.7 says "probability 1/|C|"). The bound allows a separate schedule m because ofBits zero-pads shorter simulated challenges so they match a verifier challenge with probability at least 1 / 2 ^ k n even for m = fun _ => 0; when m n > k n, ofBits on an m n-bit simulated challenge can lie outside the range of k n-bit verifier challenges, so hm cannot be dropped.

The guessing impersonator is uniform strict PPT when its challenge length is computable in polynomial time (ComputableInPolyTime m encUnary encUnary).

Negligible 1 / 2 ^ k n is necessary for security against direct attacks: for every setup and k : ℕ → ℕ, if every uniform strict-PPT impersonator wins schnorrDirectGame setup k with negligible probability, then 1 / 2 ^ k n is negligible. The proof instantiates the universal quantifier at schnorrGuessingImpersonator fun _ => 0 using inv_two_pow_le_succProbability_schnorrDirectGame and isPPT_schnorrGuessingImpersonator (no efficiency condition on k is needed). The game here draws the key ideally; the converse for the native-key game schnorrDirectProbGame, under the discrete-logarithm assumption, is negligible_schnorrDirectProbGame, and the two games differ by at most 1 / 2 ^ n (advantage_schnorrDirectProbGame_schnorrDirectGame_le).