Documentation

CslibFrontier.Crypto.Computational.Kilian.Knowledge

Amplified compact PCP-table extraction and bounded-prefix Kilian NP arguments #

CslibFrontier.Crypto.Computational.Kilian.Extraction proves the single-execution rewinding bound (HashFamily.kilianTableExtraction): running kilianTableExtractor once yields a compact PCP table whose expanded proof passes strictly more than (num / den) of the PCP coins with probability at least Pr[P accepts] - 1 / (p n + 1) - ν n.

This module upgrades single-trial compact-table extraction and unframed KilianView verification to high-confidence compact-table extraction and worst-case bounded-prefix verification:

Locators in [BG01] and [Kil92] are not re-verified against the primary PDFs (locator not re-verified against primary PDF).

Main definitions #

Main results #

References #

Polynomial-time fraction check on extracted compact tables #

Check whether an extracted compact table passes strictly more than num / den of all 2 ^ V.coins ext.stmt PCP random strings by looking up each queried address directly in ext.table via kilianPosition (avoiding materialization of V.proofOfTable).

theorem Cslib.Crypto.kilianTablePassesFrac_eq_true_iff {α : Type} (V : Complexity.PCPVerifier α) (num den : ℕ) (ext : KilianExtractedTable α) :
kilianTablePassesFrac V num den ext = true ↔ num * 2 ^ V.coins ext.stmt < den * Complexity.acceptCount (fun (y : α × List Bool) => V.accepts y.1 (V.proofOfTable ext.stmt ext.table) y.2) ext.stmt (V.coins ext.stmt)

kilianTablePassesFrac holds iff V.proofOfTable ext.stmt ext.table passes strictly more than num / den of the 2 ^ V.coins ext.stmt PCP random coins.

kilianTablePassesFrac is computable in polynomial time under V.PolyTime enc and logarithmic randomness.

Amplified strict-PPT knowledge extractor #

noncomputable def Cslib.Crypto.kilianAmplifiedExtractor {α : Type} (H : List Bool → List Bool → List Bool) (V : Complexity.PCPVerifier α) (P : KilianProver α) (T R : ℕ → ℕ) (num den n : ℕ) :

Amplified strict-PPT table extractor for Kilian's protocol: runs R n independent trials of (k ← BitString.sampleList n; kilianTableExtractor H V P T n k) and returns the first extracted compact table passing kilianTablePassesFrac V num den.

noncomputable def Cslib.Crypto.kilianAmplifiedExtractionGame {α : Type} (H : List Bool → List Bool → List Bool) (V : Complexity.PCPVerifier α) (P : KilianProver α) (T R : ℕ → ℕ) (num den n : ℕ) :

Experiment measuring whether kilianAmplifiedExtractor returns some ext.

theorem Cslib.Crypto.mem_support_kilianAmplifiedExtractor_passes {α : Type} {H : List Bool → List Bool → List Bool} {V : Complexity.PCPVerifier α} {P : KilianProver α} {T R : ℕ → ℕ} {num den n : ℕ} {ext : KilianExtractedTable α} (hmem : some ext ∈ (kilianAmplifiedExtractor H V P T R num den n).eval.support) :

Every some ext emitted by kilianAmplifiedExtractor passes kilianTablePassesFrac V num den with certainty.

theorem Cslib.Crypto.mem_support_kilianAmplifiedExtractor_stmt {α : Type} {H : List Bool → List Bool → List Bool} {V : Complexity.PCPVerifier α} {P : KilianProver α} {T R : ℕ → ℕ} {num den n : ℕ} (Q : α → Prop) (hQ : ∀ (k : List Bool), k.length = n → ∀ cm ∈ (P.commit n k).eval.support, Q cm.stmt) {ext : KilianExtractedTable α} (hmem : some ext ∈ (kilianAmplifiedExtractor H V P T R num den n).eval.support) :
Q ext.stmt

Every some ext emitted by kilianAmplifiedExtractor inherits any first-stage statement invariant satisfied on all n-bit hash keys by P.commit n k.

Uniform strict-PPT efficiency of kilianAmplifiedExtractor: for any polynomial-time hash, polynomial-time O(log n)-coin PCP verifier V, uniform strict PPT prover P, and polynomial-time budgets T and R, kilianAmplifiedExtractor runs in uniform strict PPT.

theorem Cslib.Crypto.failProbability_kilianAmplifiedExtractionGame {α : Type} (H : List Bool → List Bool → List Bool) (V : Complexity.PCPVerifier α) (P : KilianProver α) (T R : ℕ → ℕ) (num den n : ℕ) :
1 - ↑(Game.succProbability (kilianAmplifiedExtractionGame H V P T R num den n).eval) = (1 - ↑(Game.succProbability (kilianExtractionFracGame H V P T num den n).eval)) ^ R n

