Documentation

CslibFrontier.Computability.Interactive.RbrKnowledge

Round-by-round knowledge soundness of interactive reductions #

Round-by-round knowledge soundness (Interactive.Verifier.RbrKnowledgeSound) strengthens round-by-round soundness (Interactive.Verifier.RbrSound) with a straight-line witness extractor E : StmtIn → Transcript s → WitOut → WitIn Canetti et al., Chiesa and Yogev.

For every input statement x (without assuming x ∉ language relIn), a state function S x : Prefix s → Prop on transcript prefixes tracks whether the prover has gotten lucky on a verifier challenge:

Because the initial prefix is doomed for every statement x, round-by-round knowledge soundness both implies round-by-round soundness for the languages of the relations (Verifier.RbrKnowledgeSound.toRbrSound) and implies straight-line knowledge soundness with error PerChallenge.sum s ε (Verifier.RbrKnowledgeSound.toKnowledgeSound). When E is computable in polynomial time on encoded words, it yields Verifier.EfficientKnowledgeSound (Verifier.RbrKnowledgeSound.efficientKnowledgeSound). Moreover, unlike standard knowledge soundness, its round-by-round state function composes directly across sequential reductions (Verifier.RbrKnowledgeSound.append), sequential products (Verifier.RbrKnowledgeSound.seqProd), iterated stages (Verifier.RbrKnowledgeSound.iterate), and statement-parameterized bundles (Verifier.RbrKnowledgeSound.bundle).

Main definitions #

Main results #

References #

Round-by-round helpers #

theorem Cslib.Interactive.rbrFrom_true (s : Spec) (smp : Spec.PerChallenge ProbComp s) (ε : Spec.PerChallenge (fun (x : Type) => ENNReal) s) (wins : s.Transcript → Prop) :
RbrFrom s smp ε (fun (x : Prefix s) => True) wins

The round-by-round condition holds trivially when every prefix is already in the lucky state.

