Synchronous All-to-All Point-to-Point Messages #
This module defines the all-to-all message layer of CslibFrontier.Crypto.Protocols.MPC.Basic:
every party s : Fin m sends one message of type Msg to every party r : Fin m (including
itself), one .message s r Msg round per ordered pair in allPairs m.
- In
allToAllStepsWith m send finish, senderssendssend s (st s) rto receiverr, and partyioutputsfinish i (st i) inbox_i, whereinbox_i : Fin m → Msgis the sender-indexed vector of the messages addressed toi. Each party builds its inbox by adding the single-slot vectorsPi.single s msg(using[AddCommMonoid Msg]). receivedScheduleOfInbox i inbox_i (allPairs m)is partyi's received transcript when it receivesinbox_i sfrom each senders. SinceRound.Received (.message s r Msg) ihas the proof domaini = r, the transcript does not depend on messages addressed to other parties.
Broadcast (CslibFrontier.Crypto.Protocols.MPC.Broadcast) is the special case of a message that
does not depend on the receiver. The input-sharing step of
CslibFrontier.Crypto.Protocols.MPC.CircuitEval is another instance.
Main definitions #
Cslib.Crypto.Protocols.MPC.allPairs,Cslib.Crypto.Protocols.MPC.msgRound,Cslib.Crypto.Protocols.MPC.msgSchedule,Cslib.Crypto.Protocols.MPC.allToAllSchedule: the ordered pair list and the point-to-point message schedules along a pair list and along all pairs.Cslib.Crypto.Protocols.MPC.msgStepsWith,Cslib.Crypto.Protocols.MPC.allToAllStepsWith: step combinators along a pair list and along all pairs.Cslib.Crypto.Protocols.MPC.receivedMsgOfInbox,Cslib.Crypto.Protocols.MPC.receivedScheduleOfInbox: received records and transcripts built from an inbox.
Main results #
Cslib.Crypto.Protocols.MPC.evalWith_allToAllStepsWith: in any worldW, evaluatingallToAllStepsWithdeterministically delivers to each partyiits inboxfun s => send s (st s) i.Cslib.Crypto.Protocols.MPC.outputAt_allToAllStepsWith: on the transcript of inboxinbox, partyioutputsfinish i st_i inbox.
Point-to-point message round from p.1 to p.2 carrying Msg.
Schedule of all-to-all point-to-point messages of type Msg.
Extract party i's inbox update from message round p = (s, r): the single-slot vector
Pi.single s msg at the receiver r, and 0 at every other party.
Execute point-to-point message rounds along L: in round (s, r) party s sends
send s st_s r. Each party accumulates its received messages into the second component of its
state and applies finish at .done.
All-to-all message exchange: party s sends send s (st s) r to party r, and party i
outputs finish i (st i) inbox_i from the vector inbox_i : Fin m → Msg of the messages
addressed to it.
Received transcript for party i along msgSchedule Msg L constructed from inbox_i.
Evaluating allToAllStepsWith in any world W deterministically delivers to each party i
its inbox fun s => send s (st s) i.
On the transcript of inbox inbox, party i outputs finish i st_i inbox.