Ideal UC 1-out-of-2 Oblivious Transfer #
This module defines the two-party ideal 1-out-of-2 oblivious transfer functionality fot in this
library's call-bounded, static-corruption, pull-only UC execution model
(CslibFrontier/Crypto/Protocols/UC/Execution.lean, based on the UC execution and emulation
framework of [Can20a], Section 4). The functionality adapts $\mathcal{F}_{\mathrm{ot}}$ of
[BS23] (v0.6, §23.5.7, printed p. 1056, defined there as the two-party special case of
$\mathcal{F}_{\mathrm{sfe}}$ in §23.5.3, printed pp. 1043–1044) to UC.IdealFunctionality.
Model and scope #
- Parties and inputs: Sender
0 : Fin 2submits a pairmsgs : OTMessages M(m₀,m₁) viaOTInput.send msgs, and receiver1 : Fin 2submits a choice bitb : BoolviaOTInput.choose band polls for output viaOTInput.query. Both inputs are write-once immutable. - Delayed output and explicit abort: Receiver
1seesnoneonOTInput.queryuntil the adversary either releases the output viaOTBackdoor.deliver(after both inputs are recorded and no abort has occurred), yieldingsome (.delivered (msgs.select b)), or aborts viaOTBackdoor.abort(before delivery), yieldingsome .aborted. This is a deliberate model choice relative to [BS23] (v0.6, §23.5.3, pp. 1043–1044, and §23.5.7, p. 1056), where abort is silent via withheld output delivery (none, with no.abortbackdoor command or.abortedtoken); explicit abort tokens follow the synchronous SFE-with-abort convention needed for #1212. - Minimal status leakage: Polling
OTBackdoor.queryreturnsOTBackdoorReply.status stwherest : OTStatusexposes only four Boolean readiness/completion flags (senderReady,receiverReady,delivered,aborted) and never leaksm₀,m₁, orb. - Call-bounded pull model: As throughout
CslibFrontier/Crypto/Protocols/UC/Execution.lean, activations are pull-based andPolyBounded/IsBoundedcount oracle calls and private coins only, not PPT interactive Turing machine running time.
Main definitions #
Cslib.Crypto.Protocols.UC.OTMessages,Cslib.Crypto.Protocols.UC.OTInput,Cslib.Crypto.Protocols.UC.OTOutput,Cslib.Crypto.Protocols.UC.OTStatus,Cslib.Crypto.Protocols.UC.OTBackdoor,Cslib.Crypto.Protocols.UC.OTBackdoorReply,Cslib.Crypto.Protocols.UC.OTState: named request, reply, status, backdoor, and state records for 1-out-of-2 oblivious transfer.Cslib.Crypto.Protocols.UC.fot: the two-party ideal 1-out-of-2 oblivious transfer functionality $\mathcal{F}_{\mathrm{OT}}$.Cslib.Crypto.Protocols.UC.fotSelectedView,Cslib.Crypto.Protocols.UC.fotSenderView: state-abstraction machines capturing sender privacy (C = {1}) and receiver privacy (C = {0}).Cslib.Crypto.Protocols.UC.PlainSenderOT,Cslib.Crypto.Protocols.UC.corruptOTReceiverEnv: one-message sender-to-receiver plain-model OT schemes and their corrupted-receiver extraction environment.
Main results #
Cslib.Crypto.Protocols.UC.fot_isBounded,Cslib.Crypto.Protocols.UC.fot_polyBounded,Cslib.Crypto.Protocols.UC.fot_multiSession_polyBounded,Cslib.Crypto.Protocols.UC.PlainSenderOT.toProtocol_polyBounded: call-budget bounds forfot, its multi-session extension(fot M).multiSession SSID, and compiledPlainSenderOTprotocols.Cslib.Crypto.Protocols.UC.OTState.monotone_of_mem_support_runFrom: write-once input lock and delivery/abort monotonicity across arbitrary multi-step interactions.Cslib.Crypto.Protocols.UC.eval_exec_honestOTEnv,Cslib.Crypto.Protocols.UC.eval_exec_abortOTEnv: honest delivery ofmsgs.select band abort semantics.Cslib.Crypto.Protocols.UC.runFrom_fot_corruptReceiver,Cslib.Crypto.Protocols.UC.eval_runFrom_fot_corruptReceiver_eq_of_select_eq: sender privacy forC = {1}and fixedb(unselected-message independence across all party and backdoor ports).Cslib.Crypto.Protocols.UC.runFrom_fot_corruptSender,Cslib.Crypto.Protocols.UC.eval_runFrom_fot_corruptSender_flip: receiver privacy forC = {0}(choice-bit invariance across all party-0and backdoor queries).Cslib.Crypto.Protocols.UC.not_realizesWithin_fot_of_plainSenderOT,Cslib.Crypto.Protocols.UC.not_realizes_fot_of_plainSenderOT: no one-message sender-to-receiver plain-model OT scheme with nontrivial completeness UC-realizesfot Bool.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, v0.6, §23.5.7
(printed p. 1056) and §23.5.3 (printed pp. 1043–1044): ideal 1-out-of-2 oblivious transfer
$\mathcal{F}_{\mathrm{ot}}$ as the two-party special case of $\mathcal{F}_{\mathrm{sfe}}$ (with
silent abort via withheld delivery
none, whereasfotadds explicitabort/.aborted). - R. Canetti, Universally Composable Security, Section 4: the UC execution and
emulation framework (not the definition of
fotitself).
Request, reply, status, backdoor, and state types #
The sender's pair of messages (m₀, m₁) submitted to 1-out-of-2 oblivious transfer.
- m₀ : M
Message delivered when receiver chooses
false. - m₁ : M
Message delivered when receiver chooses
true.
Instances For
Non-leaking status flags exposed on the backdoor of fot: readiness of each party, delivery
status, and abort status, without revealing m₀, m₁, or b.
- senderReady : Bool
Whether sender
0has submitted its message pair. - receiverReady : Bool
Whether receiver
1has submitted its choice bit. - delivered : Bool
Whether output has been released to receiver
1. - aborted : Bool
Whether the transfer has been aborted.
Instances For
Backdoor queries of fot: query reads OTStatus, deliver releases the selected message
to receiver 1 once both inputs are present and no abort occurred, and abort aborts before
delivery.
- query : OTBackdoor
- deliver : OTBackdoor
- abort : OTBackdoor
Instances For
Backdoor replies of fot: either status flags or an acknowledgement.
- status (st : OTStatus) : OTBackdoorReply
- ack : OTBackdoorReply
Instances For
Internal state of fot.
- senderMsgs : Option (OTMessages M)
Sender
0's submitted message pair, write-once. Receiver
1's submitted choice bit, write-once.- delivered : Bool
Whether the adversary has released the chosen message to receiver
1. - aborted : Bool
Whether the adversary has aborted the transfer.
Instances For
Receiver 1's observable output in state s on OTInput.query.
Monotonicity relation between states s and s' across activations of fot: inputs are
write-once immutable, and delivered and aborted are sticky.
Once set, sender messages cannot change.
Once set, receiver choice bit cannot change.
Once delivered, the transfer stays delivered.
Once aborted, the transfer stays aborted.
The ideal two-party 1-out-of-2 oblivious transfer functionality $\mathcal{F}_{\mathrm{OT}}$
adapting [BS23] (v0.6, §23.5.7, printed p. 1056, as the two-party special case of
$\mathcal{F}_{\mathrm{sfe}}$ in §23.5.3, printed pp. 1043–1044) for sender 0 : Fin 2 and
receiver 1 : Fin 2, generic over message type M:
- Sender
0submitssend msgsonce (subsequent sends and queries returnnonewithout changingsenderMsgs). - Receiver
1submitschoose bonce (subsequent choices are ignored) and pollsqueryto readnonebefore release/abort,some (.delivered (msgs.select b))afterdeliver, orsome .abortedafterabort. - Backdoor
queryreturnsOTStatus(withoutm₀,m₁, orb);deliverreleases the output if both parties have submitted and no abort occurred;abortsetsaborted := trueif not yet delivered.
Unlike [BS23] (§23.5.3, §23.5.7), which models abort silently via withheld output
delivery (none), fot provides an explicit OTBackdoor.abort command yielding some .aborted
(following the synchronous SFE-with-abort convention needed for #1212).
Call-budget bounds and multi-session compatibility #
fot has polynomial call budget 0.
The lazy multi-session extension (fot M).multiSession SSID has polynomial call budget 0.
State invariants and write-once immutability #
Write-once input lock and delivery/abort monotonicity: across any program run against
corruptRouter C ((fot M).toProtocol κ C), every reachable final state satisfies OTState.Monotone
relative to the starting state s.
Honest delivery and abort correctness #
Honest-execution environment (C = ∅) for fot M: sender 0 submits msgs, receiver 1
submits b, the backdoor delivers, and receiver 1 polls for some (.delivered (msgs.select b)).
Abort-test environment (C = ∅) for fot M: sender 0 submits msgs, receiver 1 submits
b, the backdoor aborts, and receiver 1 polls for some .aborted.
Correctness / honest delivery of fot: with no corruptions and the dummy adversary,
honestOTEnv msgs b observes some (.delivered (msgs.select b)) with probability 1.
Abort correctness of fot: when the backdoor issues .abort before delivery, receiver 1
observes some .aborted with probability 1.
Sender privacy (C = {1}, unselected-message independence) #
State of the unselected-message-independent machine fotSelectedView.
- delivered : Bool
Whether output has been delivered to receiver
1. - aborted : Bool
Whether the transfer has been aborted.
Instances For
Machine capturing the entire port and backdoor behavior of
corruptRouter {1} ((fot M).toProtocol κ {1}) once both senderMsgs and receiverChoice = some b
are fixed, depending only on the selected message mSelected.
Sender privacy (factoring through fotSelectedView): when receiver 1 is corrupted
(C = {1}) and choice bit b is fixed (receiverChoice = some b), running any program over ALL
party and backdoor ports against corruptRouter {1} ((fot M).toProtocol κ {1}) from
senderMsgs = some msgs factors through fotSelectedView (msgs.select b), which has no access to
msgs.select (!b).
Sender privacy (unselected-message independence): for C = {1} and fixed b, any two
sender message pairs msgs, msgs' agreeing on the selected branch
(msgs.select b = msgs'.select b) produce identical output distributions across every port/backdoor
program program.
Receiver privacy (C = {0}, choice-bit hiding) #
State of the choice-bit-independent machine fotSenderView seen on the network port when
sender 0 is corrupted (C = {0}) and receiver 1 has submitted its choice bit.
- senderMsgs : Option (OTMessages M)
Sender
0's submitted message pair, if any. - delivered : Bool
Whether output has been delivered to receiver
1. - aborted : Bool
Whether the transfer has been aborted.
Instances For
Choice-bit-independent machine capturing the party-0 and backdoor behavior of
corruptRouter {0} ((fot M).toProtocol κ {0}) once receiverChoice = some b is set.
Receiver privacy (factoring through fotSenderView): when sender 0 is corrupted
(C = {0}) and receiver 1 has submitted b, every network-port program liftNet program
(covering party-0 queries and backdoor queries) factors through fotSenderView M, which is
independent of b.
Receiver privacy (choice-bit hiding): for C = {0}, flipping receiver 1's choice bit b
to !b leaves the entire party-0 and backdoor behavior (liftNet program) identically
distributed.
Impossibility of one-message sender-to-receiver plain-model OT #
Network queries for a one-message (sender-to-receiver) plain-model OT protocol: the adversary
can read the sender's message (readMsg) and deliver a message to the receiver (deliverMsg).
- readMsg {Msg : Type} : PlainOTNetQ Msg
- deliverMsg {Msg : Type} (msg : Msg) : PlainOTNetQ Msg
Instances For
Network replies for a one-message plain-model OT protocol.
- msg {Msg : Type} (c : Option Msg) : PlainOTNetR Msg
- ack {Msg : Type} : PlainOTNetR Msg
Instances For
A one-message (sender-to-receiver) plain-model 1-out-of-2 OT scheme over Bool: sender 0 runs
send κ m₀ m₁ to produce a single message c : Msg, and receiver 1 runs recv κ c b locally to
recover m_b.
Sender algorithm producing a single message from
(m₀, m₁).Receiver recovery algorithm computing
m_bfrom the sender's message and choice bitb.
State of a compiled PlainSenderOT protocol.
- senderMsg : Option Msg
Message posted by sender
0, if any. Choice bit submitted by receiver
1, if any.Output recovered by receiver
1, if delivered.
Instances For
Honest completeness probability of scheme for choice bit b over uniform (m₀, m₁) at
security parameter κ.
Probability that an honest receiver recovers m_b on uniform (m₀, m₁).
Polynomial call budgets pS and pR for scheme.send and scheme.recv.
- send (κ : ℕ) (m₀ m₁ : Bool) : OracleComp.IsQueryBounded (scheme.send κ m₀ m₁) (Polynomial.eval κ pS)
Every sender call at security parameter
κmakes at mostpS.eval κcalls. - recv (κ : ℕ) (c : Msg) (b : Bool) : OracleComp.IsQueryBounded (scheme.recv κ c b) (Polynomial.eval κ pR)
Every receiver recovery at security parameter
κmakes at mostpR.eval κcalls.
Compile a PlainSenderOT scheme into a two-party UC Protocol in the plain model (matching
OTInput Bool / OTOutput Bool): sender 0 computes c ← scheme.send κ m₀ m₁ once; receiver 1
records b once; deliverMsg c forwards c to receiver 1 (matching senderMsg when 0 ∉ C, or
any c when 0 ∈ C) and runs scheme.recv κ c b.
If scheme has polynomial call budgets pS and pR, then scheme.toProtocol has polynomial
call budget pS + pR.
Corrupted-receiver extraction environment (C = {1}) for a one-message plain-model OT scheme:
samples uniform (m₀, m₁), sends ⟨m₀, m₁⟩ to honest sender 0, reads the network message c,
runs scheme.recv locally on both false and true, and checks whether both bits were recovered.
If scheme.recv has polynomial call budget pR, then corruptOTReceiverEnv scheme has
polynomial call budget 2 * pR + 4.
In the real execution with C = {1} and dummyAdversary, corruptOTReceiverEnv scheme
recovers both m₀ and m₁ with probability at least acceptProb false + acceptProb true - 1.
Ideal-world corrupted-receiver extraction bound: against fot Bool, every simulator S₁
for C = {1} succeeds on corruptOTReceiverEnv scheme with probability at most 1 / 2.
Concrete Impossibility of One-Message Plain-Model OT: if scheme.recv has polynomial call
budget pR and at security parameter κ the error bound ε satisfies
ε 1 (2 * pR + 4) κ + 3 / 2 < scheme.acceptProb κ false + scheme.acceptProb κ true, then
scheme.toProtocol does not UC-realize fot Bool within (g, ε).
Impossibility of One-Message Plain-Model OT (UC.Realizes): no one-message
sender-to-receiver plain-model OT scheme with polynomial-call-bounded recovery whose honest
acceptance probabilities eventually sum to at least 3 / 2 + c (for c > 0) UC-realizes
fot Bool.