Documentation

CslibFrontier.Crypto.Protocols.VOLE.CircuitSound

Soundness of the circuit-bound ideal VOLE session #

The sender's actual role-local execution fixes its correction and linear openings without access to the receiver key. The hidden key can therefore be sampled after the sender's adaptive reply.

Main results #

theorem Cslib.Crypto.Protocols.VOLE.circuitCheck_eval_execute {F : Type} {p k m : ℕ} [CommRing F] [Fintype F] [DecidableEq F] (C : Circuits.Circuit (Circuits.arithSignature F) (p + k) m) {α : Type} (statement : (Fin p → F) × (Fin m → F)) (P : ProbOracleComp (voleSenderSpec F (p + k + C.size + 1)) (Interactive.ProverStrategy (ProbOracleComp (voleSenderSpec F (p + k + C.size + 1))) (circuitCheckSpec C) α)) :
(voleWorld F (p + k + C.size + 1)).eval ((circuitCheck C).verifier.execute statement P) = do let u ← Probability.PMF.uniformOfFintype (Fin (p + k + C.size + 1) → F) let v ← Probability.PMF.uniformOfFintype (Fin (p + k + C.size + 1) → F) have senderLaw : {β : Type} → OracleComp (OracleSpec.sum (fun (q : ℕ) => Fin (q + 1)) fun (x : Unit) => (Fin (p + k + C.size + 1) → F) × (Fin (p + k + C.size + 1) → F)) β → PMF β := fun {β : Type} => OracleComp.interpret (OracleComp.sumHandler ProbComp.unifOracle fun (x : Unit) => PMF.pure (u, v)) let st ← senderLaw P let __x ← senderLaw st match __x with | (first, next) => do let r ← Probability.PMF.uniformOfFintype (CircuitMulGate C → F) let response ← senderLaw (next r) let __x ← senderLaw response match __x with | (reply, result) => do let delta ← Probability.PMF.uniformOfFintype F pure ((first, r, reply, ()), if circuitVerify C statement (voleSample u v delta).receiverView first r reply = true then some () else none, result)

The actual malicious sender, including initialization, private coins and repeated setup reads, uses only its two vectors. Its first message is fixed before weights, and its complete adaptive reply is independent of the hidden key sampled last in this equal output law.

theorem Cslib.Crypto.Protocols.VOLE.circuitVerify_sample_iff {F : Type} {p k m : ℕ} [CommRing F] [DecidableEq F] (C : Circuits.Circuit (Circuits.arithSignature F) (p + k) m) (statement : (Fin p → F) × (Fin m → F)) (u v : Fin (p + k + C.size + 1) → F) (first : (Fin (p + k + C.size) → F) × (Fin p ⊕ Fin C.size ⊕ Fin m → F)) (r : CircuitMulGate C → F) (reply : F × F) (delta : F) :
have a := Fin.init u + first.1; circuitVerify C statement (voleSample u v delta).receiverView first r reply = true ↔ (∀ (row : Fin p ⊕ Fin C.size ⊕ Fin m), (circuitLinearCoeffs C).mulVec a row * delta + (circuitLinearCoeffs C).mulVec (Fin.init v) row = circuitLinearTargets C statement.1 statement.2 row * delta + first.2 row) ∧ ∑ i : CircuitMulGate C, r i * ((a (circuitMulInput C i 0) * delta + v (circuitMulInput C i 0).castSucc) * (a (circuitMulInput C i 1) * delta + v (circuitMulInput C i 1).castSucc) - (a (circuitMulOutput C i) * delta + v (circuitMulOutput C i).castSucc) * delta) = (reply.1 - u (Fin.last (p + k + C.size))) * delta + (reply.2 - v (Fin.last (p + k + C.size)))

With a valid sampled correlation, the verifier checks the extracted linear assignment and one weighted multiplication polynomial. The fresh affine mask is subtracted from the reply.

theorem Cslib.Crypto.Protocols.VOLE.toOuterMeasure_circuitVerify_le {F : Type} {p k m : ℕ} [Field F] [Fintype F] [DecidableEq F] (C : Circuits.Circuit (Circuits.arithSignature F) (p + k) m) (statement : (Fin p → F) × (Fin m → F)) (hfalse : ¬∃ (w : Fin k → F), C.eval (Circuits.arithInterpretation F) (Fin.append statement.1 w) = statement.2) (u v : Fin (p + k + C.size + 1) → F) (first : (Fin (p + k + C.size) → F) × (Fin p ⊕ Fin C.size ⊕ Fin m → F)) (reply : (CircuitMulGate C → F) → PMF (F × F)) :
(do let r ← Probability.PMF.uniformOfFintype (CircuitMulGate C → F) let ab ← reply r let delta ← Probability.PMF.uniformOfFintype F pure (circuitVerify C statement (voleSample u v delta).receiverView first r ab)).toOuterMeasure {true} ≤ (↑(Fintype.card F))⁻¹ + (1 - (↑(Fintype.card F))⁻¹) * (2 / ↑(Fintype.card F))

A false public statement passes the circuit verifier with at most the batch mixture bound. The correction and linear openings are fixed before the weights; the reply may depend arbitrarily and randomly on those weights. This is the conditional bound used by the actual sender execution.

theorem Cslib.Crypto.Protocols.VOLE.circuitCheck_sound {F : Type} {p k m : ℕ} [Field F] [Fintype F] [DecidableEq F] (C : Circuits.Circuit (Circuits.arithSignature F) (p + k) m) :
Interactive.Verifier.Sound (voleWorld F (p + k + C.size + 1)) (circuitCheck C).verifier {statement : (Fin p → F) × (Fin m → F) | ∃ (w : Fin k → F), C.eval (Circuits.arithInterpretation F) (Fin.append statement.1 w) = statement.2} Set.univ ((↑(Fintype.card F))⁻¹ + (1 - (↑(Fintype.card F))⁻¹) * (2 / ↑(Fintype.card F)))

Information-theoretic soundness for the public circuit language in the actual cached VOLE world, against every role-local sender strategy. A false linear row has error at most 1 / |F|; otherwise a false public statement forces a false multiplication gate and the batch mixture bound applies. These are disjoint assignment cases, so their bounds are not added.