Ideal UC Secure Function Evaluation with Abort #
This module defines the n-party ideal functionality fsfe for secure function evaluation (SFE)
with abort of a deterministic function f : (Fin n → In) → (Fin n → Out) 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{sfe}}$ of
[BS23] (v0.6, §23.5.3, printed pp. 1043–1044; with $\mathcal{F}_{\mathrm{ot}}$ in §23.5.7,
printed p. 1056, as its two-party special case) to UC.IdealFunctionality.
Model and scope #
- Parties and inputs: Each party
i : Fin nsubmits its inputx i : Inonce viaSFEInput.input (x i)(write-once immutable) and polls for its output viaSFEInput.query. - Delayed output and explicit selective abort: Outputs wait until all
nparties have submitted inputs (SFEState.allSubmitted = true) and the adversary issuesSFEBackdoor.deliver i(provided no abort has occurred yet), after which partyiobservessome (.output (f x i)). IssuingSFEBackdoor.abortsetsaborted := true: any party whose output was already delivered retainssome (.output (f x i)), while undelivered parties observesome .abortedand subsequentdelivercalls have no effect. - Deliberate model choices relative to [BS23]: In [BS23] (v0.6, §23.5.3,
printed pp. 1043–1044), $\mathcal{F}_{\mathrm{sfe}}$ is defined with per-wire recipient lists and
silent abort via withheld output delivery (
none, with no.abortbackdoor command or.abortedtoken). Here we make two deliberate simplifications/conventions:- explicit
SFEBackdoor.abortcommands yieldingsome .abortedfor undelivered parties (the synchronous SFE-with-abort convention needed for #1212), and - homogeneous per-party input/output types
f : (Fin n → In) → (Fin n → Out)rather than per-wire recipient lists.
- explicit
- Minimal status leakage: Polling
SFEBackdoor.queryreturnsSFEBackdoorReply.status stwherest : SFEStatus nexposes only arrival, delivery, and abort Boolean flags, never honest inputs or other parties' outputs. - 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.SFEInput,Cslib.Crypto.Protocols.UC.SFEOutput,Cslib.Crypto.Protocols.UC.SFEStatus,Cslib.Crypto.Protocols.UC.SFEBackdoor,Cslib.Crypto.Protocols.UC.SFEBackdoorReply,Cslib.Crypto.Protocols.UC.SFEState: named request, reply, status, backdoor, and state records forn-party SFE with abort.Cslib.Crypto.Protocols.UC.fsfe: then-party ideal SFE functionality $\mathcal{F}_{\mathrm{SFE}}$ for a deterministic functionf : (Fin n → In) → (Fin n → Out).Cslib.Crypto.Protocols.UC.SFECorruptEquiv,Cslib.Crypto.Protocols.UC.SFEPreOutputEquiv: corrupted-party and backdoor equivalence relations for honest-input privacy.Cslib.Crypto.Protocols.UC.otEvalFn,Cslib.Crypto.Protocols.UC.otSFE,Cslib.Crypto.Protocols.UC.otInSFEHybrid,Cslib.Crypto.Protocols.UC.OTInSFESimState,Cslib.Crypto.Protocols.UC.otInSFESim: concrete 2-partyfsfeinstantiation of 1-out-of-2 OT, its role-typed hybrid wrapper, and its 2-call-per-activation simulator againstfot.
Main results #
Cslib.Crypto.Protocols.UC.fsfe_isBounded,Cslib.Crypto.Protocols.UC.fsfe_polyBounded,Cslib.Crypto.Protocols.UC.fsfe_multiSession_polyBounded: zero-call budget bounds forfsfeand its multi-session extension(fsfe f).multiSession SSID.Cslib.Crypto.Protocols.UC.SFEState.monotone_of_mem_support_runFrom: write-once input lock and delivery/abort monotonicity across arbitrary multi-step interactions.Cslib.Crypto.Protocols.UC.eval_exec_honestSFEEnv,Cslib.Crypto.Protocols.UC.eval_exec_abortSFEEnv: honest evaluation agreement (f x i) and abort behavior.Cslib.Crypto.Protocols.UC.eval_runFrom_fsfe_corrupt_preAllSubmitted_eq,Cslib.Crypto.Protocols.UC.eval_runFrom_fsfe_corrupt_preDeliver_eq,Cslib.Crypto.Protocols.UC.eval_runFrom_fsfe_corrupt_eq,Cslib.Crypto.Protocols.UC.eval_runFrom_fsfe_corrupt_inputs_eq: honest-input privacy before all inputs arrive, before corrupted-party delivery, and post-output whenf x i = f x' ifor alli ∈ C.Cslib.Crypto.Protocols.UC.otInSFEHybrid_polyBounded,Cslib.Crypto.Protocols.UC.otInSFESim_polyBounded,Cslib.Crypto.Protocols.UC.exec_compose_otInSFEHybrid_eq,Cslib.Crypto.Protocols.UC.realizes_fot_of_otInSFEHybrid,Cslib.Crypto.Protocols.UC.realizes_fot_of_realizes_otSFE: zero-error UC realization offot Mbycompose (otInSFEHybrid M) (otSFE M).toProtocolfor everyMandC, and its modular composition corollary for any protocol realizingotSFE M.Cslib.Crypto.Protocols.UC.otSFE_sender_abort_differs_from_fot,Cslib.Crypto.Protocols.UC.otSFE_selective_deliver_zero: direct interface differences between bareotSFEandfot.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, v0.6, §23.5.3
(printed pp. 1043–1044) for $\mathcal{F}_{\mathrm{sfe}}$ (with per-wire recipient lists and
silent abort via withheld output delivery
none) and §23.5.7 (printed p. 1056) for $\mathcal{F}_{\mathrm{ot}}$ as its two-party special case. - R. Canetti, Universally Composable Security, Section 4: the UC execution and
emulation framework (not the definition of
fsfeitself).
Request, reply, status, backdoor, and state types #
Backdoor queries of fsfe: query reads SFEStatus n, deliver party releases output to
party once all inputs are present and no abort occurred, and abort sets the abort flag.
- query {n : ℕ} : SFEBackdoor n
- deliver {n : ℕ} (party : Fin n) : SFEBackdoor n
- abort {n : ℕ} : SFEBackdoor n
Instances For
Backdoor replies of fsfe: either status flags or an acknowledgement.
- status {n : ℕ} (st : SFEStatus n) : SFEBackdoorReply n
- ack {n : ℕ} : SFEBackdoorReply n
Party i's observable output in state s on SFEInput.query. Delivered outputs persist even
if a selective abort occurs later; undelivered parties observe some .aborted after an abort.
Monotonicity relation between states s and s' across activations of fsfe: every
submitted input is write-once immutable, and delivered and aborted are sticky.
Once set, party
i's input cannot change.Once delivered, party
i's output remains delivered.Once aborted, the session remains aborted.
The ideal n-party secure function evaluation functionality with abort
$\mathcal{F}_{\mathrm{SFE}}$ adapting [BS23] (v0.6, §23.5.3, printed pp. 1043–1044) for
a deterministic function f : (Fin n → In) → (Fin n → Out):
- Each party
i : Fin nsubmitsinput valonce (subsequent inputs are ignored) and pollsqueryto read its output once released (some (.output (f x i))), orsome .abortedif aborted before its output was delivered. - Backdoor
queryreturnsSFEStatus n(only arrival, delivery, and abort flags);deliver ireleases partyi's output when all parties have submitted and no abort occurred;abortsetsaborted := true.
Unlike [BS23] (§23.5.3, pp. 1043–1044), which uses per-wire recipient lists and silent
abort via withheld output delivery (none), fsfe uses homogeneous per-party input/output types
and explicit SFEBackdoor.abort commands yielding some .aborted (the synchronous SFE-with-abort
convention needed for #1212).
Call-budget bounds and multi-session compatibility #
The lazy multi-session extension (fsfe f).multiSession SSID has polynomial call budget 0.
State invariants and write-once input lock #
Write-once input lock and delivery/abort monotonicity: across any program run against
corruptRouter C ((fsfe f).toProtocol κ C), every reachable final state satisfies
SFEState.Monotone relative to the starting state s.
Honest evaluation agreement and abort correctness #
Honest-execution environment (C = ∅) for fsfe f: all n parties submit x, the backdoor
releases output to party target, and target polls some (.output (f x target)).
Abort-test environment (C = ∅) for fsfe f: all n parties submit x, the backdoor issues
abort, and target polls some .aborted.
Honest evaluation agreement of fsfe: when all parties submit x and the backdoor
delivers to target without aborting, target observes some (.output (f x target)) with
probability 1.
Abort correctness of fsfe: when all parties submit x and the backdoor aborts before
delivering to target, target observes some .aborted with probability 1.
Honest-input privacy #
State equivalence for post-output honest-input privacy of fsfe f under static corruption set
C: corrupted inputs match, all arrival/delivery/abort flags match, and for every pair of full
input vectors extending s₁ and s₂ and agreeing on C, f yields the same outputs on C.
Corrupted parties' submitted inputs agree.
All parties have the same input-arrival status.
Output delivery flags agree.
Abort flags agree.
- outputs_corrupt (x₁ x₂ : Fin n → In) : (∀ (j : Fin n) (v : In), s₁.inputs j = some v → x₁ j = v) → (∀ (j : Fin n) (v : In), s₂.inputs j = some v → x₂ j = v) → (∀ j ∈ C, x₁ j = x₂ j) → ∀ i ∈ C, f x₁ i = f x₂ i
All completions extending
s₁ands₂and agreeing onCproduce identicalf-outputs onC.
State equivalence for pre-output honest-input privacy of fsfe f under static corruption set
C: corrupted inputs, arrival flags, honest-party delivery flags, and abort flags match, while
no corrupted party has received its output yet.
Corrupted parties' submitted inputs agree.
All parties have the same input-arrival status.
No corrupted party has had its output delivered in
s₁.No corrupted party has had its output delivered in
s₂.Delivery flags on honest parties match.
Abort flags agree.
Honest-input privacy (post-output): for static corruption set C, any two states
s₁, s₂ satisfying SFECorruptEquiv C f s₁ s₂ produce identical distributions across every
network-port program liftNet program (including all corrupted-party inputs/queries and all
backdoor queries/deliveries/aborts).
Honest-input privacy (input-vector form): two full input vectors x₁, x₂ : Fin n → In
agreeing on C and producing identical f-outputs on C induce identical C-and-backdoor
behavior across every network-port program liftNet program.
Honest-input privacy (pre-all-submitted): if at least one honest party j ∉ C has not
yet submitted an input (s₁.inputs j = none), and s₁, s₂ match on C, arrival flags, and
undelivered/abort flags, then ANY network-port program liftNet program produces identical output
distributions on s₁ and s₂ regardless of honest inputs or f-outputs.
Honest-input privacy (pre-output, even after all inputs arrive): for any two states
s₁, s₂ satisfying SFEPreOutputEquiv C s₁ s₂ (including two full input vectors x₁, x₂ agreeing
on C without requiring f x₁ i = f x₂ i), any network-port program program that does not
invoke .deliver i for i ∈ C produces identical output distributions on s₁ and s₂.
The 2-party deterministic function for 1-out-of-2 oblivious transfer: sender 0 supplies
OTMessages M (receiving Unit), receiver 1 supplies Bool (receiving msgs.select b).
Malformed role inputs default to .inl ().
Concrete 2-party fsfe instantiation of 1-out-of-2 oblivious transfer.
Role-enforcing 2-party hybrid protocol adapting otSFE M to the OTInput M / OTOutput M
interface of fot M:
otInSFEHybrid M makes at most 1 subroutine call per activation.
Internal state of otInSFESim M, tracking corrupted-party otSFE inputs (including malformed
inputs not forwarded to fot M), per-party delivery flags, and abort status.
Recorded corrupted sender
0input tootSFE, if0 ∈ Chas submitted.Recorded corrupted receiver
1input tootSFE, if1 ∈ Chas submitted.- sfeDel0 : Bool
Whether
otSFEhas delivered output to party0. - sfeDel1 : Bool
Whether
otSFEhas delivered output to party1. - sfeAborted : Bool
Whether
otSFEhas been aborted.
Instances For
Two-call-per-activation simulator for compose (otInSFEHybrid M) (otSFE M).toProtocol against
fot M, working for every message type M and every static corruption set C : Finset (Fin 2):
- Tracks
(corruptIn0, corruptIn1, sfeDel0, sfeDel1, sfeAborted)inOTInSFESimState M. - Polls
OTBackdoor.queryonfot Mto reconstructSFEStatusandallSubmitted. - Forwards well-formed corrupted
.inl msgs/.inr binputs once tofot M. - Forwards
.deliver 1asOTBackdoor.deliveriffallSub && !sfeAbortedwith well-formed inputs, and forwards.abortasOTBackdoor.abortiff!sfeDel1.
otInSFESim M makes at most 2 oracle calls per activation.
Exact execution equivalence for otInSFEHybrid: for every message type M, every static
corruption set C : Finset (Fin 2), and every environment Z, running
compose (otInSFEHybrid M) (otSFE M).toProtocol with the dummy adversary is identically equal (as a
ProbComp Bool program) to running fot M with otInSFESim M.
Zero-error UC realization of fot M via otInSFEHybrid M and otSFE M: for every message
type M, the composed hybrid protocol compose (otInSFEHybrid M) (otSFE M).toProtocol UC-realizes
fot M with zero error via the 2-call-per-activation simulator otInSFESim M.
Composition corollary in this library's call-bounded static-UC model (Realizes): any protocol
π that realizes otSFE M composes with otInSFEHybrid M to realize fot M.
Semantic difference 1 (sender abort visibility): after an .abort on the backdoor, sender
0 polling .query receives some .aborted in otSFE M (since every party of fsfe receives an
output or abort), whereas sender 0 always receives none in fot M.
Semantic difference 2 (selective per-party delivery in otSFE): after both parties submit
(msgs, b), issuing .deliver 0 releases some (.output (.inl ())) to sender 0 while receiver
1 still observes none, and a subsequent .abort leaves sender 0 with its delivered output and
receiver 1 with some .aborted. (fot has only a single .deliver for receiver 1.)