Documentation

CslibFrontier.Crypto.Computational.Kilian.Succinct

Succinctness of Kilian's protocol #

Kilian's protocol is succinct: the honest transcript has a number of bits polynomial in the security parameter and polylogarithmic in the encoded statement length ([Kil92]; [BG01], Construction 3.4). This module counts it, in terms of the PCP verifier's parameters, kept separate from them: r = V.coins x random bits and at most q queries per random string.

Verifier time is certified by computableInPolyTime_kilianVerify, assuming a polynomial-time hash with key-length digests, V.PolyTime enc and logarithmically many random bits. On honest transcripts, the encoded verifier input has length linear in |enc x| and polynomial in n and the PCP parameters (length_kilianVerifierInput_honest_le); combining the two under a constant (or polynomial) query bound yields a single binary multi-tape Turing machine computing kilianVerify whose step and space counts on every honest transcript are polynomially bounded in n + |enc x| (computableInTimeAndSpace_kilianVerify_honest_le). The verifier does not truncate oversized raw messages, so on arbitrary malformed inputs its time is polynomial in the received encoded input length.

Main definitions #

Main results #

References #

Counting bits #

The payload bits of an opening: its bit and the bits of its path labels.

The payload bits of a response: the bits of all its openings.

def Cslib.Crypto.kilianCommunication (k root : List Bool) (ρs : List (List Bool)) (response : KilianResponse) :

The payload bits of a transcript after the statement: the key, the root, the random strings and the response.

The committed table #

theorem Cslib.Crypto.length_queryTable_le {α : Type} {V : Complexity.PCPVerifier α} {x : α} {q : ℕ} (hq : ∀ (ρ : List Bool), ρ.length = V.coins x → (V.queries (x, ρ)).length ≤ q) :
(V.queryTable x).length ≤ 2 ^ V.coins x * q

The compact table has at most 2 ^ r * q entries for a verifier using r random bits and at most q queries per random string.

theorem Cslib.Crypto.kilianDepth_le {α : Type} {V : Complexity.PCPVerifier α} {x : α} {q : ℕ} (hq : ∀ (ρ : List Bool), ρ.length = V.coins x → (V.queries (x, ρ)).length ≤ q) :

The committed tree has depth at most r + ⌈log₂ q⌉.

Honest communication #

theorem Cslib.Crypto.kilianResponseBits_kilianRespond_le {α : Type} {H : List Bool → List Bool → List Bool} {V : Complexity.PCPVerifier α} (hlen : ∀ (k x : List Bool), (H k x).length = k.length) {k : List Bool} {x : α} {table : List Bool} {ρs : List (List Bool)} {q : ℕ} (hq : ∀ (ρ : List Bool), ρ.length = V.coins x → (V.queries (x, ρ)).length ≤ q) (hρs : ∀ ρ ∈ ρs, ρ.length = V.coins x) :
kilianResponseBits (kilianRespond H V k x table ρs) ≤ ρs.length * (q * (1 + kilianDepth V x * k.length))

The honest response is short: for a hash with k.length-bit digests, each of the ρs.length repetitions sends at most q openings, each of one bit and kilianDepth V x labels of at most k.length bits.

theorem Cslib.Crypto.kilianCommunication_honest_le {α : Type} {H : List Bool → List Bool → List Bool} {V : Complexity.PCPVerifier α} (hlen : ∀ (k x : List Bool), (H k x).length = k.length) {n : ℕ} {k : List Bool} (hk : k.length = n) {x : α} {table : List Bool} {ρs : List (List Bool)} (hn : ρs.length = n) (hρs : ∀ ρ ∈ ρs, ρ.length = V.coins x) {q : ℕ} (hq : ∀ (ρ : List Bool), ρ.length = V.coins x → (V.queries (x, ρ)).length ≤ q) :
kilianCommunication k (kilianCommit H V k x table) ρs (kilianRespond H V k x table ρs) ≤ 2 * n + n * V.coins x + n * (q * (1 + (V.coins x + Nat.clog 2 q) * n))

Honest communication in the PCP parameters: at security parameter n, with an n-bit key, n random strings of r = V.coins x bits and a hash with n-bit digests, the honest transcript after the statement has at most 2 * n + n * r + n * (q * (1 + (r + ⌈log₂ q⌉) * n)) bits.

