Documentation

CslibFrontier.Crypto.Computational.GMW.Sequential.Simulator

Multi-session zero-knowledge simulator and PRG reduction for sequentially amplified GMW #

This module constructs the multi-session zero-knowledge simulator gmwSeqSimulator and the single-challenge PRG reduction gmwSeqViewReduction for the k n-fold sequentially composed GMW protocol (CslibFrontier.Crypto.Computational.GMW.Sequential).

Given any uniform strict oracle PPT malicious verifier Vstar (IsOraclePPTOn), we extract its clocked multi-tape probabilistic oracle Turing machine and run k n sequential sessions on its configuration state (rem, cfg) via sessionStep, followed by finishSessionRun to complete any remaining machine steps after the k n sessions are exhausted.

Because all k n * ((n + 1) * totalLen (f a)) unopened commitment pads across the k n sessions and n + 1 challenge-guessing attempts per session are drawn independently of the adaptive machine state, we flatten all unopened pads into a single list pre-sampled via OracleComp.replicate and consume totalLen (f a) pads per attempt via List.take and List.drop (attemptWithPadsStep, sessionWithPadsStep, runAllSessionsWithPads). Applying sequenceTest once to this flat pad sequence yields the single-challenge reduction gmwSeqViewReduction with exact dyadic hybrid loss dyadicSize (k n * ((n + 1) * totalLen (f a))) and multi-session rejection-sampling error at most (k n : ℝ≥0) * (7 / 8) ^ (n + 1).

Main definitions #

Main results #

Step 1: Multi-session rejection-sampling hybrid #

noncomputable def Cslib.Crypto.GMW.realPRGPadsSessionStep {tapes : ℕ} {Control : Type} (machine : Turing.MultiTapePTM tapes Bool Control Unit) (generator : List Bool → List Bool) (s m limit att : ℕ) (φ : Logic.PL.CNF ℕ) (w : List Bool) (st : ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit) :

One session of the intermediate hybrid on (rem, cfg), repeating gmwRealPRGPads att times and falling back to st on failure.

theorem Cslib.Crypto.GMW.eval_gmwRealPRGPads_sessionStep {tapes : ℕ} {Control : Type} (machine : Turing.MultiTapePTM tapes Bool Control Unit) (generator : List Bool → List Bool) (s m limit : ℕ) (φ : Logic.PL.CNF ℕ) (w : List Bool) (st : ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit) :
(gmwRealPRGPads generator s m φ w (sessionStep machine limit st.1 2 st.2)).eval = (realSessionStep machine generator s m limit φ w st).eval.bind (tagWith guessCoin)

An attempt of the intermediate hybrid is an honest session tagged by an independent guessCoin.

theorem Cslib.Crypto.GMW.advantage_iterate_realSessionStep_realPRGPadsSessionStep_le {tapes : ℕ} {Control : Type} (machine : Turing.MultiTapePTM tapes Bool Control Unit) (generator : List Bool → List Bool) (s m limit att : ℕ) (φ : Logic.PL.CNF ℕ) (w : List Bool) (K : ℕ) (st : ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit) (post : ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit → PMF Bool) :
Game.advantage ((ProbComp.eval (OracleComp.iterate K (realSessionStep machine generator s m limit φ w) st)).bind post) ((ProbComp.eval (OracleComp.iterate K (realPRGPadsSessionStep machine generator s m limit att φ w) st)).bind post) ≤ ↑K * (7 / 8) ^ att

Across K sequential sessions, replacing realSessionStep with realPRGPadsSessionStep changes the acceptance probability of any post-processing game post by at most (K : ℝ≥0) * (7 / 8) ^ att.

Step 2: Flattening unopened pads across attempts and sessions #

theorem Cslib.Crypto.GMW.eval_replicate_add_take_drop {α β : Type} (A B : ℕ) (d : ProbComp α) (f : List α → List α → ProbComp β) :
(do let zs ← OracleComp.replicate (A + B) d f (List.take A zs) (List.drop A zs)).eval = (do let xs ← OracleComp.replicate A d let ys ← OracleComp.replicate B d f xs ys).eval
noncomputable def Cslib.Crypto.GMW.attemptWithPadsStep {tapes : ℕ} {Control : Type} (machine : Turing.MultiTapePTM tapes Bool Control Unit) (generator : List Bool → List Bool) (s m limit : ℕ) (φ : Logic.PL.CNF ℕ) (w : List Bool) (st : ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit) (state : Option (ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit) × List (List Bool)) :

