Universal composition with joint state (step theorems and lazy multi-session functionality) #
This module defines the named data structures (SubSessionInput, SubSessionBackdoor,
MultiSessionState), the lazy multi-session extension IdealFunctionality.multiSession (F̂),
the sub-session relabelling MultiHybridProtocol.toJoint, the explicit demultiplexing and
multiplexing adversaries jointDemux and jointMux, and the fixed-session step theorems
EmulatesWithin.toJoint_multiSession and EmulatesWithin.multiSession_toJoint for this
library's call-bounded, static-corruption port-model emulation notions (UC.EmulatesWithin,
UC.Emulates, UC.Realizes).
These form the relabelling and execution-equivalence steps toward Theorem 1 (Universal
Composition with Joint State) of [CR03] (CRYPTO 2003, LNCS 2729: §3,
"The Composition Operation"; §3, "The Multi-session Extension of an Ideal Functionality"; Theorem 1;
and the proof of Theorem 1, definition of π̃), adapted to a fixed finite session count m, static
corruptions, pull-only execution, and this library's call-bounded statistical model (see
Cslib.Crypto.Protocols.UC.Emulates for the call-budget model vs. PPT ITMs).
The generic lazy-vs-eager parallel-package initialization theorem (SSP.parFinLazy,
SSP.run_parFinLazy_eq_parFin) lives separately in CslibFrontier.Crypto.Protocols.SSP.ParFinLazy
(SSP.Basic supplies UC.Machine via UC.Linking), so SSP callers can import the bridge
without importing the UC ideal-functionality or execution modules.
Modelling decisions and differences from [CR03] #
- Named structures (zero projection chains).
SubSessionInput,SubSessionBackdoor, andMultiSessionStatereplace raw nested products and options. - Lazy multi-session extensions
F.multiSessionandF.multiSessionProtocol([CR03], §3, "The Multi-session Extension of an Ideal Functionality"). For any[DecidableEq SSID],IdealFunctionality.multiSession SSID Fstores(secParam, corrupted, sessions)and creates a fresh copy ofFwithF.init secParam corruptedon the first party input or backdoor query for a givenssid, keeping distinctssids independent. BecauseMachine.IsBoundedquantifies over all states (including unreachable ones with arbitrarysecParam) whileProtocol.PolyBoundedevaluates at the outerκ,(F.multiSession SSID).toProtocolneed not bePolyBoundedeven whenF.toProtocolis.IdealFunctionality.multiSessionProtocol SSID FcapturesκandCat machine construction instead of in state, preserving polynomial call budgets (2 * pF) while matching(F.multiSession SSID).toProtocolin every UC execution. - Pull-model interface and scheduling differences. In [CR03], §3, "The
Multi-session Extension of an Ideal Functionality", whenever a copy of
Fsends(ssid, v)to some partyPi,F̂sends(sid, ssid, v)toPiand sendsssidto the adversary. Here,IdealFunctionality.multiSessionreturns an untaggedOption SubOuton the selected pull querySubSessionInput SSID SubIn, and provides an explicitly queried backdoor interface (SubSessionBackdoor SSID BackQ) returningBackR(adding no automatic raw-state port) rather than sending adversary notifications on honest-party activations or outputs. Because the interfaces, scheduling, and call-bounded vs. PPT ITM resource models differ, no implication betweenRealizesfor this pull API and the source premise is claimed here. - Sub-session relabelling
toJointand fixedm.MultiHybridProtocol.toJointrelabels eachSubSessionCall⟨session, party, input⟩as(party, ⟨session, input⟩)(adapting [CR03], §3, "The Composition Operation", and the proof of Theorem 1, definition ofπ̃, to a fixed finiteFin mfamily; dynamicSIDcreation and push-model tagged outputs /ssidnotifications are out of scope). - Explicit demux/mux adversaries under static corruption.
jointDemuxandjointMuxtranslate network queries between the single-protocolF̂-hybrid interface and them-sessioncomposeMultiinterface while preserving replies (NetR ⊕ RoutedNetR SubOut BackR). Static corruptionsC : Finset (Fin n)are shared acrossρ, all copies ofF, andρ̂, so corrupted-party internal state translation ([CR03], item 3 of the proof of Theorem 1) is unneeded. - Lazy-vs-eager equivalence via
SSP.ParFinLazy. The proof ofexec_compose_toJoint_multiSessionusesSSP.run_parFinLazy_eq_parFinfromCslibFrontier.Crypto.Protocols.SSP.ParFinLazyto bridge lazy first-touch initialization and eagerSSP.parFinsampling. - Scope and joint state vs. global setup. Joint state here is internal to a single subroutine
protocol
ρ̂, not a GUC/EUC global setup shared outsideρ̂. Structural isolation and unrestricted compliance hold by types (OracleSpec.emptyclosed machines andSubSessionCall).
Main definitions #
Cslib.Crypto.Protocols.UC.SubSessionInput,Cslib.Crypto.Protocols.UC.SubSessionBackdoor,Cslib.Crypto.Protocols.UC.MultiSessionState: named data structures for multi-session functionalities.Cslib.Crypto.Protocols.UC.lazySessionStep: shared single-step lazy session-table activation.Cslib.Crypto.Protocols.UC.IdealFunctionality.multiSession: lazy multi-session extensionF̂.Cslib.Crypto.Protocols.UC.IdealFunctionality.multiSessionProtocol: protocol-level budget- preserving lazy multi-session extension capturingκandCat machine construction.Cslib.Crypto.Protocols.UC.MultiHybridProtocol.toJoint: relabellingπ̃targetingF̂.Cslib.Crypto.Protocols.UC.demuxNetQuery,Cslib.Crypto.Protocols.UC.muxNetQuery,Cslib.Crypto.Protocols.UC.jointDemux,Cslib.Crypto.Protocols.UC.jointMux: explicit demultiplexing and multiplexing adversaries.
Main results #
Cslib.Crypto.Protocols.UC.lazySessionStep_isQueryBounded,Cslib.Crypto.Protocols.UC.IdealFunctionality.multiSession_polyBounded_of_zero,Cslib.Crypto.Protocols.UC.IdealFunctionality.multiSessionProtocol_isBounded,Cslib.Crypto.Protocols.UC.IdealFunctionality.multiSessionProtocol_polyBounded,Cslib.Crypto.Protocols.UC.toJoint_polyBounded,Cslib.Crypto.Protocols.UC.jointDemux_polyBounded,Cslib.Crypto.Protocols.UC.jointMux_polyBounded: call-budget preservation.Cslib.Crypto.Protocols.UC.exec_multiSessionProtocol_eq,Cslib.Crypto.Protocols.UC.exec_compose_toJoint_multiSession,Cslib.Crypto.Protocols.UC.exec_composeMulti_toJoint,Cslib.Crypto.Protocols.UC.exec_compose_toJoint_multiSessionProtocol,Cslib.Crypto.Protocols.UC.exec_composeMulti_toJoint_multiSessionProtocol: exact execution identities forF.multiSession,F.multiSessionProtocol, andcomposeMulti ρ F.toProtocol.Cslib.Crypto.Protocols.UC.EmulatesWithin.multiSessionProtocol_right_iff,Cslib.Crypto.Protocols.UC.EmulatesWithin.multiSessionProtocol_left_iff,Cslib.Crypto.Protocols.UC.EmulatesWithin.toJoint_multiSession,Cslib.Crypto.Protocols.UC.EmulatesWithin.multiSession_toJoint,Cslib.Crypto.Protocols.UC.EmulatesWithin.toJoint_multiSessionProtocol,Cslib.Crypto.Protocols.UC.EmulatesWithin.multiSessionProtocol_toJoint: fixed-session concrete emulation steps and exact transfers betweenF.multiSessionProtocoland(F.multiSession).toProtocol.Cslib.Crypto.Protocols.UC.Realizes.compose_toJoint,Cslib.Crypto.Protocols.UC.Realizes.compose_toJoint_trans,Cslib.Crypto.Protocols.UC.RealizesWithin.compose_toJoint,Cslib.Crypto.Protocols.UC.Realizes.composeMulti_toJoint: end-to-end fixed-session joint-state composition corollaries combining the relabelling steps with single-instance and multi-session composition.
References #
- R. Canetti and T. Rabin, Universal Composition with Joint State, CRYPTO
2003, LNCS 2729 (§3, "The Composition Operation"; §3, "The Multi-session Extension of an Ideal
Functionality"; Theorem 1 (Universal Composition with Joint State); and the proof of Theorem 1,
definition of
π̃).
Named structures and lazy multi-session functionality #
A party input to a multi-session functionality or joint-state protocol: sub-session ssid
with value input ([CR03], §3, "The Multi-session Extension of an Ideal
Functionality", the (ssid, v) part of (sid, ssid, v)).
- ssid : SSID
Sub-session identifier.
- input : SubIn
Party input (or poll token) for sub-session
ssid.
State of F.multiSession: the security parameter and corrupted set recorded at invocation
(so that copies can be created later) and the lazily created copies.
Single lazy session-table activation step: looks up ssid in sessions, initializes a fresh
session via init on a miss, runs step on that session's state, and wraps the updated session
table via wrap. Shared by IdealFunctionality.multiSession and
IdealFunctionality.multiSessionProtocol.
Query-budget preservation for lazySessionStep: at most t calls for lazy initialization on
a miss plus at most t calls for step.
Multi-session extension F̂ of an ideal functionality F for any [DecidableEq SSID]:
creates a fresh copy of F with F.init secParam corrupted on the first party input or backdoor
query for ssid, and activates that copy ([CR03], §3, "The Multi-session Extension of
an Ideal Functionality"). Unlike the source's F̂ (which sends (sid, ssid, v) to Pi and sends
ssid to the adversary when a copy sends (ssid, v)), this pull API returns an untagged
Option SubOut on the selected pull and provides an explicitly queried backdoor interface
(SubSessionBackdoor SSID BackQ) returning BackR, adding no automatic raw-state port.
Because MultiSessionState stores secParam in state while Machine.IsBounded quantifies over
all states (including unreachable ones with arbitrary secParam),
(F.multiSession SSID).toProtocol need not satisfy Protocol.PolyBounded even when
F.toProtocol does. Callers requiring a Protocol.PolyBounded multi-session extension (for
instance in nested composeMulti) should use IdealFunctionality.multiSessionProtocol.
Budget-preserving protocol-level lazy multi-session extension of F for any
[DecidableEq SSID]: captures the security parameter κ and static corruption set C at machine
construction rather than storing them in state, calling F.init κ C directly on first touch of
each ssid and storing only the session table SSID → Option F.State. Preserves polynomial call
budgets (IdealFunctionality.multiSessionProtocol_polyBounded) and agrees in every UC execution
with (F.multiSession SSID).toProtocol (exec_multiSessionProtocol_eq).
Any 0-bounded ideal functionality's lazy multi-session extension (F.multiSession SSID)
has polynomial call budget 0 (the uniform zero bound on F.toProtocol applies at every stored
s.secParam and s.corrupted).
Every activation of F.multiSessionProtocol SSID κ C makes at most 2 * t calls whenever
F.toProtocol κ C has per-activation budget t (at most t for lazy F.init κ C on first
touch plus at most t for the delegated handler).
Protocol-level lazy multi-session extension preserves polynomial call budgets with factor 2:
if F.toProtocol has budget pF, then F.multiSessionProtocol SSID has budget 2 * pF.
Sub-session relabelling and explicit demux/mux adversaries #
Relabel a multi-session hybrid protocol ρ (SubSessionCall subroutine calls) to a
single-subroutine HybridProtocol targeting F.multiSession (Fin m) ([CR03], §3,
"The Composition Operation", and the proof of Theorem 1, definition of π̃).
Library infrastructure (no cited result): relabelling ρ via toJoint preserves its polynomial
call budget pρ unchanged.
Library construction (no cited definition): translate a network query of the F̂-hybrid
execution (compose ρ.toJoint F̂) to the corresponding network query of the m-session execution
(composeMulti ρ F.toProtocol), keeping replies identical.
Library construction (no cited definition): inverse network query translation from the
m-session interface (composeMulti ρ F.toProtocol) to the F̂-hybrid interface
(compose ρ.toJoint F̂).
Library construction (no cited result): explicit demultiplexing adversary for
compose ρ.toJoint (F.multiSession (Fin m)).toProtocol running against
composeMulti ρ F.toProtocol ([CR03], §3, "The Composition Operation", and the proof
of Theorem 1).
Library construction (no cited result): explicit multiplexing adversary in the reverse
direction, mapping composeMulti ρ F.toProtocol queries to
compose ρ.toJoint (F.multiSession (Fin m)).toProtocol.
Library infrastructure (no cited result): jointDemux A preserves A's polynomial call budget
pA.
Library infrastructure (no cited result): jointMux A preserves A's polynomial call budget
pA.
Execution identities and concrete step theorems #
A step of the proof of Theorem 1 of [CR03] (the step showing that "protocol π̃
in the F̂-hybrid model emulates protocol π in the F-hybrid model"), not that theorem;
fixed-session joint-state execution identity for this library's call-bounded UC execution model:
compose ρ.toJoint (F.multiSession (Fin m)).toProtocol with adversary A and
composeMulti ρ F.toProtocol with jointDemux A have identical output distributions.
A step of the proof of Theorem 1 of [CR03] (the step showing that "protocol π̃
in the F̂-hybrid model emulates protocol π in the F-hybrid model"), not that theorem;
fixed-session reverse joint-state execution identity for this library's call-bounded UC execution
model: composeMulti ρ F.toProtocol with adversary A and
compose ρ.toJoint (F.multiSession (Fin m)).toProtocol with jointMux A have identical output
distributions.
A step of the proof of Theorem 1 of [CR03] (the step showing that "protocol π̃
in the F̂-hybrid model emulates protocol π in the F-hybrid model"), not that theorem;
fixed-session joint-state step for this library's call-bounded EmulatesWithin relation:
compose ρ.toJoint (F.multiSession (Fin m)).toProtocol emulates composeMulti ρ F.toProtocol
with overhead Polynomial.X and zero distinguishing error via the explicit demultiplexing
adversary jointDemux. Fixed number m of sessions chosen in advance; static corruption; pull
execution returning untagged Option SubOut with explicit SubSessionBackdoor queries.
A step of the proof of Theorem 1 of [CR03] (the step showing that "protocol π̃
in the F̂-hybrid model emulates protocol π in the F-hybrid model"), not that theorem;
fixed-session reverse joint-state step for this library's call-bounded EmulatesWithin relation:
composeMulti ρ F.toProtocol emulates compose ρ.toJoint (F.multiSession (Fin m)).toProtocol
with overhead Polynomial.X and zero distinguishing error via jointMux. Fixed number m of
sessions chosen in advance; static corruption; pull execution returning untagged Option SubOut
with explicit SubSessionBackdoor queries.
Fixed-session joint-state replacement step in this library's call-bounded statistical Realizes
model (a step toward Theorem 1 of [CR03], not that theorem): for a fixed number m of
sessions, static corruptions, and pull execution, if ρHat realizes the multi-session extension
F.multiSession (Fin m), then the joint-state protocol compose ρ.toJoint ρHat emulates the
m-session F-hybrid protocol composeMulti ρ F.toProtocol.
Fixed-session modular joint-state realization step in this library's call-bounded statistical
Realizes model (a step toward Theorem 1 of [CR03], not that theorem): for a fixed
number m of sessions, static corruptions, and pull execution, if ρHat realizes
F.multiSession (Fin m) and composeMulti ρ F.toProtocol realizes G, then the joint-state
protocol compose ρ.toJoint ρHat realizes G.
Concrete fixed-session joint-state replacement step in this library's call-bounded
RealizesWithin model (a step toward Theorem 1 of [CR03], not that theorem): for a
fixed number m of sessions, static corruptions, and pull execution, if ρHat realizes
F.multiSession (Fin m) with overhead g and error ε, then compose ρ.toJoint ρHat emulates
composeMulti ρ F.toProtocol with the overhead and error below.
Reverse fixed-session joint-state composition step in this library's call-bounded statistical
Realizes model (a step toward Theorem 1 of [CR03], not that theorem): for a fixed
number m of sessions, static corruptions, and pull execution, if π realizes F, then the
m-session protocol composeMulti ρ π emulates the F.multiSession (Fin m)-hybrid protocol
compose ρ.toJoint (F.multiSession (Fin m)).toProtocol.
Budget-preserving multi-session protocol execution and emulation #
Exact UC execution agreement between the budget-preserving protocol
F.multiSessionProtocol SSID and (F.multiSession SSID).toProtocol for every adversary,
corruption set, environment, security parameter, and auxiliary input.
Concrete UC emulation of F.multiSessionProtocol SSID is equivalent to concrete UC
realization of F.multiSession SSID with the exact same simulator overhead and error bound.
Concrete UC emulation by F.multiSessionProtocol SSID is equivalent to concrete UC
emulation by (F.multiSession SSID).toProtocol with the exact same overhead and error bound.
Fixed-session joint-state execution identity using the budget-preserving multi-session
protocol: compose ρ.toJoint (F.multiSessionProtocol (Fin m)) with adversary A and
composeMulti ρ F.toProtocol with jointDemux A have identical output distributions.
Reverse fixed-session joint-state execution identity using the budget-preserving
multi-session protocol: composeMulti ρ F.toProtocol with adversary A and
compose ρ.toJoint (F.multiSessionProtocol (Fin m)) with jointMux A have identical output
distributions.
Fixed-session joint-state step for EmulatesWithin using F.multiSessionProtocol (Fin m):
compose ρ.toJoint (F.multiSessionProtocol (Fin m)) emulates composeMulti ρ F.toProtocol with
overhead Polynomial.X and zero distinguishing error via jointDemux.
Reverse fixed-session joint-state step for EmulatesWithin using
F.multiSessionProtocol (Fin m): composeMulti ρ F.toProtocol emulates
compose ρ.toJoint (F.multiSessionProtocol (Fin m)) with overhead Polynomial.X and zero
distinguishing error via jointMux.