Documentation

CslibFrontier.Crypto.Computational.ZeroKnowledge.AuxClock

Clock bridge for auxiliary-input zero knowledge with unbounded auxiliary input #

In AuxiliaryInputZeroKnowledge, the malicious verifier Vstar is a standard IsOraclePPTOn program on encInstanceAuxInput enc, so its polynomial clock is allowed to depend on the length of the auxiliary input z, and the family z : ℕ → List Bool is required to be polynomially bounded.

When Vstar is instead clocked in the primary input (1^n, a) (or in the instance x alone) via IsOraclePPTWithAux, input-tape prefix locality (IsOraclePPTWithAux.exists_run_interpret_take) shows that Vstar reads at most a polynomial prefix z.take (T_V n a) of z during its run against any stateful prover Prover Unit. Applying AuxiliaryInputZeroKnowledge to Vstar and setting S n a z := S₀ n a (z.take (T_V n a)) yields a primary-input-clocked simulator (IsPPTWithAux) that works for arbitrary, unbounded auxiliary inputs z against any distinguisher clocked in the primary input and view (IsPPTWithAux) that receives the full untruncated z, both in the security-parameter-indexed family form (UnboundedAuxiliaryInputZeroKnowledge) and in the Goldreich-style instance-indexed (x-indexed) form (InstanceAuxiliaryInputZeroKnowledge) where the security parameter is (enc x).length and the simulator is chosen once per Vstar before the distinguisher, instance x, valid witness w, and unbounded auxiliary input z.

Because AuxiliaryInputZeroKnowledge quantifies independently over the polynomially bounded verifier auxiliary input z_V and distinguisher auxiliary input z_A, the bridge passes the verifier-sized prefix z_V n := (z n).take (T_V n (a n)) to Vstar and S₀ (where S₀ n (a n) (z_V n) = S n (a n) (z n) holds definitionally) and the distinguisher-sized prefix z_A n := (z n).take (T_A n (a n)) to adversary, without requiring any syntactic congruence condition on S₀.

Main definitions #

Main results #

References #

theorem Cslib.Complexity.Prover.exists_run_take_of_isOraclePPTWithAux {Operation α β : Type} [DecidableEq Operation] {input : α ↪ List Bool} {output : β ↪ List Bool} {program : α → List Bool → Probability.WordOracleComp Operation β} (h : Probability.IsOraclePPTWithAux input output program) :
∃ (c : ℕ) (d : ℕ), ∀ (a : α) (z : List Bool) {m : ℕ}, c * ((input a).length + 1) ^ d ≤ m → ∀ (P : Prover Operation) (s : P.State), P.run (program a (List.take m z)) s = P.run (program a z) s

Prover interaction prefix truncation for IsOraclePPTWithAux. An oracle verifier clocked in the primary input a has the exact same joint distribution of (result, finalProverState) against every stateful prover P : Prover Operation on (a, z.take m) as on (a, z) whenever m ≥ c * ((input a).length + 1) ^ d.

@[reducible, inline]
abbrev Cslib.Probability.encAuxTriple {α β : Type} (enc₁ : α ↪ List Bool) (enc₂ : β ↪ List Bool) :

Input (a, b, z) of a program with a primary input pair (a, b) and an auxiliary bit word z, flattened into a triple: a encoded by enc₁, b by enc₂, then z as a bit word. a and b are framed; z is not. IsPPTWithAux (encPair enc₁ enc₂) keeps the pair and the word apart, and the lemmas below pass between the two forms. With enc₁ = encUnary, the layout is that of the zero-knowledge input Cslib.Crypto.encInstanceAuxInput enc₂.

theorem Cslib.Probability.IsOraclePPTWithAux.isOraclePPTOn_triple {Operation α β γ : Type} [DecidableEq Operation] {enc₁ : α ↪ List Bool} {enc₂ : β ↪ List Bool} {output : γ ↪ List Bool} {program : α → β → List Bool → WordOracleComp Operation γ} (h : IsOraclePPTWithAux (Turing.MultiTapeTM.encPair enc₁ enc₂) output fun (x : α × β) (z : List Bool) => match x with | (a, b) => program a b z) :
IsOraclePPTOn (encAuxTriple enc₁ enc₂) output fun (x : α × β × List Bool) => match x with | (a, b, z) => program a b z

