Documentation

CslibFrontier.Crypto.Computational.Kilian.NP

Kilian's arguments for NP #

With the PCP theorem and its witness compiler (exists_pcpVerifier_of_npRelation), every NP relation R : NPRelation enc has a polynomial-time PCP verifier V with O(log n) random bits and constantly many queries together with a polynomial-time compiler compile sending every relation witness (x, w) to an accepted compact PCP table V.tableVerifier (x, compile (x, w)) (exists_kilianArgument_of_npRelation):

exists_kilianSound_of_mem_NP states the corresponding language-level consequence for every L ∈ NP enc.

Main results #

References #

theorem Cslib.Crypto.exists_kilianArgument_of_npRelation {α : Type} {H : List Bool → List Bool → List Bool} (hH : HashFamily H) {enc : α ↪ List Bool} (R : Complexity.NPRelation enc) :
∃ (V : Complexity.PCPVerifier α) (compile : α × List Bool → List Bool) (c : ℕ) (d : ℕ), Complexity.PCPVerifier.PolyTime enc V ∧ (∀ (x : α), V.coins x ≤ c * (Nat.log 2 (enc x).length + 1)) ∧ (∀ (x : α) (ρ : List Bool), ρ.length = V.coins x → (V.queries (x, ρ)).length ≤ d) ∧ Turing.MultiTapeTM.ComputableInPolyTime compile (Turing.MultiTapeTM.encPair enc Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits ∧ Turing.MultiTapeTM.ComputableInPolyTime (fun (p : List Bool × α × List Bool) => match p with | (key, state) => match state with | (x, w) => kilianCommit H V key x (compile (x, w))) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits (Turing.MultiTapeTM.encPair enc Turing.MultiTapeTM.encBits)) Turing.MultiTapeTM.encBits ∧ Turing.MultiTapeTM.ComputableInPolyTime (fun (p : (List Bool × α × List Bool) × List (List Bool)) => match p with | (proverIn, ρs) => match proverIn with | (key, state) => match state with | (x, w) => kilianRespond H V key x (compile (x, w)) ρs) (Turing.MultiTapeTM.encPair (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits (Turing.MultiTapeTM.encPair enc Turing.MultiTapeTM.encBits)) (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encBits)) encKilianResponse ∧ (∀ (x : α), x ∈ R.language ↔ ∃ (table : List Bool), V.tableVerifier (x, table) = true) ∧ (∀ (x : α) (w : List Bool), R.IsWitness x w → V.tableVerifier (x, compile (x, w)) = true) ∧ (∀ (x : α) (w : List Bool), R.IsWitness x w → ∀ (n : ℕ), (kilianHonestGame H V x (compile (x, w)) n).eval = PMF.pure true) ∧ KilianSound H V enc R.language ∧ (∃ (C : ℕ), ∀ (n : ℕ) (k : List Bool) (x : α) (table : List Bool) (ρs : List (List Bool)), k.length = n → ρs.length = n → (∀ ρ ∈ ρs, ρ.length = V.coins x) → kilianCommunication k (kilianCommit H V k x table) ρs (kilianRespond H V k x table ρs) ≤ C * (n + 1) ^ 2 * (Nat.log 2 (enc x).length + 1)) ∧ ∃ (k : ℕ) (State : Type) (_ : Finite State) (tm : Turing.MultiTapeTM k Bool State) (t : ℕ → ℕ) (s : ℕ → ℕ) (tHonest : ℕ → ℕ) (sHonest : ℕ → ℕ), PolynomiallyBounded t ∧ PolynomiallyBounded s ∧ PolynomiallyBounded tHonest ∧ PolynomiallyBounded sHonest ∧ (tm.ComputesFunInTimeAndSpace (encKilianView enc) Turing.MultiTapeTM.encBool (fun (v : KilianView α) => kilianVerify H V v.key v.stmt v.root v.challenges v.response) (fun (v : KilianView α) => t ((encKilianView enc) v).length) fun (v : KilianView α) => s ((encKilianView enc) v).length) ∧ ∀ (n : ℕ) (key : List Bool) (x : α) (table : List Bool) (ρs : List (List Bool)), key.length = n → ρs.length = n → (∀ ρ ∈ ρs, ρ.length = V.coins x) → have view := { key := key, stmt := x, root := kilianCommit H V key x table, challenges := ρs, response := kilianRespond H V key x table ρs }; t ((encKilianView enc) view).length ≤ tHonest (n + (enc x).length) ∧ s ((encKilianView enc) view).length ≤ sHonest (n + (enc x).length) ∧ tm.ComputesInTimeAndSpace ((encKilianView enc) view) (Turing.MultiTapeTM.encBool (kilianVerify H V key x view.root ρs view.response)) (tHonest (n + (enc x).length)) (sHonest (n + (enc x).length))

Kilian's interactive arguments for arbitrary NP relations: for a collision-resistant HashFamily H and any NP relation R : NPRelation enc, there exist a polynomial-time PCP verifier V with O(log n) random bits and constantly many queries d and a polynomial-time witness compiler compile : α × List Bool → List Bool such that the composed honest commitment and opening maps on (key, x, w) run in polynomial time, compile produces tables accepted by V.tableVerifier with perfect completeness on R.IsWitness x w, the protocol is computationally sound (KilianSound H V enc R.language), honest transcripts use O(n² · (log₂ |enc x| + 1)) payload bits, and a fixed binary machine computes kilianVerify in time and space polynomial in n + |enc x| on every honest transcript.

theorem Cslib.Crypto.exists_kilianSound_of_mem_NP {α : Type} {H : List Bool → List Bool → List Bool} (hH : HashFamily H) {enc : α ↪ List Bool} {L : Set α} (hL : L ∈ Complexity.NP enc) :
∃ (V : Complexity.PCPVerifier α) (c : ℕ), Complexity.PCPVerifier.PolyTime enc V ∧ (∀ (x : α), V.coins x ≤ c * (Nat.log 2 (enc x).length + 1)) ∧ (∀ (x : α), x ∈ L ↔ ∃ (table : List Bool), V.tableVerifier (x, table) = true) ∧ (∀ (x : α) (table : List Bool), V.tableVerifier (x, table) = true → ∀ (n : ℕ), (kilianHonestGame H V x table n).eval = PMF.pure true) ∧ KilianSound H V enc L ∧ ∃ (C : ℕ), ∀ (n : ℕ) (k : List Bool) (x : α) (table : List Bool) (ρs : List (List Bool)), k.length = n → ρs.length = n → (∀ ρ ∈ ρs, ρ.length = V.coins x) → kilianCommunication k (kilianCommit H V k x table) ρs (kilianRespond H V k x table ρs) ≤ C * (n + 1) ^ 2 * (Nat.log 2 (enc x).length + 1)

Kilian's arguments for NP: for a collision-resistant HashFamily H, every language L in NP has a polynomial-time PCP verifier V with O(log n) random bits whose accepted compact tables characterize L, such that Kilian's protocol over V and H accepts the honest prover on every accepted table with probability one, is computationally sound for L, and has honest transcripts of O(n² · (log₂ |enc x| + 1)) payload bits at security parameter n.