Computational observation layer for UC security #
This file gives a concrete computational reading of the abstract UC
judgments (Emulates, UCSecure) in terms of distributional
distinguishing advantage. It deliberately keeps the fixed-ε notion
CompEmulates separate from the abstract Emulates-as-equivalence
judgment, because the relation
fun c₁ c₂ => tvDist (sem c₁) (sem c₂) ≤ ε is not transitive at fixed
ε (the triangle inequality only gives 2ε) and therefore cannot be
packaged as Observation T. The principled bridge to abstract
Emulates lives at the asymptotic level (AsympCompEmulates), where
sums of negligibles are still negligible.
Design: bundled sub-probabilistic semantics #
A Semantics T bundles:
- an ambient surface monad
m : Type → Typein which closed systems are observed; - a
SPMFSemantics mfactoring computations inmthrough an internal semantic monad into an externally visibleSPMF; - a
run : T.Closed → m Unitthat extracts the probabilistic game associated to each closed system.
The observation target is SPMF Unit, so the resulting denotation
carries genuine failure mass. Distinguishing advantage is the total
variation distance between the two resulting SPMF Unit distributions.
This lets the same framework express:
- coin-flip-only protocols with
m = ProbCompandSPMFSemantics.ofHasEvalSPMF ProbComp; - protocols with shared oracles where
m = OracleComp superSpecand the internal semantic monad isStateT σ ProbCompviasimulateQ; - observation-style semantics that deliberately introduce failure, for
example by querying with
OptionT ProbCompandguard-ing on a predicate over sampled values. This is how OTP-style privacy gets aCompEmulates 0statement against anSPMF Unitthat carries a real failure mass.
Main definitions #
Semantics Tbundles a surface monad, its sub-probabilistic semantics, and arunfunction extracting a game from each closed system.Semantics.evalDistis theSPMF Unitdenotation of a closed system.Semantics.distAdvantageis the total variation distance between two such denotations.CompEmulates sem ε real idealasserts that for every environment (plug), the distinguishing advantage between the real and ideal closed systems is at mostε.AsympCompEmulatesis the asymptotic variant: for every PPT adversary choosing environments, the advantage is negligible in the security parameter.CompUCSecure sem ε protocol ideal SimSpace simulateis the simulator-based variant with bounded advantage.
Main results #
CompEmulates.refl: advantage zero against itself.CompEmulates.triangle: transitivity with additive advantage bounds.CompEmulates.map_invariance: boundary adaptation preserves the bound.CompEmulates.par_compose,wire_compose,plug_compose: advantages add under parallel, wired, and plugged composition.CompUCSecure.toCompEmulates_id: simulator-based security with the identity simulator recovers computational emulation.AsympCompEmulates.par_compose,wire_compose,plug_compose: asymptotic composition from pointwise negligible bounds.ucDistGame: constructs theSecurityGamewhose advantage is the UC distinguishing advantage.AsympCompEmulates.iff_secureAgainst:AsympCompEmulatesis equivalent to security of the UC distinguishing game.
Semantics T bundles a computational observation layer for closed
systems in the open-composition theory T:
mis the surface monad in which the observation is written;semis aSPMFSemantics mgivingmits sub-probabilistic meaning;runextracts am Unitgame from each closed system.
The visible denotation of a closed system is therefore a
SPMF Unit, where the none branch records failure mass (for example,
a guard that rejected the sampled value). Distinguishing advantage
is total variation on those SPMF Unit distributions.
Surface monad in which closed systems are observed.
Monad structure on the surface monad.
- sem : SPMFSemantics self.m
The probabilistic game extracted from a closed system.
Instances For
The external SPMF Unit denotation of a closed system under S.
Instances For
Distinguishing advantage between two closed systems under S,
defined as the total variation distance of their SPMF Unit
denotations.
Instances For
CompEmulates sem ε real ideal asserts that real computationally
emulates ideal up to advantage ε under semantics sem.
For every plug K : T.Plug Δ, the total variation distance between the
real-world and ideal-world closed-system denotations is at most ε.
Instances For
Every system computationally emulates itself with advantage zero.
Computational emulation composes transitively with additive advantage bounds (triangle inequality on total variation distance).
Adapting both sides of a computational emulation along the same boundary morphism preserves the advantage bound.
This is the computational specialization of Emulates.map_invariance.
The key identity is plug (map f W) K = plug W (map (swap f) K).
Weakening: if ε₁ ≤ ε₂ then CompEmulates sem ε₁ implies
CompEmulates sem ε₂.
Composition #
Replacing the left component of a parallel composition preserves the computational emulation bound.
Replacing the right component of a parallel composition preserves the computational emulation bound.
Computational UC composition for par: advantages add.
Replacing the left factor of a wiring preserves the computational emulation bound.
Replacing the right factor of a wiring preserves the computational emulation bound.
Computational UC composition for wire: advantages add.
Computational UC composition for plug: when both the protocol
and the environment emulate their ideals, the advantage of the closed
real system vs. closed ideal system is bounded by the sum.
Simulator-based computational UC security #
CompUCSecure sem ε protocol ideal SimSpace simulate is the
simulator-based UC security statement with bounded advantage.
There exists a simulator parameter s : SimSpace such that for every
context K, the distinguishing advantage between the real execution
and the simulated ideal execution is at most ε.
Instances For
Computational emulation implies simulator-based UC security with the trivial (identity) simulator.
Simulator-based UC security with identity simulation recovers computational emulation.
Asymptotic computational emulation #
AsympCompEmulates is the asymptotic version of computational emulation.
Given a family of theories T n indexed by security parameter n : ℕ,
with corresponding semantics, real/ideal systems, and adversary-chosen
environments, this asserts that every PPT adversary has negligible
distinguishing advantage.
Instances For
Pointwise bounded advantage implies asymptotic security: if at each
security parameter the advantage is bounded by f n, and f is
negligible, then the asymptotic emulation holds (for any adversary class).
Convert a family of pointwise CompEmulates bounds into an asymptotic
statement when the bound function is negligible.
Asymptotic composition #
Asymptotic UC composition for par: if each component's pointwise
advantage is negligible, then the parallel composition also has negligible
advantage.
Asymptotic UC composition for wire: if each factor's pointwise
advantage is negligible, then the wired composition also has negligible
advantage.
Asymptotic UC composition for plug: if both the protocol and
the environment have negligible pointwise advantages, then the
distinguishing advantage of the closed real vs. closed ideal system
is negligible.
Bridge to SecurityGame #
The UC distinguishing game: a SecurityGame whose advantage at adversary
A and security parameter n is the total variation distance between
the real and ideal closed executions under the environment chosen by A.
Instances For
AsympCompEmulates is exactly secureAgainst isPPT for the UC
distinguishing game. This is definitional.
If real UC-emulates ideal, then the UC distinguishing game is secure against
any adversary class. Uses the SecurityGame.secureAgainst vocabulary.
UC security reduction: if security of g₁ reduces to UC-emulation of
real by ideal, then g₁ is secure whenever UC-emulation holds.
This bridges SecurityGame.secureAgainst_of_reduction to the UC setting:
given a reduction from a standard security game to the UC distinguishing
game, UC-emulation implies security of the original game.