Universal Composability (UC) Security #
This file defines UC security at Level 1 (information-theoretic): no complexity bounds.
Main definitions #
UCSpec— specification of UC interfaces (honest, output, leak, sim_if, view)mapSum— parallel composition onSum(= tensor inKlSPComp)realWorld,idealWorld— real and ideal world executionsUCEmulates— UC emulation with statistical error εUCEmulatesPerfect— perfect UC emulation (ε = 0)
Main results #
mapSum_pure_left—mapSum pure g (.inl a) = pure (.inl a)UCEmulates_of_sdist— same-interface:sdist ≤ ε → UCEmulates εUCEmulates_of_dummy— dummy adversary sufficiencyUCEmulates_trans— transitivity (same-interface, via simulator chaining)
UC vs sdist #
UC emulation (Canetti-style ∀ A ∃ S) is strictly weaker than sdist ≤ ε.
The implication sdist ≤ ε → UCEmulates ε holds (take S = A), but the
reverse is false because the simulator can transform the leak channel. (The
robust-hyperproperty (RHP) equivalence is developed separately.)
Sub-SMC structure (same-interface case) #
When leak = sim_if (same adversary interface), UC emulation inherits the
sub-SMC structure from sdist:
UCEmulates_refl— identity: any protocol emulates itselfUCEmulates_trans— composition: simulator chaining gives additive bounds- Tensor: follows from
sdist_mapSum_leviaUCEmulates_of_sdist
For the general case (different interfaces), the categorical structure is richer — it involves a 2-categorical notion where simulators are 2-cells.
Concurrent UC (forthcoming) #
This file provides single-shot, non-interactive UC emulation. The concurrent
(reactive) layer — UCEmulatesConcurrent* over the ITreeN interaction-tree
monad, with the Kantorovich-distance and stateful variants — will be included in
core in a forthcoming revision; it currently lives in the parent development
under CatCrypt/Crypto/UCMonad/.
UC Specification #
A UC specification bundles the types of the various interfaces.
hon: honest input interfaceout: honest output interfaceleak: adversary interface (real world leakage)sim_if: simulator interface (ideal world)view: adversary/simulator observable output
Instances For
Parallel Composition on Sum #
Concrete parallel composition on Sum (= tensor ⊗ in KlSPComp).
Applies f on .inl and g on .inr.
Equations
- CatCrypt.Crypto.mapSum f g (Sum.inl a) = CatCrypt.Core.SPComp.map Sum.inl (f a)
- CatCrypt.Crypto.mapSum f g (Sum.inr c) = CatCrypt.Core.SPComp.map Sum.inr (g c)
Instances For
mapSum pure pure = pure (identity on Sum).
mapSum f g equals the KlSPComp tensor product wkR f ≫ wkL g.
Real and Ideal Worlds #
Real world: Z ∘ₖ (id ⊕ A) ∘ₖ π.
Equations
- CatCrypt.Crypto.realWorld spec π A Z a = ((π a).bind (CatCrypt.Crypto.mapSum CatCrypt.Core.SPComp.pure A)).bind Z
Instances For
Ideal world: Z ∘ₖ (id ⊕ S) ∘ₖ F.
Equations
- CatCrypt.Crypto.idealWorld spec F S Z a = ((F a).bind (CatCrypt.Crypto.mapSum CatCrypt.Core.SPComp.pure S)).bind Z
Instances For
UC Emulation #
Protocol π UC-emulates ideal functionality F with statistical error ε.
For ALL adversaries A, there EXISTS a simulator S such that the sdist of the post-adversary views is ≤ ε. The environment Z is absorbed into sdist's distinguisher supremum.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Perfect UC emulation: ε = 0.
Equations
- CatCrypt.Crypto.UCEmulatesPerfect spec π F = CatCrypt.Crypto.UCEmulates 0 spec π F
Instances For
Basic Theorems #
Same-interface UC: if sdist π F ≤ ε, then UCEmulates ε with S = A.
When leak = sim_if, the simulator is just the adversary itself.
Monotonicity: UC emulation with tighter bound implies looser bound.
Dummy adversary sufficiency (same-interface case: view = leak).
If UC holds against the identity adversary, it holds against ALL adversaries. The key idea: given adversary A, absorb it into the distinguisher.
Reflexivity: any protocol UC-emulates itself perfectly (same-interface).
Transitivity of UC emulation (same-interface case).
Given adversary A, chain simulators: h₁ gives S₁ for A, h₂ gives S₂ for S₁. The triangle inequality on sdist gives the additive bound. This is the composition property for the UC sub-SMC.
Heterogeneous Transitivity #
Heterogeneous transitivity: compose UC bounds across different leak types. Given π₁ ──UC(ε₁)──▶ π₂ (leak₁ → leak₂) and π₂ ──UC(ε₂)──▶ π₃ (leak₂ → sim_if), we get π₁ ──UC(ε₁+ε₂)──▶ π₃ (leak₁ → sim_if). The middle type leak₂ is consumed.
Heterogeneous transitivity for 3-step pipelines.
Oracle-Game UC Emulation #
UC emulation for oracle-based (interactive) games.
Many cryptographic security definitions give the adversary oracle access to a set of operations (e.g., encryption, decryption, key generation). The game constructs the oracles and hands them to the adversary, who produces a distinguishing bit.
GameUCEmulates ε G_real G_ideal says that no adversary can distinguish
the real game from the ideal game with advantage greater than ε.
This generalizes UCEmulates to the reactive/oracle setting where
the adversary interacts via multiple adaptive queries rather than
receiving a single output.
Equations
- CatCrypt.Crypto.GameUCEmulates ε G_real G_ideal = ∀ (A : OracleIf → CatCrypt.Core.SPComp Bool), CatCrypt.Crypto.Advantage (G_real A) (G_ideal A) ≤ ε
Instances For
Reflexivity: any game trivially emulates itself.
Monotonicity: tighter bound implies looser bound.
Transitivity via triangle inequality.
Symmetry: swapping real and ideal preserves the bound.