Fair-coin DDH oblivious transfer as a protocol family, and its reduction to DDH #
Cslib.Crypto.Protocols.MPC.ddhOTProtocolWith in CslibFrontier/Crypto/Protocols/MPC/DDHOT.lean
is a three-message 1-out-of-2 oblivious transfer over a group of prime order, a checked
per-branch-coin variant of the protocol of [BS23], Section 23.5.7, Figure 23.17
(p. 1057), parameterized by party coin types, samplers, and exponent projections. Following
Section 23.5.7.2 ("Further assumptions about randomness", Remark 23.5, p. 1059) and [Lin17],
Section 4.2, Definition 4.1 (p. 7), this module instantiates the parties' coins as the raw
fair-coin bit strings they actually draw (sampleExpBits, width n + |encNat (F.order d)|) so
that each party's PartyView.coins retains its unreduced bit strings (DDHOTSenderBitCoins for
the sender, List Bool for the receiver), runs the protocol over a PrimeOrderGroupFamily F as
ddhOTProbFamily, gives the machine encoding ddhOTEncoding, and reduces a corrupted receiver to
DDH. CslibFrontier/Crypto/Protocols/MPC/DDHOT/Simulators.lean gives PPT simulators across all
static coalitions and proves stand-alone semi-honest security as a step toward Theorem 23.7
(Cslib.Crypto.PrimeOrderGroupFamily.DDH.ddhOTProbFamily_semiHonestSecure, #5829, #5293).
ddhOTEncoding writes group parameters with F.encDesc and group elements as F.encode d words.
The sender's input is the pair of words of its two messages and the receiver's input is its choice
bit; the sender's output () is the empty word and the receiver's output is the word of its
message. A corrupted party's view is written as its view words (ddhOTSenderViewWords,
ddhOTReceiverViewWords): the group elements as F.encode d words and the party's raw coin bit
strings verbatim (encBits). The words determine the view (ddhOTSenderViewWords_injective,
ddhOTReceiverViewWords_injective).
Proof of the reduction. Against a corrupted receiver ({1}), ddhOTReceiverToDDHDistinguisher
turns an environment Z into a DDH distinguisher: it runs Z's input choice, draws the receiver's
raw coin bit string bBits from sampleExpBits (identical to the real receiver's coin draw, with
zero statistical loss on PartyView.coins) together with two chosen-branch bit strings rBits, sBits, and embeds the DDH triple into the unchosen branch via ddhOTReductionWithCoinsOf. In the
real game, the honest sender's five bit strings enter the receiver's view only through their
ZMod (F.order d) residues, so replacing them with exact uniform exponents costs at most
5 / 2 ^ n (advantage_bind_sampleDDHOTSenderBitCoins_le), after which the hybrid real and ideal
games equal the real and random DDH experiments of the exact-branch reduction
(real_receiver_eq_ddhRealExperiment_of, ideal_receiver_eq_ddhRandomExperiment_of). The two
chosen-branch draws in ddhOTReceiverToDDHDistinguisher cost at most 2 / 2 ^ n in each DDH
world, giving advantage_ddhOTReceiverGame_le (≤ ddhAdv + 9 / 2 ^ n).
isPPT_ddhOTReceiverToDDHDistinguisher proves that the reduction is uniform strict PPT whenever
Z is.
Main definitions #
Cslib.Crypto.Protocols.MPC.DDHOTSenderBitCoins,Cslib.Crypto.Protocols.MPC.encDDHOTSenderBitCoins, andCslib.Crypto.Protocols.MPC.DDHOTSenderBitCoins.toSenderCoins: the sender's five raw fair-coin bit strings, their encoding, and their projection toDDHOTSenderCoins q.Cslib.Crypto.Protocols.MPC.DDHOTSenderViewWords,Cslib.Crypto.Protocols.MPC.DDHOTReceiverViewWords, their encodings, andCslib.Crypto.Protocols.MPC.DDHOTViewWords: a party's view as words, preserving raw coin bit strings.Cslib.Crypto.PrimeOrderGroupFamily.sampleExpBits,Cslib.Crypto.PrimeOrderGroupFamily.sampleDDHOTSenderBitCoins: raw fair-coin bit-string samplers for one exponent and for the sender's five exponents.Cslib.Crypto.PrimeOrderGroupFamily.ddhOTProbProtocol,Cslib.Crypto.PrimeOrderGroupFamily.ddhOTProbFamily: the fair-coin DDH OT protocol with raw bit-string coins and itsProtocolFamilyoverF.Cslib.Crypto.PrimeOrderGroupFamily.ddhOTSenderViewWords,Cslib.Crypto.PrimeOrderGroupFamily.ddhOTReceiverViewWords,Cslib.Crypto.PrimeOrderGroupFamily.ddhOTEncoding: view-word maps and machine encoding ofddhOTProbFamily.Cslib.Crypto.PrimeOrderGroupFamily.ddhOTReceiverToDDHDistinguisher: the reduction to DDH.
Main results #
Cslib.Crypto.PrimeOrderGroupFamily.isPPTOn_sampleExpBits,Cslib.Crypto.PrimeOrderGroupFamily.eval_map_binaryValue_sampleExpBits:sampleExpBitsis uniform strict PPT and itsZMod (F.order d)residue law matchessampleExp.Cslib.Crypto.PrimeOrderGroupFamily.ddhOTSenderViewWords_injective,Cslib.Crypto.PrimeOrderGroupFamily.ddhOTReceiverViewWords_injective: the words determine the view, including the unreduced coin bit strings.Cslib.Crypto.PrimeOrderGroupFamily.advantage_ddhOTReceiverGame_le: against a corrupted receiver and the exact-sender-mask simulatorddhOTReceiverSimOf, every environment's advantage is at most the DDH advantage ofddhOTReceiverToDDHDistinguisher Zplus9 / 2 ^ n.Cslib.Crypto.PrimeOrderGroupFamily.isPPT_ddhOTReceiverToDDHDistinguisher: the reduction is uniform strict PPT.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Section 23.5.7 (Figure 23.17, p. 1057; Remark 23.5, p. 1059).
- Y. Lindell, How To Simulate It – A Tutorial on the Simulation Proof Technique, ECCC TR17-112, Section 4.2 (Definition 4.1, p. 7).
Raw fair-coin bit strings and views as words #
Raw fair-coin bit strings drawn by the sender in ddhOTProbProtocol: one bit string for the
Round 1 exponent a and two per branch for Round 3 encryption ([BS23], Section 23.5.7.2,
"Further assumptions about randomness", p. 1059).
Raw bit string from which the Round 1 exponent
ais derived.Raw bit string from which branch
0coinr₀is derived.Raw bit string from which branch
0coins₀is derived.Raw bit string from which branch
1coinr₁is derived.Raw bit string from which branch
1coins₁is derived.
The encoding of the sender's raw coins in the fair-coin DDH transfer: its five bit strings in turn, all but the last framed.
Project the sender's five raw bit strings into DDHOTSenderCoins q by interpreting each bit
string as a binary natural number modulo q.
The words of a corrupted sender's view in ddhOTProbProtocol: its two messages, its five raw
fair-coin bit strings, and the two branch keys of the receiver's Round 2 message.
The word of the message
m₀.The word of the message
m₁.The raw bit string from which the Round 1 exponent
ais derived.The raw bit string from which branch
0coinr₀is derived.The raw bit string from which branch
0coins₀is derived.The raw bit string from which branch
1coinr₁is derived.The raw bit string from which branch
1coins₁is derived.The word of the branch key
w₀.The word of the branch key
w₁.
The encoding of a sender's view words: each field in turn, all but the last framed.
The words of a corrupted receiver's view in ddhOTProbProtocol: its choice bit, its raw
fair-coin bit string, the sender's first message, and the two components of each branch ciphertext
of the sender's reply.
- choiceBit : Bool
The receiver's choice bit
σ. The receiver's raw fair-coin bit string.
The word of the sender's first message
u.The word of the first component of the ciphertext of branch
0.The word of the second component of the ciphertext of branch
0.The word of the first component of the ciphertext of branch
1.The word of the second component of the ciphertext of branch
1.
The encoding of a receiver's view words: each field in turn, all but the last framed.
The view words of the two parties of ddhOTProbProtocol: DDHOTSenderViewWords for the sender
(party 0) and DDHOTReceiverViewWords for the receiver (party 1).
Raw fair-coin bit-string sampling #
Sample a raw fair-coin bit string of width n + |encNat (F.order d)|, the underlying random
bit string from which sampleExp n d derives an approximately uniform residue modulo F.order d
([BS23], Section 23.5.7.2, Remark 23.5, p. 1059).
sampleExpBits is uniform strict PPT whenever n and d are computable in polynomial
time.
Interpreting a sampleExpBits n d bit string via BitString.binaryValue in ZMod (F.order d)
has the exact same residue law as sampleExp n d.
Replacing the ZMod (F.order d) residue of one sampleExpBits n d draw by an exact uniform
draw changes Game.advantage by at most 1 / 2 ^ n.
Sample the sender's five raw fair-coin bit strings in ddhOTProbProtocol via five independent
sampleExpBits n d draws.
Replacing the five projected ZMod (F.order d) residues of sampleDDHOTSenderBitCoins n d
with five exact uniform draws (sampleDDHOTSenderCoins) changes Game.advantage by at most
5 / 2 ^ n.
The fair-coin protocol family and its encoding #
Fair-coin three-message DDH 1-out-of-2 Oblivious Transfer protocol over F.Carrier d at
security parameter n, with raw fair-coin bit strings (DDHOTSenderBitCoins and List Bool)
stored unreduced in PartyView.coins ([BS23], Section 23.5.7.2, Remark 23.5, p. 1059).
ddhOTProbProtocol over the groups of F as a ProtocolFamily: at security parameter n and
public parameters d, both parties draw raw fair-coin bit strings via sampleExpBits n d, retain
those bit strings in PartyView.coins, and compute otFunctionality (F.Carrier d).
The words of a sender's view in ddhOTProbProtocol over F.Carrier d: the messages and branch
keys as F.encode d words, and the five raw coin bit strings verbatim.
The words of a receiver's view in ddhOTProbProtocol over F.Carrier d: the choice bit, the
raw coin bit string verbatim, and the received group elements as F.encode d words.
The words determine a sender's view, including its five unreduced coin bit strings.
The words determine a receiver's view, including its unreduced coin bit string.
The encoding of ddhOTProbFamily for machines. Group parameters are written with F.encDesc.
The sender's input (m₀, m₁) is the pair of words (F.encode d m₀, F.encode d m₁)
(encPair encBits encBits) and the receiver's input is its choice bit (encBool). The sender's
output () is the empty word (encUnit) and the receiver's output m_σ is the word
F.encode d m_σ. Each party's view is its view words (ddhOTSenderViewWords,
ddhOTReceiverViewWords, preserving the raw coin bit strings), encoded by
encDDHOTSenderViewWords and encDDHOTReceiverViewWords.
Corrupted receiver: the reduction to DDH #
The DDH distinguisher built from an environment Z that corrupts the receiver: given the
security parameter n, group parameters d and a DDH triple (u, v, w), run Z.choose, draw
the receiver's raw coin bit string bBits and two chosen-branch bit strings rBits, sBits with
sampleExpBits n d, and run ddhOTReductionWithCoinsOf with Z.guess, recording bBits
unreduced in the receiver's PartyView.coins and embedding (u, v, w) into the unchosen
branch.
Concrete reduction step for a corrupted receiver in ddhOTProbFamily against the
exact-sender-mask simulator ddhOTReceiverSimOf (which draws the receiver's raw bit string via
sampleExpBits n d and the five sender/mask exponents uniformly): every environment's advantage is
at most the DDH advantage of ddhOTReceiverToDDHDistinguisher Z plus 9 / 2 ^ n. For the
certified PPT simulator ddhOTReceiverSimProb, see advantage_ddhOTProbReceiverGame_le in
CslibFrontier/Crypto/Protocols/MPC/DDHOT/Simulators.lean.
Corrupted receiver: efficiency of the reduction #
ddhOTReceiverToDDHDistinguisher Z is uniform strict PPT whenever Z is.