One attempt of a session consuming totalLen φ pre-sampled pads from state.2 and updating the first-success accumulator state.1.

noncomputable def Cslib.Crypto.GMW.sessionWithPadsStep {tapes : ℕ} {Control : Type} (machine : Turing.MultiTapePTM tapes Bool Control Unit) (generator : List Bool → List Bool) (s m limit att : ℕ) (φ : Logic.PL.CNF ℕ) (w : List Bool) (state : (ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit) × List (List Bool)) :

One session of att attempts consuming att * totalLen φ pre-sampled pads from state.2 and updating the machine configuration state.1.

noncomputable def Cslib.Crypto.GMW.runAllSessionsWithPads {tapes : ℕ} {Control : Type} (machine : Turing.MultiTapePTM tapes Bool Control Unit) (generator : List Bool → List Bool) (s m limit att K : ℕ) (φ : Logic.PL.CNF ℕ) (w word : List Bool) (pads : List (List Bool)) :

Run all K sessions on a pre-sampled flat list of pads, starting from the initial machine configuration (limit, FiniteConfig.init machine.initial word), and finish with finishSessionRun.

theorem Cslib.Crypto.GMW.eval_replicate_iterate_attemptWithPadsStep {tapes : ℕ} {Control : Type} (machine : Turing.MultiTapePTM tapes Bool Control Unit) (generator : List Bool → List Bool) (s m limit : ℕ) (φ : Logic.PL.CNF ℕ) (w : List Bool) (st : ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit) (d_pad : ProbComp (List Bool)) (att B : ℕ) (acc : Option (ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit)) :
(do let pads ← OracleComp.replicate (att * totalLen φ + B) d_pad OracleComp.iterate att (attemptWithPadsStep machine generator s m limit φ w st) (acc, pads)).eval = (do let attempts ← OracleComp.replicate att do let p ← OracleComp.replicate (totalLen φ) d_pad gmwRealWithPads generator s m φ w (sessionStep machine limit st.1 2 st.2) p let rest ← OracleComp.replicate B d_pad pure (List.foldl Option.or acc attempts, rest)).eval
theorem Cslib.Crypto.GMW.eval_replicate_sessionWithPadsStep {tapes : ℕ} {Control : Type} (machine : Turing.MultiTapePTM tapes Bool Control Unit) (generator : List Bool → List Bool) (s m limit att : ℕ) (φ : Logic.PL.CNF ℕ) (w : List Bool) (st : ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit) (d_pad : ProbComp (List Bool)) (B : ℕ) :
(do let pads ← OracleComp.replicate (att * totalLen φ + B) d_pad sessionWithPadsStep machine generator s m limit att φ w (st, pads)).eval = (do let st' ← firstSuccess st <$> OracleComp.replicate att do let p ← OracleComp.replicate (totalLen φ) d_pad gmwRealWithPads generator s m φ w (sessionStep machine limit st.1 2 st.2) p let rest ← OracleComp.replicate B d_pad pure (st', rest)).eval
theorem Cslib.Crypto.GMW.eval_replicate_iterate_sessionWithPadsStep {tapes : ℕ} {Control : Type} (machine : Turing.MultiTapePTM tapes Bool Control Unit) (generator : List Bool → List Bool) (s m limit att : ℕ) (φ : Logic.PL.CNF ℕ) (w : List Bool) (d_pad : ProbComp (List Bool)) (K : ℕ) (st : ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit) :
(do let pads ← OracleComp.replicate (K * (att * totalLen φ)) d_pad Prod.fst <$> OracleComp.iterate K (sessionWithPadsStep machine generator s m limit att φ w) (st, pads)).eval = ProbComp.eval (OracleComp.iterate K (fun (cur : ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit) => firstSuccess cur <$> OracleComp.replicate att do let p ← OracleComp.replicate (totalLen φ) d_pad gmwRealWithPads generator s m φ w (sessionStep machine limit cur.1 2 cur.2) p) st)
theorem Cslib.Crypto.GMW.eval_replicate_runAllSessionsWithPads_prg {tapes : ℕ} {Control : Type} (machine : Turing.MultiTapePTM tapes Bool Control Unit) (generator : List Bool → List Bool) (s m limit att K : ℕ) (φ : Logic.PL.CNF ℕ) (w word : List Bool) :
(do let pads ← OracleComp.replicate (K * (att * totalLen φ)) (generator <$> BitString.sampleList s) runAllSessionsWithPads machine generator s m limit att K φ w word pads).eval = (do let st' ← OracleComp.iterate K (realPRGPadsSessionStep machine generator s m limit att φ w) (limit, Turing.MultiTapeMachine.FiniteConfig.init machine.initial word) finishSessionRun machine limit st').eval
theorem Cslib.Crypto.GMW.eval_replicate_runAllSessionsWithPads_uniform {tapes : ℕ} {Control : Type} (machine : Turing.MultiTapePTM tapes Bool Control Unit) (generator : List Bool → List Bool) (s m limit att K : ℕ) (φ : Logic.PL.CNF ℕ) (w word : List Bool) (hw : Complexity.ThreeSAT.verifier (φ, w) = true) :
(do let pads ← OracleComp.replicate (K * (att * totalLen φ)) (BitString.sampleList m) runAllSessionsWithPads machine generator s m limit att K φ w word pads).eval = (do let st' ← OracleComp.iterate K (simSessionStep machine generator s m limit att φ) (limit, Turing.MultiTapeMachine.FiniteConfig.init machine.initial word) finishSessionRun machine limit st').eval