Exact failure amplification identity: running R n independent extractor trials shrinks the failure probability (1 - Pr[extract]) to the (R n)-th power of the single-trial failure probability of kilianExtractionFracGame.

High-confidence asymptotic extraction bounds #

Amplified strict-PPT compact-table extraction for Kilian's protocol: for any collision-resistant HashFamily, polynomial-time O(log |enc x|)-coin PCP verifier V, uniform strict PPT prover P, strict coin threshold num / den < 1, and polynomial slack indices p, q : ℕ → ℕ, there are polynomial-time budgets T and R such that:

  1. kilianAmplifiedExtractor H V P T R num den runs in uniform strict PPT;
  2. every some ext emitted by it passes kilianTablePassesFrac V num den ext = true; and
  3. whenever P accepts with probability at least (p n + 1)⁻¹ + (q n + 1)⁻¹ + ν n (for a negligible function ν), the amplified extractor fails with probability at most (1 / 2) ^ n. No NP witness w is extracted here; the output is a compact PCP bit table.
noncomputable def Cslib.Crypto.kilianRawAcceptGame {α : Type} (H : List Bool → List Bool → List Bool) (V : Complexity.PCPVerifier α) (P : KilianRawProver α) (n : ℕ) :

Single-run acceptance game for a raw prover verified by the bounded-prefix verifier kilianVerifyRawBounded.

Every run accepted by kilianVerifyRawBounded in kilianRawAcceptGame also makes kilianAcceptGame accept for P.toKilianProver.

theorem Cslib.Crypto.HashFamily.kilianRawAmplifiedExtraction {α : Type} {H : List Bool → List Bool → List Bool} {V : Complexity.PCPVerifier α} {enc : α ↪ List Bool} {c : ℕ} {P : KilianRawProver α} (hH : HashFamily H) (hV : Complexity.PCPVerifier.PolyTime enc V) (hcoins : ∀ (a : α), V.coins a ≤ c * (Nat.log 2 (enc a).length + 1)) (hP : KilianRawProver.IsPPT enc P) (p q : ℕ → ℕ) (hp : Turing.MultiTapeTM.ComputableInPolyTime p Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) (hq : Turing.MultiTapeTM.ComputableInPolyTime q Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary) {num den : ℕ} (hnum : num < den) :

Amplified strict-PPT compact-table extraction from raw cheating provers: for any uniform strict PPT raw prover P : KilianRawProver α verified by kilianVerifyRawBounded, decoding P via P.toKilianProver yields a uniform strict PPT extractor outputting compact PCP tables passing kilianTablePassesFrac V num den with failure probability at most 2⁻ⁿ whenever P passes kilianVerifyRawBounded with probability at least (p n + 1)⁻¹ + (q n + 1)⁻¹ + ν n. No NP witness w is extracted here.

Unified Kilian succinct argument with bounded-prefix verifier and table extraction #

