Language reductions and derived Sigma protocols #
Pullback of a Sigma protocol P' for R' along a witness map f : X → Y → X' and a statement
map g : Y → Y' ([BS23], Section 20.2, p. 829). The derived protocol P'.comap f g
runs P' on (f x y, g y) for the prover and on g y for the verifier, keeping commitments,
challenges and responses unchanged.
A LanguageReduction R R' f g requires:
(i) (f x y, g y) is in R' whenever (x, y) is in R (map_rel);
(ii) y has some witness in R whenever g y has one in R' (exists_of_exists_map).
Complete.comap and SpecialHVZK.comap depend only on condition (i). SpecialSoundness.comap
transfers special soundness to the relation "w is a witness of g y" without hypotheses on the
maps; SpecialSoundness.mapWitness maps the extracted witness back to R when a witness map
k : W → Y → W' is given.
Unlike Cslib.Complexity.LevinReduction
(CslibFrontier/Computability/Complexity/Reduction/Levin.lean) and ZKProof.withRelationWitness
(CslibFrontier/Crypto/Computational/ZeroKnowledge/Levin.lean), which act on encoded NP relations
and include a polynomial-time backward witness map, LanguageReduction works on typed relations
without encodings or decision procedures and does not require recovering witnesses of y from
witnesses of g y.
Main definitions #
Cslib.Crypto.Protocols.SigmaProtocol.LanguageReduction: predicate bundling conditions (i) and (ii) of a language reduction.Cslib.Crypto.Protocols.SigmaProtocol.comap: derived Sigma protocol alongfandg.
Main results #
Cslib.Crypto.Protocols.SigmaProtocol.Complete.comap: completeness under condition (i).Cslib.Crypto.Protocols.SigmaProtocol.SpecialHVZK.comap: special HVZK under condition (i).Cslib.Crypto.Protocols.SigmaProtocol.SpecialSoundness.comap: special soundness for the mapped statementg y.Cslib.Crypto.Protocols.SigmaProtocol.SpecialSoundness.mapWitness: post-processing an extractor with a witness map back.Cslib.Crypto.Protocols.SigmaProtocol.LanguageReduction.complete: completeness from a language reduction.Cslib.Crypto.Protocols.SigmaProtocol.LanguageReduction.specialHVZK: special HVZK from a language reduction.
A language reduction from R to R' ([BS23], Section 20.2): a curried
witness map f : X → Y → X' (taking x and y separately rather than as a pair (x, y)) and a
statement map g : Y → Y' such that (i) f sends a witness of y to a witness of g y, and
(ii) g y is a true statement of R' only if y is a true statement of R. Unlike the book's
maps, the predicate does not ask for f or g to be efficiently computable; word representations
appear as hypotheses on the transfers in
CslibFrontier/Crypto/Protocols/SigmaProtocol/LanguageReduction/Efficient.lean.
- map_rel (x : X) (y : Y) : R x y → R' (f x y) (g y)
Condition (i).
- exists_of_exists_map (y : Y) : (∃ (x' : X'), R' x' (g y)) → ∃ (x : X), R x y
Condition (ii).
A witness map back gives condition (ii).
The protocol for statements Y and witnesses X obtained from a protocol P' for statements
Y' and witnesses X' along a witness map f and a statement map g
([BS23], Section 20.2): the prover on (x, y) is the prover of P' on
(f x y, g y), and the verifier on y is the verifier of P' on g y. Commitments, challenges
and responses are unchanged.
Completeness is inherited under condition (i).
Special HVZK is inherited under condition (i), with the simulator of P' run on g y.
Special soundness is inherited for the relation "w is a witness of g y", with the
extractor of P' run on g y. No condition on the maps is needed, and the extracted witness is
one of R', not of R.
Post-process the extracted witness by a map that preserves the relation at every statement.
A language reduction gives a complete protocol (this is Complete.comap at h.map_rel, which
needs condition (i) only).
A language reduction gives a special HVZK protocol (this is SpecialHVZK.comap at h.map_rel,
which needs condition (i) only).