Documentation

CslibFrontier.Crypto.Computational.ZeroKnowledge.Amplification

Soundness-amplified ZKProof builders for NP with uniform generable zero knowledge #

This module packages the k n-fold sequential repetition of the masked-3SAT protocol from CslibFrontier.Crypto.Computational.GMW.Sequential and its witness-free simulator from CslibFrontier.Crypto.Computational.GMW.Sequential.Simulator into ZKProof systems with soundness error (1 / 3) ^ (k n) and uniform GenerableZeroKnowledge only (zero knowledge restricted to (instance, witness) families generated from 1^n in deterministic polynomial time, #6044, rather than Goldreich's auxiliary-input GMW theorem of [Gol98], Definition 4.3.8 and Theorem 4.4.10, proved under nonuniform one-way functions in Cslib.Crypto.NonuniformOneWay.exists_zkProof_of_mem_NP and Cslib.Crypto.NonuniformOneWay.exists_zkProof_of_npRelation):

References #

noncomputable def Cslib.Crypto.PseudorandomGenerator.zkProofOfReduction {α : Type} {enc : α ↪ List Bool} {A : Set α} {generator : List Bool → List Bool} {length k : ℕ → ℕ} (hG : PseudorandomGenerator generator length) (hstretch : ∀ (m : ℕ), 3 * m + 1 ≤ length m) {f : α → Logic.PL.CNF ℕ} (hf : Turing.MultiTapeTM.ComputableInPolyTime f enc Complexity.encCNF) (hred : ∀ (a : α), a ∈ A ↔ f a ∈ Complexity.ThreeSAT) (hk : Turing.MultiTapeTM.ComputableInPolyTime k Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) :
ZKProof enc A fun (n : ℕ) => (1 / 3) ^ k n

Sequentially amplified masked-3SAT ZKProof builder via a Karp reduction to ThreeSAT, giving uniform GenerableZeroKnowledge only (#6044; see GenerableZeroKnowledge) and soundness (1 / 3) ^ (k n). Given a pseudorandom generator with stretch at least 3 * m + 1, a polynomial-time reduction f : α → CNF ℕ from A to ThreeSAT, and a polynomial-time repetition schedule k : ℕ → ℕ, this runs k n sequential sessions of the 3-copy masked-3SAT protocol.

theorem Cslib.Crypto.PseudorandomGenerator.negligibleSoundness_zkProofOfReduction {α : Type} {enc : α ↪ List Bool} {A : Set α} {generator : List Bool → List Bool} {length k : ℕ → ℕ} (hG : PseudorandomGenerator generator length) (hstretch : ∀ (m : ℕ), 3 * m + 1 ≤ length m) {f : α → Logic.PL.CNF ℕ} (hf : Turing.MultiTapeTM.ComputableInPolyTime f enc Complexity.encCNF) (hred : ∀ (a : α), a ∈ A ↔ f a ∈ Complexity.ThreeSAT) (hk : Turing.MultiTapeTM.ComputableInPolyTime k Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (hk_ge : ∀ (n : ℕ), n ≤ k n) :
(hG.zkProofOfReduction hstretch hf hred hk).NegligibleSoundness

When ∀ n, n ≤ k n, hG.zkProofOfReduction hstretch hf hred hk has negligible soundness.

theorem Cslib.Crypto.PseudorandomGenerator.auxiliaryInputZeroKnowledge_zkProofOfReduction_of_advicePRG {α : Type} {enc : α ↪ List Bool} {A : Set α} {generator : List Bool → List Bool} {length k : ℕ → ℕ} (hG : PseudorandomGenerator generator length) (hstretch : ∀ (m : ℕ), 3 * m + 1 ≤ length m) {f : α → Logic.PL.CNF ℕ} (hf : Turing.MultiTapeTM.ComputableInPolyTime f enc Complexity.encCNF) (hred : ∀ (a : α), a ∈ A ↔ f a ∈ Complexity.ThreeSAT) (hk : Turing.MultiTapeTM.ComputableInPolyTime k Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (hAdv : GMW.AdvicePRG enc generator length) :

A step toward the Goldreich–Micali–Wigderson theorem, not that theorem: it rests on GMW.AdvicePRG, a premise novel to this library. Under GMW.AdvicePRG enc generator length, the sequentially amplified GMW proof system hG.zkProofOfReduction hstretch hf hred hk satisfies general auxiliary-input zero knowledge (ZKProof.AuxiliaryInputZeroKnowledge). A nonuniform PRG satisfies the premise (NonuniformPRG.advicePRG); the library's GMW theorem is NonuniformOneWay.exists_zkProof_of_mem_NP.

noncomputable def Cslib.Crypto.PseudorandomGenerator.zkProofThreeSAT {generator : List Bool → List Bool} {length : ℕ → ℕ} (hG : PseudorandomGenerator generator length) (hstretch : ∀ (m : ℕ), 3 * m + 1 ≤ length m) :
ZKProof Complexity.encCNF Complexity.ThreeSAT fun (n : ℕ) => (1 / 3) ^ (n + 1)

Sequentially amplified masked-3SAT ZKProof builder for ThreeSAT at repetition schedule k n := n + 1, giving uniform GenerableZeroKnowledge only (#6044; see GenerableZeroKnowledge) and soundness bound (1 / 3) ^ (n + 1).

theorem Cslib.Crypto.PseudorandomGenerator.negligibleSoundness_zkProofThreeSAT {generator : List Bool → List Bool} {length : ℕ → ℕ} (hG : PseudorandomGenerator generator length) (hstretch : ∀ (m : ℕ), 3 * m + 1 ≤ length m) :

hG.zkProofThreeSAT hstretch has negligible soundness (1 / 3) ^ (n + 1).

theorem Cslib.Crypto.PseudorandomGenerator.auxiliaryInputZeroKnowledge_zkProofThreeSAT_of_advicePRG {generator : List Bool → List Bool} {length : ℕ → ℕ} (hG : PseudorandomGenerator generator length) (hstretch : ∀ (m : ℕ), 3 * m + 1 ≤ length m) (hAdv : GMW.AdvicePRG Complexity.encCNF generator length) :

A step toward the Goldreich–Micali–Wigderson theorem, not that theorem: it rests on GMW.AdvicePRG, a premise novel to this library. Under GMW.AdvicePRG encCNF generator length, hG.zkProofThreeSAT hstretch satisfies general auxiliary-input zero knowledge (ZKProof.AuxiliaryInputZeroKnowledge). The library's GMW theorem is NonuniformOneWay.exists_zkProof_of_mem_NP.

noncomputable def Cslib.Crypto.PseudorandomGenerator.levinZKProof {α : Type} {enc : α ↪ List Bool} {R : Complexity.NPRelation enc} {generator : List Bool → List Bool} {length k : ℕ → ℕ} (hG : PseudorandomGenerator generator length) (hstretch : ∀ (m : ℕ), 3 * m + 1 ≤ length m) (r : Complexity.LevinReduction R Complexity.ThreeSAT.npRelation) (hk : Turing.MultiTapeTM.ComputableInPolyTime k Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) :
ZKProof enc R.language fun (n : ℕ) => (1 / 3) ^ k n

Sequentially amplified masked-3SAT ZKProof builder for an NP relation R with uniform GenerableZeroKnowledge only (#6044; see GenerableZeroKnowledge) and soundness (1 / 3) ^ (k n). Given a pseudorandom generator with stretch at least 3 * m + 1, a Levin reduction r from R to ThreeSAT.npRelation, and a polynomial-time repetition schedule k : ℕ → ℕ, this is zkProofOfReduction for the instance map of r with witnesses changed by ZKProof.withRelationWitness: the honest prover maps an R-witness w to r.forwardWitness (a, w) and the bundled witness check is decide (R.IsWitness a w).

@[simp]

The bundled witness check of levinZKProof is the NP relation R.IsWitness itself.

When ∀ n, n ≤ k n, hG.levinZKProof hstretch r hk has negligible soundness.

A step toward the Goldreich–Micali–Wigderson theorem, not that theorem: it rests on GMW.AdvicePRG, a premise novel to this library. Under GMW.AdvicePRG enc generator length, hG.levinZKProof hstretch r hk satisfies general auxiliary-input zero knowledge (ZKProof.AuxiliaryInputZeroKnowledge). The library's GMW theorem for NP relations is NonuniformOneWay.exists_zkProof_of_npRelation.

theorem Cslib.Crypto.PseudorandomGenerator.exists_generableZKProof_of_mem_NP {α : Type} {enc : α ↪ List Bool} {A : Set α} {generator : List Bool → List Bool} {length : ℕ → ℕ} (hG : PseudorandomGenerator generator length) (hstretch : ∀ (m : ℕ), 3 * m + 1 ≤ length m) (hA : A ∈ Complexity.NP enc) :
∃ (zk : ZKProof enc A fun (n : ℕ) => (1 / 3) ^ (n + 1)), zk.NegligibleSoundness

Existence of a ZKProof with uniform GenerableZeroKnowledge only (#6044; see GenerableZeroKnowledge — not Goldreich's auxiliary-input GMW theorem of [Gol98], Definition 4.3.8 and Theorem 4.4.10, proved under nonuniform one-way functions in NonuniformOneWay.exists_zkProof_of_mem_NP) and negligible soundness (1 / 3) ^ (n + 1) against unbounded provers for every language A ∈ NP enc, from any uniform pseudorandom generator with stretch at least 3 * m + 1.

theorem Cslib.Crypto.PseudorandomGenerator.exists_auxiliaryInputZKProof_of_mem_NP_of_advicePRG {α : Type} {enc : α ↪ List Bool} {A : Set α} {generator : List Bool → List Bool} {length : ℕ → ℕ} (hG : PseudorandomGenerator generator length) (hstretch : ∀ (m : ℕ), 3 * m + 1 ≤ length m) (hAdv : GMW.AdvicePRG enc generator length) (hA : A ∈ Complexity.NP enc) :
∃ (zk : ZKProof enc A fun (n : ℕ) => (1 / 3) ^ (n + 1)), zk.NegligibleSoundness ∧ zk.AuxiliaryInputZeroKnowledge

A step toward the Goldreich–Micali–Wigderson theorem, not that theorem: it rests on GMW.AdvicePRG, a premise novel to this library, where the theorem assumes a nonuniform one-way function. Given a pseudorandom generator with stretch at least 3 * m + 1 satisfying GMW.AdvicePRG enc generator length, every language A ∈ NP enc has a computational zero-knowledge interactive proof system with negligible soundness (1 / 3) ^ (n + 1) and general auxiliary-input zero knowledge (ZKProof.AuxiliaryInputZeroKnowledge). The library's GMW theorem, NonuniformOneWay.exists_zkProof_of_mem_NP, applies this step to a nonuniform PRG through NonuniformPRG.advicePRG.

theorem Cslib.Crypto.PseudorandomGenerator.exists_generableZKProof_of_npRelation {α : Type} {enc : α ↪ List Bool} {generator : List Bool → List Bool} {length : ℕ → ℕ} (hG : PseudorandomGenerator generator length) (hstretch : ∀ (m : ℕ), 3 * m + 1 ≤ length m) (R : Complexity.NPRelation enc) :
∃ (zk : ZKProof enc R.language fun (n : ℕ) => (1 / 3) ^ (n + 1)), (∀ (a : α) (w : List Bool), zk.isWitness a w = true ↔ R.IsWitness a w) ∧ zk.NegligibleSoundness

Existence of a ZKProof for any NP relation R with uniform GenerableZeroKnowledge only (#6044; see GenerableZeroKnowledge — not Goldreich's auxiliary-input GMW theorem of [Gol98], Definition 4.3.8 and Theorem 4.4.10, proved under nonuniform one-way functions in NonuniformOneWay.exists_zkProof_of_npRelation), negligible soundness (1 / 3) ^ (n + 1), and honest prover using R's own witnesses, from any uniform pseudorandom generator with stretch at least 3 * m + 1.

theorem Cslib.Crypto.PseudorandomGenerator.exists_auxiliaryInputZKProof_of_npRelation_of_advicePRG {α : Type} {enc : α ↪ List Bool} {generator : List Bool → List Bool} {length : ℕ → ℕ} (hG : PseudorandomGenerator generator length) (hstretch : ∀ (m : ℕ), 3 * m + 1 ≤ length m) (hAdv : GMW.AdvicePRG enc generator length) (R : Complexity.NPRelation enc) :
∃ (zk : ZKProof enc R.language fun (n : ℕ) => (1 / 3) ^ (n + 1)), (∀ (a : α) (w : List Bool), zk.isWitness a w = true ↔ R.IsWitness a w) ∧ zk.NegligibleSoundness ∧ zk.AuxiliaryInputZeroKnowledge

A step toward the Goldreich–Micali–Wigderson theorem for NP relations, not that theorem: it rests on GMW.AdvicePRG, a premise novel to this library, where the theorem assumes a nonuniform one-way function. Given a pseudorandom generator with stretch at least 3 * m + 1 satisfying GMW.AdvicePRG enc generator length, every NP relation R has a computational zero-knowledge interactive proof system with negligible soundness (1 / 3) ^ (n + 1) and general auxiliary-input zero knowledge whose honest prover uses R's own witnesses. The library's GMW theorem for relations, NonuniformOneWay.exists_zkProof_of_npRelation, applies this step to a nonuniform PRG through NonuniformPRG.advicePRG.

theorem Cslib.Crypto.OneWay.exists_generableZKProof_of_mem_NP {α : Type} {enc : α ↪ List Bool} {A : Set α} {f : List Bool → List Bool} (hf : OneWay f) (hA : A ∈ Complexity.NP enc) :
∃ (zk : ZKProof enc A fun (n : ℕ) => (1 / 3) ^ (n + 1)), zk.NegligibleSoundness

Existence of a ZKProof with uniform GenerableZeroKnowledge only (#6044; see GenerableZeroKnowledge — not Goldreich's auxiliary-input GMW theorem of [Gol98], Definition 4.3.8 and Theorem 4.4.10, proved under nonuniform one-way functions in NonuniformOneWay.exists_zkProof_of_mem_NP) and negligible soundness (1 / 3) ^ (n + 1) against unbounded provers for every language A ∈ NP enc, from any uniform one-way function.

theorem Cslib.Crypto.OneWay.exists_generableZKProof_of_npRelation {α : Type} {enc : α ↪ List Bool} {f : List Bool → List Bool} (hf : OneWay f) (R : Complexity.NPRelation enc) :
∃ (zk : ZKProof enc R.language fun (n : ℕ) => (1 / 3) ^ (n + 1)), (∀ (a : α) (w : List Bool), zk.isWitness a w = true ↔ R.IsWitness a w) ∧ zk.NegligibleSoundness

Existence of a ZKProof for any NP relation R with uniform GenerableZeroKnowledge only (#6044; see GenerableZeroKnowledge — not Goldreich's auxiliary-input GMW theorem of [Gol98], Definition 4.3.8 and Theorem 4.4.10, proved under nonuniform one-way functions in NonuniformOneWay.exists_zkProof_of_npRelation), negligible soundness (1 / 3) ^ (n + 1), and honest prover using R's own witnesses, from any uniform one-way function.