Step 3: Strict polynomial-time certificates for session and multi-session loops #

theorem Cslib.Crypto.GMW.mem_support_simSessionStep {tapes : ℕ} {Control : Type} (machine : Turing.MultiTapePTM tapes Bool Control Unit) (generator : List Bool → List Bool) (s m limit att : ℕ) (φ : Logic.PL.CNF ℕ) {st st' : ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit} (hst' : st' ∈ (simSessionStep machine generator s m limit att φ st).eval.support) :
st' = st ∨ st' ∈ OracleComp.support (sessionStep machine limit st.1 2 st.2)
theorem Cslib.Crypto.GMW.isPPTOn_iterate_simSessionStep_finishSessionRun {α Param : Type} {enc : α ↪ List Bool} {input : Param ↪ List Bool} {tapes : ℕ} {Control : Type} [Finite Control] (machine : Turing.MultiTapePTM tapes Bool Control Unit) {generator : List Bool → List Bool} {length : ℕ → ℕ} {f : α → Logic.PL.CNF ℕ} {n T att K : Param → ℕ} {a : Param → α} {word : Param → List Bool} (hg : Turing.MultiTapeTM.ComputableInPolyTime generator Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) (hlen : ∀ (s : List Bool), (generator s).length = length s.length) (hf : Turing.MultiTapeTM.ComputableInPolyTime f enc Complexity.encCNF) (hn : Turing.MultiTapeTM.ComputableInPolyTime n input Turing.MultiTapeTM.encUnary) (hT : Turing.MultiTapeTM.ComputableInPolyTime T input Turing.MultiTapeTM.encUnary) (hatt : Turing.MultiTapeTM.ComputableInPolyTime att input Turing.MultiTapeTM.encUnary) (hK : Turing.MultiTapeTM.ComputableInPolyTime K input Turing.MultiTapeTM.encUnary) (ha : Turing.MultiTapeTM.ComputableInPolyTime a input enc) (hword : Turing.MultiTapeTM.ComputableInPolyTime word input Turing.MultiTapeTM.encBits) :
Probability.IsPPTOn input Turing.MultiTapeTM.encBits fun (p : Param) => do let st' ← OracleComp.iterate (K p) (simSessionStep machine generator (n p + 7) (length (n p + 7)) (T p) (att p) (f (a p))) (T p, Turing.MultiTapeMachine.FiniteConfig.init machine.initial (word p)) finishSessionRun machine (T p) st'
theorem Cslib.Crypto.GMW.isPPTOn_attemptWithPadsStep {α Param : Type} {enc : α ↪ List Bool} {input : Param ↪ List Bool} {tapes : ℕ} {Control : Type} [Finite Control] (machine : Turing.MultiTapePTM tapes Bool Control Unit) {generator : List Bool → List Bool} {f : α → Logic.PL.CNF ℕ} {n s m limit : Param → ℕ} {a : Param → α} {w : Param → List Bool} {st : Param → ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit} {state : Param → Option (ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit) × List (List Bool)} (hg : Turing.MultiTapeTM.ComputableInPolyTime generator Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) (hf : Turing.MultiTapeTM.ComputableInPolyTime f enc Complexity.encCNF) (hn : Turing.MultiTapeTM.ComputableInPolyTime n input Turing.MultiTapeTM.encUnary) (hs : Turing.MultiTapeTM.ComputableInPolyTime s input Turing.MultiTapeTM.encUnary) (hm : Turing.MultiTapeTM.ComputableInPolyTime m input Turing.MultiTapeTM.encUnary) (hlimit : Turing.MultiTapeTM.ComputableInPolyTime limit input Turing.MultiTapeTM.encUnary) (ha : Turing.MultiTapeTM.ComputableInPolyTime a input enc) (hw : Turing.MultiTapeTM.ComputableInPolyTime w input Turing.MultiTapeTM.encBits) (hst : Turing.MultiTapeTM.ComputableInPolyTime st input (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encFiniteConfig)) (hstate : Turing.MultiTapeTM.ComputableInPolyTime state input (Turing.MultiTapeTM.encPair (Turing.MultiTapeTM.encOption (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encFiniteConfig)) (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits))) :
theorem Cslib.Crypto.GMW.mem_support_attemptWithPadsStep {tapes : ℕ} {Control : Type} (machine : Turing.MultiTapePTM tapes Bool Control Unit) (generator : List Bool → List Bool) (s m limit : ℕ) (φ : Logic.PL.CNF ℕ) (w : List Bool) (st : ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit) {state next : Option (ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit) × List (List Bool)} (hnext : next ∈ (attemptWithPadsStep machine generator s m limit φ w st state).eval.support) :
theorem Cslib.Crypto.GMW.isPPTOn_sessionWithPadsStep_and_support {α Param : Type} {enc : α ↪ List Bool} {input : Param ↪ List Bool} {tapes : ℕ} {Control : Type} [Finite Control] (machine : Turing.MultiTapePTM tapes Bool Control Unit) {generator : List Bool → List Bool} {f : α → Logic.PL.CNF ℕ} {n s m limit att : Param → ℕ} {a : Param → α} {w : Param → List Bool} {state : Param → (ℕ × Turing.MultiTapeMachine.FiniteConfig tapes Bool Control Unit) × List (List Bool)} (hg : Turing.MultiTapeTM.ComputableInPolyTime generator Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) (hf : Turing.MultiTapeTM.ComputableInPolyTime f enc Complexity.encCNF) (hn : Turing.MultiTapeTM.ComputableInPolyTime n input Turing.MultiTapeTM.encUnary) (hs : Turing.MultiTapeTM.ComputableInPolyTime s input Turing.MultiTapeTM.encUnary) (hm : Turing.MultiTapeTM.ComputableInPolyTime m input Turing.MultiTapeTM.encUnary) (hlimit : Turing.MultiTapeTM.ComputableInPolyTime limit input Turing.MultiTapeTM.encUnary) (hatt : Turing.MultiTapeTM.ComputableInPolyTime att input Turing.MultiTapeTM.encUnary) (ha : Turing.MultiTapeTM.ComputableInPolyTime a input enc) (hw : Turing.MultiTapeTM.ComputableInPolyTime w input Turing.MultiTapeTM.encBits) (hstate : Turing.MultiTapeTM.ComputableInPolyTime state input (Turing.MultiTapeTM.encPair (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encFiniteConfig) (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits))) :
(Probability.IsPPTOn input (Turing.MultiTapeTM.encPair (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encFiniteConfig) (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits)) fun (p : Param) => sessionWithPadsStep machine generator (s p) (m p) (limit p) (att p) (f (a p)) (w p) (state p)) ∧ ∀ (p : Param), ∀ next ∈ (sessionWithPadsStep machine generator (s p) (m p) (limit p) (att p) (f (a p)) (w p) (state p)).eval.support, (next.1 = (state p).1 ∨ next.1 ∈ OracleComp.support (sessionStep machine (limit p) (state p).1.1 2 (state p).1.2)) ∧ ((Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits) next.2).length ≤ ((Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits) (state p).2).length
theorem Cslib.Crypto.GMW.isPPTOn_runAllSessionsWithPads {α Param : Type} {enc : α ↪ List Bool} {input : Param ↪ List Bool} {tapes : ℕ} {Control : Type} [Finite Control] (machine : Turing.MultiTapePTM tapes Bool Control Unit) {generator : List Bool → List Bool} {f : α → Logic.PL.CNF ℕ} {n s m T att K : Param → ℕ} {a : Param → α} {w word : Param → List Bool} {pads : Param → List (List Bool)} (hg : Turing.MultiTapeTM.ComputableInPolyTime generator Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) (hf : Turing.MultiTapeTM.ComputableInPolyTime f enc Complexity.encCNF) (hn : Turing.MultiTapeTM.ComputableInPolyTime n input Turing.MultiTapeTM.encUnary) (hs : Turing.MultiTapeTM.ComputableInPolyTime s input Turing.MultiTapeTM.encUnary) (hm : Turing.MultiTapeTM.ComputableInPolyTime m input Turing.MultiTapeTM.encUnary) (hT : Turing.MultiTapeTM.ComputableInPolyTime T input Turing.MultiTapeTM.encUnary) (hatt : Turing.MultiTapeTM.ComputableInPolyTime att input Turing.MultiTapeTM.encUnary) (hK : Turing.MultiTapeTM.ComputableInPolyTime K input Turing.MultiTapeTM.encUnary) (ha : Turing.MultiTapeTM.ComputableInPolyTime a input enc) (hw : Turing.MultiTapeTM.ComputableInPolyTime w input Turing.MultiTapeTM.encBits) (hword : Turing.MultiTapeTM.ComputableInPolyTime word input Turing.MultiTapeTM.encBits) (hpads : Turing.MultiTapeTM.ComputableInPolyTime pads input (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits)) :
Probability.IsPPTOn input Turing.MultiTapeTM.encBits fun (p : Param) => runAllSessionsWithPads machine generator (s p) (m p) (T p) (att p) (K p) (f (a p)) (w p) (word p) (pads p)

Step 4: Multi-session simulator gmwSeqSimulator and reduction gmwSeqViewReduction #

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

Witness-free multi-session simulator for the k n-fold sequentially composed GMW protocol. For any uniform strict oracle PPT malicious verifier Vstar (IsOraclePPTOn), it extracts a realizing multi-tape probabilistic oracle Turing machine and polynomial clock, executes k n sequential simulated sessions (simSessionStep with n + 1 attempts per session) on the machine configuration, and finishes any remaining machine steps with finishSessionRun.

gmwSeqSimulator is a uniform strict PPT program whenever generator, f, and k are polynomial-time computable and Vstar is uniform strict oracle PPT.

noncomputable def Cslib.Crypto.GMW.gmwSeqViewReduction {α : Type} (enc : α ↪ List Bool) (generator : List Bool → List Bool) (length : ℕ → ℕ) (f : α → Logic.PL.CNF ℕ) (k : ℕ → ℕ) (Vstar : ℕ → α → List Bool → Probability.WordOracleComp Unit (List Bool)) (adversary : ℕ → α → List Bool → List Bool → ProbComp Bool) (n : ℕ) (a : α) (w z challenge : List Bool) :

Single-challenge PRG distinguisher for the k n-session GMW view hybrid. It uses sequenceTest to splice challenge into the flat sequence of k n * ((n + 1) * totalLen (f a)) unopened pads, runs runAllSessionsWithPads on the verifier's realizing machine, and passes the resulting view to adversary n a z.

theorem Cslib.Crypto.GMW.gmwSeqView_advantage_le {α : Type} {enc : α ↪ List Bool} (generator : List Bool → List Bool) (length : ℕ → ℕ) (f : α → Logic.PL.CNF ℕ) (k : ℕ → ℕ) {Vstar : ℕ → α → List Bool → Probability.WordOracleComp Unit (List Bool)} (hV : Probability.IsOraclePPTOn (encInstanceAuxInput enc) Turing.MultiTapeTM.encBits fun (x : ℕ × α × List Bool) => match x with | (n, a, z) => Vstar n a z) (adversary : ZKDistinguisher α) (n : ℕ) (a : α) (w z : List Bool) (hw : Complexity.ThreeSAT.verifier (f a, w) = true) :
(distinguishingGame (zkRealView (gmwSeqProver generator (n + 7) (length (n + 7)) (f a) w (k n)) (Vstar n a z)) (adversary n a z)).advantage (distinguishingGame (gmwSeqSimulator enc generator length f k Vstar n a z).eval (adversary n a z)) ≤ ↑(k n) * (7 / 8) ^ (n + 1) + ↑(Probability.dyadicSize (k n * ((n + 1) * totalLen (f a)))) * Game.advantage (generator <$> BitString.sampleList (n + 7) >>= gmwSeqViewReduction enc generator length f k Vstar adversary n a w z).eval (BitString.sampleList (length (n + 7)) >>= gmwSeqViewReduction enc generator length f k Vstar adversary n a w z).eval

Pointwise finite multi-session GMW view reduction for every valid instance, witness, and auxiliary word. Across k n sequential executions, the distinguishing advantage between the real view of any uniform strict oracle PPT malicious verifier Vstar and gmwSeqSimulator is bounded by (k n : ℝ≥0) * (7 / 8) ^ (n + 1) plus dyadicSize (k n * ((n + 1) * totalLen (f a))) times the PRG advantage of gmwSeqViewReduction at seed length n + 7.

gmwSeqViewReduction has a strict uniform clock polynomial in its complete encoded input ((1^n, (a, (w, z))), challenge).

theorem Cslib.Crypto.GMW.AdvicePRG.gmwSeqView_negligible {α : Type} {enc : α ↪ List Bool} {generator : List Bool → List Bool} {length k : ℕ → ℕ} {f : α → Logic.PL.CNF ℕ} {Vstar : ℕ → α → List Bool → Probability.WordOracleComp Unit (List Bool)} {adversary : ZKDistinguisher α} (hAdv : AdvicePRG enc generator length) (hf : Turing.MultiTapeTM.ComputableInPolyTime f enc Complexity.encCNF) (hk : Turing.MultiTapeTM.ComputableInPolyTime k Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (hV : Probability.IsOraclePPTOn (encInstanceAuxInput enc) Turing.MultiTapeTM.encBits fun (x : ℕ × α × List Bool) => match x with | (n, a, z) => Vstar n a z) (hadv : ZKDistinguisher.IsPPT enc adversary) {a : ℕ → α} {w z z' : ℕ → List Bool} (ha : PolynomiallyBounded fun (n : ℕ) => (enc (a n)).length) (hw : PolynomiallyBounded fun (n : ℕ) => (w n).length) (hz : PolynomiallyBounded fun (n : ℕ) => (z n).length) (hz' : PolynomiallyBounded fun (n : ℕ) => (z' n).length) (hw_sat : ∀ (n : ℕ), Complexity.ThreeSAT.verifier (f (a n), w n) = true) :
Negligible fun (n : ℕ) => (distinguishingGame (zkRealView (gmwSeqProver generator (n + 7) (length (n + 7)) (f (a n)) (w n) (k n)) (Vstar n (a n) (z n))) (adversary n (a n) (z' n))).advantage (distinguishingGame (gmwSeqSimulator enc generator length f k Vstar n (a n) (z n)).eval (adversary n (a n) (z' n)))

Under AdvicePRG enc generator length, the k n-session real GMW interaction view and gmwSeqSimulator have negligible distinguishing advantage against every full-input uniform strict PPT distinguisher across all polynomially bounded valid instance, witness, verifier-auxiliary, and distinguisher-auxiliary families.

Zero-knowledge simulation of the sequentially amplified GMW protocol. For any uniform strict oracle PPT malicious verifier Vstar and any deterministic polynomial-time families of instances a, valid ThreeSAT witnesses w, and auxiliary inputs z, the k n-session real interaction view of Vstar with gmwSeqProver is computationally indistinguishable from gmwSeqSimulator.