Momentary-corruption bookkeeping #
MomentaryCorruption tracks compromise flags and refresh counters for identities
in an arbitrary type M. The deterministic updates have the following effects:
compromise msetscorrupted mand marks the current epoch ofmincompromised.refresh mclearscorrupted mand incrementsepoch m. It preserves the entirecompromisedfunction, including any flags for future epochs supplied in the input state.
react returns these updates through pure, and model M m bundles them as a
CorruptionModel m. OpenProcess.withMomentaryCorruption pairs an open process
with this reaction on a separate bookkeeping state. Connecting events to
protocol-state observations, secret updates, or execution scheduling requires
consumer-supplied semantics. The definitions and equations here establish no
post-compromise security or leakage guarantee.
Identity and universes #
The alphabet, state, and process types accept any M : Type; the updates and
canonical reaction require [DecidableEq M]. Pair identities can be supplied as
M := Sid × Pid. No session structure is used by the updates.
The identity and bookkeeping types live in Type 0, matching the input
universe of m : Type → Type w' in CorruptionModel. The process-state universe
v and the monad-output universe w' remain independent.
References #
CJSV22, Universally Composable End-to-End Secure Messaging, motivates the
compromise/refresh vocabulary; see REFERENCES.md. Its protocol-specific
recovery arguments require secret-state semantics and key evolution beyond the
bookkeeping implemented here.
Alphabet and epoch #
Events selecting the compromise or refresh update for an identity.
Their interpretation on bookkeeping state is given by react.
- compromise {M : Type} (m : M) : Alphabet M
Mark the current epoch of
mas compromised. - refresh {M : Type} (m : M) : Alphabet M
Advance the epoch counter of
mand clear its current corruption flag.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
The machine targeted by an event.
Equations
Instances For
The natural-number counter advanced by each refresh of an identity.
Equations
Instances For
Bookkeeping state #
Flags and counters carried between events.
corrupted mis set bycompromise mand cleared byrefresh m.compromised m erecords a flag for identitymat epoche. Compromise marks the current epoch, and both updates preserve previously set flags.epoch mis incremented byrefresh m.
The structure admits arbitrary field values. Relating the flags to an event
history requires a reachability invariant from State.init; relating them to
an observer's knowledge requires a separate semantic interpretation.
- corrupted : M → Bool
Current corruption flag, set by
compromiseand cleared byrefresh. Per-(identity, epoch) compromise flag, preserved by both updates once true.
- epoch : M → Epoch
Per-machine refresh counter, advanced by
refresh.
Instances For
The initial bookkeeping state: all flags false and every epoch counter 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.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Clear corrupted m and advance the epoch counter of m by one.
The entire compromised function is preserved, regardless of the recorded
epochs. Subsequent compromise events mark the new current epoch.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compromise preserves every flag that was already set, for any identity and epoch.
Refresh preserves all compromise flags.
Reaction and bundled model #
Return the deterministic bookkeeping update selected by an event through pure.
Any [Pure m] suffices; m := Id gives the underlying state update.
Equations
- Interaction.Open.MomentaryCorruption.react (Interaction.Open.MomentaryCorruption.Alphabet.compromise m_1) cs = pure (Interaction.Open.MomentaryCorruption.State.applyCompromise m_1 cs)
- Interaction.Open.MomentaryCorruption.react (Interaction.Open.MomentaryCorruption.Alphabet.refresh m_1) cs = pure (Interaction.Open.MomentaryCorruption.State.applyRefresh m_1 cs)
Instances For
The canonical momentary-corruption EnvAction.
Equations
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.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Canonical corruption-aware open process #
Open processes over M paired with a reaction on Alphabet M and State M.
Each value supplies its reaction; OpenProcess.withMomentaryCorruption
supplies the canonical envAction.
The type requires only [Pure m]. Constructing the canonical reaction
additionally requires [DecidableEq M].
Equations
Instances For
Pair an open process with MomentaryCorruption.envAction on a separate
MomentaryCorruption.State M. The underlying process is preserved
definitionally; events update only the bookkeeping state passed to react.
Equations
- P.withMomentaryCorruption = { process := P, envAction := Interaction.Open.MomentaryCorruption.envAction }