Contextual emulation and UC security #
This file defines the core judgments for Universally Composable (UC) security
at the abstract OpenTheory level.
Main definitions #
Emulates T real ideal ObsEqsays that the open systemrealemulatesidealin theoryTwhenever, for every valid plug (context), the resulting closed systems are observationally equivalent.UCSecure T protocol ideal ObsEq SimSpace simulateis the existential simulator variant: there exists a simulator that transforms any context so that the closed ideal system (with the simulated context) is observationally equivalent to the closed real system.
Basic properties #
Emulates.reflandEmulates.transfollow immediately from the corresponding properties of the observation relationObsEq.Emulates.map_invarianceshows that adapting both sides of an emulation along the same boundary morphism preserves the emulation (requires a lawful theory).Emulates.plug_invarianceshows that plugging both sides of an emulation with the same additional context preserves the emulation (requires a lawful theory).
UC composition theorems #
Emulates.par_compose: parallel composition preserves emulation.Emulates.wire_compose: wired composition preserves emulation.Emulates.plug_compose: both protocol and environment emulation compose to yield observational equivalence of the closed systems.
These rely on structural factorization lemmas
(close_par_left, close_par_right, close_wire_left,
close_wire_right, plug_comm) that capture monoidal coherence
identities, derived from the CompactClosed axioms.
Emulates T real ideal ObsEq asserts that real contextually emulates
ideal in the open-composition theory T.
For every plug K : T.Plug Δ, the closed compositions T.close real K
and T.close ideal K are related by ObsEq.
This is the definitional core of UC security: no environment can
distinguish real from ideal.
Instances For
Every open system emulates itself, provided the observation relation is reflexive.
Emulation composes transitively, provided the observation relation is transitive.
Adapting both sides of an emulation along the same boundary morphism
preserves the emulation, provided the theory has lawful map and plug.
The key identity used is plug (map f W) K = plug W (map (swap f) K),
which is the map_plug naturality law.
Plugging both sides of an emulation with the same additional context preserves the emulation.
If real emulates ideal and we close both against the same plug K,
the resulting closed systems are still observationally equivalent. This is
immediate from the definition.
The effective plug for the left component of a parallel composition.
Given W₂ : T.Obj Δ₂ and K : T.Plug (tensor Δ₁ Δ₂), wire them
together through the Δ₂ boundary to obtain a plug for Δ₁ alone.
Instances For
The effective plug for the right component of a parallel composition.
Given W₁ : T.Obj Δ₁ and K : T.Plug (tensor Δ₁ Δ₂), wire them
together through the Δ₁ boundary to obtain a plug for Δ₂ alone.
Instances For
Closing a parallel composition factors through the left component.
This captures the string-diagram identity: plugging par W₁ W₂ against
K is the same as plugging W₁ against the residual context formed by
wiring W₂ into K.
Closing a parallel composition factors through the right component.
The effective plug for the left factor of a wiring.
Given W₂ : T.Obj (tensor (swap Γ) Δ₂) and
K : T.Plug (tensor Δ₁ Δ₂), wire them together through the Δ₂
boundary to obtain a plug for tensor Δ₁ Γ.
Instances For
The effective plug for the right factor of a wiring.
Given W₁ : T.Obj (tensor Δ₁ Γ) and K : T.Plug (tensor Δ₁ Δ₂),
wire them together through the Δ₁ boundary to obtain a plug for
tensor (swap Γ) Δ₂.
Instances For
Closing a wired composition factors through the left component.
Closing a wired composition factors through the right component.
plug is symmetric: the protocol and context roles are interchangeable.
This follows from plug_eq_wire plus commutativity of wire via
par_comm.
Replacing the left component of a parallel composition preserves emulation, with the right component and environment held fixed.
Replacing the right component of a parallel composition preserves emulation, with the left component and environment held fixed.
UC composition theorem for par: if each component emulates its
ideal, then their parallel composition emulates the parallel composition
of ideals.
The proof uses a hybrid argument through T.par ideal₁ real₂, with
each step reducing to emulation of a single component via
close_par_left / close_par_right.
Replacing the left factor of a wiring preserves emulation.
Replacing the right factor of a wiring preserves emulation.
UC composition theorem for wire: if each factor emulates its
ideal, then their wired composition emulates the wired ideal.
Replacing the plug (environment) while keeping the protocol fixed
preserves observational equivalence, using plug_comm to swap
the protocol/environment roles.
UC composition theorem for plug: if the protocol emulates its
ideal and the environment emulates its ideal, then the closed real-world
execution is observationally equivalent to the closed ideal-world
execution.
The proof uses a hybrid through T.close ideal K_real:
step 1 is plug_invariance (same environment, different protocol) and
step 2 is plug_right (same protocol, different environment).
UCSecure T protocol ideal ObsEq SimSpace simulate is the UC security
statement with an existential simulator.
There exists a simulator parameter s : SimSpace such that for every
context K, the closed real-world execution T.close protocol K is
observationally equivalent to the closed ideal-world execution
T.close ideal (simulate s K).
The simulator simulate s transforms the context rather than the ideal
functionality, following the standard UC convention: the simulator acts as
a wrapper around the honest context to make the ideal world look like the
real world.
Instances For
Emulation implies UC security with the trivial (identity) simulator.
UC security with identity simulation recovers emulation.