Documentation

Complexity.Crypto.Computational.GMW.PolyTime

Polynomial-time and PPT certificates for the 3-copy GMW protocol #

This module registers @[fun_prop] polynomial-time and strict-(oracle-)PPT certificates for the 3-copy masked-3SAT GMW protocol gadgets defined in Complexity.Crypto.Computational.GMW.Protocol, proves that runTwoRound preserves strict PPT when driven by polynomial-time round functions and a strict oracle PPT verifier (isPPTOn_runTwoRound), defines the zero-knowledge simulator gmwSimulator (via gmwFirstSuccess, gmwSampleSimCoins, gmwSimWithPads, gmwSimAttempt), and certifies:

Main definitions #

Main results #

References #

Polynomial-time certificates for protocol gadgets #

PPT certificates for runTwoRound and honest interaction #

theorem Cslib.Crypto.GMW.isPPTOn_runTwoRound {α Caller : Type} {enc : α ↪ List Bool} {input : Caller ↪ List Bool} {Vstar : ℕ → α → List Bool → Probability.WordOracleComp Unit (List Bool)} {prepare : Caller → ℕ × α × List Bool} {reply1 reply2 : Caller × List Bool → List Bool} {bound : Caller → ℕ} (hV : Probability.IsOraclePPTOn (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary (Turing.MultiTapeTM.encPair enc Turing.MultiTapeTM.encBits)) Turing.MultiTapeTM.encBits fun (p : ℕ × α × List Bool) => Vstar p.1 p.2.1 p.2.2) (hprep : Turing.MultiTapeTM.ComputableTidilyInPolyTime prepare input (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary (Turing.MultiTapeTM.encPair enc Turing.MultiTapeTM.encBits))) (hr1 : Turing.MultiTapeTM.ComputableTidilyInPolyTime reply1 (Turing.MultiTapeTM.encPair input Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits) (hr2 : Turing.MultiTapeTM.ComputableTidilyInPolyTime reply2 (Turing.MultiTapeTM.encPair input Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits) (hbound : Turing.MultiTapeTM.ComputableTidilyInPolyTime bound input Turing.MultiTapeTM.encUnary) (hle1 : ∀ (c : Caller) (q : List Bool), (reply1 (c, q)).length ≤ bound c) (hle2 : ∀ (c : Caller) (q : List Bool), (reply2 (c, q)).length ≤ bound c) :
Probability.IsPPTOn input (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encBits)) fun (c : Caller) => runTwoRound (fun (q : List Bool) => reply1 (c, q)) (fun (q : List Bool) => reply2 (c, q)) (Vstar (prepare c).1 (prepare c).2.1 (prepare c).2.2) (0, [false, false, false])
theorem Cslib.Crypto.GMW.isPPTOn_runTwoRound_prover {α Caller : Type} {enc : α ↪ List Bool} {input : Caller ↪ List Bool} {Vstar : ℕ → α → List Bool → Probability.WordOracleComp Unit (List Bool)} {generator : List Bool → List Bool} {n s m : Caller → ℕ} {a : Caller → α} {z : Caller → List Bool} {φ : Caller → Logic.PL.CNF ℕ} {openFlags bits ch_guess : Caller → List Bool} {seeds pads : Caller → List (List Bool)} (hV : Probability.IsOraclePPTOn (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary (Turing.MultiTapeTM.encPair enc Turing.MultiTapeTM.encBits)) Turing.MultiTapeTM.encBits fun (p : ℕ × α × List Bool) => Vstar p.1 p.2.1 p.2.2) (hg : Turing.MultiTapeTM.ComputableTidilyInPolyTime generator Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) (hn : Turing.MultiTapeTM.ComputableTidilyInPolyTime n input Turing.MultiTapeTM.encUnary) (hs : Turing.MultiTapeTM.ComputableTidilyInPolyTime s input Turing.MultiTapeTM.encUnary) (hm : Turing.MultiTapeTM.ComputableTidilyInPolyTime m input Turing.MultiTapeTM.encUnary) (ha : Turing.MultiTapeTM.ComputableTidilyInPolyTime a input enc) (hz : Turing.MultiTapeTM.ComputableTidilyInPolyTime z input Turing.MultiTapeTM.encBits) (hφ : Turing.MultiTapeTM.ComputableTidilyInPolyTime φ input Complexity.encCNF) (hopen : Turing.MultiTapeTM.ComputableTidilyInPolyTime openFlags input Turing.MultiTapeTM.encBits) (hbits : Turing.MultiTapeTM.ComputableTidilyInPolyTime bits input Turing.MultiTapeTM.encBits) (hch : Turing.MultiTapeTM.ComputableTidilyInPolyTime ch_guess input Turing.MultiTapeTM.encBits) (hseeds : Turing.MultiTapeTM.ComputableTidilyInPolyTime seeds input (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits)) (hpads : Turing.MultiTapeTM.ComputableTidilyInPolyTime pads input (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits)) :
Probability.IsPPTOn input (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encBits)) fun (c : Caller) => runTwoRound (fun (r : List Bool) => proverReply1 generator (m c) r (openFlags c) (bits c) (seeds c) (pads c)) (fun (x : List Bool) => proverReply2 (s c) (φ c) (ch_guess c) (bits c) (seeds c)) (Vstar (n c) (a c) (z c)) (0, [false, false, false])

GMW zero-knowledge simulator and its PPT certificate #

Extract the payload of the first successful GMW simulation attempt (true :: out), or [] if all attempts failed ([]).

Instances For
    noncomputable def Cslib.Crypto.GMW.gmwSampleSimCoins (s : ℕ) (φ : Logic.PL.CNF ℕ) (ch_guess : List Bool) :

    Sample the GMW simulator's random strings and commitment seeds for a guessed challenge ch_guess, returning (simBits φ ch_guess r₀ r₁ r₂, seeds).

    Instances For
      noncomputable def Cslib.Crypto.GMW.gmwSimWithPads (generator : List Bool → List Bool) (s m : ℕ) (φ : Logic.PL.CNF ℕ) (prog : Probability.WordOracleComp Unit (List Bool)) (pads : List (List Bool)) :

      Run one simulated GMW attempt with pre-sampled unopened pads pads (without any witness).

      Instances For
        noncomputable def Cslib.Crypto.GMW.gmwSimAttempt (generator : List Bool → List Bool) (s m : ℕ) (φ : Logic.PL.CNF ℕ) (prog : Probability.WordOracleComp Unit (List Bool)) :

        One attempt of the GMW zero-knowledge simulator (without any witness).

        Instances For
          noncomputable def Cslib.Crypto.GMW.gmwSimulator {α : Type} (generator : List Bool → List Bool) (length : ℕ → ℕ) (f : α → Logic.PL.CNF ℕ) (Vstar : ℕ → α → List Bool → Probability.WordOracleComp Unit (List Bool)) (n : ℕ) (a : α) (z : List Bool) :

          The GMW zero-knowledge simulator: repeat gmwSimAttempt n + 1 times and return the first successful output (gmwFirstSuccess).

          Instances For