Sigma protocols as public-coin interactive reductions #
Every Sigma protocol P : SigmaProtocol X Y T C Z with a nonempty finite challenge space C
embeds as a three-round public-coin interactive reduction in the plain model
(CslibFrontier.Computability.Interactive), reducing the swapped relation Function.swap R : Y → X → Prop to Interactive.Accept:
- The prover sends a commitment
t : Twith full oracle access (OracleInterface.full T). - The verifier samples a uniform challenge
c : CviaProbComp.uniform C. - The prover sends a response
z : Zwith full oracle access (OracleInterface.full Z). - The verifier reads
tandzand accepts (some ()) iffP.verify y t c z = true.
Because SigmaProtocol.commit is a semantic PMF while Interactive.Reduction requires an
explicit ProbOracleComp strategy tree, the honest prover takes a ProbComp commitment sampler
sampleCommit : X → Y → ProbComp (T × P.State) certified by P.CommitRealizedBy sampleCommit.
The verifier (P.toInteractiveVerifier) needs no sampler beyond ProbComp.uniform C.
This module proves that the Sigma-protocol security notions transfer across the bridge:
- Completeness (
Complete.toInteractiveReduction):P.Complete RandP.CommitRealizedBy sampleCommitimply perfect completeness(P.toInteractiveReduction sampleCommit).Complete World.plain (Function.swap R) Accept 0. - Round-by-round soundness and soundness (
SpecialSoundness.rbrSound,SpecialSoundness.sound):P.SpecialSoundness R extractimplies round-by-round soundnessP.toInteractiveVerifier.RbrSound (language (Function.swap R)) langOut (1 / |C|, ())and plain-model soundness with error1 / |C|. At the commitment prefixsome (t, none), a prefix is doomed unless two distinct challenges have accepting responses; by 2-special soundness, no false statement can reach a non-doomed commitment, and from a doomed commitment at most one challenge inChas an accepting response. - Honest-verifier zero knowledge (
SpecialHVZK.hvzk,SpecialHVZK.hvzk_zero,EfficientSpecialHVZK.efficientHVZK):P.SpecialHVZK R simulateand aProbCompsimulatorsimCompwithinεofsimulategive(P.toInteractiveReduction sampleCommit).HVZK (Function.swap R) (P.interactiveSim simComp) ε(0whensimCompis exact); combined with a strict PPT challenge sampler forC i,EfficientSpecialHVZKtransfers toReduction.EfficientHVZK. - Protocol instances: commitment and simulator realizations for
SigmaProtocol.linear,SigmaProtocol.schnorr,SigmaProtocol.andProofandSigmaProtocol.orProof.
No knowledge-soundness statement is made here: Interactive.Verifier.KnowledgeSound asks for a
straight-line extractor, while the proof-of-knowledge property of Sigma protocols comes from a
rewinding extractor, built for indexed families in
CslibFrontier.Crypto.Protocols.SigmaProtocol.ProofOfKnowledge.
Main definitions #
SigmaProtocol.interactiveSpec: the 3-round public-coin specification[.prover T (OracleInterface.full T), .verifier C, .prover Z (OracleInterface.full Z)].SigmaProtocol.interactiveTranscript,SigmaProtocol.transcriptOfConversation,SigmaProtocol.commitOfTranscript,SigmaProtocol.challengeOfTranscript,SigmaProtocol.responseOfTranscript,SigmaProtocol.conversationOfTranscript: transcript constructors and projections.SigmaProtocol.CommitRealizedBy:ProbComprealization ofP.commit.SigmaProtocol.toInteractiveVerifier,SigmaProtocol.toInteractiveProver,SigmaProtocol.toInteractiveReduction: the interactive verifier, prover and reduction.SigmaProtocol.rbrState: the round-by-round state function on prefixes ofP.interactiveSpec.SigmaProtocol.interactiveSim: the interactive transcript simulator induced by a challenge-conditioned simulator.SigmaProtocol.Encoding.toInteractiveEncoding: interactive word encodings induced by aSigmaProtocol.Encoding.
Main results #
SigmaProtocol.eval_toInteractiveReduction_run,SigmaProtocol.map_fst_eval_toInteractiveReduction_run: the plain-model execution and transcript laws ofP.toInteractiveReduction.SigmaProtocol.Complete.toInteractiveReduction: completeness transfer.SigmaProtocol.SpecialSoundness.rbrSound,SigmaProtocol.SpecialSoundness.sound: round-by-round soundness and plain-model soundness with error1 / |C|.SigmaProtocol.SpecialHVZK.hvzk,SigmaProtocol.SpecialHVZK.hvzk_zero,SigmaProtocol.EfficientSpecialHVZK.efficientHVZK: HVZK and efficient HVZK transfer.
Specification and transcripts #
The interactive specification of P.
Package a commitment t, challenge c and response z as a transcript of
P.interactiveSpec.
Package a conversation triple (t, c, z) as a transcript of P.interactiveSpec.
The commitment t of an interactive transcript.
The challenge c of an interactive transcript.
The response z of an interactive transcript.
View an interactive transcript as a Sigma-protocol conversation (t, c, z).
Interactive verifier, prover and reduction #
sampleCommit realizes P.commit as a ProbComp program.
The honest prover strategy of P in the plain model, using sampleCommit to sample the
commitment and private prover state, then answering the verifier's challenge with P.respond.
The public-coin interactive verifier of P in the plain model: sample a uniform challenge
c : C, read the commitment t : T and response z : Z, and output some () iff
P.verify y t c z = true.
Embed P as a three-round public-coin interactive reduction in the plain model, reducing
Function.swap R : Y → X → Prop to Interactive.Accept.
In the plain model, running P.toInteractiveProver sampleCommit against the verifier's uniform
challenge sampler produces the conversation law P.conversation x y.
The full plain-model execution law of P.toInteractiveReduction sampleCommit.
The transcript marginal of an honest plain-model run of P.toInteractiveReduction is
(P.conversation x y).map P.transcriptOfConversation.
Completeness transfer #
Completeness transfer: a complete Sigma protocol with a realized commitment sampler gives a
perfectly complete interactive reduction to Interactive.Accept in the plain model.
Round-by-round soundness and soundness transfer #
The round-by-round state predicate for P on transcript prefixes of P.interactiveSpec:
- at the empty prefix
none, some commitment has accepting responses for two distinct challenges; - after commitment
t(some (t, none)),thas accepting responses for two distinct challenges; - after challenge
c(some (t, some (c, none))),(t, c)has an accepting responsez; - on a complete transcript
some (t, some (c, some (z, ()))),P.Accepts y t c zholds.
P.rbrState y satisfies RbrFrom with challenge error 1 / Fintype.card C.
Round-by-round soundness transfer: 2-special soundness of P implies round-by-round
soundness of P.toInteractiveVerifier with challenge error 1 / |C|.
Soundness transfer: 2-special soundness of P implies plain-model soundness of
P.toInteractiveVerifier against arbitrary unbounded provers with error 1 / |C|.
Honest-verifier zero knowledge transfer #
The interactive transcript simulator induced by a challenge-conditioned ProbComp simulator
simComp: sample a uniform challenge c : C, sample (t, z) ← simComp y c, and return
(t, c, z, ()).
HVZK transfer: if P is special HVZK with simulate, sampleCommit realizes P.commit,
and simComp y c is within statistical distance ε of simulate y c at every challenge, then
P.toInteractiveReduction sampleCommit is ε-HVZK with P.interactiveSim simComp.
Perfect HVZK transfer: if P is special HVZK with simulate, sampleCommit realizes
P.commit, and simComp evaluates to simulate at every challenge, then
P.toInteractiveReduction sampleCommit is perfectly HVZK (ε = 0).
Indexed families: encodings and efficient HVZK #
Convert a SigmaProtocol.Encoding for an indexed family PF into an Interactive.Encoding,
encoding each transcript (t, c, z, ()) as the nested pair (t, (c, z)).
Combine a challenge sampler sampleChallenge with a word-level Sigma-protocol simulator
program to sample encoded interactive transcripts (t, (c, z)): the sampled challenge is passed
to program encoded by enc.
If program is uniform strict PPT and one machine samples the encoded challenges of
sampleChallenge from the encoded index, then interactiveSimWord is uniform strict PPT.
interactiveSimWord realizes (PF i).interactiveSim (simComp i) on encodings up to
δC i + δ i, when program is within δ i of the encoded simulate i on every encoded input
(as SimulatorRealizedBy.exists_word provides).
Efficient HVZK transfer: an EfficientSpecialHVZK family of Sigma protocols, paired with a
strict PPT challenge sampler for CF i within δC i of uniform, yields
Interactive.Reduction.EfficientHVZK with simulation error 0 and realization error
δC i + δ i.
Realizations for linear, Schnorr, AND and OR protocols #
ProbComp commitment sampler for SigmaProtocol.linear: draw r ← ProbComp.uniform M and
return (ψ y r, r).
ProbComp simulator for SigmaProtocol.linear: draw z ← ProbComp.uniform M and return
(ψ y z - ι c • u y, z).
ProbComp commitment sampler for P₀.andProof P₁.
ProbComp commitment sampler for orProof P₀ P₁ simulate₀ simulate₁.
ProbComp simulator for orProof P₀ P₁ simulate₀ simulate₁.