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 #
Cslib.Crypto.PrimeOrderGroupFamily.schnorrGuessingImpersonator: the word-level guessing impersonator againstPrimeOrderGroupFamily.schnorrDirectGame.
Main results #
Cslib.Crypto.PrimeOrderGroupFamily.inv_two_pow_le_succProbability_schnorrDirectGame: for everysetup,k,m, andnwithm n ≤ k n,schnorrGuessingImpersonator mwinsschnorrDirectGame setup kwith probability at least1 / 2 ^ k n(a lower bound where Section 19.1.1 / Exercise 19.7 states probability1/|C|).Cslib.Crypto.PrimeOrderGroupFamily.isPPT_schnorrGuessingImpersonator: whenmis computable in polynomial time in unary (ComputableInPolyTime m encUnary encUnary),schnorrGuessingImpersonator mis uniform strict PPT.Cslib.Crypto.PrimeOrderGroupFamily.negligible_inv_two_pow_of_negligible_schnorrDirectGame: for everysetupandk : ℕ → ℕ, if every uniform strict-PPT impersonator has negligible success probability inschnorrDirectGame setup k, then1 / 2 ^ k nis negligible (proved atm := fun _ => 0, requiring no efficiency hypothesis onk).
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).