Multi-party oracle-aided protocols and semi-honest privacy #
This module defines the party-structured syntax and execution semantics of synchronous m-party
protocols over pairwise private authenticated point-to-point channels with k-ary ideal oracle
calls (MultiOracleSpec), together with Goldreich's joint view-and-output definition of perfect
semi-honest privacy against static coalitions (PerfectSemiHonestPrivate).
PerfectSemiHonestPrivate departs from Goldreich's Definitions 7.2.1 and 7.5.1 in two ways.
Privacy is exact equality of distributions, not computational indistinguishability. The coalition
simulators are arbitrary ProbComp values with no efficiency requirement, whereas Goldreich asks
for a probabilistic polynomial-time simulator. Efficient simulators for the $\text{OT}_1^4$
completeness theorem are certified separately, in CslibFrontier.Crypto.Protocols.MPC.PolyTime.
Each party's view (PartyView) is derived from the protocol execution: it records only that
party's own input x i, its own private coins r i drawn from proto.sampleCoins i, the messages
addressed to i, and the oracle answer parts for slots assigned to i. In Round.Received,
message delivery to receiver has type (i = receiver) → Msg and oracle answer delivery has
type (s : Fin (spec.arity op)) → (parties s = i) → spec.Answer op s, so parties outside the
recipient set receive functions over an empty proof domain and transport under party embeddings is
definitional function composition. Each party's output (Protocol.outputOfView) is extracted
deterministically from its own PartyView.
Main definitions #
Cslib.Crypto.Protocols.MPC.MultiOracleSpec,Cslib.Crypto.Protocols.MPC.MultiOracleSpec.toOracleSpec,Cslib.Crypto.Protocols.MPC.MultiOracleWorld,Cslib.Crypto.Protocols.MPC.MultiOracleWorld.handler,Cslib.Crypto.Protocols.MPC.noOracleSpec,Cslib.Crypto.Protocols.MPC.noOracleWorld:k-ary ideal oracle specifications and memoryless worlds.Cslib.Crypto.Protocols.MPC.Round,Cslib.Crypto.Protocols.MPC.Schedule,Cslib.Crypto.Protocols.MPC.Round.Received,Cslib.Crypto.Protocols.MPC.Schedule.Received,Cslib.Crypto.Protocols.MPC.PartyView: synchronous communication schedules and derived per-party views.Cslib.Crypto.Protocols.MPC.Steps,Cslib.Crypto.Protocols.MPC.Protocol,Cslib.Crypto.Protocols.MPC.Protocol.outputOfView,Cslib.Crypto.Protocols.MPC.Steps.mapState,Cslib.Crypto.Protocols.MPC.Steps.append,Cslib.Crypto.Protocols.MPC.Steps.run,Cslib.Crypto.Protocols.MPC.Protocol.run,Cslib.Crypto.Protocols.MPC.Protocol.evalWith,Cslib.Crypto.Protocols.MPC.Protocol.realJoint,Cslib.Crypto.Protocols.MPC.Protocol.mapInput,Cslib.Crypto.Protocols.MPC.mapInputSim: local step-by-step party strategies, local input re-encoding, and their real execution semantics.Cslib.Crypto.Protocols.MPC.Functionality,Cslib.Crypto.Protocols.MPC.Functionality.ofDeterministic,Cslib.Crypto.Protocols.MPC.CoalitionSimulator,Cslib.Crypto.Protocols.MPC.SetupSimulator,Cslib.Crypto.Protocols.MPC.idealJoint,Cslib.Crypto.Protocols.MPC.PerfectSemiHonestPrivate,Cslib.Crypto.Protocols.MPC.PerfectSemiHonestPrivateProper,Cslib.Crypto.Protocols.MPC.PerfectSemiHonestPrivateLe: ideal joint view-and-output execution and perfect semi-honest privacy (full, proper-coalition, andt-threshold).Cslib.Crypto.Protocols.MPC.PerfectSemiHonestPrivateProperWithSetup: proper-coalition privacy for protocols whose party inputs are dealt by a trusted setup, with simulators that do not see the setup's output.
Main results #
Cslib.Crypto.Protocols.MPC.Schedule.Received.split_append,Cslib.Crypto.Protocols.MPC.Schedule.Received.append_split: splitting and concatenating received transcripts along concatenated schedules.Cslib.Crypto.Protocols.MPC.Protocol.evalWith_eq,Cslib.Crypto.Protocols.MPC.Steps.evalWith_done,Cslib.Crypto.Protocols.MPC.Steps.evalWith_message,Cslib.Crypto.Protocols.MPC.Steps.evalWith_oracle,Cslib.Crypto.Protocols.MPC.eval_idealJoint: structural evaluation rules for protocols, steps and the ideal sampler.Cslib.Crypto.Protocols.MPC.PerfectSemiHonestPrivate.proper,Cslib.Crypto.Protocols.MPC.PerfectSemiHonestPrivate.le,Cslib.Crypto.Protocols.MPC.PerfectSemiHonestPrivate.mapInput,Cslib.Crypto.Protocols.MPC.PerfectSemiHonestPrivateLe.proper_of_succ_eq,Cslib.Crypto.Protocols.MPC.perfectSemiHonestPrivateProperWithSetup_pure_iff: implications between full-coalition, threshold (I.card ≤ t), proper-coalition and trivial-setup privacy, and preservation under local party input encodings.Cslib.Crypto.Protocols.MPC.perfectSemiHonestPrivate_of_deterministic,Cslib.Crypto.Protocols.MPC.perfectSemiHonestPrivateLe_of_deterministic: for deterministic functionalities, matching the marginal coalition view distribution (Eq. 7.39, cf. Eqs. 7.7–7.8) together with output correctness on the support yields full joint view-and-output privacy (Eq. 7.40, cf. Eqs. 7.9–7.10).
References #
- O. Goldreich, Foundations of Cryptography, Volume 2: Basic Applications, Section 7.2.2.1 (Definition 7.2.1, pp. 620–622), Section 7.5.1.2 (Definition 7.5.1, pp. 696–697), and Section 7.5.2.1 (Definitions 7.5.5–7.5.6, pp. 701–702).
Multi-party oracle specifications and worlds #
Specification of k-ary oracle operations (Goldreich Def. 7.5.5, pp. 701–702).
Underlying OracleSpec of a MultiOracleSpec.
A memoryless implementation (world) of spec.
Combined PMF handler for ProbOracleComp spec.toOracleSpec in a memoryless world W.
The empty multi-party oracle specification (plain point-to-point channel model).
The unique world for noOracleSpec.
Synchronous rounds, schedules, and received transcripts #
A single synchronous step in an m-party protocol over pairwise private point-to-point
channels and k-ary oracle spec.
- message {m : ℕ} {spec : MultiOracleSpec} (sender receiver : Fin m) (Msg : Type) : Round m spec
Point-to-point private message of type
Msgfromsendertoreceiver. - oracle {m : ℕ} {spec : MultiOracleSpec} (op : spec.Op) (parties : Fin (spec.arity op) ↪ Fin m) : Round m spec
Joint
k-ary oracle invocation ofopbykdistinct partiesparties.
A fixed-schedule m-party protocol shape over spec.
What party i receives in round r, using proof-domain functions so transport under
party embeddings is definitional function composition without if-casts.
Deliver a point-to-point message msg to receiver; parties i ≠ receiver have an empty
proof domain i = receiver.
Deliver oracle answer parts ans to the participating parties; for slots s with
parties s ≠ i, the proof domain parties s = i is empty.
For a non-recipient i ≠ receiver, any two received-message records are equal.
Two received-message records at i are equal if they agree when i = receiver.
Two received-oracle records at i are equal if they agree on every slot assigned to i.
The sequence of values received by party i across all rounds of sc.
Concatenate received transcripts along sc₁ and sc₂ into a transcript along sc₁ ++ sc₂.
Party i's complete view of an execution along schedule sc (Goldreich Def. 7.2.1, p. 620).
- input : In i
Party
i's input. - coins : Coins i
Party
i's private random coins. - received : sc.Received i
Messages and oracle answers received by party
ialongsc.
Party-structured protocols and execution semantics #
Local step-by-step party computations along schedule sc, with State and Out as indices
after the colon so Lean's kernel accepts the varying state type in next.
- done {m : ℕ} {spec : MultiOracleSpec} {State Out : Fin m → Type} (output : (i : Fin m) → State i → Out i) : Steps State Out []
End of interaction: each party
ideterministically computes its output from its local state. - message {m : ℕ} {spec : MultiOracleSpec} {State Out : Fin m → Type} {sender receiver : Fin m} {Msg : Type} {sc : Schedule m spec} (send : State sender → Msg) (next : Steps (fun (i : Fin m) => State i × (Round.message sender receiver Msg).Received i) Out sc) : Steps State Out (Round.message sender receiver Msg :: sc)
Point-to-point message round:
sendercomputesMsgfrom its local state,receiverreceives it, and execution continues with each party's state augmented by itsRound.Receivedrecord. - oracle {m : ℕ} {spec : MultiOracleSpec} {State Out : Fin m → Type} {op : spec.Op} {parties : Fin (spec.arity op) ↪ Fin m} {sc : Schedule m spec} (query : (s : Fin (spec.arity op)) → State (parties s) → spec.Query op s) (next : Steps (fun (i : Fin m) => State i × (Round.oracle op parties).Received i) Out sc) : Steps State Out (Round.oracle op parties :: sc)
Joint
k-ary oracle round: each participating partyparties scomputes its query part from its own local state, the oracle returns answer parts, and execution continues with each party's state augmented by itsRound.Receivedrecord.
An m-party protocol along schedule sc.
Independent private coin sampler for each party
i.Interactive step-by-step party computations starting from
(input, coins).
Extract party i's output from its own current local state st_i and its own remaining
received transcript recv_i along sc.
Deterministic extraction of party i's output from its complete PartyView.
Execute steps in ProbOracleComp spec.toOracleSpec from current local states st,
returning each party's received transcript along sc.
Pinned execution of proto on input tuple x in ProbOracleComp spec.toOracleSpec:
samples each party's coins independently, runs proto.steps, and sets outputs to
fun i => proto.outputOfView i (views i) by definition.
Evaluate steps.run st against W : MultiOracleWorld spec via OracleComp.evalWith.
Evaluate proto.run x against W : MultiOracleWorld spec via OracleComp.evalWith.
Precompose a step-by-step protocol computation with a local state transformation f.
Sequentially compose steps₁ : Steps State Mid sc₁ (whose .done node computes each
party's intermediate state Mid i) with steps₂ : Steps Mid Out sc₂ along sc₁ ++ sc₂.
Unfold proto.evalWith W x into independent coin sampling followed by
proto.steps.evalWith W.
Every supported outcome of proto.evalWith W x has outputs equal to proto.outputOfView of its
views.
Real joint distribution of the coalition I's views and all m parties' outputs when running
proto in world W on inputs x (Goldreich Def. 7.5.1, Eq. 7.40, p. 696).
Ideal functionalities, coalition simulators, and semi-honest privacy #
Lift a deterministic m-party function to a Functionality.
A simulator for a static coalition I : Finset (Fin m) receives the coalition's inputs
(i : I) → In i and the coalition's outputs (i : I) → Out i, and samples simulated views
(i : I) → PartyView In Coins sc i. It is an arbitrary ProbComp: unlike Goldreich's
simulators, it need not run in probabilistic polynomial time.
A simulator for a static coalition I of a protocol run after a trusted setup: it receives the
coalition's functionality inputs (i : I) → X i and outputs (i : I) → Out i, and samples
simulated views (i : I) → PartyView In Coins sc i of the protocol, whose party inputs In i are
dealt by the setup. It does not receive the setup's output, so it must simulate that part of the
views too. CoalitionSimulator sc In Coins Out I is the case X = In without a setup.
Ideal joint view-and-output sampler (Goldreich Def. 7.2.1 Eqs. 7.9–7.10, p. 620; Def. 7.5.1
Eq. 7.40, p. 696): samples the full functionality output y ← f x, feeds the coalition's inputs
and outputs to the simulator S, and returns (v, y). The simulated views may belong to a
protocol whose party inputs come from a trusted setup (SetupSimulator); without a setup S is a
CoalitionSimulator.
The ideal joint distribution samples the functionality output and then the simulated views.
Perfect semi-honest privacy for all static coalitions I : Finset (Fin m)
(Goldreich Def. 7.5.1, Eq. 7.40, p. 696; cf. Def. 7.2.1, Eqs. 7.9–7.10, p. 620), with exact
equality in place of computational indistinguishability. The simulators S are unrestricted:
Goldreich requires a probabilistic polynomial-time simulator, and this definition does not.
Perfect semi-honest privacy against all proper static coalitions I ≠ Finset.univ, with the
same exact equality and unrestricted simulators as PerfectSemiHonestPrivate.
Threshold (t-private) perfect semi-honest privacy against all static coalitions I of size
at most t (I.card ≤ t, following [BOGW88] and [AL17],
Section 2.1, Definition 2.1; cf. [Gol04], Definition 7.5.1), with the same exact equality
and unrestricted simulators as PerfectSemiHonestPrivate.
Full-coalition perfect semi-honest privacy implies proper-coalition privacy.
Full-coalition perfect semi-honest privacy implies threshold privacy for every t.
When t + 1 = m, threshold privacy PerfectSemiHonestPrivateLe t implies proper-coalition
privacy PerfectSemiHonestPrivateProper (I ≠ Finset.univ).
Bridge lemma (Goldreich Def. 7.5.1, Eqs. 7.39–7.40, p. 696; cf. Def. 7.2.1, Eqs. 7.7–7.10,
p. 620, and equivalence remark on p. 621): for a deterministic functionality f, matching the
marginal coalition view distribution (Eq. 7.39, cf. Eqs. 7.7–7.8) together with perfect output
correctness on the support yields full joint view-and-output privacy (Eq. 7.40, cf. Eqs. 7.9–7.10).
Deterministic bridge lemma for threshold semi-honest privacy (cf.
perfectSemiHonestPrivate_of_deterministic): for a deterministic functionality f, matching the
marginal coalition view distribution whenever I.card ≤ t together with output correctness on the
support yields PerfectSemiHonestPrivateLe t.
Privacy with a trusted setup #
Averaging the real joint distribution over the inputs dealt by a setup restricts the averaged execution to the coalition.
Perfect semi-honest privacy against all proper static coalitions I ≠ Finset.univ for a
protocol whose party inputs are dealt by a trusted setup: on functionality inputs x, the setup
samples the protocol inputs setup x, and the real joint distribution averaged over the setup
equals the ideal one. The simulators see only the coalition's functionality inputs and outputs
(SetupSimulator), so they must also simulate the coalition's share of the setup. With a setup
dealing correlated randomness this is perfect privacy in the trusted-dealer (correlated-randomness)
model; perfectSemiHonestPrivateProperWithSetup_pure_iff recovers PerfectSemiHonestPrivateProper
when the setup passes the inputs through.
With the trivial setup PMF.pure, privacy with a setup is proper-coalition privacy.
Local party input encodings #
Precompose an m-party protocol P with local party input encodings
enc : (i : Fin m) → In i → In' i.
Coalition simulator for P.mapInput enc.
Perfect semi-honest privacy is preserved under local input encodings Protocol.mapInput.