Direct and eavesdropping security of Schnorr identification in the strict-PPT model #
In an eavesdropping attack on an identification scheme ([BS23], Section 18.5, Attack
Game 18.2), the adversary first overhears Q n honest conversations between the prover and the
verifier for the public key u = α • g before attempting impersonation. For an idealized simulator
that samples ZMod q uniformly, special HVZK makes simulated conversations identically distributed
to honest ones ([BS23], Theorems 19.3 and 19.5;
schnorr_eavesdropAttack_eq_directAttack_ideal in
CslibFrontier.Crypto.Protocols.SigmaProtocol.SchnorrIdentification).
In the uniform strict-PPT model, fair-coin machines with a fixed polynomial clock cannot sample
ZMod q exactly when the prime group order q is not a power of two. Instead, exponent sampling
uses F.sampleExp n d (ProbComp.sampleModNat), which is within statistical distance 1 / 2 ^ n
of uniform on ZMod q (closeTo_uniform_sampleExp). Consequently:
- Per-conversation statistical closeness:
- A strict-PPT simulated conversation
schnorrSimulatedTranscript(usingschnorrSimulateWordon the public key without the secret key) is within statistical distance (CloseTo)1 / 2 ^ nof an ideal honest conversationschnorrHonestTranscript(closeTo_schnorrHonestTranscript_simulated). - A strict-PPT honest conversation
schnorrRealTranscript(where the honest prover also samples its commitment exponent withsampleExp) is within1 / 2 ^ nofschnorrHonestTranscript(closeTo_schnorrRealTranscript_honest) and hence within2 / 2 ^ nofschnorrSimulatedTranscript(closeTo_schnorrRealTranscript_simulated).
- A strict-PPT simulated conversation
- Multi-conversation statistical closeness:
- Across
Qindependent conversations over the infinite word spaceList (List Bool × List Bool × List Bool),CloseTo.iid,CloseTo.iid_replicate, andCloseTo.eval_replicatebound the statistical distance byQ / 2 ^ nagainst ideal honest conversations (closeTo_iid_schnorrHonestTranscript_replicate_simulated) and by2 * Q / 2 ^ nagainst strict-PPT honest conversations (closeTo_replicate_schnorrRealTranscript_simulated).
- Across
- Reduction to direct attacks and discrete logarithms:
SchnorrEavesdropAdversary.toDirectconverts any eavesdropping adversaryAinto a direct impersonator that generatesQ nsimulated conversations on the public key before runningA.commit. It is uniform strict PPT wheneverA, the challenge lengthk, and the conversation countQare (isPPT_toDirect,isPPTOn_rewind_toDirect). It runs the generic reductionSigmaProtocol.Impersonator.withSimulatedViews: its typed view is that reduction applied to the typed view ofA, with the lawschnorrSampledSimulateof the strict-PPT simulator as the simulator, sinceQ nstrict-PPT simulated conversations areQ ntyped simulated conversations written as words (eval_replicate_schnorrSimulatedTranscript).
- Native games and security under the discrete-logarithm assumption:
schnorrDirectProbGameandschnorrEavesdropProbGameare the direct and eavesdropping attack games ([BS23], Attack Games 18.1 and 18.2) with the native key generatorschnorrSigKeyGen(fromSchnorrProtocol), which samples the secret exponent withF.sampleExp n dand outputs the encoded public key with the binary secret key(sk % F.order d).bits(isPPTOn_schnorrSigKeyGen,advantage_bind_schnorrSigKeyGen_le). Their executableProbComp BoolexperimentsschnorrDirectProbExperimentandschnorrEavesdropProbExperimentcheck acceptance withencodeSchnorrVerifyand are certifiedIsPPTOn(isPPTOn_schnorrDirectProbExperiment,isPPTOn_schnorrEavesdropProbExperiment).At each security parameter where every supported group has order at least
2 ^ k n,succProbability_schnorrDirectProbGame_leandsuccProbability_schnorrEavesdropProbGame_legive the explicit boundsε ≤ 1 / 2 ^ n + 1 / 2 ^ k n + √ε'andε ≤ (2 * Q n + 1) / 2 ^ n + 1 / 2 ^ k n + √ε',where
ε'is the discrete-logarithm success probability of the rewinding adversaryA.rewind kor(A.toDirect k Q).rewind k.Under the discrete-logarithm assumption
F.DiscreteLog setup, for any polynomial-timekandQwith negligible1 / 2 ^ k n, every uniform strict PPT impersonator and every uniform strict PPT eavesdropping adversary succeeds with negligible probability (negligible_schnorrDirectProbGame, [BS23], Theorem 19.1;negligible_schnorrEavesdropProbGameandschnorr_isProbEavesdropSecure_of_discreteLogHard, Theorems 19.1 and 19.5 combined). Each applies the assumption to the rewinding adversary throughisPPTOn_rewind.
- Ideal-sampling steps: the concrete bounds pass through the ideal-key games
schnorrDirectGameandschnorrEavesdropGame, which draw the secret key withPMF.uniformOfFintype(advantage_schnorrDirectProbGame_schnorrDirectGame_le,advantage_schnorrEavesdropProbGame_schnorrEavesdropGame_le,advantage_schnorrEavesdropGame_schnorrDirectGame_leandsuccProbability_schnorrDirectGame_le_ideal). No theorem here states security of an ideal-key game.
Main definitions #
Cslib.Crypto.PrimeOrderGroupFamily.SchnorrEavesdropAdversary,Cslib.Crypto.PrimeOrderGroupFamily.SchnorrEavesdropAdversary.IsPPT: two-stage eavesdropping adversaries and uniform strict PPT admissibility.Cslib.Crypto.PrimeOrderGroupFamily.schnorrHonestTranscript,Cslib.Crypto.PrimeOrderGroupFamily.schnorrRealTranscript,Cslib.Crypto.PrimeOrderGroupFamily.schnorrSimulatedTranscript: ideal honest, strict-PPT honest, and strict-PPT simulated Schnorr conversations withm-bit challenges.Cslib.Crypto.PrimeOrderGroupFamily.schnorrSampledSimulate,Cslib.Crypto.PrimeOrderGroupFamily.transcriptWords: the law of the strict-PPT simulator at a typed challenge, and the word view of a typed conversation.Cslib.Crypto.PrimeOrderGroupFamily.SchnorrEavesdropAdversary.toDirect: reduction from an eavesdropping adversary to a direct impersonator by simulatingQ nconversations.Cslib.Crypto.PrimeOrderGroupFamily.schnorrDirectProbGame,Cslib.Crypto.PrimeOrderGroupFamily.schnorrDirectProbExperiment,Cslib.Crypto.PrimeOrderGroupFamily.schnorrEavesdropProbGame,Cslib.Crypto.PrimeOrderGroupFamily.schnorrEavesdropProbExperiment: native direct and eavesdropping games and experiments usingschnorrSigKeyGenandencodeSchnorrVerify.Cslib.Crypto.PrimeOrderGroupFamily.IsProbEavesdropSecure: security against all uniform strict PPT eavesdropping adversaries for all polynomial-time conversation counts.Cslib.Crypto.PrimeOrderGroupFamily.schnorrEavesdropGame: the eavesdropping game with an ideal key, an intermediate game of the reduction.
Main results #
Cslib.Probability.CloseTo.iid,Cslib.Probability.CloseTo.iid_replicate,Cslib.Probability.CloseTo.eval_replicate: statistical closeness ofkindependent draws andOracleComp.replicateruns without finiteness assumptions.Cslib.Crypto.PrimeOrderGroupFamily.closeTo_schnorrRealTranscript_honest,Cslib.Crypto.PrimeOrderGroupFamily.closeTo_schnorrHonestTranscript_simulated,Cslib.Crypto.PrimeOrderGroupFamily.closeTo_schnorrRealTranscript_simulated: per-conversation statistical closeness (1 / 2 ^ nand2 / 2 ^ n).Cslib.Crypto.PrimeOrderGroupFamily.closeTo_iid_schnorrHonestTranscript_replicate_simulated,Cslib.Crypto.PrimeOrderGroupFamily.closeTo_replicate_schnorrRealTranscript_simulated:Q-conversation statistical closeness (Q / 2 ^ nand2 * Q / 2 ^ n).Cslib.Crypto.PrimeOrderGroupFamily.isPPTOn_schnorrRealTranscript,Cslib.Crypto.PrimeOrderGroupFamily.isPPTOn_schnorrSimulatedTranscript,Cslib.Crypto.PrimeOrderGroupFamily.isPPT_toDirect,Cslib.Crypto.PrimeOrderGroupFamily.isPPTOn_rewind_toDirect,Cslib.Crypto.PrimeOrderGroupFamily.isPPTOn_schnorrDirectProbExperiment,Cslib.Crypto.PrimeOrderGroupFamily.isPPTOn_schnorrEavesdropProbExperiment: strict-PPT certificates for conversation generation, the direct-attack reduction, the composed rewinding DL adversary, and the executable direct and eavesdropping experiments.Cslib.Crypto.PrimeOrderGroupFamily.succProbability_schnorrDirectProbGame_le,Cslib.Crypto.PrimeOrderGroupFamily.succProbability_schnorrEavesdropProbGame_le: concrete direct-to-DL and eavesdropping-to-DL bounds for the native games.Cslib.Crypto.PrimeOrderGroupFamily.negligible_schnorrDirectProbGame,Cslib.Crypto.PrimeOrderGroupFamily.negligible_schnorrEavesdropProbGame,Cslib.Crypto.PrimeOrderGroupFamily.schnorr_isProbEavesdropSecure_of_discreteLogHard: direct and eavesdropping security of Schnorr identification under the discrete-logarithm assumption ([BS23], Theorem 19.1, and Theorems 19.1 and 19.5 combined).
Ideal-sampling steps #
Cslib.Crypto.PrimeOrderGroupFamily.advantage_schnorrDirectProbGame_schnorrDirectGame_le,Cslib.Crypto.PrimeOrderGroupFamily.advantage_schnorrEavesdropProbGame_schnorrEavesdropGame_le: the native key generator is within1 / 2 ^ nof the ideal key.Cslib.Crypto.PrimeOrderGroupFamily.advantage_schnorrEavesdropGame_schnorrDirectGame_le,Cslib.Crypto.PrimeOrderGroupFamily.advantage_schnorrEavesdropProbGame_schnorrDirectGame_le: simulating the overheard conversations changes the advantage by at most2 * Q n / 2 ^ n, or(2 * Q n + 1) / 2 ^ nfrom the native game.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Sections 18.3, 18.5 and 19.1 (Attack Games 18.1 and 18.2, Definition 18.6, and Theorems 19.1, 19.3 and 19.5).
- J. Katz, Y. Lindell, Introduction to Modern Cryptography, 3rd ed., Theorem 13.2.
- C.-P. Schnorr, Efficient Signature Generation by Smart Cards
A uniform eavesdropping adversary against Schnorr identification ([BS23], Attack
Game 18.2). Its first stage sees the security parameter, the group description, the encoded public
key, and a list of overheard conversations (t, c, z), and returns a commitment word and a state
word; its second stage sees the security parameter, the state and the challenge word.
Both stages of an eavesdropping adversary are uniform strict PPT in their whole inputs.
Ideal honest, strict-PPT honest, and strict-PPT simulated conversations #
An ideal honest Schnorr conversation with an m-bit challenge ([BS23], Section 19.1):
sample a uniform commitment exponent r : ZMod (F.order d) and a uniform m-bit challenge c,
and output the encoded commitment r • g, the challenge c, and the binary response
(r + c * α).val.bits.
A strict-PPT honest Schnorr conversation at security parameter n with an m-bit challenge:
sample the commitment exponent r with F.sampleExp n d and the challenge c with
BitString.sampleList m, and output (encode (r • g), c, ((r + ofBits c * α) % q).bits).
A strict-PPT simulated Schnorr conversation at security parameter n with an m-bit
challenge ([BS23], Example 19.3 and Theorem 19.3): sample a uniform m-bit challenge c
and run F.schnorrSimulateWord ((n, d), u, c) on the encoded public key u to obtain (t, z),
returning (t, c, z) without using the secret key.
Statistical closeness of single and repeated conversations #
The law of one strict-PPT simulated conversation on a canonical public key encode u: a
uniform m-bit challenge c, a sampled scalar response z, and the commitment
encode (z • g - c • u).
The law of the strict-PPT Schnorr simulator at a typed challenge: a sampled scalar response z
and the commitment z • g - c • u, with the challenge read as a binary number.
A strict-PPT simulated transcript is a typed simulated conversation, written as words.
k strict-PPT simulated transcripts are k typed simulated conversations, written as
words.
A strict-PPT honest Schnorr conversation is within statistical distance 1 / 2 ^ n of an ideal
honest conversation.
An ideal honest Schnorr conversation is within statistical distance 1 / 2 ^ n of a strict-PPT
simulated conversation on the public key encode (α • g).
A strict-PPT honest Schnorr conversation is within statistical distance 2 / 2 ^ n of a
strict-PPT simulated conversation on the public key encode (α • g).
Q independent ideal honest Schnorr conversations are within statistical distance Q / 2 ^ n
of Q strict-PPT simulated conversations on the public key encode (α • g).
Q independent strict-PPT honest Schnorr conversations are within statistical distance
2 * Q / 2 ^ n of Q strict-PPT simulated conversations on the public key encode (α • g).
Eavesdropping games and reduction to direct attacks #
The eavesdropping impersonation attack on Schnorr identification ([BS23], Attack
Game 18.2) with an ideal key: the secret key is drawn with PMF.uniformOfFintype, which a strict
PPT machine cannot do. Before committing, the adversary overhears Q n independent conversations
generated by the strict-PPT honest prover (schnorrRealTranscript) with k n-bit challenges. This
game is the intermediate step between schnorrEavesdropProbGame, with the native key generator,
and the direct attack schnorrDirectGame.
Turn an eavesdropping adversary into a direct impersonator ([BS23], Theorem 19.3 and
Figure 19.2): before committing, simulate Q n conversations on the public key using
schnorrSimulatedTranscript.
Ideal-sampling step: in the ideal-key games, replacing Q n strict-PPT honest conversations by
strict-PPT simulated ones changes the game advantage by at most 2 * Q n / 2 ^ n.
Efficiency of conversation generation and the eavesdropping reduction #
schnorrRealTranscript is uniform strict PPT when the security parameter, group description,
secret exponent, and challenge length are computable in polynomial time.
schnorrSimulatedTranscript is uniform strict PPT when the security parameter, group
description, encoded public key, and challenge length are computable in polynomial time.
The direct impersonator A.toDirect k Q is uniform strict PPT when the eavesdropping
adversary A is and both k and Q are computable in polynomial time.
The rewinding discrete-logarithm adversary built from an eavesdropper is uniform strict PPT
when the eavesdropper is and k and Q are computable in polynomial time.
Native games and security under the discrete-logarithm assumption #
The direct impersonation attack on Schnorr identification ([BS23], Attack Game 18.1)
with k n-bit challenges and the native key generator: the key pair comes from
F.schnorrSigKeyGen n d, whose exponent F.sampleExp n d is within statistical distance
1 / 2 ^ n of uniform on ZMod (F.order d). The verifier accepts when the commitment encodes
z • g - c • u.
Executable ProbComp Bool direct impersonation experiment at group description d: sample
the key pair with schnorrSigKeyGen n d, run A.commit, sample c ← BitString.sampleList (k n),
run A.respond, and check acceptance with encodeSchnorrVerify.
Averaging schnorrDirectProbExperiment over d ← setup n yields schnorrDirectProbGame.
schnorrDirectProbExperiment is uniformly strict PPT in (n, d) whenever k is computable in
polynomial time and A is a uniform strict PPT SchnorrImpersonator.
Replacing schnorrSigKeyGen with ideal uniform key generation in schnorrDirectProbGame
changes the game advantage by at most 1 / 2 ^ n.
Concrete bound for the native direct attack, the bound (19.2) of [BS23],
Theorem 19.1, plus the key generator's statistical distance: at each security parameter where every
supported group has at least 2 ^ k n elements, an impersonator's success probability in
schnorrDirectProbGame is at most 1 / 2 ^ n + 1 / 2 ^ k n + √ε', where ε' is the
discrete-logarithm success probability of the rewinding adversary A.rewind k.
Schnorr identification is secure against direct attacks under the discrete-logarithm
assumption ([BS23], Theorem 19.1), with its native key generator schnorrSigKeyGen.
Suppose the challenge length k is computable in polynomial time, every group the setup can
produce at parameter n has at least 2 ^ k n elements, and 1 / 2 ^ k n is negligible (the
source's super-poly N := |C|). Then every uniform strict PPT impersonator succeeds in
schnorrDirectProbGame with negligible probability. The proof applies F.DiscreteLog setup to
the rewinding adversary A.rewind k through its certificate isPPTOn_rewind.
Differences from the source: challenges are k n-bit words read as numbers modulo q, which embed
injectively when 2 ^ k n ≤ q (challengeEmbedding), where the source takes any C ⊆ ℤ_q;
commitments and responses are words, and the verifier accepts when the commitment encodes
z • g - c • u; the key exponent comes from the strict-PPT sampler sampleExp rather than exactly
uniformly; and the setup law is arbitrary, so F.DiscreteLog setup is the source's assumption
when an efficient algorithm samples the setup (see DiscreteLog).
The eavesdropping impersonation attack on Schnorr identification ([BS23], Attack
Game 18.2) with its native algorithms: the key pair comes from schnorrSigKeyGen and the Q n
overheard honest conversations from the strict-PPT honest prover schnorrRealTranscript, both of
which sample exponents with F.sampleExp n d.
Executable ProbComp Bool eavesdropping experiment at group description d: sample
(pk, sk) ← schnorrSigKeyGen n d, generate Q n honest transcripts with schnorrRealTranscript,
run A.commit, sample c ← BitString.sampleList (k n), run A.respond, and verify with
encodeSchnorrVerify.
Averaging schnorrEavesdropProbExperiment over d ← setup n yields
schnorrEavesdropProbGame.
schnorrEavesdropProbExperiment is uniformly strict PPT in (n, d) whenever k and Q are
computable in polynomial time and A is a uniform strict PPT SchnorrEavesdropAdversary.
Replacing schnorrSigKeyGen with ideal uniform key generation in schnorrEavesdropProbGame
changes the game advantage by at most 1 / 2 ^ n.
Replacing both schnorrSigKeyGen and the Q n strict-PPT honest conversations in
schnorrEavesdropProbGame with ideal key generation and simulated conversations in
schnorrDirectGame setup k (A.toDirect k Q) changes the game advantage by at most
(2 * Q n + 1) / 2 ^ n.
Concrete bound for the native eavesdropping attack: at each security parameter where every
supported group has at least 2 ^ k n elements, an eavesdropper's success probability in
schnorrEavesdropProbGame is at most (2 * Q n + 1) / 2 ^ n + 1 / 2 ^ k n + √ε', where ε' is
the discrete-logarithm success probability of the rewinding adversary (A.toDirect k Q).rewind k.
The term (2 * Q n + 1) / 2 ^ n is the statistical distance of the native key generator and the
Q n simulated conversations from ideal ones, where [BS23], Theorem 19.5 has an exact
equality.
Schnorr identification with challenge length k is secure against eavesdropping attacks
([BS23], Definition 18.6) with its native algorithms (schnorrEavesdropProbGame): for
every polynomial-time conversation count Q and every uniform strict PPT eavesdropping adversary
A, the success probability is negligible. The source's adversary chooses how many conversations
to request; quantifying over every polynomial-time count Q covers an adversary that requests at
most Q n of them.
Schnorr identification is secure against eavesdropping attacks under the discrete-logarithm
assumption ([BS23], Theorems 19.1 and 19.5 combined), with its native algorithms.
Under the premises of negligible_schnorrDirectProbGame and a conversation count Q computable in
polynomial time, every uniform strict PPT eavesdropping adversary succeeds in
schnorrEavesdropProbGame with negligible probability. The proof applies F.DiscreteLog setup to
the rewinding adversary of the direct impersonator A.toDirect k Q, which simulates the Q n
conversations, through the certificates isPPT_toDirect and isPPTOn_rewind. Where
Theorem 19.5 has an exact equality, the strict-PPT simulator and key generator add the statistical
term (2 * Q n + 1) / 2 ^ n (succProbability_schnorrEavesdropProbGame_le). The other
differences from the source are those of negligible_schnorrDirectProbGame.
Schnorr identification satisfies IsProbEavesdropSecure under the discrete-logarithm
assumption ([BS23], Theorems 19.1 and 19.5 combined): this is
negligible_schnorrEavesdropProbGame for every polynomial-time conversation count and every
uniform strict PPT eavesdropper.