theorem Cslib.Crypto.kilianCommunication_honest_le_log {α : Type} {H : List Bool → List Bool → List Bool} {V : Complexity.PCPVerifier α} {enc : α ↪ List Bool} {c : ℕ} (hlen : ∀ (k x : List Bool), (H k x).length = k.length) {n : ℕ} {k : List Bool} (hk : k.length = n) {x : α} {table : List Bool} {ρs : List (List Bool)} (hn : ρs.length = n) (hρs : ∀ ρ ∈ ρs, ρ.length = V.coins x) {q : ℕ} (hq : ∀ (ρ : List Bool), ρ.length = V.coins x → (V.queries (x, ρ)).length ≤ q) (hcoins : V.coins x ≤ c * (Nat.log 2 (enc x).length + 1)) :
kilianCommunication k (kilianCommit H V k x table) ρs (kilianRespond H V k x table ρs) ≤ (2 + c + q + q * c + q * Nat.clog 2 q) * (n + 1) ^ 2 * (Nat.log 2 (enc x).length + 1)

Polylogarithmic communication: for a verifier with at most c * (log₂ |enc x| + 1) random bits and at most q queries per random string (as the verifier of the PCP theorem has, with q constant), the honest transcript after the statement has at most (2 + c + q + q * c + q * ⌈log₂ q⌉) * (n + 1) ^ 2 * (log₂ |enc x| + 1) bits.

The verifier's input #

theorem Cslib.Crypto.length_kilianVerifierInput_honest_le {α : Type} {H : List Bool → List Bool → List Bool} {V : Complexity.PCPVerifier α} {enc : α ↪ List Bool} (hlen : ∀ (k x : List Bool), (H k x).length = k.length) {n : ℕ} {k : List Bool} (hk : k.length = n) {x : α} {table : List Bool} {ρs : List (List Bool)} (hn : ρs.length = n) (hρs : ∀ ρ ∈ ρs, ρ.length = V.coins x) {q : ℕ} (hq : ∀ (ρ : List Bool), ρ.length = V.coins x → (V.queries (x, ρ)).length ≤ q) :
((encKilianView enc) { key := k, stmt := x, root := kilianCommit H V k x table, challenges := ρs, response := kilianRespond H V k x table ρs }).length ≤ 4 * (enc x).length + 6 * n + 6 + 2 * (n * (2 * V.coins x + 1)) + n * (2 * (q * (2 * (3 + (V.coins x + Nat.clog 2 q) * (2 * n + 1)) + 1)) + 1)

The honest verifier input is short: on an honest transcript at security parameter n, the encoded input of kilianVerify (the input of computableInPolyTime_kilianVerify) has length at most 4 * |enc x| + 6 * n + 6 + 2 * n * (2 * r + 1) + n * (2 * q * B + 1) with B = 2 * (3 + (r + ⌈log₂ q⌉) * (2 * n + 1)) + 1, linear in the statement and polynomial in n and the PCP parameters. This is an input-length bound, not a runtime certificate. Combined with computableInPolyTime_kilianVerify under its polynomial-time hash, digest-length, V.PolyTime and logarithmic-randomness hypotheses, and a polynomial query bound (constant for the PCP-theorem verifier), it gives polynomial time in n + |enc x| on honest transcripts.

theorem Cslib.Crypto.computableInTimeAndSpace_kilianVerify_honest_le {α : Type} {H : List Bool → List Bool → List Bool} {V : Complexity.PCPVerifier α} {enc : α ↪ List Bool} {c q : ℕ} (hH : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : List Bool × List Bool) => H p.1 p.2) (Encoding.encProd Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits) (hlen : ∀ (k x : List Bool), (H k x).length = k.length) (hV : Complexity.PCPVerifier.PolyTime enc V) (hcoins : ∀ (a : α), V.coins a ≤ c * (Nat.log 2 (enc a).length + 1)) (hq : ∀ (x : α) (ρ : List Bool), ρ.length = V.coins x → (V.queries (x, ρ)).length ≤ q) :
∃ (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) Encoding.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) (Encoding.encBool (kilianVerify H V key x view.root ρs view.response)) (tHonest (n + (enc x).length)) (sHonest (n + (enc x).length))

Honest-transcript verifier runtime and space: under a polynomial-time hash with key-length digests and a polynomial-time PCP verifier V using O(log |enc x|) coins and at most q queries per random string, there is a fixed binary multi-tape Turing machine computing kilianVerify on every KilianView α in polynomial time and space in the encoded view, whose step and space bounds on every honest transcript at security parameter n are bounded by polynomially bounded functions of n + |enc x|.