Sigma Protocol #
This file defines a structure type for Σ-protocols, along with standard security properties: completeness, special soundness, and honest-verifier zero-knowledge (HVZK).
Type Parameters #
Stmt: statement (public key)Wit: witness (secret key)Commit: public commitmentPrvState: private prover state (retained between commit and respond)Chal: verifier challenge (drawn uniformly)Resp: prover responserel: the relation proven by the protocol
Coercion to IdenSchemeWithAbort #
Every SigmaProtocol can be viewed as a non-aborting IdenSchemeWithAbort via
SigmaProtocol.toIdenSchemeWithAbort, which wraps respond with some.
A sigma protocol for statements in Stmt and witnesses in Wit,
where rel : Stmt → Wit → Bool is the proposition proven by the Σ-protocol.
Commitments are split into a public part Commit (revealed to the verifier) and a
private part PrvState (retained by the prover). Verifier challenges are drawn uniformly
from Chal. Prover responses are in Resp.
We leave properties like special soundness as separate definitions for better modularity.
Generate a commitment to prove knowledge of a valid witness.
Given a previous private state, respond to the challenge.
Deterministic verification: check that the response satisfies the challenge.
- sim (stmt : Stmt) : ProbComp Commit
Simulate public commitment generation while only knowing the statement.
Extract a witness to the statement from two accepting transcripts.
Instances For
A Σ-protocol is perfectly complete if the honest prover always convinces the verifier on valid statement-witness pairs.
Instances For
Special soundness at a particular statement: given two accepting transcripts with the same commitment but different challenges, the extracted witness is valid.
Instances For
A Σ-protocol is specially sound if SpeciallySoundAt holds for all statements.
Instances For
Special soundness immediately validates any witness returned by the Σ-protocol extractor from two accepting transcripts with the same statement and commitment and with distinct challenges.
The honest prover's transcript distribution for a Σ-protocol.
Instances For
Honest-verifier zero-knowledge: the real transcript distribution is within total variation
distance ζ_zk of the simulated one.
The real transcript is σ.realTranscript x w.
The simulated transcript is produced by simTranscript given only the statement x.
Note: the sim field of SigmaProtocol only produces a public commitment. For HVZK we need
a full transcript simulator Stmt → ProbComp (Commit × Chal × Resp). We parameterize by this
simulator.
Instances For
Exact honest-verifier zero-knowledge: the real transcript distribution equals the simulated one.
Instances For
The perfect HVZK property is equivalent to the approximate HVZK property with ζ_zk = 0.
A Σ-protocol has unique responses if for any statement, commitment, and challenge, there is at most one valid response. This property is required by the Fischlin transform and holds for most common Σ-protocols (Schnorr, Guillou-Quisquater, etc.).
Instances For
Every SigmaProtocol can be viewed as a non-aborting IdenSchemeWithAbort by wrapping
the response in some. The sim and extract fields are not part of
IdenSchemeWithAbort and are dropped.