@[instance_reducible]
Equations
- DY.KEM.Pk.instFunctorSizeOfSubF = { sizeOf := fun {t : Type} [SizeOf t] (x : DY.KEM.Pk.SubF t) => match x with | { sk := sk } => sizeOf sk }
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
@[instance_reducible]
Instances For
@[instance_reducible]
Instances For
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
Equations
- DY.KEM.kemPkInvert pk = match pk.view? DY.KEM.Pk.SubF with | some { sk := sk } => some sk | none => none
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
Equations
Instances For
Equations
- DY.KEM.attackerKnowledge.internal 0 = DY.KEM.kemPk.attackerKnowledge
- DY.KEM.attackerKnowledge.internal 1 = DY.KEM.kemEncapCipher.attackerKnowledge
- DY.KEM.attackerKnowledge.internal 2 = DY.KEM.kemEncapSS.attackerKnowledge
- DY.KEM.attackerKnowledge.internal 3 = DY.KEM.kemDecap.attackerKnowledge
- DY.KEM.attackerKnowledge.internal ⟨n.succ.succ.succ.succ, isLt⟩ = ⋯.elim
Instances For
theorem
DY.KEM.kemPk.attacker_knows
[BytesFunctor]
[BytesFunctor.Has SubF]
[ExecTraceTypes]
[BaseAttackerKnowledge]
[AttackerKnowledge]
[AttackerKnowledge.Has attackerKnowledge]
(sk : Bytes)
(tr : ExecTrace)
:
sk.AttackerKnows tr → (kemPk sk).AttackerKnows tr
theorem
DY.KEM.kemEncap.attacker_knows
[BytesFunctor]
[BytesFunctor.Has SubF]
[ExecTraceTypes]
[BaseAttackerKnowledge]
[AttackerKnowledge]
[AttackerKnowledge.Has attackerKnowledge]
(pk entropy : Bytes)
(tr : ExecTrace)
:
pk.AttackerKnows tr →
entropy.AttackerKnows tr → (kemEncap pk entropy).fst.AttackerKnows tr ∧ (kemEncap pk entropy).snd.AttackerKnows tr
theorem
DY.KEM.kemDecap.attacker_knows
[BytesFunctor]
[BytesFunctor.Has SubF]
[ExecTraceTypes]
[BaseAttackerKnowledge]
[AttackerKnowledge]
[AttackerKnowledge.Has attackerKnowledge]
(sk cipher : Bytes)
(tr : ExecTrace)
:
sk.AttackerKnows tr →
cipher.AttackerKnows tr →
match kemDecap sk cipher with
| none => True
| some ss => ss.AttackerKnows tr
@[instance_reducible]
Instances For
Equations
Instances For
@[instance_reducible]
Equations
Instances For
Equations
Instances For
def
DY.KEM.Broken.ThisKemPkHasBeenBroken
[BytesFunctor]
[ExecTraceTypes]
[ExecTraceTypes.Has ExecEntryT]
(brokenPk : Bytes)
(tr : ExecTrace)
:
Equations
- DY.KEM.Broken.ThisKemPkHasBeenBroken brokenPk tr = DY.Trace.EventLogged { brokenPk := brokenPk } tr
Instances For
def
DY.KEM.Broken.OneKemPkHasBeenBroken
[BytesFunctor]
[ExecTraceTypes]
[ExecTraceTypes.Has ExecEntryT]
(tr : ExecTrace)
:
Equations
- DY.KEM.Broken.OneKemPkHasBeenBroken tr = ∃ (brokenPk : DY.Bytes), DY.KEM.Broken.ThisKemPkHasBeenBroken brokenPk tr
Instances For
def
DY.KEM.Broken.label
[BytesFunctor]
[ExecTraceTypes]
[ExecTraceTypes.Has ExecEntryT]
(brokenPk : Bytes)
:
Equations
- DY.KEM.Broken.label brokenPk = { isCorrupt := fun (tr : DY.ExecTrace) => DY.KEM.Broken.ThisKemPkHasBeenBroken brokenPk tr, isCorruptLater := ⋯ }
Instances For
def
DY.KEM.Broken.breakKemPk
[BytesFunctor]
[ExecTraceTypes]
[ExecTraceTypes.Has ExecEntryT]
[BytesFunctor.Has SubF]
[ExecTraceTypes.Has Network.ExecEntryT]
(msgHandle : Nat)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
DY.KEM.Broken.breakKemPk.reachability
[BytesFunctor]
[ExecTraceTypes]
[ExecTraceTypes.Has ExecEntryT]
[BytesFunctor.Has SubF]
[ExecTraceTypes.Has Network.ExecEntryT]
:
Equations
- DY.KEM.Broken.breakKemPk.reachability = DY.ReachabilityConfig.make fun (handle : Nat) => DY.KEM.Broken.breakKemPk handle
Instances For
def
DY.KEM.Pk.invariants
[ExecTraceTypes]
[ProofTraceTypes]
[BytesFunctor]
[BytesFunctor.Has KEM.SubF]
[ExecTraceTypes.Has Broken.ExecEntryT]
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem
DY.KEM.kemPk.WellFormed
[ExecTraceTypes]
[ProofTraceTypes]
[BytesFunctor]
[BytesFunctor.Has SubF]
[ExecTraceTypes.Has Broken.ExecEntryT]
[BytesInvariants]
[BytesInvariants.Has Pk.invariants]
(inp : Bytes)
(tr : ProofTrace)
:
@[simp]
theorem
DY.KEM.kemPk.label
[ExecTraceTypes]
[ProofTraceTypes]
[BytesFunctor]
[BytesFunctor.Has SubF]
[ExecTraceTypes.Has Broken.ExecEntryT]
[BytesInvariants]
[BytesInvariants.Has Pk.invariants]
(inp : Bytes)
(tr : ProofTrace)
:
@[simp]
theorem
DY.KEM.kemPk.Invariant
[ExecTraceTypes]
[ProofTraceTypes]
[BytesFunctor]
[BytesFunctor.Has SubF]
[ExecTraceTypes.Has Broken.ExecEntryT]
[BytesInvariants]
[BytesInvariants.Has Pk.invariants]
(sk : Bytes)
(tr : ProofTrace)
:
sk.Invariant tr → (sk.label tr).canFlow (Broken.label (kemPk sk)) (Trace.erase tr) → (kemPk sk).Invariant tr
def
DY.Bytes.KemSkHasUsage
[BytesFunctor]
[BytesFunctor.Has KEM.SubF]
[ExecTraceTypes]
[ProofTraceTypes]
[BytesInvariants]
(pk : Bytes)
(skUsg : Usage)
(tr : ProofTrace)
:
Equations
- pk.KemSkHasUsage skUsg tr = DY.Bytes.XXXHasUsage DY.KEM.extractKemSk✝ pk skUsg tr
Instances For
theorem
DY.Bytes.KemSkHasUsage_kemPk
[BytesFunctor]
[BytesFunctor.Has KEM.SubF]
[ExecTraceTypes]
[ProofTraceTypes]
[BytesInvariants]
(sk : Bytes)
(skUsg : Usage)
(tr : ProofTrace)
:
theorem
DY.Bytes.KemSkHasUsage_later
[BytesFunctor]
[BytesFunctor.Has KEM.SubF]
[ExecTraceTypes]
[ProofTraceTypes]
[BytesInvariants]
[ExecTraceTypes.Has KEM.Broken.ExecEntryT]
[BytesInvariants.Has KEM.Pk.invariants]
[GetUsageLater]
[GetLabelLater]
(b : Bytes)
(usg : Usage)
(tr1 tr2 : ProofTrace)
:
b.WellFormed tr1 → tr1 ≤ tr2 → b.KemSkHasUsage usg tr1 → b.KemSkHasUsage usg tr2
theorem
DY.Bytes.KemSkHasUsage_later_fast
[BytesFunctor]
[BytesFunctor.Has KEM.SubF]
[ExecTraceTypes]
[ProofTraceTypes]
[BytesInvariants]
[BytesInvariantsProofs]
[ExecTraceTypes.Has KEM.Broken.ExecEntryT]
[BytesInvariants.Has KEM.Pk.invariants]
(b : Bytes)
(usg : Usage)
(tr1 tr2 : ProofTrace)
:
b.Invariant tr1 → tr1 ≤ tr2 → b.KemSkHasUsage usg tr1 → b.KemSkHasUsage usg tr2
noncomputable def
DY.Bytes.kemSkLabel
[BytesFunctor]
[BytesFunctor.Has KEM.SubF]
[ExecTraceTypes]
[ProofTraceTypes]
[GetLabel]
(pk : Bytes)
(tr : ProofTrace)
:
Equations
- pk.kemSkLabel tr = DY.Bytes.xxxLabel DY.KEM.extractKemSk✝ pk tr
Instances For
theorem
DY.Bytes.kemSkLabel_kemPk
[BytesFunctor]
[BytesFunctor.Has KEM.SubF]
[ExecTraceTypes]
[ProofTraceTypes]
[BytesInvariants]
[ExecTraceTypes.Has KEM.Broken.ExecEntryT]
[BytesInvariants.Has KEM.Pk.invariants]
(sk : Bytes)
(tr : ProofTrace)
:
theorem
DY.Bytes.kemSkLabel_later
[BytesFunctor]
[BytesFunctor.Has KEM.SubF]
[ExecTraceTypes]
[ProofTraceTypes]
[BytesInvariants]
[ExecTraceTypes.Has KEM.Broken.ExecEntryT]
[BytesInvariants.Has KEM.Pk.invariants]
[GetLabelLater]
(b : Bytes)
(tr1 tr2 : ProofTrace)
:
b.WellFormed tr1 → tr1 ≤ tr2 → b.kemSkLabel tr1 = b.kemSkLabel tr2
theorem
DY.Bytes.kemSkLabel_later_fast
[BytesFunctor]
[BytesFunctor.Has KEM.SubF]
[ExecTraceTypes]
[ProofTraceTypes]
[BytesInvariants]
[BytesInvariantsProofs]
[ExecTraceTypes.Has KEM.Broken.ExecEntryT]
[BytesInvariants.Has KEM.Pk.invariants]
(b : Bytes)
(tr1 tr2 : ProofTrace)
:
b.Invariant tr1 → tr1 ≤ tr2 → b.kemSkLabel tr1 = b.kemSkLabel tr2
def
DY.KEM.Encap.invariants
[ExecTraceTypes]
[ProofTraceTypes]
[BytesFunctor]
[BytesFunctor.Has KEM.SubF]
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
DY.KEM.invariants.internal
[BytesFunctor]
[ExecTraceTypes]
[ProofTraceTypes]
[BytesFunctor.Has SubF]
[ExecTraceTypes.Has Broken.ExecEntryT]
(id✝ : Fin 3)
:
Equations
Instances For
@[instance_reducible]
def
DY.KEM.invariants
[BytesFunctor]
[ExecTraceTypes]
[ProofTraceTypes]
[BytesFunctor.Has SubF]
[ExecTraceTypes.Has Broken.ExecEntryT]
:
Instances For
theorem
DY.KEM.kemEncap.WellFormed
[ExecTraceTypes]
[ProofTraceTypes]
[BytesFunctor]
[BytesFunctor.Has SubF]
[ExecTraceTypes.Has Broken.ExecEntryT]
[BytesInvariants]
[BytesInvariants.Has invariants]
(pk entropy : Bytes)
(tr : ProofTrace)
:
match kemEncap pk entropy with
| (cipher, ss) =>
cipher.WellFormed tr = (pk.WellFormed tr ∧ entropy.WellFormed tr) ∧ ss.WellFormed tr = entropy.WellFormed tr
theorem
DY.KEM.kemEncap.ss_label
[ExecTraceTypes]
[ProofTraceTypes]
[BytesFunctor]
[BytesFunctor.Has SubF]
[ExecTraceTypes.Has Broken.ExecEntryT]
[BytesInvariants]
[BytesInvariants.Has invariants]
(pk entropy : Bytes)
(tr : ProofTrace)
:
theorem
DY.KEM.kemDecap.WellFormed
[ExecTraceTypes]
[ProofTraceTypes]
[BytesFunctor]
[BytesFunctor.Has SubF]
[ExecTraceTypes.Has Broken.ExecEntryT]
[BytesInvariants]
[BytesInvariants.Has invariants]
(sk cipher : Bytes)
(tr : ProofTrace)
:
match kemDecap sk cipher with
| none => True
| some ss => (sk.WellFormed tr ∧ ss.WellFormed tr) = cipher.WellFormed tr
instance
DY.KEM.kemPk_hoareTriple
[ExecTraceTypes]
[ProofTraceTypes]
[BytesFunctor]
[BytesFunctor.Has SubF]
[ExecTraceTypes.Has Broken.ExecEntryT]
[BytesInvariants]
[BytesInvariants.Has invariants]
(sk : Bytes)
:
HoareTriplePure (kemPk sk)
(fun (tr : ProofTrace) => sk.Invariant tr ∧ (sk.label tr).canFlow (Broken.label (kemPk sk)) (Trace.erase tr))
fun (res : Bytes) (tr : ProofTrace) => res.Invariant tr ∧ res.label tr = Label.pub
instance
DY.KEM.kemEncap_hoareTriple
[ExecTraceTypes]
[ProofTraceTypes]
[BytesFunctor]
[BytesFunctor.Has SubF]
[ExecTraceTypes.Has Broken.ExecEntryT]
[BytesInvariants]
[BytesInvariants.Has invariants]
(pk entropy : Bytes)
:
HoareTriplePure (kemEncap pk entropy)
(fun (tr : ProofTrace) =>
pk.Invariant tr ∧ entropy.Invariant tr ∧ (entropy.label tr).canFlow (pk.kemSkLabel tr) (Trace.erase tr))
fun (x : Bytes × Bytes) (tr : ProofTrace) =>
match x with
| (cipher, ss) => cipher.Publishable tr ∧ ss.Invariant tr ∧ ss.label tr = entropy.label tr
instance
DY.KEM.kemDecap_hoareTriple
[ExecTraceTypes]
[ProofTraceTypes]
[BytesFunctor]
[BytesFunctor.Has SubF]
[ExecTraceTypes.Has Broken.ExecEntryT]
[BytesInvariants]
[BytesInvariants.Has invariants]
[TraceInvariant]
(sk cipher : Bytes)
:
HoareTriple (kemDecap sk cipher) (fun (tr : ProofTrace) => sk.Invariant tr ∧ cipher.Invariant tr)
fun (ss : Bytes) (tr : ProofTrace) =>
kemDecap sk cipher = some ss ∧ ss.Invariant tr ∧ (ss.label tr).canFlow (sk.label tr) (Trace.erase tr)
@[instance_reducible]
instance
DY.KEM.Broken.instEventInvBrokenKemEvent
[BytesFunctor]
[ExecTraceTypes]
[ProofTraceTypes]
:
Equations
- DY.KEM.Broken.instEventInvBrokenKemEvent = { invariant := fun (x : DY.ProofTrace) (x_1 : DY.KEM.Broken.BrokenKemEvent) => True }
Equations
Instances For
@[instance_reducible]
Instances For
instance
DY.KEM.Broken.instReachableImpliesInvariantReachability
[BytesFunctor]
[ExecTraceTypes]
[ProofTraceTypes]
[TraceInvariant]
[BytesInvariants]
[BytesFunctor.Has SubF]
[ExecTraceTypes.Has ExecEntryT]
[BytesInvariants.Has invariants]
[BytesInvariantsProofs]
[ExecTraceTypes.Has Network.ExecEntryT]
[ProofTraceTypes.Has ProofEntryT]
[ProofTraceTypes.Has Network.ProofEntryT]
[TraceInvariant.Has Network.ProofEntryT]
[TraceInvariant.Has ProofEntryT]
: