Oblivious transfer of masked values from an oblivious transfer of pads #
maskedOT mask unmask samplePads is a two-party protocol for the single 1-out-of-2 transfer
otFunctionality M of values in M, in the hybrid model whose oracle is the single transfer
otSpec G of values in a pad type G. The sender (party 0) samples a pair of pads
r ← samplePads as its coins. The parties call the pad transfer once: the sender submits the two
pads and the receiver (party 1) its choice bit, so the receiver obtains the pad of its choice.
The sender then sends the pair (mask r.1 m.1, mask r.2 m.2) of its two values masked by the two
pads, and the receiver outputs unmask of its pad and the component of its choice.
This is the sender-masking step that turns a transfer of pads into a transfer of values of
another type, for instance a transfer of group elements into a transfer of words with
mask r m = m ⊕ H r for a key-derivation function H. It is original library infrastructure in
the style of CslibFrontier/Crypto/Protocols/MPC/BatchOT/Sequential.lean; no cited theorem is
claimed.
What is proved #
All statements are concrete and per instance (fixed input pair and distinguisher), in the hybrid
model with the ideal pad transfer otWorld G. The only hypothesis is that, under every pad r,
unmask r recovers the receiver's output otOutputs x 1 from its mask; it is stated for the
value of the instance, so a mask that inverts only on words of a bounded length, such as the xor
with a key of fixed length, satisfies it on inputs of that length. samplePads is an arbitrary
joint distribution of the two pads.
The execution outputs
otOutputs x(evalWith_maskedOT).A corrupted sender sees only its input and its pads, so every distinguisher has advantage zero with the simulator
maskedOTSenderSim(semiHonestAdvantage_maskedOT_sender).A corrupted receiver sees its pad and the two masked values. With the simulator
maskedOTReceiverSim, which masks the receiver's output with its pad and fills the other component with a sample of a given distributionpad, the advantage of a distinguisherDequals the advantage of the explicit testmaskedOTPadTest mask x Din telling, next to the receiver's pad, the masked unchosen value from a sample ofpad(semiHonestAdvantage_maskedOT_receiver_eq). Nothing is assumed about this term.Substituting a protocol
Subfor the pad transfer (Protocol.compose) gives a protocol forotFunctionality Min the model ofSub. When, for a coalition, every test has advantage at mostε₁againstmaskedOTwith the ideal pad transfer and at mostε₂againstSub, every test has advantage at mostε₁ + ε₂against the composed protocol (semiHonestAdvantage_maskedOT_compose_le_add).
What is not proved #
- No bound on the pad-hiding term is derived from a property of
mask: neither the statistical case (mask r m = m ⊕ H rfor a universal hashHvia a leftover hash lemma) nor a computational key-derivation assumption is instantiated here. - The hypotheses of
semiHonestAdvantage_maskedOT_compose_le_addrange over all tests, so that theorem is a statement about statistically secure components. For a computationally secure pad transfer, such as the DDH transferddhOTProbProtocolagainst a corrupted receiver, the bound to use issemiHonestAdvantage_compose_le_replacementBoundapplied tomaskedOT, with its explicit distinguishers; that bound is not specialized here. - Simulators are provided for the coalitions
{0}and{1}only. The composition theorems take a family of simulators over all coalitions, of which these are the members at{0}and{1}. - No efficiency statement and no asymptotic statement (
ProtocolFamily.SemiHonestSecure) is made.
Main definitions #
Cslib.Crypto.Protocols.MPC.maskedOT: the protocol.Cslib.Crypto.Protocols.MPC.maskedOTSenderSim,Cslib.Crypto.Protocols.MPC.maskedOTReceiverSim: the simulators of a corrupted sender and of a corrupted receiver.Cslib.Crypto.Protocols.MPC.maskedOTPadTest: the reduction from a distinguisher of a corrupted receiver's view to a test of the masked unchosen value.
Main results #
Cslib.Crypto.Protocols.MPC.evalWith_maskedOT: the execution law, with the outputs ofotOutputs.Cslib.Crypto.Protocols.MPC.semiHonestAdvantage_maskedOT_sender: advantage zero against a corrupted sender.Cslib.Crypto.Protocols.MPC.bind_eval_idealJoint_maskedOT_receiver,Cslib.Crypto.Protocols.MPC.bind_realJoint_maskedOT_receiver: the ideal and the real game of a corrupted receiver against a test are the two pad-test experiments.Cslib.Crypto.Protocols.MPC.semiHonestAdvantage_maskedOT_receiver_eq: the advantage against a corrupted receiver is the pad-hiding advantage ofmaskedOTPadTest.Cslib.Crypto.Protocols.MPC.semiHonestAdvantage_maskedOT_compose_le_add: the bound after substituting a protocol for the pad transfer, for statistically secure components.Cslib.Crypto.Protocols.MPC.semiHonestAdvantage_compose_seqBatchOT_maskedOT_le_sum_roundGame: an outer protocol over sequential masked transfers over a substituted pad transfer: per transfer, the advantage of one environment againstmaskedOTwith the ideal pad transfer and against the pad transfer. Neither term is bounded here.
The protocol #
The query of party s to the pad transfer: the sender submits its two pads and the receiver
its choice bit.
The local state of party i at the end of maskedOTSchedule G M: its input and coins, its
answer from the pad transfer and the message it received.
The outputs of maskedOT: () for the sender; the receiver applies unmask of its pad to
the component of the sender's message selected by its choice bit, true selecting the second.
Oblivious transfer of masked values, in the hybrid model whose oracle is the single
transfer otSpec G of a pad. The sender's coins are a pair of pads r ← samplePads. The parties
call the pad transfer on the two pads and the receiver's choice bit, the sender sends
maskedOTMsg mask m r, and the receiver outputs unmask of its pad and the component of its
choice (maskedOTOutput).
Views and the execution law #
The sender's view in a run with input m and pads r: it receives () from the pad transfer
and no message.
The receiver's view with choice bit σ when it obtains the pad r from the pad transfer and
receives the message c.
The views of both parties in the run of maskedOT on the inputs x with pads r: the
receiver obtains the pad selected by its choice bit and the message maskedOTMsg mask (x 0) r.
Execution law of maskedOT. When unmask r recovers the receiver's output
otOutputs x 1 from its mask under every pad r, the execution with the ideal pad transfer draws
the sender's pads r ← samplePads and returns the views maskedOTViews mask x r and the outputs
otOutputs x: the receiver outputs the value of its choice.
A corrupted sender #
Simulator for a corrupted sender ({0}): samples the pads and returns the sender's input and
pads, with no information from the pad transfer.
Perfect privacy against a corrupted sender: the ideal joint distribution with
maskedOTSenderSim equals the real joint distribution with the ideal pad transfer.
A corrupted sender has advantage zero against every distinguisher.
A corrupted receiver #
The message with the value c in the component selected by the choice bit σ and u in the
other component; true selects the second component.
Simulator for a corrupted receiver ({1}) with choice bit σ and output y: samples the
pads and a value u ← pad, and returns the view in which the receiver obtains the pad r of its
choice and the message with mask r y in the chosen component and u in the other.
The reduction from a corrupted receiver's distinguisher to a test of the masked unchosen
value. Given the receiver's pad r and a candidate u for the masked unchosen value, the test
assembles the receiver's view on the inputs x, with mask r of the receiver's output in the
chosen component of the message and u in the other, and runs D on it and the outputs.
The ideal game of a corrupted receiver is the pad test on a sample of pad. The ideal
joint distribution of otFunctionality M for the coalition {1} with the simulator
maskedOTReceiverSim mask samplePads pad, followed by a test D, draws the pads
r ← samplePads and u ← pad and runs maskedOTPadTest mask x D on the receiver's pad and u.
No hypothesis is needed.
The real game of a corrupted receiver is the pad test on the masked unchosen value. When
unmask r recovers the receiver's output from its mask under every pad r, the real joint
distribution of maskedOT with the ideal pad transfer for the coalition {1}, followed by a test
D, draws the pads r ← samplePads and runs maskedOTPadTest mask x D on the receiver's pad and
the sender's unchosen value masked by the other pad.
The advantage against a corrupted receiver is the pad-hiding advantage. When unmask r
recovers the receiver's output from its mask under every pad r, the semi-honest advantage of D
against maskedOT with the ideal pad transfer, for the coalition {1} with the simulator
maskedOTReceiverSim mask samplePads pad, equals the advantage of the test
maskedOTPadTest mask x D between two experiments that both draw the pads r ← samplePads and
give the test the receiver's pad: in the first the candidate is a sample of pad, and in the
second it is the sender's unchosen value masked by the other pad. Nothing is assumed about mask,
samplePads or pad beyond that recovery, and the right-hand side is not bounded here.
Substituting a protocol for the pad transfer #
The masked transfer over a substituted pad transfer, with uniform bounds. Let Sub be a
protocol for the pad transfer otFunctionality G in a world W₂, with simulators S₂, and let
S₁ be simulators of maskedOT. If, for the coalition I, every test has semi-honest advantage
at most ε₁ against maskedOT with the ideal pad transfer on the inputs x, and at most ε₂
against Sub on every pair of inputs, then every test has advantage at most ε₁ + ε₂ against
(maskedOT mask unmask samplePads).compose fun _ => Sub, for otFunctionality M with the composed
simulator.
Both hypotheses range over all tests, so they hold with small bounds only for statistically
secure components: for I = {0} the first holds with ε₁ = 0
(semiHonestAdvantage_maskedOT_sender), and for I = {1} it is a bound on the pad-hiding
advantage (semiHonestAdvantage_maskedOT_receiver_eq). For a computationally secure Sub the
bound to use is semiHonestAdvantage_compose_le_replacementBound, with its explicit
distinguishers.
An outer protocol over sequential masked transfers over a substituted pad transfer, with one
environment per term. Let P be any protocol that calls the batched transfer batchOTSpec k M,
such as Yao's protocol, with every call run by seqBatchOT k M over maskedOT, and the pad
transfer of maskedOT run by a protocol Sub in a world W₂. The semi-honest advantage of D
against the composed protocol, with the composed simulator, is at most the advantage of
composeDistinguisher against P with the ideal batched transfer, plus, for every call i of P
and every transfer j < k, two advantages of the environment composeSeqBatchOTRoundEnv of that
transfer followed by one further stage:
- between the ideal and the real game of
maskedOTwith the ideal pad transfer, againstcomposeDistinguisher(for a corrupted receiver this is where the pads have to hide the value that was not chosen); - between the ideal game of the pad transfer, with the simulator
S₂, and its real game withSub(composeRoundEnvofmaskedOT).
Every term is the absolute difference of two acceptance probabilities of one environment, which
samples the coins of P and the pads and runs the earlier calls and transfers itself. Nothing is
assumed about P, Sub, mask, the simulators or D; no term is bounded here and no efficiency
of the environments is claimed.