Reassociate IsOraclePPTWithAux (encPair enc₁ enc₂) into a standard IsOraclePPTOn certificate on encAuxTriple enc₁ enc₂.

theorem Cslib.Probability.IsPPTOn.isPPTWithAux_take_triple {α β γ : Type} {enc₁ : α ↪ List Bool} {enc₂ : β ↪ List Bool} {output : γ ↪ List Bool} {program : α → β → List Bool → ProbComp γ} (h : IsPPTOn (encAuxTriple enc₁ enc₂) output fun (x : α × β × List Bool) => match x with | (a, b, z) => program a b z) (c d : ℕ) :
IsPPTWithAux (Turing.MultiTapeTM.encPair enc₁ enc₂) output fun (x : α × β) (z : List Bool) => match x with | (a, b) => program a b (List.take (c * (((Turing.MultiTapeTM.encPair enc₁ enc₂) (a, b)).length + 1) ^ d) z)

Truncating the auxiliary input of a three-argument IsPPTOn program to a polynomial in the encoded primary pair encPair enc₁ enc₂ (a, b) yields an IsPPTWithAux (encPair enc₁ enc₂) certificate.

theorem Cslib.Probability.IsPPTOn.take_aux_triple {α β γ : Type} {enc₁ : α ↪ List Bool} {enc₂ : β ↪ List Bool} {output : γ ↪ List Bool} {program : α → β → List Bool → ProbComp γ} (h : IsPPTOn (encAuxTriple enc₁ enc₂) output fun (x : α × β × List Bool) => match x with | (a, b, z) => program a b z) (c d : ℕ) :
IsPPTOn (encAuxTriple enc₁ enc₂) output fun (x : α × β × List Bool) => match x with | (a, b, z) => program a b (List.take (c * (((Turing.MultiTapeTM.encPair enc₁ enc₂) (a, b)).length + 1) ^ d) z)

Truncating the auxiliary input of a three-argument IsPPTOn program to a polynomial in the encoded primary pair encPair enc₁ enc₂ (a, b) preserves IsPPTOn.

def Cslib.Crypto.UnboundedAuxiliaryInputZeroKnowledge {α : Type} (enc : α ↪ List Bool) (prover : ℕ → α → List Bool → Complexity.Prover Unit) (isWitness : α → List Bool → Bool) :

Unbounded-z family auxiliary-input computational zero knowledge. For every malicious verifier Vstar clocked in the primary input (1^n, a) (IsOraclePPTWithAux (encPair encUnary enc) encBits), there exists a uniform strict PPT witness-free simulator S clocked in (1^n, a) (IsPPTWithAux (encPair encUnary enc) encBits) together with a polynomial prefix bound c, d in (1^n, a) such that:

  1. S depends only on the first c * ((encPair encUnary enc (n, a)).length + 1) ^ d bits of z.
  2. Across all polynomially bounded instance families a : ℕ → α, polynomially bounded valid witness families w : ℕ → List Bool, and arbitrary, unbounded auxiliary-input families z : ℕ → List Bool, every distinguisher clocked in ((1^n, a), view) (IsPPTWithAux) receiving the full untruncated z n has negligible distinguishing advantage between the real interaction view and the simulated view.

This notion is novel to this library. It follows [Gol98], Definition 4.3.8, pp. 151–152, in its treatment of auxiliary input: z may have any length, the verifier, simulator and distinguisher are clocked in the primary input (1^n, a) (and the view), so they read only a polynomial prefix of it, and the distinguisher receives the verifier's z. It strengthens the source by decoupling the security parameter from the instance, as AuxiliaryInputZeroKnowledge does: the instances are polynomially bounded families indexed by n, every party runs in time polynomial in n, and the gap is negligible in n, so on instances much shorter than n the prover must withstand verifiers and distinguishers that run in time superpolynomial in the instance length.

Relation to standard assumptions. It implies the library's instance-indexed form of Definition 4.3.8, InstanceAuxiliaryInputZeroKnowledge (UnboundedAuxiliaryInputZeroKnowledge.instanceAuxiliaryInputZeroKnowledge), and follows from AuxiliaryInputZeroKnowledge (AuxiliaryInputZeroKnowledge.unboundedAuxiliaryInputZeroKnowledge).

