Schnorr identification and its rewinding discrete-logarithm reduction #
Schnorr's identification scheme ([BS23], Section 19.1) over a PrimeOrderGroupFamily:
the key is a description d, drawn from a setup law, a uniform secret α and the public key
u = α • g. An impersonator sees the description and the encoded public key and sends a
commitment word t; the verifier draws a uniform challenge word c of k n bits; the
impersonator answers with a word z. Challenges and responses are read as binary numbers modulo
the group order q, and the verifier accepts when t encodes z • g - c • u; on genuine group
elements this is Schnorr's check z • g = t + c • u.
Rewinding an impersonator gives a discrete-logarithm adversary, SchnorrImpersonator.rewind. It
runs the impersonator to its commitment, answers two independent uniform challenges from the same
state, and computes (c - c')⁻¹ (z - z') modulo q with extractNat, inverting by Fermat's little
theorem. For each security parameter, if 2 ^ k ≤ q for every description the setup can produce,
ε ≤ 1 / 2 ^ k + √ε',
where ε is the impersonator's success probability and ε' the discrete-logarithm success
probability of the rewinding adversary (succProbability_schnorrDirectGame_le_ideal, the
bound (19.2) of [BS23], Theorem 19.1). schnorrDirectGame draws the secret key with
PMF.uniformOfFintype, which a strict PPT machine cannot do, so this bound is an ideal-sampling
step. The rewinding adversary is uniform strict PPT whenever the impersonator is and k is
computable in polynomial time (isPPTOn_rewind).
Theorem 19.1 itself, for the native key generator schnorrSigKeyGen, is
negligible_schnorrDirectProbGame in CslibFrontier.Crypto.Computational.SchnorrEavesdrop. It
applies the discrete-logarithm assumption to the rewinding adversary through isPPTOn_rewind.
The impersonator may use fresh randomness in its second stage; its state is a word. Challenges
are bit strings because strict PPT machines sample them exactly; they cannot sample ZMod q
exactly, which matters for the honest prover and for simulation but not for this reduction.
Main definitions #
Cslib.Crypto.PrimeOrderGroupFamily.SchnorrImpersonator: a two-stage word adversary.Cslib.Crypto.PrimeOrderGroupFamily.schnorrDirectGame: the direct impersonation attack, with an ideal key.Cslib.Crypto.PrimeOrderGroupFamily.SchnorrImpersonator.rewind: the rewinding discrete-logarithm adversary.Cslib.Crypto.PrimeOrderGroupFamily.SchnorrImpersonator.typed: an impersonator's typed view, which the exact bound runs through the generic Sigma-protocol results.Cslib.Crypto.PrimeOrderGroupFamily.challengeEmbedding:m-bit challenges as scalars modulo the group order, injective when2 ^ m ≤ q.
Main results #
Cslib.Crypto.PrimeOrderGroupFamily.isPPTOn_rewind: the rewinding adversary is uniform strict PPT.
Ideal-sampling step #
Cslib.Crypto.PrimeOrderGroupFamily.succProbability_schnorrDirectGame_le_ideal:ε ≤ 1 / 2 ^ k + √ε'at each security parameter, in the ideal-key game.
References #
A uniform impersonator against Schnorr identification. Its first stage sees the security parameter, the group description and the encoded public key, and returns a commitment word and a state word; its second stage sees the security parameter, the state and the challenge word.
Commit, keeping a state word.
Respond to a challenge word from the state word.
Both stages of an impersonator are uniform strict PPT in their whole inputs.
The direct impersonation attack on Schnorr identification ([BS23], Attack
Game 18.1), with challenges of k n bits and an ideal key: the secret key is drawn with
PMF.uniformOfFintype, which a strict PPT machine cannot do. The verifier accepts when the
commitment encodes z • g - c • u. The game with the native key generator schnorrSigKeyGen is
schnorrDirectProbGame.
The rewinding discrete-logarithm adversary (proof of [BS23], Theorem 19.1): run the
impersonator to its commitment, answer two independent uniform k n-bit challenges from the same
state, and output the extracted witness in binary.
Bit challenges as scalars #
The exact bound #
The typed view of an impersonator at security parameter n with m-bit challenges: a
SigmaProtocol.Impersonator whose statements pair a group description with a group element,
which it sees encoded, and whose challenges are typed bit strings.
Ideal-sampling step toward [BS23], Theorem 19.1, not the cited result: in the
ideal-key game schnorrDirectGame, at each security parameter where every possible group has at
least 2 ^ k n elements, an impersonator's success probability is at most 1 / 2 ^ k n + √ε',
where ε' is the discrete-logarithm success probability of the rewinding adversary (the
bound (19.2)). The native-key bound is succProbability_schnorrDirectProbGame_le, and
Theorem 19.1 is negligible_schnorrDirectProbGame.
Efficiency of the rewinding adversary #
The rewinding adversary is uniform strict PPT when the impersonator is and the challenge length is computable in polynomial time.