theorem Cslib.Interactive.RbrFrom.mono_wins {s : Spec} {smp : Spec.PerChallenge ProbComp s} {ε : Spec.PerChallenge (fun (x : Type) => ENNReal) s} {S : Prefix s → Prop} {wins wins' : s.Transcript → Prop} :
(∀ (τ : s.Transcript), wins' τ → wins τ) → RbrFrom s smp ε S wins → RbrFrom s smp ε S wins'

Strengthening the winning event preserves the round-by-round condition.

Round-by-round knowledge soundness and its fundamental implications #

def Cslib.Interactive.Verifier.RbrKnowledgeSound {s : Spec} {StmtIn WitIn StmtOut WitOut : Type} (V : Verifier OracleSpec.empty s StmtIn StmtOut) (relIn : StmtIn → WitIn → Prop) (relOut : StmtOut → WitOut → Prop) (E : StmtIn → s.Transcript → WitOut → WitIn) (ε : Spec.PerChallenge (fun (x : Type) => ENNReal) s) :

Round-by-round knowledge soundness in the plain model with straight-line extractor E and per-round errors ε: some state function on transcript prefixes is false on the empty prefix of every statement and satisfies the round-by-round condition for the event that the verifier outputs a statement with a valid output witness for which E fails to recover a valid input witness.

theorem Cslib.Interactive.Verifier.RbrKnowledgeSound.toRbrSound {s : Spec} {StmtIn WitIn StmtOut WitOut : Type} {V : Verifier OracleSpec.empty s StmtIn StmtOut} {relIn : StmtIn → WitIn → Prop} {relOut : StmtOut → WitOut → Prop} {E : StmtIn → s.Transcript → WitOut → WitIn} {ε : Spec.PerChallenge (fun (x : Type) => ENNReal) s} (h : V.RbrKnowledgeSound relIn relOut E ε) :
V.RbrSound (language relIn) (language relOut) ε

Round-by-round knowledge soundness implies round-by-round soundness for the languages of the input and output relations, with the same per-round errors. On a statement x ∉ language relIn, no extracted witness can satisfy relIn x, so any transcript producing an output in language relOut must have entered the lucky state.

theorem Cslib.Interactive.Verifier.RbrKnowledgeSound.rbrSound {s : Spec} {StmtIn WitIn StmtOut WitOut : Type} {V : Verifier OracleSpec.empty s StmtIn StmtOut} {relIn : StmtIn → WitIn → Prop} {relOut : StmtOut → WitOut → Prop} {E : StmtIn → s.Transcript → WitOut → WitIn} {ε : Spec.PerChallenge (fun (x : Type) => ENNReal) s} (h : V.RbrKnowledgeSound relIn relOut E ε) :
V.RbrSound (language relIn) (language relOut) ε

Alias for Verifier.RbrKnowledgeSound.toRbrSound.

theorem Cslib.Interactive.Verifier.RbrKnowledgeSound.toKnowledgeSound {s : Spec} {StmtIn WitIn StmtOut WitOut : Type} {V : Verifier OracleSpec.empty s StmtIn StmtOut} {relIn : StmtIn → WitIn → Prop} {relOut : StmtOut → WitOut → Prop} {E : StmtIn → s.Transcript → WitOut → WitIn} {ε : Spec.PerChallenge (fun (x : Type) => ENNReal) s} (h : V.RbrKnowledgeSound relIn relOut E ε) :
V.KnowledgeSound relIn relOut E (PerChallenge.sum s ε)

Round-by-round knowledge soundness implies straight-line knowledge soundness, with the sum of the per-round errors and the same extractor E.

theorem Cslib.Interactive.Verifier.RbrKnowledgeSound.knowledgeSound {s : Spec} {StmtIn WitIn StmtOut WitOut : Type} {V : Verifier OracleSpec.empty s StmtIn StmtOut} {relIn : StmtIn → WitIn → Prop} {relOut : StmtOut → WitOut → Prop} {E : StmtIn → s.Transcript → WitOut → WitIn} {ε : Spec.PerChallenge (fun (x : Type) => ENNReal) s} (h : V.RbrKnowledgeSound relIn relOut E ε) :
V.KnowledgeSound relIn relOut E (PerChallenge.sum s ε)

Alias for Verifier.RbrKnowledgeSound.toKnowledgeSound.

theorem Cslib.Interactive.Verifier.RbrKnowledgeSound.toSound {s : Spec} {StmtIn WitIn StmtOut WitOut : Type} {V : Verifier OracleSpec.empty s StmtIn StmtOut} {relIn : StmtIn → WitIn → Prop} {relOut : StmtOut → WitOut → Prop} {E : StmtIn → s.Transcript → WitOut → WitIn} {ε : Spec.PerChallenge (fun (x : Type) => ENNReal) s} (h : V.RbrKnowledgeSound relIn relOut E ε) :

Round-by-round knowledge soundness implies soundness for the languages of the relations, with the sum of the per-round errors.

theorem Cslib.Interactive.Verifier.RbrKnowledgeSound.sound {s : Spec} {StmtIn WitIn StmtOut WitOut : Type} {V : Verifier OracleSpec.empty s StmtIn StmtOut} {relIn : StmtIn → WitIn → Prop} {relOut : StmtOut → WitOut → Prop} {E : StmtIn → s.Transcript → WitOut → WitIn} {ε : Spec.PerChallenge (fun (x : Type) => ENNReal) s} (h : V.RbrKnowledgeSound relIn relOut E ε) :

Alias for Verifier.RbrKnowledgeSound.toSound.

theorem Cslib.Interactive.Verifier.RbrKnowledgeSound.efficientKnowledgeSound {I : Type} {s : I → Spec} {StmtIn WitIn StmtOut WitOut : I → Type} {V : (i : I) → Verifier OracleSpec.empty (s i) (StmtIn i) (StmtOut i)} {relIn : (i : I) → StmtIn i → WitIn i → Prop} {relOut : (i : I) → StmtOut i → WitOut i → Prop} {enc : Encoding I s StmtIn} {encOut : (i : I) → WitOut i ↪ List Bool} {encIn : (i : I) → WitIn i ↪ List Bool} {E : (i : I) → StmtIn i → (s i).Transcript → WitOut i → WitIn i} {ε : (i : I) → Spec.PerChallenge (fun (x : Type) => ENNReal) (s i)} {f : I × List Bool × List Bool × List Bool → List Bool} (hrbr : ∀ (i : I), (V i).RbrKnowledgeSound (relIn i) (relOut i) (E i) (ε i)) (hf : Turing.MultiTapeTM.ComputableInPolyTime f (Turing.MultiTapeTM.encPair enc.index (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits))) Turing.MultiTapeTM.encBits) (hreal : ExtractorRealizedBy enc encOut encIn E f) :
EfficientKnowledgeSound V relIn relOut enc encOut encIn E fun (i : I) => PerChallenge.sum (s i) (ε i)

Round-by-round knowledge soundness with a polynomial-time extractor gives efficient straight-line knowledge soundness, with knowledge error PerChallenge.sum (s i) (ε i) at index i.

theorem Cslib.Interactive.Verifier.RbrSound.rbrKnowledgeSound {s : Spec} {StmtIn WitIn StmtOut WitOut : Type} {V : Verifier OracleSpec.empty s StmtIn StmtOut} {relIn : StmtIn → WitIn → Prop} {relOut : StmtOut → WitOut → Prop} {ε : Spec.PerChallenge (fun (x : Type) => ENNReal) s} (E : StmtIn → s.Transcript → WitOut → WitIn) (hE : ∀ x ∈ language relIn, ∀ (τ : s.Transcript) (w : WitOut), relIn x (E x τ w)) (h : V.RbrSound (language relIn) (language relOut) ε) :
V.RbrKnowledgeSound relIn relOut E ε

Round-by-round soundness gives round-by-round knowledge soundness for any extractor that outputs a valid witness on every statement of language relIn (for example, in reductions with Unit witnesses).

Sequential composition #

theorem Cslib.Interactive.Verifier.RbrKnowledgeSound.append {s₁ s₂ : Spec} {S₁ W₁ S₂ W₂ S₃ W₃ : Type} {V₁ : Verifier OracleSpec.empty s₁ S₁ S₂} {V₂ : Verifier OracleSpec.empty s₂ S₂ S₃} {rel₁ : S₁ → W₁ → Prop} {rel₂ : S₂ → W₂ → Prop} {rel₃ : S₃ → W₃ → Prop} {E₁ : S₁ → s₁.Transcript → W₂ → W₁} {E₂ : S₂ → s₂.Transcript → W₃ → W₂} {ε₁ : Spec.PerChallenge (fun (x : Type) => ENNReal) s₁} {ε₂ : Spec.PerChallenge (fun (x : Type) => ENNReal) s₂} (h₁ : V₁.RbrKnowledgeSound rel₁ rel₂ E₁ ε₁) (h₂ : V₂.RbrKnowledgeSound rel₂ rel₃ E₂ ε₂) (y₀ : S₂) :
(V₁.append V₂).RbrKnowledgeSound rel₁ rel₃ (V₁.extractAppend E₁ E₂ y₀) (Spec.PerChallenge.append s₁ s₂ ε₁ ε₂)

Round-by-round knowledge soundness composes sequentially, with the composed straight-line extractor Verifier.extractAppend and the concatenated per-round errors. The combined state function is T₁ during the first phase and the disjunction of the first phase's failure event with T₂ during the second phase.

theorem Cslib.Interactive.Verifier.RbrKnowledgeSound.seq {s₁ s₂ : Spec} {S₁ W₁ S₂ W₂ S₃ W₃ : Type} {V₁ : Verifier OracleSpec.empty s₁ S₁ S₂} {V₂ : Verifier OracleSpec.empty s₂ S₂ S₃} {rel₁ : S₁ → W₁ → Prop} {rel₂ : S₂ → W₂ → Prop} {rel₃ : S₃ → W₃ → Prop} {E₁ : S₁ → s₁.Transcript → W₂ → W₁} {E₂ : S₂ → s₂.Transcript → W₃ → W₂} {ε₁ : Spec.PerChallenge (fun (x : Type) => ENNReal) s₁} {ε₂ : Spec.PerChallenge (fun (x : Type) => ENNReal) s₂} (h₁ : V₁.RbrKnowledgeSound rel₁ rel₂ E₁ ε₁) (h₂ : V₂.RbrKnowledgeSound rel₂ rel₃ E₂ ε₂) (y₀ : S₂) :
(V₁.append V₂).RbrKnowledgeSound rel₁ rel₃ (V₁.extractAppend E₁ E₂ y₀) (Spec.PerChallenge.append s₁ s₂ ε₁ ε₂)

Alias for Verifier.RbrKnowledgeSound.append.

Sequential product composition #

theorem Cslib.Interactive.Verifier.RbrKnowledgeSound.seqProd {s₁ s₂ : Spec} {S₁ W₁ S₂ W₂ T₁ U₁ T₂ U₂ : Type} {V₁ : Verifier OracleSpec.empty s₁ S₁ S₂} {V₂ : Verifier OracleSpec.empty s₂ T₁ T₂} {rel₁ : S₁ → W₁ → Prop} {rel₁' : S₂ → W₂ → Prop} {rel₂ : T₁ → U₁ → Prop} {rel₂' : T₂ → U₂ → Prop} {E₁ : S₁ → s₁.Transcript → W₂ → W₁} {E₂ : T₁ → s₂.Transcript → U₂ → U₁} {ε₁ : Spec.PerChallenge (fun (x : Type) => ENNReal) s₁} {ε₂ : Spec.PerChallenge (fun (x : Type) => ENNReal) s₂} (h₁ : V₁.RbrKnowledgeSound rel₁ rel₁' E₁ ε₁) (h₂ : V₂.RbrKnowledgeSound rel₂ rel₂' E₂ ε₂) :
(V₁.seqProd V₂).RbrKnowledgeSound (relProd rel₁ rel₂) (relProd rel₁' rel₂') (extractSeqProd E₁ E₂) (Spec.PerChallenge.append s₁ s₂ ε₁ ε₂)

Round-by-round knowledge soundness composes across sequential products, with combined state State₁ on the first phase and State₁ ∨ State₂ on the second phase, and with product extractor Verifier.extractSeqProd E₁ E₂.

theorem Cslib.Interactive.Verifier.RbrSound.seqProd {s₁ s₂ : Spec} {S₁ S₂ T₁ T₂ : Type} {V₁ : Verifier OracleSpec.empty s₁ S₁ S₂} {V₂ : Verifier OracleSpec.empty s₂ T₁ T₂} {L₁ : Set S₁} {L₁' : Set S₂} {L₂ : Set T₁} {L₂' : Set T₂} {ε₁ : Spec.PerChallenge (fun (x : Type) => ENNReal) s₁} {ε₂ : Spec.PerChallenge (fun (x : Type) => ENNReal) s₂} (h₁ : V₁.RbrSound L₁ L₁' ε₁) (h₂ : V₂.RbrSound L₂ L₂' ε₂) :
(V₁.seqProd V₂).RbrSound (L₁ ×ˢ L₂) (L₁' ×ˢ L₂') (Spec.PerChallenge.append s₁ s₂ ε₁ ε₂)

Round-by-round soundness composes across Verifier.seqProd when either input statement is outside its language (x ∉ L₁ ×ˢ L₂, with x.1 ∉ L₁ or x.2 ∉ L₂).

Identity, iteration, and bundles #

theorem Cslib.Interactive.Reduction.id_rbrKnowledgeSound {S W : Type} (rel : S → W → Prop) :
id.verifier.RbrKnowledgeSound rel rel (fun (x : S) (x_1 : Spec.Transcript []) (w : W) => w) ()

The identity reduction without rounds is round-by-round knowledge sound without error, with the identity extractor.

noncomputable def Cslib.Interactive.Verifier.extractIterate {s : ℕ → Spec} {S W : ℕ → Type} (R : (i : ℕ) → Reduction OracleSpec.empty OracleSpec.empty (s i) (S i) (W i) (S (i + 1)) (W (i + 1))) (E : (i : ℕ) → S i → (s i).Transcript → W (i + 1) → W i) (y₀ : (i : ℕ) → S i) (k : ℕ) :
S 0 → (iterSpec s k).Transcript → W k → W 0

Composed straight-line extractor for the first k stages of Reduction.iterate.

theorem Cslib.Interactive.Verifier.RbrKnowledgeSound.iterate {s : ℕ → Spec} {S W : ℕ → Type} {R : (i : ℕ) → Reduction OracleSpec.empty OracleSpec.empty (s i) (S i) (W i) (S (i + 1)) (W (i + 1))} {rel : (i : ℕ) → S i → W i → Prop} {E : (i : ℕ) → S i → (s i).Transcript → W (i + 1) → W i} {ε : (i : ℕ) → Spec.PerChallenge (fun (x : Type) => ENNReal) (s i)} (y₀ : (i : ℕ) → S i) (k : ℕ) (h : ∀ i < k, (R i).verifier.RbrKnowledgeSound (rel i) (rel (i + 1)) (E i) (ε i)) :

Iterated round-by-round knowledge soundness, with the composed stage extractors and the per-round errors of the stages in order.

theorem Cslib.Interactive.Verifier.RbrKnowledgeSound.bundle {s : Spec} {Θ : Type} {S₁ S₂ : Θ → Type} {W₁ W₂ : Type} {smp : Spec.PerChallenge ProbComp s} {V : (θ : Θ) → Verifier OracleSpec.empty s (S₁ θ) (S₂ θ)} (hsmp : ∀ (θ : Θ), (V θ).samplers = smp) {rel₁ : (θ : Θ) → S₁ θ → W₁ → Prop} {rel₂ : (θ : Θ) → S₂ θ → W₂ → Prop} {E : (θ : Θ) → S₁ θ → s.Transcript → W₂ → W₁} {ε : Spec.PerChallenge (fun (x : Type) => ENNReal) s} (h : ∀ (θ : Θ), (V θ).RbrKnowledgeSound (rel₁ θ) (rel₂ θ) (E θ) ε) :
(Verifier.bundle smp V).RbrKnowledgeSound (fun (x : (θ : Θ) × S₁ θ) (w : W₁) => rel₁ x.fst x.snd w) (fun (y : (θ : Θ) × S₂ θ) (w : W₂) => rel₂ y.fst y.snd w) (fun (x : (θ : Θ) × S₁ θ) (τ : s.Transcript) (w : W₂) => E x.fst x.snd τ w) ε

Round-by-round knowledge soundness of a bundle, with the family of extractors fun x => E x.1 x.2 and the common per-round errors.