Sigma protocols #
A Sigma protocol ([BS23], Section 19.4) is a three-move protocol for a relation
R : X → Y → Prop: given a witness x for the statement y, the prover sends a commitment
t, the verifier replies with a uniformly random challenge c from a finite set, the prover
answers with a response z, and the verifier decides deterministically from y and the
conversation (t, c, z).
The prover's private state between its two messages is explicit. Its commitment and state are sampled together, and its response is a function of the state and the challenge; randomness the response needs can be sampled with the commitment and kept in the state. Protocols are plain functions and distributions, with no efficiency or finiteness assumption; the properties are exact statements about a single protocol.
Each property carries its algorithm explicitly. SpecialSoundness R extract says that the
deterministic extract computes a witness from any two accepting conversations that share a
commitment and have distinct challenges, for every statement, with or without a witness.
SpecialHVZK R simulate says that the simulator, given a statement and a challenge, always
outputs accepting conversations, and that for each witness-statement pair and each fixed
challenge its output has exactly the law of the honest commitment and response. With a uniform
challenge this gives the book's Definition 19.5 (SpecialHVZK.conversation_eq).
Main definitions #
Cslib.Crypto.Protocols.SigmaProtocol: commitment, response and verification.SigmaProtocol.transcript,SigmaProtocol.conversation: honest executions.SigmaProtocol.Complete: honest conversations always accept.SigmaProtocol.SpecialSoundness: an explicit witness extractor (Definition 19.4).SigmaProtocol.SpecialHVZK: an explicit perfect simulator (Definition 19.5).
Main results #
SigmaProtocol.Complete.accepts_of_mem_support_conversation: the verifier always accepts the honest prover.SigmaProtocol.SpecialHVZK.conversation_eq: a simulated conversation with a uniform challenge has the law of an honest one.SigmaProtocol.SpecialSoundness.exists_witness: two accepting conversations with a common commitment and distinct challenges certify that the statement has a witness.
References #
A Sigma protocol with witnesses in Witness, statements in Statement, and conversations
(t, c, z) in Commitment × Challenge × Response ([BS23], Definition 19.3).
Completeness and the security properties are separate predicates.
- State : Type u
The prover's private state between its commitment and its response.
Sample the commitment together with the prover's private state.
- respond : Witness → Statement → self.State → Challenge → Response
Answer a challenge from the private state.
- verify : Statement → Commitment → Challenge → Response → Bool
The verifier's deterministic decision on a statement and a conversation.
Instances For
The conversation (t, c, z) is accepting for the statement y.
Instances For
The honest prover's commitment and response when the verifier sends the challenge c.
Instances For
An honest execution: the prover commits, the verifier sends a uniform challenge, and the prover responds.
Instances For
Completeness ([BS23], Definition 19.3): for every witness-statement pair in R
and every challenge, every honest transcript is accepting.
Instances For
Special soundness ([BS23], Definition 19.4): extract returns a witness for any
statement from two accepting conversations with a common commitment and distinct challenges.
Instances For
Special honest-verifier zero knowledge ([BS23], Definition 19.5) with the explicit
simulator simulate. The simulator gets a statement and a challenge and returns a commitment
and a response.
Simulated conversations are accepting, for every statement and challenge.
For a witness-statement pair, simulation at any fixed challenge has the honest law.
Instances For
Completeness for a relation implies completeness for every smaller relation.
A witness extractor for a relation is one for every larger relation.
A simulator for a relation is one for every smaller relation.
Every possible honest commitment leads to an accepting response, whatever the challenge.
Special soundness certifies that the statement has a witness.
Continuing after an honest transcript is continuing after the commitment with the honest response.
An honest execution samples the challenge first and then the prover's messages.
Every honest conversation is accepting: the verifier always accepts the honest prover.
With a uniform challenge, the simulator reproduces the honest conversation law ([BS23], Definition 19.5 (ii)).