Why it is plausible. Through AuxiliaryInputZeroKnowledge, the library's Goldreich–Micali–Wigderson theorem NonuniformOneWay.exists_zkProof_of_mem_NP gives a proof system with this property for every language in NP from any nonuniformly one-way function.

theorem Cslib.Crypto.UnboundedAuxiliaryInputZeroKnowledge.computationallyIndistinguishable {α : Type} {enc : α ↪ List Bool} {prover : ℕ → α → List Bool → Complexity.Prover Unit} {isWitness : α → List Bool → Bool} (h : UnboundedAuxiliaryInputZeroKnowledge enc prover isWitness) {Vstar : ℕ → α → List Bool → Probability.WordOracleComp Unit (List Bool)} (hV : Probability.IsOraclePPTWithAux (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary enc) Turing.MultiTapeTM.encBits fun (x : ℕ × α) (z : List Bool) => match x with | (n, a) => Vstar n a z) :
∃ (S : ℕ → α → List Bool → ProbComp (List Bool)) (c : ℕ) (d : ℕ), (Probability.IsPPTWithAux (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary enc) Turing.MultiTapeTM.encBits fun (x : ℕ × α) (z : List Bool) => match x with | (n, a) => S n a z) ∧ (∀ (n : ℕ) (a : α) (z : List Bool) {m : ℕ}, c * (((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary enc) (n, a)).length + 1) ^ d ≤ m → S n a (List.take m z) = S n a z) ∧ ∀ (a : ℕ → α) (w z : ℕ → List Bool), (PolynomiallyBounded fun (n : ℕ) => (enc (a n)).length) → (PolynomiallyBounded fun (n : ℕ) => (w n).length) → (∀ (n : ℕ), isWitness (a n) (w n) = true) → ComputationallyIndistinguishable (fun (n : ℕ) => zkRealView (prover n (a n) (w n)) (Vstar n (a n) (z n))) fun (n : ℕ) => (S n (a n) (z n)).eval

Under UnboundedAuxiliaryInputZeroKnowledge, the real and simulated view ensembles are ComputationallyIndistinguishable across all polynomially bounded valid (a, w) families and all arbitrary, unbounded auxiliary-input families z : ℕ → List Bool.

theorem Cslib.Crypto.AuxiliaryInputZeroKnowledge.unboundedAuxiliaryInputZeroKnowledge {α : Type} {enc : α ↪ List Bool} {prover : ℕ → α → List Bool → Complexity.Prover Unit} {isWitness : α → List Bool → Bool} (h : AuxiliaryInputZeroKnowledge enc prover isWitness) :

Clock bridge for family auxiliary-input zero knowledge. Every system satisfying AuxiliaryInputZeroKnowledge also satisfies UnboundedAuxiliaryInputZeroKnowledge against verifiers clocked in (1^n, a).

def Cslib.Crypto.InstanceAuxiliaryInputZeroKnowledge {α : Type} (enc : α ↪ List Bool) (prover : ℕ → α → List Bool → Complexity.Prover Unit) (isWitness : α → List Bool → Bool) :

Goldreich-style instance-indexed (x-indexed) auxiliary-input computational zero knowledge with unbounded auxiliary input. For every malicious verifier Vstar : α → List Bool → WordOracleComp Unit (List Bool) clocked in the primary instance x (IsOraclePPTWithAux enc encBits Vstar), there exists a single uniform strict PPT witness-free simulator S : α → List Bool → ProbComp (List Bool) clocked in x (IsPPTWithAux enc encBits S, chosen once per Vstar before the distinguisher, polynomial bounds, instance x, witness w, and auxiliary input z) together with a polynomial prefix bound c, d such that:

  1. S depends only on the first c * ((enc x).length + 1) ^ d bits of z.
  2. For every distinguisher adversary : α → List Bool → List Bool → ProbComp Bool clocked in (x, view) (IsPPTWithAux (encPair enc encBits) encBool (fun (x, view) z => adversary x z view)) receiving the full untruncated z, and every witness-length bound c_w * (n + 1) ^ d_w and inverse-polynomial degree k, for all sufficiently large instance lengths n = (enc x).length, every valid instance-witness pair (x, w) (isWitness x w = true, w.length ≤ c_w * (n + 1) ^ d_w) and every arbitrary, unbounded auxiliary input z : List Bool have distinguishing advantage at most 1 / ((n : ℝ) + 1) ^ k when interacting with prover (enc x).length x w.

