The attacker knowledge is ultimately defined as a 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.
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_isMonotonic : Fixpoint.IsMonotonic self.pred
Instances For
- attackerKnowledge : SubAttackerKnowledge BytesF
Instances
Instances
Instances
Equations
- DY.SubAttackerKnowledge.combine atts = { pred := DY.Fixpoint.combine fun (id : Fin n) => (atts id).pred, pred_isMonotonic := ⋯ }
Instances For
Equations
- DY.SubAttackerKnowledge.combine' atts = { pred := DY.Fixpoint.combine fun (id : Fin n) => (atts id).pred, pred_isMonotonic := ⋯ }
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.