Efficient special soundness and special HVZK #
SigmaProtocol.SpecialSoundness and SigmaProtocol.SpecialHVZK name their extractor and
simulator but accept arbitrary functions and distributions. Boneh and Shoup require an efficient
deterministic extractor (Definition 19.4) and an efficient probabilistic simulator
(Definition 19.5). Without that requirement the notions say little: a Sigma protocol has some
extractor exactly when two accepting conversations with a common commitment and distinct
challenges certify that the statement has a witness, and for a relation in which every statement
has exactly one witness, even the protocol that reveals its witness is special HVZK (test module
CslibFrontierTests.UnboundedSimulators). This module adds the efficient variants; the test module
CslibFrontierTests.EfficientSimulators shows that, under the discrete-logarithm assumption, they
rule out both examples.
Efficiency is uniform over a family P i of Sigma protocols indexed by i : I, typically a
unary security parameter together with a system parameter such as a group description
([BS23], Definition 2.9). The types of statements, commitments, challenges and responses
may depend on the index, so the algorithms are certified on words, through the encodings
collected in a SigmaProtocol.Encoding.
EfficientSpecialSoundness P R enc encW extract: at every indexextract iis a witness extractor, and one deterministic polynomial-time function of words computes the whole family (ExtractorRealizedBy).EfficientSpecialHVZK P R enc simulate δ: at every indexsimulate iis a perfect simulator, and one typed simulator familysim : Simulator I Y T C Zis uniform strict PPT (Simulator.IsPPT) and within statistical distanceδ iofsimulate i(SimulatorRealizedBy). The simulator takes and returns typed values; encodings appear only inSimulator.IsPPT, which reads the recordSimulatorInputof the index, the statement and the challenge and writes the encoded commitment and response. The error is needed because a strict PPT machine has a fixed clock and only fair coins, so it cannot sampleZMod qexactly whenqis not a power of two; withProbComp.sampleModNatthe error is exponentially small. Boneh and Shoup's efficient algorithms (Definition 2.8) may instead exceed their time bound with negligible probability, which permits exact rejection sampling.
Both variants contain the exact property at every index with the same extractor or simulator, so
every theorem about SpecialSoundness and SpecialHVZK applies to them. An efficient simulator is
δ i-close to honest transcripts (SimulatorRealizedBy.closeTo_transcript) and outputs an
accepting conversation except with probability δ i (SimulatorRealizedBy.one_sub_le_accepts),
which relaxes Definition 19.5 (i). A simulator certified by Simulator.IsPPT is computed on words
by a uniform strict PPT program that agrees with it on every encoded input
(Simulator.IsPPT.exists_word), and conversely a word program that agrees with a typed simulator
certifies it (Simulator.IsPPT.of_word). Note that δ in EfficientSpecialHVZK is an
unconstrained parameter of the predicate rather than a bundled Negligible condition: at δ i ≥ 1
(since event probabilities are at most 1), SimulatorRealizedBy holds trivially for every
simulator, reducing EfficientSpecialHVZK to the unbounded SpecialHVZK field
(not_efficientSpecialHVZK_sendWitness in CslibFrontierTests.EfficientSimulators requires
δ i ≤ 1 / 2). Computational special HVZK ([BS23], Definition 20.6) is defined in
CslibFrontier.Crypto.Protocols.SigmaProtocol.Computational
(SigmaProtocol.ComputationalSpecialHVZK); when δ is bounded along the setup distribution by a
negligible function, EfficientSpecialHVZK.exists_computationalSpecialHVZK derives it.
Main definitions #
SigmaProtocol.Encoding: word encodings of an indexed family of Sigma protocols.SigmaProtocol.SimulatorInput,SigmaProtocol.encSimulatorInput: a simulator's input(index, statement, challenge)and its encoding.SigmaProtocol.encSimulatorWordInput,SigmaProtocol.encExtractorWordInput,SigmaProtocol.encSubChallengeWordInput: encodings of the inputs to word simulator, word extractor, and word challenge-subtraction programs.SigmaProtocol.Simulator,SigmaProtocol.Simulator.IsPPT: typed simulator families and their uniform strict PPT admissibility.SigmaProtocol.ExtractorRealizedBy: a word function computes an extractor family on encodings.SigmaProtocol.SimulatorRealizedBy: a typed simulator family isδ-close to a family of distributions.SigmaProtocol.WordSimulatorRealizedBy: a word program isδ-close to the encoded output of a family of distributions, the word-level form provided bySimulatorRealizedBy.exists_word.SigmaProtocol.EfficientSpecialSoundness: special soundness with a polynomial-time extractor.SigmaProtocol.EfficientSpecialHVZK: special HVZK with a strict PPT simulator, up toδ.SigmaProtocol.Encoding.andProof,SigmaProtocol.Encoding.orProof,SigmaProtocol.Encoding.parallelRepetition: composite encodings forandProof,orProof, andparallelRepetition.SigmaProtocol.andExtractWord,SigmaProtocol.andSimulator,SigmaProtocol.orExtractWord,SigmaProtocol.orSimulator,SigmaProtocol.parallelExtractWord,SigmaProtocol.parallelSimulator: word extractors and typed simulators for composed protocols.
Main results #
SigmaProtocol.Simulator.IsPPT.of_word,SigmaProtocol.Simulator.IsPPT.exists_word: a typed simulator is uniform strict PPT exactly when a uniform strict PPT word program computes it on encodings.SigmaProtocol.SimulatorRealizedBy.closeTo_transcript: an efficient simulator isδ i-close to the honest prover's commitment and response at every challenge.SigmaProtocol.SimulatorRealizedBy.one_sub_le_accepts: an efficient simulator outputs an accepting conversation with probability at least1 - δ i.SigmaProtocol.EfficientSpecialSoundness.andProof,SigmaProtocol.EfficientSpecialHVZK.andProof: efficiency transfer throughandProof.SigmaProtocol.EfficientSpecialSoundness.orProof,SigmaProtocol.EfficientSpecialHVZK.orProof: efficiency transfer throughorProof.SigmaProtocol.EfficientSpecialSoundness.parallelRepetition,SigmaProtocol.EfficientSpecialHVZK.parallelRepetition: efficiency transfer through positive parallel repetition, and through arbitrary repetition for simulation.SigmaProtocol.EfficientSpecialSoundness.parallelRepetition_of_default: the zero-fold extraction extension with a certified default-witness encoding.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Definitions 2.8, 2.9, 19.4, 19.5 and 20.6, Theorems 19.18–19.19 and Exercise 19.6.
Word encodings for a family of Sigma protocols indexed by I, with statements in Y i,
commitments in T i, challenges in C i and responses in Z i at the index i.
The index, such as a unary security parameter with a system parameter.
The statements at each index.
The commitments at each index.
The challenges at each index.
The responses at each index.
The word function f computes the extractor family extract on encodings: from the index,
the encoded statement and the encoded conversations (t, c, z) and (t, c', z'), it returns the
encoded witness.
The encoding of a simulator's input: the index, then the words of the statement and the
challenge under enc at that index, each framed except the last (encSimulatorInput_apply).
A family of special HVZK simulators: at index i, a probabilistic program from a statement and
a challenge to a commitment and a response. Simulator.IsPPT states its efficiency on encodings.
A simulator family is uniform strict PPT: one machine reads encSimulatorInput enc and writes
the encoded commitment and response, framing the commitment.
Input (i, y, c) of a word program computing a special HVZK simulator: the index i encoded by
encI, then the encoded statement and the encoded challenge as bit words. The index and the
statement are framed.
The word program program realizes the simulator family simulate on encodings up to
statistical distance δ: on the index, the encoded statement and the encoded challenge, its output
is within δ i of the encoded commitment and response sampled by simulate i. This is the
word-level form of SimulatorRealizedBy that SimulatorRealizedBy.exists_word provides.
A uniform strict PPT word program on the index and the encoded statement and challenge that
computes a typed program on encodings certifies the typed program. Its output type β and its
output encoding out are arbitrary, so this also certifies simulators with aborts.
A uniform strict PPT word program that computes a typed simulator on encodings certifies it.
A uniform strict PPT simulator family is computed on words by a uniform strict PPT program of the index and arbitrary statement and challenge words, which agrees with it on every encoded input.
The typed simulator family sim realizes the family of distributions simulate up to
statistical distance δ: on every statement and challenge at index i, its output law is within
δ i of simulate i. The outputs O i are commitment-response pairs for EfficientSpecialHVZK
and optional pairs for simulators with aborts.
A uniform strict PPT simulator family within δ of simulate yields a uniform strict PPT word
program of the index and arbitrary statement and challenge words whose output on every encoded input
is within δ i of the encoded simulate i.
Input (i, y, t, c, z, c', z') of a word function computing a special-soundness extractor:
the index i encoded by encI, then the encoded statement, commitment, and two challenge-response
pairs as bit words.
Efficient special soundness ([BS23], Definition 19.4). At every index,
extract i is a witness extractor for P i, and one deterministic polynomial-time function of the
index and words computes the whole family on encodings. As in SpecialSoundness, the extracted
witness has a type W i and a relation R i of its own.
- specialSoundness (i : I) : (P i).SpecialSoundness (R i) (extract i)
extract iis a witness extractor at every index. - polyTime : ∃ (f : I × List Bool × List Bool × List Bool × List Bool × List Bool × List Bool → List Bool), Turing.MultiTapeTM.ComputableInPolyTime f (encExtractorWordInput enc.index) Turing.MultiTapeTM.encBits ∧ ExtractorRealizedBy enc encW extract f
One polynomial-time word function computes the extractor family.
Efficient special HVZK ([BS23], Definition 19.5), up to a statistical error
δ. At every index, simulate i is a perfect special HVZK simulator for P i, and one uniform
strict PPT simulator family realizes the whole family up to δ, for every statement and
challenge.
- specialHVZK (i : I) : (P i).SpecialHVZK (R i) (simulate i)
simulate iis a perfect special HVZK simulator at every index. - realized : ∃ (sim : Simulator I Y T C Z), Simulator.IsPPT enc sim ∧ SimulatorRealizedBy simulate sim δ
One uniform strict PPT simulator family realizes
simulateup toδ.
A simulator realizing a perfect simulator is δ i-close to the honest prover's commitment and
response, for every witness-statement pair and every challenge.
A simulator realizing a perfect simulator outputs an accepting conversation with probability at
least 1 - δ i, for every statement and challenge (a relaxation of [BS23],
Definition 19.5 (i)).
Combined encodings for andProof: statements, commitments, and responses are paired with
encPair, while the index and challenge encodings are taken from enc₀.
Word-level extractor for andProof: unframe the paired statement, commitment, and responses,
run f₀ and f₁ on their respective halves at the shared challenges, and pair the encoded
witnesses.
andExtractWord is computable in polynomial time when both component word extractors are and
they share the same index encoding.
andExtractWord realizes andExtract on enc₀.andProof enc₁ when f₀ and f₁ realize
extract₀ and extract₁ and share the same challenge encoding.
Efficient special soundness of andProof.
Combined typed simulator for andProof: run sim₀ and sim₁ independently at the shared
challenge c and pair their commitments and responses.
andSimulator is uniform strict PPT when both component simulators are and they share the same
index and challenge encodings.
andSimulator realizes andSimulate with statistical error δ₀ i + δ₁ i.
Efficient special HVZK of andProof.
Combined encodings for orProof: statements and commitments are paired with encPair,
responses (c₀, z₀, z₁) are encoded by encPair (enc₀.challenge i) (encPair (enc₀.response i) (enc₁.response i)), and the index and challenge encodings are taken from enc₀.
Word-level extractor for orProof: compare the first side's challenge words unframe z and
unframe z', and run f₁ with subtracted challenges subWord (i, c, unframe z) when they agree,
or f₀ on the first side when they differ, tagging the output with true or false (encSum).
orExtractWord is computable in polynomial time when subWord, f₀, and f₁ are and enc₀
and enc₁ share the same index encoding.
orExtractWord realizes orExtract on enc₀.orProof enc₁ with witness encoding encSum.
Efficient special soundness of orProof.
Combined typed simulator for orProof: sample c₀ ← sampleChallenge i, run sim₀ i y.1 c₀
and sim₁ i y.2 (c - c₀), and return ((a.1, b.1), c₀, a.2, b.2).
orSimulator is uniform strict PPT when the challenge sampler, challenge subtraction, and both
component simulators are.
orSimulator realizes orSimulate with statistical error δC i + (δ₀ i + δ₁ i).
Efficient special HVZK of orProof.
Efficiency transfer through parallelRepetition #
Encodings for k-fold parallel repetition (P i).parallelRepetition (k i): statements and
indices keep their encodings from enc, while commitment, challenge, and response tuples are
encoded by encFinFn (k i).
Word-level extractor for parallelRepetition: split the tuple words into their framed
coordinate words, find the first index where the two challenge words differ, and run f on that
coordinate's words. Equal challenge tuples use coordinate zero when nonempty, and defaultWord i
only for the empty tuple.
parallelExtractWord is computable in polynomial time when defaultWord and f are.
parallelExtractWord realizes parallelExtract on enc.parallelRepetition k.
Polynomial-time extraction for arbitrary repetition counts, including zero, when the encoded
default witness is polynomial-time computable. Positive repetition uses
EfficientSpecialSoundness.parallelRepetition without this default-witness premise.
Polynomial-time special-soundness extraction is preserved by positive parallel repetition ([BS23], Exercise 19.6(b), pp. 810–811). On equal challenge tuples the extractor runs the component extractor at coordinate zero, so no efficient default witness is assumed.
Typed simulator for parallelRepetition: run sim i y (c j) independently at each coordinate
j : Fin (k i) and unzip the resulting commitments and responses.
parallelSimulator is uniform strict PPT whenever sim is.
parallelSimulator realizes parallelSimulate with statistical error (k i : ℝ≥0∞) * δ i.
Efficient special HVZK of parallelRepetition.