BACAP positions: a capability bound to one box on its stream #
A cap paired with an index from another stream addresses a box nobody writes to. A position
carries a proof Reaches cap.messageBoxIndex index that rules this out.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The ratchet as an iterate #
One ratchet step under BLAKE2b-512.
Equations
Instances For
Streams #
Why a BACAP operation refused its input. openFailed covers both a bad signature and an
AEAD failure.
- indexNotInChannel : BACAPError
- indexTooFar : BACAPError
- emptyBox : BACAPError
- boxMismatch : BACAPError
- openFailed : BACAPError
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
idx with a proof it is on the stream from start, or why not.
Equations
- One or more equations did not get rendered due to their size.
Instances For
checkReaches accepts exactly the indices a bounded number of ratchet steps on.
Contains #
.ok () if the ratchet reaches idx from the cap's index within maxContainsWalk steps.
Equations
- rc.contains idx = Except.map (fun (x : PLift (Cryptlib.Protocols.BACAP.Types.Reaches rc.messageBoxIndex idx)) => ()) (Cryptlib.Protocols.BACAP.Types.checkReaches rc.messageBoxIndex idx)
Instances For
See ReadCap.contains.
Instances For
contains accepts idx iff idx is the cap's index ratcheted at most maxContainsWalk
times.
contains_ok_iff, phrased with advanceIndexTo.
Opening a box #
The all-zero box ID, which a reply carries when the box was empty.
Equations
Instances For
Check the box is the one rc and this index derive under ctx, then verify and decrypt.
The check rejects a tombstone signed for another box.
Equations
- One or more equations did not get rendered due to their size.
Instances For
openForContext only succeeds for the box the cap and index derive.
An encrypted box opens to its plaintext at its own index, unless its box ID is all zeros.
A tombstone opens as empty at its own box, unless that box ID is all zeros.
Positions #
A read cap and one box on its stream.
- cap : ReadCap
- index : MessageBoxIndex
- onStream : Reaches self.cap.messageBoxIndex self.index
Instances For
A write cap and one box on its stream.
- cap : WriteCap
- index : MessageBoxIndex
- onStream : Reaches self.cap.messageBoxIndex self.index
Instances For
The position of the cap's own index.
Equations
- rc.start = { cap := rc, index := rc.messageBoxIndex, onStream := ⋯ }
Instances For
The position of the cap's own index.
Equations
- wc.start = { cap := wc, index := wc.messageBoxIndex, onStream := ⋯ }
Instances For
The position of idx, after checking it is on this cap's stream.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The position of idx, after checking it is on this cap's stream.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The next box, or none at the end of the index space.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The box at target, or none if that is behind this one.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The next box, or none at the end of the index space.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The box at target, or none if that is behind this one.
Equations
- One or more equations did not get rendered due to their size.
Instances For
next moves a position exactly as nextIndex moves its index.
advanceTo moves a position exactly as advanceIndexTo moves its index.
The read position of the same box.
Instances For
Equations
- p.boxID ctx = p.index.boxIDForContext p.cap ctx
Instances For
Instances For
Verify and decrypt the box at this position. See MessageBoxIndex.openForContext.
Equations
- p.open ctx box ciphertext sig = p.index.openForContext p.cap ctx box ciphertext sig
Instances For
Returns (box ID, ciphertext, signature).
Equations
- p.encrypt ctx plaintext = p.index.encryptForContext p.cap ctx plaintext
Instances For
Sign the empty payload for this box; returns (box ID, signature).
Instances For
A write position's tombstone opens as empty at its own read position.
Every position addresses a box on its cap's stream.
Serialization: the cap's bytes followed by the index's #
Decode a position, checking its index is on its cap's stream.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Decode a position, checking its index is on its cap's stream.
Equations
- One or more equations did not get rendered due to their size.