- traceExec5 : ExecTraceTypes.Has (LongTermKeys.ExecEntryT "Ratchet PKI")
- traceProof : ProofTraceTypes
- traceProof0 : ProofTraceTypes.Has Network.ProofEntryT
- traceProof1 : ProofTraceTypes.Has Random.ProofEntryT
- traceProof2 : ProofTraceTypes.Has (ProtocolEvent.ProofEntryT RatchetEvent)
- traceProof5 : ProofTraceTypes.Has (LongTermKeys.ProofEntryT "Ratchet PKI")
Instances
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
DY.Example.Ratchet.computeTranscriptHash_neq_initialTranscriptHash
[HasProofTrace]
(previousTxHash : Bytes)
(elem : TranscriptElement)
:
theorem
DY.Example.Ratchet.computeTranscriptHash_inj
[HasProofTrace]
(previousTxHash1 : Bytes)
(elem1 : TranscriptElement)
(previousTxHash2 : Bytes)
(elem2 : TranscriptElement)
:
computeTranscriptHash previousTxHash1 elem1 = computeTranscriptHash previousTxHash2 elem2 →
previousTxHash1 = previousTxHash2 ∧ elem1 = elem2
Equations
- DY.Example.Ratchet.stateLabel me transcript = { isCorrupt := fun (tr : DY.ExecTrace) => DY.Example.Ratchet.StateCompromised me transcript tr, isCorruptLater := ⋯ }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
DY.Example.Ratchet.stateTxHashLabel_eq
[HasProofTrace]
(transcript : Transcript)
(h : 2 ≤ List.length transcript)
:
stateTxHashLabel (transcriptToHash transcript) = (stateLabel transcript[0].recipient transcript).join (stateLabel transcript[1].recipient transcript)
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
- DY.Example.Ratchet.isKeyMyTurn [] k = (k = DY.Example.Ratchet.firstKey)
- DY.Example.Ratchet.isKeyMyTurn [head] k = (k = DY.Example.Ratchet.firstKey)
Instances For
Equations
- One or more equations did not get rendered due to their size.
- DY.Example.Ratchet.isKeyOtherTurn [] k = (k = DY.Example.Ratchet.firstKey)
- DY.Example.Ratchet.isKeyOtherTurn [head] k = (k = DY.Example.Ratchet.firstKey)
Instances For
theorem
DY.Example.Ratchet.isKeyMyTurn_isKeyOtherTurn
[HasProofTrace]
(l : Transcript)
(k1 k2 : Bytes)
:
isKeyMyTurn l k1 → isKeyOtherTurn l k2 → k1 = k2
Equations
- DY.Example.Ratchet.labelBeforeTimestamp l i = { isCorrupt := fun (tr : DY.ExecTrace) => l.isCorrupt (DY.Trace.prefix tr i), isCorruptLater := ⋯ }
Instances For
def
DY.Example.Ratchet.labelBeforeEvent
[HasProofTrace]
(l : Label)
(me other : Participant)
(transcript : Transcript)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
DY.Example.Ratchet.labelBeforeEvent_canFlow_labelBeforeTimestamp
[HasProofTrace]
(l : Label)
(me other : Participant)
(transcript : Transcript)
(i : Nat)
(tr : ExecTrace)
:
i ≤ Trace.length tr →
(∃ (k : Bytes), Trace.EventLogged (RatchetEvent.ReceiveUpdate me other transcript k) (Trace.prefix tr i)) →
(∀ (i' : Nat),
i' < i →
¬∃ (k : Bytes), Trace.EventLogged (RatchetEvent.ReceiveUpdate me other transcript k) (Trace.prefix tr i')) →
(labelBeforeEvent l me other transcript).canFlow (labelBeforeTimestamp l (i - 1)) tr
@[irreducible]
Equations
- DY.Example.Ratchet.minimum.aux p i1 i2 = if h : i1 ≥ i2 ∨ p i1 then i1 else DY.Example.Ratchet.minimum.aux p (i1 + 1) i2
Instances For
theorem
DY.Example.Ratchet.event_minimum_prefix
[HasProofTrace]
{EventT : Type}
[ExecTraceTypes.Has (ProtocolEvent.ExecEntryT EventT)]
(pred : EventT → Prop)
(tr : ExecTrace)
:
(∃ (ev : EventT), pred ev ∧ Trace.EventLogged ev tr) →
∃ (i : Nat), ∃ (ev' : EventT), pred ev' ∧ Trace.EventLoggedAt ev' i tr ∧ Trace.EventLogged ev' (Trace.prefix tr (i + 1)) ∧ ∀ (i' : Nat) (ev'' : EventT), i' ≤ i → pred ev'' → ¬Trace.EventLogged ev'' (Trace.prefix tr i')
Equations
- DY.Example.Ratchet.ltkLabel p = { isCorrupt := fun (tr : DY.ExecTrace) => ∃ (spk : DY.Bytes), DY.LongTermKeys.LongTermKeyCompromised "Ratchet PKI" p spk tr, isCorruptLater := ⋯ }
Instances For
def
DY.Example.Ratchet.keyLabelMyTurn
[HasProofTrace]
(me other : Participant)
(transcript : Transcript)
:
Equations
- One or more equations did not get rendered due to their size.
- DY.Example.Ratchet.keyLabelMyTurn me other [] = DY.Label.pub
- DY.Example.Ratchet.keyLabelMyTurn me other [head] = DY.Label.pub
Instances For
def
DY.Example.Ratchet.keyLabelOtherTurn
[HasProofTrace]
(me other : Participant)
(transcript : Transcript)
:
Equations
- One or more equations did not get rendered due to their size.
- DY.Example.Ratchet.keyLabelOtherTurn me other [] = DY.Label.pub
- DY.Example.Ratchet.keyLabelOtherTurn me other [head] = DY.Label.pub
Instances For
theorem
DY.Example.Ratchet.keyLabelMyTurn_shortTranscript
[HasProofTrace]
(me other : Participant)
(transcript : Transcript)
:
List.length transcript ≤ 1 → keyLabelMyTurn me other transcript = Label.pub
theorem
DY.Example.Ratchet.keyLabelOtherTurn_shortTranscript
[HasProofTrace]
(me other : Participant)
(transcript : Transcript)
:
List.length transcript ≤ 1 → keyLabelOtherTurn me other transcript = Label.pub
theorem
DY.Example.Ratchet.keyLabelMyTurn_eq
[HasProofTrace]
(me other : Participant)
(transcript : Transcript)
:
2 ≤ List.length transcript →
keyLabelMyTurn me other transcript = ((stateLabel me transcript).join (stateLabel other transcript)).join
((keyLabelOtherTurn me other (List.tail transcript)).meet
((stateLabel me (List.tail transcript)).join
((stateLabel other transcript).join (labelBeforeEvent (ltkLabel other) me other transcript))))
theorem
DY.Example.Ratchet.keyLabelOtherTurn_eq
[HasProofTrace]
(me other : Participant)
(transcript : Transcript)
:
2 ≤ List.length transcript →
keyLabelOtherTurn me other transcript = ((stateLabel me transcript).join (stateLabel other transcript)).join
((keyLabelMyTurn me other (List.tail transcript)).meet
((stateLabel me transcript).join
((stateLabel other (List.tail transcript)).join
(labelBeforeEvent (ltkLabel other) me other (List.tail transcript)))))
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
Equations
- DY.Example.Ratchet.mkLongTermKeyUsage me = { type := "SigKey", tag := "Ratchet PKI", data := some (DY.Comparse.serialize { principal := me }) }
Instances For
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
- traceExec5 : ExecTraceTypes.Has (LongTermKeys.ExecEntryT "Ratchet PKI")
- traceProof5 : ProofTraceTypes.Has (LongTermKeys.ProofEntryT "Ratchet PKI")
- bytesInv : BytesInvariants
- bytesInvProof : BytesInvariantsProofs
- bytesInv0 : BytesInvariants.Has Random.invariants
- bytesInv1 : BytesInvariants.Has Literal.invariants
- bytesInv2 : BytesInvariants.Has Concat.invariants
- bytesInv3 : BytesInvariants.Has Hash.invariants
- bytesInv4 : BytesInvariants.Has Signature.invariants
- bytesInv5 : BytesInvariants.Has DiffieHellman.invariants
- bytesInv6 : BytesInvariants.Has KdfExtract.invariants
- bytesInv7 : BytesInvariants.Has KdfExpand.invariants
Instances
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
theorem
DY.Example.Ratchet.StateMyTurnInv_imp_Invariant
[HasBytesInvariants]
{tr : ProofTrace}
(participant : Participant)
(st : StateMyTurn)
:
@[instance_reducible]
Equations
- One or more equations did not get rendered due to their size.
theorem
DY.Example.Ratchet.StateOtherTurnInv_imp_Invariant
[HasBytesInvariants]
{tr : ProofTrace}
(participant : Participant)
(st : StateOtherTurn)
:
@[instance_reducible]
instance
DY.Example.Ratchet.instProofConfigMkLongTermKeyUsageLabel
[HasBytesInvariants]
:
LongTermKeys.ProofConfig "Ratchet PKI" mkLongTermKeyUsage (LongTermKeys.label "Ratchet PKI")
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.
- traceExec5 : ExecTraceTypes.Has (LongTermKeys.ExecEntryT "Ratchet PKI")
- traceProof5 : ProofTraceTypes.Has (LongTermKeys.ProofEntryT "Ratchet PKI")
- traceInv : TraceInvariant
- traceInv0 : TraceInvariant.Has Network.ProofEntryT
- traceInv1 : TraceInvariant.Has Random.ProofEntryT
- traceInv2 : TraceInvariant.Has (ProtocolEvent.ProofEntryT RatchetEvent)
- traceInv5 : TraceInvariant.Has (LongTermKeys.ProofEntryT "Ratchet PKI")
- attBaseThm : BaseAttackerKnowledgeTheorem
- attThm : AttackerKnowledgeTheorem
Instances
instance
DY.Example.Ratchet.initialTranscriptHash.spec
[HasTraceInvariant]
:
HoareTriplePure initialTranscriptHash (fun (x : ProofTrace) => True) fun (res : Bytes) (tr : ProofTrace) =>
res.Publishable tr
instance
DY.Example.Ratchet.computeTranscriptHash.spec
[HasTraceInvariant]
(previousTranscriptHash : Bytes)
(elem : TranscriptElement)
:
HoareTriplePure (computeTranscriptHash previousTranscriptHash elem)
(fun (tr : ProofTrace) => previousTranscriptHash.Publishable tr ∧ elem.dhPk.Publishable tr)
fun (res : Bytes) (tr : ProofTrace) => res.Publishable tr
instance
DY.Example.Ratchet.firstKey.spec
[HasTraceInvariant]
:
HoareTriplePure firstKey (fun (x : ProofTrace) => True) fun (res : Bytes) (tr : ProofTrace) => res.Publishable tr
instance
DY.Example.Ratchet.initiate.spec
[HasTraceInvariant]
(me other : Participant)
(mySigKeyHandle : Nat)
:
HoareTriple (initiate me other mySigKeyHandle) (fun (x : ProofTrace) => True) fun (x : Nat × Nat) (x_1 : ProofTrace) =>
True
instance
DY.Example.Ratchet.processInitiate.spec
[HasTraceInvariant]
(me other : Participant)
(otherVerifKeyHandle msgHandle : Nat)
:
HoareTriple (processInitiate me other otherVerifKeyHandle msgHandle) (fun (x : ProofTrace) => True)
fun (x : Nat) (x_1 : ProofTrace) => True
instance
DY.Example.Ratchet.sendUpdate.spec
[HasTraceInvariant]
(me : Participant)
(mySigKeyHandle stHandle : Nat)
:
HoareTriple (sendUpdate me mySigKeyHandle stHandle) (fun (x : ProofTrace) => True)
fun (x : Nat × Nat) (x_1 : ProofTrace) => True
theorem
DY.Example.Ratchet.eventLogged_receiveUpdate_dhPk_label
[HasTraceInvariant]
(me recipient : Participant)
(transcript : Transcript)
(k : Bytes)
(tr : ProofTrace)
(h_transcript : 2 ≤ List.length transcript)
:
Trace.Invariant tr →
Trace.EventLogged (RatchetEvent.ReceiveUpdate me recipient transcript k) (Trace.erase tr) →
((stateLabel recipient transcript).join (labelBeforeEvent (ltkLabel recipient) me recipient transcript)).canFlow
((List.head transcript ⋯).dhPk.dhSkLabel tr) (Trace.erase tr)
theorem
DY.Example.Ratchet.eventLogged_receiveUpdate_key_label
[HasTraceInvariant]
(me recipient : Participant)
(transcript : Transcript)
(k : Bytes)
(tr : ProofTrace)
:
2 ≤ List.length transcript →
Trace.Invariant tr →
Trace.EventLogged (RatchetEvent.ReceiveUpdate me recipient transcript k) (Trace.erase tr) →
(keyLabelMyTurn me recipient transcript).canFlow (k.label tr) (Trace.erase tr)
instance
DY.Example.Ratchet.processUpdate.spec
[HasTraceInvariant]
(me : Participant)
(otherVerifKeyHandle stHandle msgHandle : Nat)
:
HoareTriple (processUpdate me otherVerifKeyHandle stHandle msgHandle) (fun (x : ProofTrace) => True)
fun (x : Nat) (x_1 : ProofTrace) => True
instance
DY.Example.Ratchet.StateMyTurn.compromise.spec
[HasTraceInvariant]
(stHandle : Nat)
:
HoareTriple (compromise stHandle) (fun (x : ProofTrace) => True) fun (x : Nat) (x_1 : ProofTrace) => True
instance
DY.Example.Ratchet.StateOtherTurn.compromise.spec
[HasTraceInvariant]
(stHandle : Nat)
:
HoareTriple (compromise stHandle) (fun (x : ProofTrace) => True) fun (x : Nat) (x_1 : ProofTrace) => True