Computational special honest-verifier zero knowledge #
Boneh and Shoup's computational relaxation of special HVZK ([BS23], Section 20.4.2,
Attack Game 20.4 and Definition 20.6, p. 840) for an indexed family of Sigma protocols P i over a
parameter distribution setup : ℕ → PMF I ([BS23], Section 2.3.4).
Attack Game 20.4 is first stated at one index. chvzkExperiment R conv A runs a two-stage
adversary A : TwoStage Unit (X × Y) (T × C × Z) Bool σ: it chooses a witness-statement pair
(x, y) and a saved state; if R x y fails the experiment outputs false, and otherwise it
samples a conversation from conv x y and outputs A's guess on it.
- Experiment 0 uses the honest conversation
(P i).conversation x y. - Experiment 1 uses
simulatedConversation sim i y: sample a uniform challengecand run the typed simulatorsim i y cwithoutx.
The games chvzkRealGame and chvzkSimGame draw i ← setup n and run the experiment at i with
the adversary A n i of a family A : CHVZKAdversary I X Y T C Z σ. Adversaries receive and
return typed values; their efficiency is stated on encodings by CHVZKAdversary.IsPPT. The choice
stage writes ((encW i x, enc.statement i y), state), the layout of the word-level adversaries
when σ := List Bool. The guessing stage reads the record CHVZKGuessInput, encoded by
encCHVZKGuessInput as the unary security parameter, the state, the index and the encoded
commitment, challenge and response.
ComputationalSpecialHVZK P R enc encW setup sim δ bundles, for a typed simulator family
sim : Simulator I Y T C Z:
- Uniform strict PPT admissibility of
sim(Simulator.IsPPT), the only place where its encodings appear. - Acceptance on every
(i, y, c)with probability at least1 - δ i(exact Definition 20.6 acceptance whenδ = 0; relaxed byδwhen a strict PPT fair-coin simulator approximates a non-dyadic distribution). - Negligible distinguishing advantage between
chvzkRealGameandchvzkSimGamefor every state type, state encoding and uniform strict PPTCHVZKAdversary.
Every EfficientSpecialHVZK protocol whose realization error δ is bounded along setup by a
negligible function satisfies ComputationalSpecialHVZK, in fact against arbitrary, even
computationally unbounded adversaries at each index
(SimulatorRealizedBy.advantage_chvzkExperiment_le,
EfficientSpecialHVZK.exists_computationalSpecialHVZK). As in EfficientSpecialHVZK, δ is an
explicit parameter of ComputationalSpecialHVZK rather than a bundled Negligible condition on the
acceptance error alone; exact Definition 20.6 acceptance corresponds to δ = fun _ => 0 (which
Schnorr's simulator achieves in PrimeOrderGroupFamily.computationalSpecialHVZK_schnorr).
When an ideal-sampling PMF prover P is replaced by a fair-coin prover P' whose honest
transcripts are within statistical distance ε of P's on valid pairs, pointwise transcript
closeness (SimulatorRealizedBy.closeTo_transcript_of_closeTo), Attack Game 20.4 advantage bounds
(advantage_chvzkRealGame_le_of_closeTo_transcript,
SimulatorRealizedBy.advantage_chvzkGame_le_of_closeTo_transcript), and ComputationalSpecialHVZK
(ComputationalSpecialHVZK.of_closeTo_transcript) transfer without requiring P and P' to share
a private-state type.
Main definitions #
Cslib.Crypto.Protocols.SigmaProtocol.chvzkExperiment: Attack Game 20.4 at one index, for a given conversation law.Cslib.Crypto.Protocols.SigmaProtocol.CHVZKAdversary,Cslib.Crypto.Protocols.SigmaProtocol.CHVZKGuessInput,Cslib.Crypto.Protocols.SigmaProtocol.encCHVZKGuessInput,Cslib.Crypto.Protocols.SigmaProtocol.CHVZKAdversary.IsPPT: families of typed two-stage adversaries and their uniform strict PPT admissibility.Cslib.Crypto.Protocols.SigmaProtocol.simulatedConversation: the conversation of a typed simulator at a uniform challenge.Cslib.Crypto.Protocols.SigmaProtocol.chvzkRealGame,Cslib.Crypto.Protocols.SigmaProtocol.chvzkSimGame: Attack Game 20.4 oversetup.Cslib.Crypto.Protocols.SigmaProtocol.ComputationalSpecialHVZK: Definition 20.6 with explicit simulator and acceptance errorδ.
Main results #
Cslib.Crypto.Protocols.SigmaProtocol.advantage_chvzkExperiment_le: conversation laws that areε-close on valid pairs give advantage at mostεagainst every adversary.Cslib.Crypto.Protocols.SigmaProtocol.SimulatorRealizedBy.closeTo_simulatedConversation: statistical closeness of honest and simulated conversations.Cslib.Crypto.Protocols.SigmaProtocol.SimulatorRealizedBy.advantage_chvzkExperiment_le,Cslib.Crypto.Protocols.SigmaProtocol.SimulatorRealizedBy.advantage_chvzkGame_le: concrete advantage bounds in Attack Game 20.4 against arbitrary adversaries.Cslib.Crypto.Protocols.SigmaProtocol.SimulatorRealizedBy.computationalSpecialHVZK_of_accepts,Cslib.Crypto.Protocols.SigmaProtocol.SimulatorRealizedBy.computationalSpecialHVZK,Cslib.Crypto.Protocols.SigmaProtocol.EfficientSpecialHVZK.exists_computationalSpecialHVZK: statistical special HVZK with negligible realization error alongsetupimplies computational special HVZK.EfficientSpecialSoundness.of_verify_eq,SimulatorRealizedBy.closeTo_transcript_of_closeTo,advantage_chvzkRealGame_le_of_closeTo_transcript,SimulatorRealizedBy.advantage_chvzkGame_le_of_closeTo_transcript,ComputationalSpecialHVZK.of_closeTo_transcript,closeTo_andProof_transcript,closeTo_orProofWith_transcript,closeTo_parallelRepetition_transcriptCslib.Crypto.Protocols.SigmaProtocol.exists_negligible_inv_two_pow_map: uniform1 / 2 ^ nerror along any(setup n).map (n, ·)distribution is negligibly bounded.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Section 2.3.4 and Section 20.4.2 (Attack Game 20.4 and Definition 20.6, p. 840).
Attack Game 20.4 at one index #
Attack Game 20.4 ([BS23], Section 20.4.2, p. 840) at one index, with conversation
law conv. The adversary chooses a witness-statement pair (x, y) and a state. If R x y holds,
the challenger samples a conversation from conv x y and the experiment outputs the adversary's
guess on it; it outputs false when R x y fails.
Conversation laws that are ε-close on every valid pair give Attack Game 20.4 advantage at
most ε against every adversary, including computationally unbounded ones.
Adversary families and their efficiency #
A family of Attack Game 20.4 adversaries: at security parameter n and index i, a two-stage
adversary that chooses a pair in X i × Y i with a state of type σ, then guesses from the state
and a conversation in T i × C i × Z i. CHVZKAdversary.IsPPT states its efficiency on
encodings.
The input of the guessing stage: the security parameter, the saved state, the index and a conversation at that index.
The encoding of a guessing-stage input: the unary security parameter, the state encoded by
encσ, the index and the words of the commitment, challenge and response under enc at that
index, each framed except the last (encCHVZKGuessInput_apply).
A family of Attack Game 20.4 adversaries is uniform strict PPT: one machine runs each stage at
every security parameter and index. The choice stage reads the unary security parameter and the
encoded index and writes the encoded witness, statement and state; the guessing stage reads
encCHVZKGuessInput and writes the guess. Each clock charges the complete encoded input,
including the saved state.
- choose : Probability.IsPPTOn (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary enc.index) (Turing.MultiTapeTM.encPair (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) encσ) fun (x : ℕ × I) => match x with | (n, i) => (fun (out : (X i × Y i) × σ) => (((encW i) out.1.1, (enc.statement i) out.1.2), out.2)) <$> (A n i).choose ()
The choice stage is uniform strict PPT on the security parameter and the index.
- guess : Probability.IsPPTOn (encCHVZKGuessInput enc encσ) Turing.MultiTapeTM.encBool fun (g : CHVZKGuessInput I T C Z σ) => (A g.secParam g.index).guess g.state (g.commitment, g.challenge, g.response)
The guessing stage is uniform strict PPT on the encoded guessing-stage input.
The real and simulated games #
The simulated conversation on (i, y) ([BS23], Section 20.4.2, Attack Game 20.4,
Experiment 1, p. 840): sample a uniform challenge c : C i and run sim i y c.
Experiment 0 of Attack Game 20.4 ([BS23], Section 20.4.2, p. 840): draw i ← setup n
and give the adversary an honest conversation of P i on its valid pair.
Experiment 1 of Attack Game 20.4 ([BS23], Section 20.4.2, p. 840): draw i ← setup n
and give the adversary a conversation simulated from the statement of its valid pair, without the
witness.
Computational special honest-verifier zero knowledge ([BS23], Section 20.4.2,
Definition 20.6, p. 840), for a family P of Sigma protocols over setup with explicit typed
simulator sim and acceptance error δ: sim is uniform strict PPT, outputs an accepting
conversation on every (i, y, c) with probability at least 1 - δ i (exact Definition 20.6
acceptance when δ = fun _ => 0), and for every state type and state encoding, every uniform
strict PPT CHVZKAdversary has negligible distinguishing advantage between chvzkRealGame and
chvzkSimGame.
- ppt : Simulator.IsPPT enc sim
The simulator family is uniform strict PPT.
- accepts (i : I) (y : Y i) (c : C i) : 1 - δ i ≤ (sim i y c).eval.toOuterMeasure {tz : T i × Z i | (P i).Accepts y tz.1 c tz.2}
On every statement and challenge,
simoutputs an accepting conversation with probability at least1 - δ i. - indistinguishable {σ : Type} (encσ : σ ↪ List Bool) : Game.Indistinguishable (chvzkRealGame P R setup) (chvzkSimGame R setup sim) (CHVZKAdversary.IsPPT enc encW encσ)
Honest and simulated conversations are computationally indistinguishable in Attack Game 20.4, for every state type and state encoding.
Relaxing the acceptance-error bound preserves ComputationalSpecialHVZK.
Bridging statistical EfficientSpecialHVZK to ComputationalSpecialHVZK #
A simulator realizing a perfect special HVZK simulator up to δ i gives simulated
conversations within statistical distance δ i of honest conversations, for every valid
witness-statement pair.
When δ i ≤ ε, a simulator realizing a perfect special HVZK simulator has Attack Game 20.4
advantage at most ε at index i against every adversary (including computationally unbounded
adversaries).
When δ i ≤ ε on (setup n).support, a simulator realizing a perfect special HVZK simulator
has Attack Game 20.4 advantage at most ε against every adversary family (including
computationally unbounded adversaries).
A strict PPT simulator realizing a perfect special HVZK simulator with negligible statistical
error along setup gives ComputationalSpecialHVZK, retaining any independently proved acceptance
error δ'.
A strict PPT simulator realizing a perfect special HVZK simulator with negligible statistical
error along setup satisfies ComputationalSpecialHVZK with acceptance error δ.
Efficient statistical special HVZK implies computational special HVZK whenever the
realization error δ is bounded along setup by a negligible function.
Transfer across protocols with close honest transcripts #
Efficient special soundness depends only on verify and transfers across protocol families with
the same verifier.
Combining a perfect special HVZK simulator for P, a typed simulator realizing it up to
δS i, and a second protocol family P' whose honest transcript is within δP i of (P i)'s
yields δP i + δS i pointwise transcript closeness for P'.
Replacing P by a protocol family P' whose honest transcripts are within ε on valid pairs
over (setup n).support changes Experiment 0 of Attack Game 20.4 (chvzkRealGame) by at most ε
in Game.advantage, against every adversary (including computationally unbounded ones).
Combining advantage_chvzkRealGame_le_of_closeTo_transcript and
SimulatorRealizedBy.advantage_chvzkGame_le bounds Attack Game 20.4 distinguishing advantage for
P' by εP + εS against every adversary (including computationally unbounded ones).
ComputationalSpecialHVZK transfers from P to P' with the same simulator sim and
acceptance error δ whenever P' accepts every conversation P accepts and their honest
transcripts are within a negligible statistical distance along setup on valid pairs.
Honest transcripts of andProof add their component transcript distances (δ₀ + δ₁).
Honest transcripts of orProofWith on any valid witness-statement pair (orRelation R₀ R₁)
add the challenge-sampling error δC, the simulated-side error δS, and the witness-side honest
transcript error δP.
Honest transcripts of k-fold parallelRepetition multiply a uniform coordinate transcript
distance δ by k.
1 / 2 ^ n is bounded along any distribution paired with the security parameter by a
negligible geometric sequence.