Source. This is zero knowledge with respect to auxiliary input, [Gol98], Definition 4.3.8, pp. 151–152, with the clock conventions stated after it (p. 152): the verifier, the simulator and the distinguisher are clocked in |x| (here (enc x).length) alone, the auxiliary input z may have any length and is also given to the distinguisher, the verifier's output is compared with the simulator's, and the gap is measured in |x|. It differs from the source as follows.

  • The prover's private input ranges over valid witnesses (isWitness x w) of length at most c_w * (|x| + 1) ^ d_w, for every c_w and d_w, where the source's ranges over every string with which the prover meets the completeness condition. The prover is the family prover run at security parameter |x|. This weakens the notion.
  • The simulator must also depend only on a prefix of z of length polynomial in |x| (item 1). A machine clocked in |x|, as the source's simulator is, reads no more of z than that.
  • The distinguisher is clocked in the lengths of the instance and the view together, where the source's is clocked in |x|. Both views have length polynomial in |x|, since the verifier and the simulator are clocked in |x|, so the two clocks admit the same distinguishers on them.

It is a property of the prover alone; ZKProof.InstanceAuxiliaryInputZeroKnowledge states it for the prover of a proof system.

Indexing bridge from UnboundedAuxiliaryInputZeroKnowledge to Goldreich-style x-indexed auxiliary-input zero knowledge. Every system satisfying UnboundedAuxiliaryInputZeroKnowledge satisfies InstanceAuxiliaryInputZeroKnowledge.

theorem Cslib.Crypto.AuxiliaryInputZeroKnowledge.instanceAuxiliaryInputZeroKnowledge {α : Type} {enc : α ↪ List Bool} {prover : ℕ → α → List Bool → Complexity.Prover Unit} {isWitness : α → List Bool → Bool} (h : AuxiliaryInputZeroKnowledge enc prover isWitness) :

Clock and indexing bridge to Goldreich-style x-indexed auxiliary-input zero knowledge. Every system satisfying AuxiliaryInputZeroKnowledge satisfies InstanceAuxiliaryInputZeroKnowledge.

def Cslib.Crypto.ZKProof.UnboundedAuxiliaryInputZeroKnowledge {α : Type} {enc : α ↪ List Bool} {A : Set α} {soundness : ℕ → ENNReal} (zk : ZKProof enc A soundness) :

Unbounded-z family auxiliary-input zero knowledge for a bundled ZKProof: Cslib.Crypto.UnboundedAuxiliaryInputZeroKnowledge for the bundled prover and witness predicate.

Like that notion, this one is novel to this library: it strengthens [Gol98], Definition 4.3.8, pp. 151–152, by decoupling the security parameter from the instance. It implies ZKProof.InstanceAuxiliaryInputZeroKnowledge, which follows the source's indexing (ZKProof.UnboundedAuxiliaryInputZeroKnowledge.instanceAuxiliaryInputZeroKnowledge). It follows from ZKProof.AuxiliaryInputZeroKnowledge (ZKProof.AuxiliaryInputZeroKnowledge.unboundedAuxiliaryInputZeroKnowledge), so it is plausible for the same reason: NonuniformOneWay.exists_zkProof_of_mem_NP builds systems with that property for every language in NP from any nonuniformly one-way function.

def Cslib.Crypto.ZKProof.InstanceAuxiliaryInputZeroKnowledge {α : Type} {enc : α ↪ List Bool} {A : Set α} {soundness : ℕ → ENNReal} (zk : ZKProof enc A soundness) :

Goldreich-style x-indexed auxiliary-input zero knowledge with unbounded z for a bundled ZKProof: InstanceAuxiliaryInputZeroKnowledge of its prover and witness relation, which is [Gol98], Definition 4.3.8, pp. 151–152, with the deviations listed there.