Leakage Judgments for Side-Channel Reasoning #
This file defines three leakage judgments of increasing strength, enabling formal
side-channel reasoning within the VCVio framework. All three operate on observed
computations (outputs of runObs) that produce a result paired with an accumulated trace.
Main Definitions #
TraceNoninterference: exact trace equality in every coupling (pRHL indicator). Two observed computations satisfy this when their trace components always match, regardless of the result. This is the VCVio analogue of constant-time execution.ProbLeakFree: distributional trace independence. The trace distribution does not depend on secrets.LeakageBound: approximate trace independence via total variation distance. The trace distributions differ by at mostε.
Main Results #
traceNoninterference_implies_probLeakFree: exact trace equality implies distributional independence.probLeakFree_iff_leakageBound_zero:ProbLeakFreeis theε = 0case ofLeakageBound.leakageBound_triangle: transitivity for game-hopping arguments.
TraceNoninterference #
Exact trace noninterference: two observed computations produce equal trace components in every coupled output. This is the strongest leakage judgment, corresponding to constant-time execution for deterministic channels.
Defined via RelTriple' (the pRHL indicator pattern from QuantitativeDefs.lean).
Instances For
ProbLeakFree #
Distributional trace independence: the trace distributions are identical regardless of which computation produced them. This captures the property that an adversary observing only the trace cannot distinguish between the two computations.
The comparison is made at the SPMF level via evalDist, allowing computations over
different oracle specs to be compared.
Instances For
LeakageBound #
Approximate trace independence: the trace distributions differ by at most ε in total
variation distance. This enables game-hopping arguments where each hop introduces a small
leakage discrepancy.
Instances For
Bridge Lemmas #
Exact trace noninterference implies distributional trace independence: if traces always match in every coupling, their distributions must be equal.
ProbLeakFree is equivalent to LeakageBound 0.
Transitivity of LeakageBound for game-hopping: if the first pair of computations
has leakage at most ε₁ and the second pair at most ε₂, then the outer pair has
leakage at most ε₁ + ε₂.
ProbLeakFree is reflexive.
ProbLeakFree is symmetric.
LeakageBound with ε = 0 implies ProbLeakFree.
LeakageBound is reflexive with bound 0.
LeakageBound is symmetric.
Monotonicity: a smaller leakage bound implies a larger one.
Compositional Lemmas: Map #
Mapping the result component preserves distributional trace independence.
Mapping the result component preserves approximate trace independence.
Mapping the result component preserves trace noninterference.
Mapping the trace component with the same function preserves distributional trace independence.
Mapping the trace component with the same function preserves approximate trace independence.
Mapping the trace component with the same function preserves trace noninterference.
Compositional Lemmas: Bind #
Trace noninterference is preserved by sequential composition (bind). The continuations may depend on both the result and the trace, but whenever the traces match, the continuations must themselves be trace noninterfering.
Distributional trace independence is preserved by bind when the continuation depends only on the trace (second component).
Approximate trace independence is preserved by bind when the continuation depends only on the trace and produces identical trace distributions.