Momentary corruption: the CJSV22 corruption model #
This file ships the momentary corruption model: the canonical
adaptive corruption model with refresh-based healing introduced in
Canetti, Jain, Swanberg, Varia, Universally Composable End-to-End
Secure Messaging (CRYPTO 2022, §3.2). All names live under the
MomentaryCorruption.* namespace so it is unambiguous which
model (in the sense of CorruptionModel) is in scope.
The model captures:
- Adaptive compromise. The environment may issue
compromise(m)for any machinemat any time, markingm's current epoch as compromised in the adversary's view. - Refresh-based healing. A subsequent
refresh(m)advancesm's epoch counter and clears the currentcorruptedsnapshot flag; future epochs are not (yet) compromised. This is the structural ingredient that lets the framework derive post-compromise security as a healing theorem rather than as an axiom.
The bundled value MomentaryCorruption.model Sid Pid is a
CorruptionModel whose Event is Alphabet Sid Pid and whose
State is State Sid Pid (the two-flag plus epoch tracking).
Contents #
Alphabet Sid Pid— inductive event alphabetcompromise(m) | refresh(m), indexed byMachineId Sid Pid.Epoch— the per-machine refresh counter (aℕabbrev).State Sid Pid— two-flag corruption tracking (corrupted,compromised) plus the per-machineepochcounter.State.applyCompromise/State.applyRefresh— the canonical deterministic updates triggered by alphabet events.react— theAlphabet → State → ProbComp Statereaction driving the model'sEnvAction.envAction— the canonicalEnvAction Alphabet Statefor the model.model Sid Pid— the bundledCorruptionModelvalue.Process Sid Pid Δ— the corruption-aware open-process abbreviation:EnvOpenProcessof aMachineProcesswith this model's env channel.MachineProcess.withMomentaryCorruption— the standard wrapping that turns aMachineProcessinto aProcess.
Universe constraint #
Sid and Pid live in Type (i.e. Type 0) because State
participates in ProbComp-valued reactions and
ProbComp : Type → Type. Concrete protocol identity types
(ℕ, String, etc.) all satisfy this bound. The two OpenProcess
universes (v, w) are exposed.
Additive design #
The model is standalone: nothing here is threaded into
OpenNodeProfile. Existing OpenProcess constructions are
untouched. The corruption-aware composition operators (par / wire /
plug lifted from OpenTheory) and the four *.corrupt forwarding
lemmas (CJSV22 §4.2) live in a downstream layer that consumes
Process and the model's bundled envAction; this file ships only
the data and the per-event reactions.
Decidability #
All comparisons are over MachineId (which derives DecidableEq
from [DecidableEq Sid] [DecidableEq Pid]) and over Epoch = ℕ.
The deterministic state updates require [DecidableEq Sid] [DecidableEq Pid]; the alphabet, state, and process types
themselves do not.
Alphabet and epoch #
The momentary-corruption event alphabet.
compromise msnapshots the current state of machineminto the adversary's view: a leakage observer (declared separately, e.g. viaSnapshotLeakable) fires, and the current epoch ofmis marked compromised in the bookkeeping state.refresh madvances the epoch counter formand clears the current snapshot flag. After a refresh, future epochs ofmare not (yet) compromised; the protocol's forward-secrecy mechanism gets a chance to heal.
The pair (compromise, refresh) is what makes corruption
momentary (rather than persistent): at any point the environment
may compromise a machine, and a subsequent refresh recovers
post-compromise security for future epochs.
- compromise
{Sid Pid : Type}
(m : MachineId Sid Pid)
: Alphabet Sid Pid
Snapshot the current state of
minto the adversary's view. - refresh
{Sid Pid : Type}
(m : MachineId Sid Pid)
: Alphabet Sid Pid
Advance the epoch counter of
m, enabling forward healing.
Instances For
Instances For
The machine targeted by an event.
Instances For
Epoch indexes the per-machine refresh cycles.
A flat ℕ is the simplest concrete choice: refresh counts as
epoch m += 1. Richer protocols (e.g. Signal's asymmetric ratchet
with separate sending and receiving counters) can wrap this in
their own Epoch-isomorphic type; the model only requires
DecidableEq and a way to advance.
Instances For
Bookkeeping state #
State Sid Pid packages the two-flag corruption tracking that the
model carries between events.
corrupted m = trueiff the current state ofmhas been snapshotted by the adversary at least once and not refreshed since. Mutated bycompromise m(setstrue) andrefresh m(setsfalse).compromised m e = trueiff the secrets for epocheofmare in the adversary's view. Strictly accumulating: a compromise event setscompromised m (current_epoch m); epochs once compromised stay compromised forever.epoch mism's current refresh counter. Mutated byrefresh m(increments by one).
The two flags corrupted and compromised are deliberately
independent:
corrupted mmay befalsewhilecompromised m eholds for some paste: the adversary saw that epoch's secret, but the machine has since refreshed and now has a fresh secret.corrupted mmay betruewhilecompromised m e'isfalsefor some futuree': a forward-secret key schedule may forward-decrypt only a bounded window from a current compromise.
Two flags, two distinct purposes. The naming deliberately avoids
the ambiguous "exposed", which would collide with OpenTheory's
boundary-exposure terminology.
Per-machine snapshot flag, mutated by
compromiseandrefresh.Per-(machine, epoch) leak flag, monotonically accumulating.
Per-machine refresh counter, advanced by
refresh.
Instances For
The fully-honest initial state: nothing corrupted, nothing compromised, every machine at epoch zero.
Instances For
Apply compromise m to the bookkeeping state: set corrupted m
and mark the current epoch of m as compromised. The epoch counter
is not advanced.
This is a deterministic update, so the value lives in the
underlying State; the canonical EnvAction reaction wraps it
via pure.
Instances For
Apply refresh m to the bookkeeping state: clear corrupted m
and advance the epoch counter of m by one. Past compromised
flags are preserved (they are historical and accumulate).
After a refresh, future events on m write into the new epoch;
this is the structural ingredient that lets the model derive PCS
(post-compromise security) as a healing theorem rather than as an
axiom.
Instances For
compromise is monotone: once an epoch is in the adversary's view,
it stays in the adversary's view. This is the structural fact that
makes PCS (post-compromise security) about future epochs rather
than about un-leaking past ones.
refresh preserves all past compromise flags.
Reaction and bundled model #
The canonical EnvAction reaction for the momentary-corruption
alphabet: compromise snapshots, refresh advances the epoch.
This is the baseline used by every protocol that opts in to
momentary corruption. Protocols that need richer per-event
behaviour (e.g. simulator-controlled randomization on compromise,
or a non-trivial leakage function) build their own EnvAction
rather than overriding individual branches here.
Instances For
The canonical momentary-corruption EnvAction.
Instances For
The momentary-corruption model bundled as a CorruptionModel.
Use this when you want to talk about the model abstractly through
the CorruptionModel API — for instance, when stating a lemma
that is generic over corruption models but instantiated to the
momentary case at a use site.
Instances For
Canonical corruption-aware open process #
Process Sid Pid Δ is the canonical open process for the
momentary-corruption model: a MachineProcess Sid Pid Δ paired
with this model's env channel.
Type-level definition does not depend on [DecidableEq Sid] [DecidableEq Pid]; the typeclass requirements only appear when one
constructs the env action's reaction (e.g. via
MachineProcess.withMomentaryCorruption).
Instances For
Wrap a MachineProcess Sid Pid Δ with the canonical
momentary-corruption env channel, yielding a
MomentaryCorruption.Process.
This is the standard inhabitant: compromise(m) snapshots
m's current epoch into the adversary's view (sets corrupted m
and compromised m (epoch m)), and refresh(m) advances m's
epoch counter and clears corrupted m.
Protocols that need richer per-event behaviour (e.g.
simulator-controlled randomization on compromise, or a
non-trivial leakage function that depends on the protocol state)
build their EnvOpenProcess directly with a bespoke EnvAction
rather than going through this wrapping.