Documentation

DY.Bytes.AttackerKnowledge

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

Instances For
    Instances
      Instances
        instance DY.AttackerKnowledge.instHasOfHasStep [BytesFunctor] [AttackerKnowledge] {SubF1 SubF2 : Type → Type} (att1 : SubAttackerKnowledge SubF1) (att2 : SubAttackerKnowledge SubF2) [inst1 : HasStep att1 att2] [inst2 : Has att2] :
        Has att1
        def DY.SubAttackerKnowledge.combine [BytesFunctor] {n : Nat} {SubFs : Fin n → Type → Type} (atts : (id : Fin n) → SubAttackerKnowledge (SubFs id)) :
        Equations
        Instances For
          Equations
          Instances For
            Equations
            Instances For
              instance DY.AttackerKnowledge.instHasStepCombineCombine [BytesFunctor] {n : Nat} {SubFs : Fin n → Type → Type} (atts : (id : Fin n) → SubAttackerKnowledge (SubFs id)) (id : Fin n) :

              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.

              Equations
              Instances For
                theorem DY.SubAttackerKnowledge.combine'.implies [BytesFunctor] {n : Nat} {SubF : Type → Type} (atts : Fin n → SubAttackerKnowledge SubF) (p : Bytes → Prop) (pfs : ∀ (id : Fin n), (atts id).Implies p) :
                (combine' atts).Implies p
                theorem DY.SubAttackerKnowledge.combine.implies [BytesFunctor] {n : Nat} {SubFs : Fin n → Type → Type} (atts : (id : Fin n) → SubAttackerKnowledge (SubFs id)) (p : Bytes → Prop) (pfs : ∀ (id : Fin n), (atts id).Implies p) :
                (combine atts).Implies p