The attacker knowledge is ultimately defined as a Kleene fixpoint,
and SubAttackerKnowledge is a component of this fixpoint computation.
For example, to say that the attacker is allowed to concatenate bytes, we can write:
-- attacker knows out when
pred p out :=
∃ lhs rhs,
-- out is the concatenation of lhs and rhs and
out = concat lhs rhs ∧
p lhs ∧ -- the attacker knows lhs and
p rhs -- the attacker knows rhs.
To prove the scott-continuity of pred (a technical requirement for Kleene fixpoint)
it is better to use the Forall predicate like this:
pred p out := ∃ lhs rhs, out = concat lhs rhs ∧ DY.Kleene.Forall p [lhs, rhs]
This allows to rely on the lemma DY.Kleene.isScottContinuous_Forall_lemma,
and allow for pred_isScottContinuous to be proved automatically by our tactic script.
The SubF parameter is not useful in this definition.
It is only for hygiene, to make sure we don't miss equational theories
by using SubAttackerKnowledge.combine
- pred_isScottContinuous : Kleene.IsScottContinuous self.pred
Instances For
- attackerKnowledge : SubAttackerKnowledge BytesF
Instances
Instances
Instances
Equations
- DY.SubAttackerKnowledge.combine atts = { pred := DY.Kleene.combine fun (id : t) => (atts id).pred, pred_isScottContinuous := ⋯ }
Instances For
Equations
- DY.SubAttackerKnowledge.combine' atts = { pred := DY.Kleene.combine fun (id : t) => (atts id).pred, pred_isScottContinuous := ⋯ }
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Main theorem to prove that the attacker knows some particular value
The attacker knowledge AttackerKnows is the weakest predicate P such that every sub-attacker knowledge predicate att,
att.pred P b
implies
P b
The attacker knowledge satisfies this property: this is the theorem by Bytes.AttackerKnows.prove
The attacker knowledge is the weakest predicate: this is the theorem Bytes.AttackerKnows.is_least_fixpoint.
In other words, if a predicate P has this property, then Bytes.AttackerKnows b => P b
We can use SubAttackerKnowledge.Implies to modularly prove that a predicate P satisfy this property.