Pigeonhole replica #
A replica stores, per box ID (a public key), a payload and a signature over it under that key.
Requests are handled by the state machine step:
- Write: the payload must be
boxSizebytes, verify under the box ID, and the box must be free. - Tombstone (empty payload): must verify over the empty payload; replaces the box.
- Read: returns the stored entry, with a distinct code for a tombstone.
Not modelled: storage failures, read repair, epochs.
A stored payload and its signature. An empty payload is a tombstone.
Instances For
Equations
Instances For
Equations
Instances For
A request as the replica receives it, after MKEM decryption.
- write {Sg : Primitives.Sign.Sign.Signature} (id : Sg.PublicKey) (payload : ByteArray) (sig : Sg.Sig) : Request Sg
- read {Sg : Primitives.Sign.Sign.Signature} (id : Sg.PublicKey) : Request Sg
Instances For
- writeReply {Sg : Primitives.Sign.Sign.Signature} (code : Code) : Reply Sg
- readReply {Sg : Primitives.Sign.Sign.Signature} (code : Code) (entry : Option (Entry Sg)) : Reply Sg
Instances For
Handle one request. boxSize is the required payload length.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Every stored box verifies under its own ID.
Equations
Instances For
Every request preserves Valid.
Run a list of requests in order.
Equations
- Cryptlib.Protocols.Pigeonhole.Replica.run boxSize x✝ [] = x✝
- Cryptlib.Protocols.Pigeonhole.Replica.run boxSize x✝ (r :: rs) = Cryptlib.Protocols.Pigeonhole.Replica.run boxSize (Cryptlib.Protocols.Pigeonhole.Replica.step boxSize x✝ r).fst rs
Instances For
An accepted write's signature verifies under the box ID.
A write leaves the store unchanged, or stores a verified entry under its box ID.
A well-formed, correctly signed write to a free box is accepted and stores the box.
A non-empty write to an existing box is refused and changes nothing.
A read leaves the store unchanged and returns the stored entry.
Reading a box just written returns what was written.
A signed tombstone replaces the box; a read then reports a tombstone.
A request that changes the entry at x is a write to x whose signature verifies.