Multi-Party Protocol Composition, Randomized Wrapper, and Completeness of $\text{OT}_1^4$ #
This module formalizes the $m$-party semi-honest composition theorem, the reduction from randomized functionalities to deterministic functionalities via shared coin-tossing, and the resulting information-theoretic reduction of any randomized $m$-party Boolean circuit functionality to $\text{OT}_1^4$ from Goldreich's Foundations of Cryptography, Volume 2: Basic Applications:
- $k$-ary Subprotocol Composition (
Round.embed,Schedule.compose,Schedule.ComposedCoins,Protocol.compose,composeSim,PerfectSemiHonestPrivate.compose): generalizes the 2-party composition theorem (Section 7.3.1, Definitions 7.3.1–7.3.2 on print p. 636 and Theorem 7.3.3 on print pp. 637–638) to $m$-party protocols making $k$-ary ideal oracle calls (Section 7.5.2.1, Definitions 7.5.5–7.5.6 on print pp. 701–702 and Theorem 7.5.7 on print pp. 702–703). Replacing each.oracle op partiesround of an outer protocolPwith the embedded execution of a perfectly private $k$-party subprotocolSub opyields a perfectly private $m$-party protocolP.compose Subin the lower-level oracle worldW₂. - Reduction of Randomized Functionalities to Deterministic Ones (
randomizedFunctionality,detOfRandomized,Protocol.randomizedWrapper,randomizedWrapperSim,perfectSemiHonestPrivate_randomizedWrapper): formalizes Equation 7.48 (Section 7.5.2.4, print p. 707) and Proposition 7.3.4 (Section 7.3.1, print pp. 639–640) combined with the composition theorem ("Application: Reducing Private Computation of General Functionalities to Deterministic Ones", Section 7.3.1, print pp. 638–639, Equation 7.19). Each partyi : Fin msamples a uniform private coin sharer_i : BitString coinsand runs a deterministic protocol on(x_i, r_i)that evaluatesg (∑ i : Fin m, r_i) x. Against every proper static coalitionI ≠ Finset.univ, the sum∑ i : Fin m, r_iis uniform and independent of the coalition's coin sharesI.restrict r.perfectSemiHonestPrivate_randomizedWrapperis proved directly rather than viaPerfectSemiHonestPrivate.composebecause the coin-sharing reduction is only private against proper coalitionsI ≠ Finset.univ, whereasPerfectSemiHonestPrivate.composerequires all-Iprivacy of the outer protocol. Note that restricting toI ≠ Finset.univis narrower than Goldreich's quantifier over all $I \subseteq [m]$ in Definition 7.5.1 (print p. 696, where $I = [m]$ is called "always trivial" on print pp. 697 and 703): under the joint view-and-output equation (Eq. 7.40) for randomized functionalities, $I = [m]$ is not trivial when coin shares are simulated independently of the output (for $m = 2$, Definition 7.2.1 considers only single-party views, so Proposition 7.3.4 itself is fully covered). - XOR Prelude Circuit and $\text{OT}_1^4$-Hybrid GMW Protocol (
xorPreludeCircuit,eval_xorPreludeCircuit,gmwOT14Protocol,gmwOT14RandomizedProtocol,perfectSemiHonestPrivateProper_gmwOT14Randomized): constructs a Boolean circuitxorPreludeCircuit m n coins(reusingCslib.Circuits.Program.appendXorandCslib.Circuits.Circuit.pi) that unpacks themparty input-coin blocks(x_i, r_i)intoFin.append (BitString.blocksEquiv.symm x) (∑ i : Fin m, r_i), composesgmwCircuitProtocol(M3) withmultiPartyMulProtocolandtwoPartyMulProtocol(M2) to obtaingmwOT14ProtocolandgmwOT14RandomizedProtocol, and establishes Theorem 7.5.12 (Section 7.5.2.4, print p. 707; generalizing Theorem 7.3.11, Section 7.3.4, print p. 648) at the circuit level for all proper coalitionsI ≠ Finset.univ. Throughout this module, security is stated as exactPMFdistributional equality with unrestrictedProbCompsimulators, whereas Goldreich's Definitions 7.2.1 and 7.5.1 use computational indistinguishability and PPT simulators (polynomial-time efficiency is certified in M5). BecausegmwCircuitProtocolin M3 includes onesharedMulSpec mshare-refresh call per output coordinate(r, j) : Fin m × Fin k(in addition to onesharedMulSpec mcall per.and/.orgate in Step 2), composing withmultiPartyMulProtocol mandtwoPartyMulProtocolexpands each such call into $m(m-1)/2$ pairwise invocations ofot14Spec(an extra $m \cdot k \cdot m(m-1)/2$ calls toot14Specfrom Step 3, polynomial in $m, n, k, C.\text{size}$).
Main definitions #
Cslib.Crypto.Protocols.MPC.Round.embed,Cslib.Crypto.Protocols.MPC.Schedule.compose,Cslib.Crypto.Protocols.MPC.Schedule.ComposedCoins: schedule and coin-type composition for $k$-ary oracle replacement (Definitions 7.5.5–7.5.6, pp. 701–702).Cslib.Crypto.Protocols.MPC.Protocol.compose,Cslib.Crypto.Protocols.MPC.composeSim: protocol and coalition-simulator composition (Theorem 7.5.7, pp. 702–703).Cslib.Crypto.Protocols.MPC.Protocol.mapInput,Cslib.Crypto.Protocols.MPC.mapInputSim: precomposing a protocol and coalition simulator with local party input encodings.Cslib.Crypto.Protocols.MPC.randomizedFunctionality,Cslib.Crypto.Protocols.MPC.detOfRandomized,Cslib.Crypto.Protocols.MPC.Protocol.randomizedWrapper,Cslib.Crypto.Protocols.MPC.randomizedWrapperSim: randomized-to-deterministic wrapper (Eq. 7.19, p. 638; Proposition 7.3.4, pp. 639–640; Eq. 7.48, p. 707).Cslib.Crypto.Protocols.MPC.xorPreludeCircuit: Boolean prelude circuit combining party coin shares by bitwise XOR.Cslib.Crypto.Protocols.MPC.gmwOT14Protocol,Cslib.Crypto.Protocols.MPC.gmwOT14Sim,Cslib.Crypto.Protocols.MPC.gmwOT14RandomizedProtocol,Cslib.Crypto.Protocols.MPC.gmwOT14RandomizedSim: $\text{OT}_1^4$-hybrid GMW protocols and coalition simulators.
Main results #
Cslib.Crypto.Protocols.MPC.PerfectSemiHonestPrivate.compose: Theorem 7.5.7 (print pp. 702–703; cf. Theorem 7.3.3, print pp. 637–638), multi-party composition theorem for perfect semi-honest privacy.Cslib.Crypto.Protocols.MPC.PerfectSemiHonestPrivate.mapInput: preservation of perfect semi-honest privacy under local party input encodings.Cslib.Crypto.Protocols.MPC.perfectSemiHonestPrivate_randomizedWrapper: Proposition 7.3.4 (print pp. 639–640) combined with the composition theorem (Section 7.3.1 Application, print pp. 638–639, Eq. 7.19) and Section 7.5.2.4 Eq. 7.48 (print p. 707), proper-coalition privacy of the randomized-functionality wrapper.Cslib.Crypto.Protocols.MPC.eval_xorPreludeCircuit,Cslib.Crypto.Protocols.MPC.size_xorPreludeCircuit: correctness and gate count ofxorPreludeCircuit.Cslib.Crypto.Protocols.MPC.perfectSemiHonestPrivate_gmwOT14: full-coalition perfect privacy of deterministicgmwOT14Protocolinot14World.Cslib.Crypto.Protocols.MPC.perfectSemiHonestPrivateProper_gmwOT14Randomized: Theorem 7.5.12 (print p. 707; cf. Theorem 7.3.11, print p. 648), proper-coalition perfect privacy ofgmwOT14RandomizedProtocolinot14World.
References #
- O. Goldreich, Foundations of Cryptography, Volume 2: Basic Applications, Section 7.3.1 (Definitions 7.3.1–7.3.2 on p. 636, Theorem 7.3.3 on pp. 637–638, Eq. 7.19 on p. 638, Proposition 7.3.4 on pp. 639–640), Section 7.3.4 (Theorem 7.3.11, p. 648), Section 7.5.2.1 (Definitions 7.5.5–7.5.6 on pp. 701–702, Theorem 7.5.7 on pp. 702–703), and Section 7.5.2.4 (Eq. 7.48, Theorem 7.5.12, p. 707).
Part 1: $k$-ary Subprotocol Composition (Theorem 7.5.7) #
Lift a k-party round r : Round k spec to an m-party round along a party embedding
parties : Fin k ↪ Fin m (Goldreich Definition 7.5.5, pp. 701–702).
Instances For
Replace each .oracle op parties round in sc₁ with the lifted schedule
(sc₂ op).map (Round.embed parties), taking sc₂ first and matching sc₁ after the colon
(Goldreich Definitions 7.5.5–7.5.6 and Theorem 7.5.7, pp. 701–703).
Instances For
Per-party subprotocol coins needed along an outer schedule sc₁ : Schedule m spec₁:
for each .oracle op parties round, party i holds (s : Fin (spec₁.arity op)) → (parties s = i) → Coins₂ op s (proof-domain indexed so parties outside parties hold a canonical subsingleton).
Instances For
Combined coin type for party i : Fin m in Π.compose Sub: outer coins Coins₁ i paired with
the sequence of subprotocol coins Schedule.SubCoins Coins₂ sc₁ i.
Instances For
Independent product helper for single-party slot sampling #
Induced sub-coalitions, tuple pushforwards, and subprotocol coin sampling #
Induced sub-coalition in Fin k of an outer coalition I : Finset (Fin m) along an embedding
parties : Fin k ↪ Fin m (Goldreich Theorem 7.5.7 Proof Sketch, pp. 702–703). Defined via
Finset.univ.filter rather than Finset.preimage so that subCoalition and expandSimSteps
remain computable.
Instances For
Push a k-party tuple c_k : (s : Fin k) → F s forward along parties : Fin k ↪ Fin m to the
proof-domain indexed m-party family fun i s _ => c_k s.
Instances For
Push a coalition-restricted J-tuple c_J : (s : subCoalition parties I) → F s.1 forward
along parties : Fin k ↪ Fin m to (i : I) → (s : Fin k) → (parties s = i.1) → F s.
Instances For
Sample party i's proof-domain indexed subcoins (s : Fin k) → (parties s = i) → Coins_k s
from sample_k : (s : Fin k) → ProbComp (Coins_k s).
Instances For
Joint distribution of sampleSlotCoins parties sample_k across all m outer parties equals the
pushforward of OracleComp.pi sample_k along pushTuple parties.
Sample party i's sequence of subprotocol coins along an outer schedule sc₁.
Instances For
Embedded round/schedule transcripts and Steps.embed #
Pull a received record in Round.embed parties r at party i back to slot s : Fin k
given hs : parties s = i.
Instances For
Pull a received transcript in sc.map (Round.embed parties) at party i back to slot
s : Fin k given hs : parties s = i.
Instances For
Push a k-party received record recv_k : (s : Fin k) → r.Received s forward to all m
parties in Round.embed parties r.
Instances For
Push a k-party received transcript recv_k : (s : Fin k) → sc.Received s forward to all m
parties in sc.map (Round.embed parties).
Instances For
Push a coalition-restricted received record recv_J : (s : subCoalition parties I) → r.Received s.1 forward to (i : I) → (Round.embed parties r).Received i.1.
Instances For
Push a coalition-restricted received transcript
recv_J : (s : subCoalition parties I) → sc.Received s.1 forward to
(i : I) → Schedule.Received (sc.map (Round.embed parties)) i.1.
Instances For
Embed a k-party step computation steps : Steps State_k Out_k sc along parties : Fin k ↪ Fin m, threading an arbitrary m-party outer state Outer : Fin m → Type unchanged through the
first state component.
Instances For
Composing Steps, Protocol, and CoalitionSimulator #
Replace each .oracle op parties node in steps : Steps State Out sc₁ with the embedded
execution of (Sub op).steps along parties.
Instances For
Expand a simulated outer execution along steps : Steps State Out sc₁ by invoking the inner
simulator S₂ op (subCoalition parties I) at every .oracle op parties round (Goldreich Theorem
7.5.7 Proof Sketch, pp. 702–703).
Instances For
Compose an m-party protocol P over spec₁ with k-party subprotocols Sub op over
spec₂ (Goldreich Section 7.5.2.1, Theorem 7.5.7, pp. 702–703; generalizing Section 7.3.1,
Theorem 7.3.3, pp. 637–638).
Instances For
Composed coalition simulator for P.compose Sub (Goldreich Section 7.5.2.1, Theorem 7.5.7
Proof Sketch, pp. 702–703; cf. Section 7.3.1, Theorem 7.3.3 Proof Sketch, pp. 637–638): runs the
outer simulator S₁ I xI yI to obtain simulated outer views v₁ and expands each oracle call in
P.steps using the inner simulator S₂ op (subCoalition parties I).
Instances For
Theorem 7.5.7 (Goldreich Section 7.5.2.1, pp. 702–703; cf. Theorem 7.3.3, pp. 637–638):
composing a perfectly private m-party outer protocol P with perfectly private k-party
subprotocols Sub op yields a perfectly private m-party protocol P.compose Sub in W₂.
Part 2: Randomized-to-Deterministic Wrapper (Proposition 7.3.4 & Eq. 7.48) #
Randomized m-party functionality defined by sampling a uniform shared coin string
r : BitString coins and evaluating g r x (Goldreich Section 7.3.1, pp. 638–639;
Section 7.5.2.4, p. 707).
Instances For
Deterministic functionality associated to g via shared coin-tossing (Goldreich
Section 7.5.2.4, Eq. 7.48, p. 707; generalizing Section 7.3.1, Eq. 7.19 on p. 638 and
Proposition 7.3.4 on p. 639): takes party inputs (x_i, r_i) and evaluates
g (∑ i : Fin m, r_i) x, where addition on BitString coins is bitwise XOR.
Instances For
Precompose an m-party protocol P with local party input encodings
enc : (i : Fin m) → In i → In' i.
Instances For
Coalition simulator for P.mapInput enc.
Instances For
Perfect semi-honest privacy is preserved under local input encodings Protocol.mapInput.
Wrap a deterministic-input protocol P expecting (x_i, r_i) into a protocol for input x_i
in which each party i independently samples a uniform r_i : BitString coins as part of its
private random tape (Goldreich Section 7.3.1, Proposition 7.3.4, p. 639; Section 7.5.2.4,
Eq. 7.48, p. 707).
Instances For
Coalition simulator for P.randomizedWrapper coins (Goldreich Section 7.3.1, Proposition 7.3.4
Proof, pp. 639–640; Section 7.5.2.4, p. 707): samples independent uniform coin shares rI i for
each coalition party i ∈ I, runs the deterministic simulator S I (fun i => (xI i, rI i)) yI, and
combines (rI i, (v i).coins) into the simulated coin tape.
Instances For
Proposition 7.3.4 (Goldreich Section 7.3.1, pp. 639–640) combined with the composition theorem
(Section 7.3.1 Application, pp. 638–639, Eq. 7.19) and Section 7.5.2.4 Eq. 7.48 (p. 707):
if P is perfectly semi-honest private for detOfRandomized coins g, then
P.randomizedWrapper coins is perfectly semi-honest private for randomizedFunctionality coins g
against every proper static coalition I ≠ Finset.univ.
This is proved directly rather than via PerfectSemiHonestPrivate.compose, because the coin-sharing
reduction is only private against proper coalitions I ≠ Finset.univ, whereas
PerfectSemiHonestPrivate.compose requires all-I privacy of the outer protocol. Note that
restricting to I ≠ Finset.univ is narrower than Goldreich's quantifier over all I ⊆ [m] in
Definition 7.5.1 (p. 696, where I = [m] is called trivial on pp. 697, 703): under the joint
view-and-output equation Eq. 7.40 for randomized functionalities, I = Finset.univ is not
satisfied by an output-independent coin simulator (for m = 2, Definition 7.2.1 considers only
single-party views, so Proposition 7.3.4 itself is fully covered). Moreover, this theorem proves
exact PMF equality with an unrestricted ProbComp simulator rather than Goldreich's computational
indistinguishability with PPT simulators.
Part 3: XOR Prelude Circuit and $\text{OT}_1^4$-Hybrid GMW Protocol (Theorem 7.5.12) #
Single-output 4-gate De Morgan circuit computing a c + b c (a c ^^ b c) at coordinate
c : Fin coins of Fin.append a b : BitString (coins + coins), built from
Cslib.Circuits.Program.appendXor.
Instances For
Single-gate Boolean circuit outputting 0 : BitString coins via .const false.
Instances For
Coordinatewise XOR circuit of size 4 * coins on two coins-bit strings, constructed side by
side via Cslib.Circuits.Circuit.pi from xorBitAtCircuit.
Instances For
Boolean circuit summing m blocks of width coins by coordinatewise XOR.
Instances For
Zero-gate wiring circuit extracting the m * n party input bits from m blocks of width
n + coins.
Instances For
Zero-gate wiring circuit extracting the m * coins party coin bits from m blocks of width
n + coins.
Instances For
XOR-combining prelude circuit (Goldreich Section 7.5.2.4, Eq. 7.48, p. 707): takes m party
blocks (x_i, r_i) of width n + coins and outputs the m * n packed party inputs
BitString.blocksEquiv.symm x followed by the coins-bit XOR sum ∑ i : Fin m, r i.
Instances For
Correctness of xorPreludeCircuit: evaluating xorPreludeCircuit m n coins on the packed
input-coin blocks fun i => Fin.append (x i) (r i) yields Fin.append (BitString.blocksEquiv.symm x) (∑ i : Fin m, r i).
Gate count of xorPreludeCircuit m n coins.
Deterministic m-party $\text{OT}_1^4$-hybrid GMW protocol composed from
gmwCircuitProtocol m n k C (Construction 7.5.10, p. 706), multiPartyMulProtocol m
(Construction 7.5.8, p. 704), and twoPartyMulProtocol (Construction 7.3.7, p. 643).
Because gmwCircuitProtocol m n k C makes one sharedMulSpec m call per .and/.or gate in
Step 2 plus m * k sharedMulSpec m share-refresh calls in Step 3 (coordSchedule), composing
with multiPartyMulProtocol m (m * (m - 1) / 2 calls to sharedMulSpec 2) and
twoPartyMulProtocol (1 call to ot14Spec) expands each sharedMulSpec m call into
m * (m - 1) / 2 pairwise calls to ot14Spec.
Instances For
Composed coalition simulator for gmwOT14Protocol m n k C.
Instances For
Full-coalition perfect semi-honest privacy of the deterministic gmwOT14Protocol m n k C in
ot14World (combining Proposition 7.5.11, pp. 706–707; Proposition 7.5.9, pp. 704–705;
Proposition 7.3.8, p. 644; and Theorem 7.5.7, pp. 702–703).
Randomized m-party $\text{OT}_1^4$-hybrid GMW protocol (Goldreich Section 7.5.2.4,
Eq. 7.48 and Theorem 7.5.12, p. 707; cf. Section 7.3.4, Theorem 7.3.11, p. 648): runs
Protocol.randomizedWrapper coins around gmwOT14Protocol m (n + coins) k (C.comp (xorPreludeCircuit m n coins)) precomposed with Protocol.mapInput packing (x_i, r_i) into
Fin.append x_i r_i : BitString (n + coins).
Instances For
Coalition simulator for gmwOT14RandomizedProtocol m coins n k C.
Instances For
Theorem 7.5.12 (Goldreich Section 7.5.2.4, p. 707; generalizing Theorem 7.3.11, Section 7.3.4,
p. 648): for any randomized m-party Boolean circuit C : Circuit Boolean.signature (m * n + coins) (m * k), gmwOT14RandomizedProtocol m coins n k C perfectly and privately computes the randomized
functionality of C in ot14World against every proper static coalition I ≠ Finset.univ.
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, treating I = [m] as trivial on pp. 697, 703), because under the joint view-and-output
equation Eq. 7.40 for randomized functionalities, I = Finset.univ is not satisfied when coin
shares are simulated independently of the output. Furthermore, this theorem establishes exact PMF
distributional equality with an unrestricted ProbComp simulator (gmwOT14RandomizedSim), whereas
Goldreich states computational indistinguishability with PPT simulators (uniform polynomial-time
efficiency is certified in M5).