Documentation

CslibFrontier.Crypto.Protocols.MPC.PolyTime

Polynomial-Time Completeness of $\text{OT}_1^4$ for Semi-Honest Multi-Party Computation #

This module formalizes a proper-coalition variant of Goldreich's semi-honest multi-party completeness theorem for 1-out-of-4 bit oblivious transfer $\text{OT}_1^4$ (Section 7.5.2.4, Theorem 7.5.12, print p. 707; generalizing Section 7.3.4, Theorem 7.3.11, print p. 648), with uniform efficiency certificates for the joint word-level runner and coalition simulators. Given any polynomial-time computable family of $m$-party randomized functionalities specified by a word-level evaluator F : α × List Bool → List Bool with polynomial-time unary input width n : α → ℕ, output width k : α → ℕ, and shared-coin width coins : α → ℕ:

  1. Uniform Circuit Compilation: Cslib.Complexity.CircuitValue.exists_uniformCircuitFamily compiles F into a polynomial-time constructible family of Boolean circuits C : (a : α) → Circuit Boolean.signature (m * n a + coins a) (m * k a) whose evaluation agrees with wordRandomizedFunctionality m coins n k F a.
  2. Word-Level Protocol Execution & Bridge Lemma: Protocol.runEncoded executes any ot14Spec-hybrid protocol in Cslib.Probability.WordOracleComp Unit (List Bool) by translating each typed ot14Spec query to a 6-bit word query and reading the 1-bit reply prefix. Protocol.eval_runEncoded_eq_evalWith_map proves that running Π.runEncoded against ot14WordHandler yields the exact distribution of (Π.evalWith ot14World x).map (encodeViewsAndOutputs encView encOut).
  3. Uniform Efficiency Certificates: Over the family input records FamilyRunInput and FamilySimInput, familyIsOraclePPT_gmwOT14RandomizedProtocol certifies that the centralized joint word-encoded execution Protocol.runEncoded of gmwOT14RandomizedProtocol across all m parties is uniformly oracle-PPT (Protocol.Family.IsOraclePPT; note that this certifies the joint word-level runner rather than separate per-party local PPT strategies), and familyIsPPT_gmwOT14RandomizedSim certifies that for every static coalition I : Finset (Fin m), the encoded view simulator gmwOT14RandomizedSim is uniformly PPT (CoalitionSimulator.Family.IsPPT). Because gmwCircuitProtocol (Construction 7.5.10, p. 706) includes one sharedMulSpec m share-refresh call per output coordinate (r, j) : Fin m × Fin k a in Step 3 in addition to one call per .and/.or gate in Step 2, composing with multiPartyMulProtocol m (Construction 7.5.8, p. 704) and twoPartyMulProtocol (Construction 7.3.7, pp. 643–644) expands each sharedMulSpec m call into $m(m-1)/2$ pairwise ot14Spec calls (adding $m \cdot k(a) \cdot m(m-1)/2$ calls in Step 3, polynomial in $m, n(a), k(a), (C\,a).\text{size}$).
  4. End-to-End Completeness (exists_perfectSemiHonestPrivate_ot14_of_polyTime): Formalizes a proper-coalition variant of Goldreich's Theorem 7.5.12, combining uniform circuit compilation, proper-coalition perfect semi-honest privacy in ot14World (PerfectSemiHonestPrivateProper), and the uniform efficiency predicates above. The proper-coalition quantifier I ≠ Finset.univ is narrower than Goldreich's Definition 7.5.1 and Theorem 7.5.12 (which quantify over all I ⊆ [m], p. 696; Goldreich's text on pp. 697 and 703 treats I = [m] as trivial without restricting that remark to deterministic functionalities or to the view-only Eq. 7.39). Under the joint view-and-output equation Eq. 7.40 for randomized functionalities, I = Finset.univ is not vacuous: the canonical independent-coin-share simulator randomizedWrapperSim is refuted at I = Finset.univ by not_perfectSemiHonestPrivate_coinEchoRandomizedWrapper_univ in CslibFrontierTests/Crypto/MPC.lean, and any full-coalition simulator receiving only (x, y) would have to sample coin shares whose XOR r satisfies g(r, x) = y.

The development is split by stage:

Main results #

References #

theorem Cslib.Crypto.Protocols.MPC.exists_perfectSemiHonestPrivate_ot14_of_polyTime {α : Type} {enc : α ↪ List Bool} (m : ℕ) [NeZero m] {coins n k : α → ℕ} {F : α × List Bool → List Bool} (hcoins : Turing.MultiTapeTM.ComputableInPolyTime coins enc Turing.MultiTapeTM.encUnary) (hn : Turing.MultiTapeTM.ComputableInPolyTime n enc Turing.MultiTapeTM.encUnary) (hk : Turing.MultiTapeTM.ComputableInPolyTime k enc Turing.MultiTapeTM.encUnary) (hF : Turing.MultiTapeTM.ComputableInPolyTime F (Turing.MultiTapeTM.encPair enc Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits) :
∃ (C : (a : α) → Circuits.Circuit Circuits.Boolean.signature (m * n a + coins a) (m * k a)), Turing.MultiTapeTM.ComputableInPolyTime (fun (a : α) => (C a).code) enc Circuits.Boolean.encCode ∧ (∀ (a : α) (xr : Fin (m * n a + coins a) → Bool) (j : Fin (m * k a)), (C a).eval Circuits.Boolean.interpretation xr j = (F (a, List.ofFn xr)).getD (↑j) false) ∧ (∀ (a : α), PerfectSemiHonestPrivateProper (gmwOT14RandomizedProtocol m (coins a) (n a) (k a) (C a)) ot14World (wordRandomizedFunctionality m coins n k F a) (gmwOT14RandomizedSim m (coins a) (n a) (k a) (C a))) ∧ (Protocol.Family.IsOraclePPT enc m n (fun (a : α) => gmwOT14RandomizedProtocol m (coins a) (n a) (k a) (C a)) (fun (a : α) => encGMWPartyView m (coins a) (n a) (k a) (C a)) fun (x : α) (x_1 : Fin m) (y : BitString (k x)) => List.ofFn y) ∧ ∀ (I : Finset (Fin m)), I ≠ Finset.univ → CoalitionSimulator.Family.IsPPT enc m n k I (fun (a : α) => encGMWPartyView m (coins a) (n a) (k a) (C a)) fun (a : α) => gmwOT14RandomizedSim m (coins a) (n a) (k a) (C a) I

Proper-coalition variant of Theorem 7.5.12 (Goldreich Section 7.5.2.4, p. 707; generalizing Theorem 7.3.11, Section 7.3.4, p. 648): every polynomial-time m-party randomized functionality family F is privately reducible to $\text{OT}_1^4$ in the semi-honest model against every proper static coalition I ≠ Finset.univ, with uniform polynomial-time circuit family C, uniform IsOraclePPTOn joint word-level protocol execution via Protocol.runEncoded (linked to Protocol.evalWith ot14World by Protocol.eval_runEncoded_eq_evalWith_map), and uniform IsPPTOn coalition simulators.

Note that the proper-coalition quantifier I ≠ Finset.univ (PerfectSemiHonestPrivateProper) is narrower than Goldreich's Definition 7.5.1 and Theorem 7.5.12 (which quantify over all I ⊆ [m], p. 696; Goldreich's text on pp. 697 and 703 treats I = [m] as trivial without restricting that remark to deterministic functionalities or to the view-only Eq. 7.39). Under the joint view-and-output equation Eq. 7.40 for randomized functionalities, I = Finset.univ is not vacuous: the canonical independent-coin-share simulator randomizedWrapperSim is refuted at I = Finset.univ by not_perfectSemiHonestPrivate_coinEchoRandomizedWrapper_univ in CslibFrontierTests/Crypto/MPC.lean, and any full-coalition simulator receiving only (x, y) would have to sample coin shares whose XOR r satisfies g(r, x) = y.