theorem Cslib.Crypto.exists_kilianSuccinctTableExtractionArgument_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 : ℕ), (kilianHonestRawBoundedGame H V x (compile (x, w)) n).eval = PMF.pure true ∧ (kilianHonestGame H V x (compile (x, w)) n).eval = PMF.pure true) ∧ (∃ (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 : ℕ → ℕ) (tBound : ℕ → ℕ) (sBound : ℕ → ℕ), PolynomiallyBounded t ∧ PolynomiallyBounded s ∧ PolynomiallyBounded tBound ∧ PolynomiallyBounded sBound ∧ (tm.ComputesFunInTimeAndSpace (Turing.MultiTapeTM.encPair (encKilianChallengeInput enc) Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBool (fun (p : KilianChallengeInput α × List Bool) => kilianVerifyRawBounded H V p.1 p.2) (fun (p : KilianChallengeInput α × List Bool) => t ((encKilianChallengeInput enc) p.1).length) fun (p : KilianChallengeInput α × List Bool) => s ((encKilianChallengeInput enc) p.1).length) ∧ ∀ (n : ℕ) (ch : KilianChallengeInput α) (rawProver : List Bool), ch.key.length ≤ n → ch.challenges.length ≤ n → (∀ ρ ∈ ch.challenges, ρ.length ≤ V.coins ch.stmt) → tm.ComputesInTimeAndSpace ((Turing.MultiTapeTM.encPair (encKilianChallengeInput enc) Turing.MultiTapeTM.encBits) (ch, rawProver)) (Turing.MultiTapeTM.encBool (kilianVerifyRawBounded H V ch rawProver)) (tBound (n + (enc ch.stmt).length)) (sBound (n + (enc ch.stmt).length))) ∧ KilianSound H V enc R.language ∧ KilianRawSound H V enc R.language ∧ (∀ (ext : KilianExtractedTable α), kilianTablePassesFrac V 1 2 ext = true → ∃ (w : List Bool), R.IsWitness ext.stmt w) ∧ (∀ (P : KilianProver α), KilianProver.IsPPT enc P → ∀ (p q : ℕ → ℕ), Turing.MultiTapeTM.ComputableInPolyTime p Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary → Turing.MultiTapeTM.ComputableInPolyTime q Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary → ∃ (T : ℕ → ℕ) (R_rep : ℕ → ℕ), Turing.MultiTapeTM.ComputableInPolyTime T Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary ∧ Turing.MultiTapeTM.ComputableInPolyTime R_rep Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary ∧ (Probability.IsPPT (Turing.MultiTapeTM.encOption (encKilianExtractedTable enc)) fun (n : ℕ) (x : List Bool) => kilianAmplifiedExtractor H V P T R_rep 1 2 n) ∧ (∀ (n : ℕ) (ext : KilianExtractedTable α), some ext ∈ (kilianAmplifiedExtractor H V P T R_rep 1 2 n).eval.support → kilianTablePassesFrac V 1 2 ext = true ∧ ∃ (w : List Bool), R.IsWitness ext.stmt w) ∧ ∃ (ν : ℕ → NNReal), Negligible ν ∧ ∀ (n : ℕ), (↑(p n + 1))⁻¹ + (↑(q n + 1))⁻¹ + ν n ≤ Game.succProbability (kilianAcceptGame H V P n).eval → 1 - ↑(Game.succProbability (kilianAmplifiedExtractionGame H V P T R_rep 1 2 n).eval) ≤ (1 / 2) ^ n) ∧ ∀ (P : KilianRawProver α), KilianRawProver.IsPPT enc P → ∀ (p q : ℕ → ℕ), Turing.MultiTapeTM.ComputableInPolyTime p Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary → Turing.MultiTapeTM.ComputableInPolyTime q Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary → ∃ (T : ℕ → ℕ) (R_rep : ℕ → ℕ), Turing.MultiTapeTM.ComputableInPolyTime T Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary ∧ Turing.MultiTapeTM.ComputableInPolyTime R_rep Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary ∧ (Probability.IsPPT (Turing.MultiTapeTM.encOption (encKilianExtractedTable enc)) fun (n : ℕ) (x : List Bool) => kilianAmplifiedExtractor H V P.toKilianProver T R_rep 1 2 n) ∧ (∀ (n : ℕ) (ext : KilianExtractedTable α), some ext ∈ (kilianAmplifiedExtractor H V P.toKilianProver T R_rep 1 2 n).eval.support → kilianTablePassesFrac V 1 2 ext = true ∧ ∃ (w : List Bool), R.IsWitness ext.stmt w) ∧ ∃ (ν : ℕ → NNReal), Negligible ν ∧ ∀ (n : ℕ), (↑(p n + 1))⁻¹ + (↑(q n + 1))⁻¹ + ν n ≤ Game.succProbability (kilianRawAcceptGame H V P n).eval → 1 - ↑(Game.succProbability (kilianAmplifiedExtractionGame H V P.toKilianProver T R_rep 1 2 n).eval) ≤ (1 / 2) ^ n

Kilian succinct NP argument with worst-case bounded-prefix verifier and amplified compact-table extraction: under any collision-resistant HashFamily H, every NP relation R : NPRelation enc admits an O(log n)-coin constant-query PCP verifier V and polynomial-time witness compiler compile giving:

  • polynomial-time honest commitment and opening algorithms on NP witnesses (x, w);
  • perfect completeness for both structured kilianHonestGame and raw bounded-prefix kilianHonestRawBoundedGame;
  • polylogarithmic communication O(n² · (log₂ |enc x| + 1));
  • one fixed binary MultiTapeTM computing kilianVerifyRawBounded in worst-case time and space polynomial in n + |enc x| uniformly over all arbitrary unbounded rawProver : List Bool;
  • computational soundness against both structured (KilianSound) and raw (KilianRawSound) uniform strict PPT cheating provers; and
  • high-confidence (≤ 2⁻ⁿ failure) strict-PPT extraction of a compact PCP table passing kilianTablePassesFrac V 1 2 (> 1 / 2 of PCP coins) from any structured or raw uniform strict PPT prover with acceptance probability at least (p n + 1)⁻¹ + (q n + 1)⁻¹ + ν n. No NP witness w is extracted constructively by kilianAmplifiedExtractor; the conclusion ∃ w, R.IsWitness ext.stmt w is an existential PCP-soundness consequence of ext.stmt ∈ R.language.