Skip to main content

Module open

Module open 

Source
Expand description

The recipient’s opening of its mail topic (pure).

  by_digest  = { H(e) ↦ e | e ∈ elements }
  manifests  = { M | e ∈ elements decodes to M ∧ 1 ≤ |M.chunks| ≤ N_max }
  open(M)    = Incomplete             some H(chunk_i) of M names no chunk element
             | ⊥ (forged)             H(chunk_0 ‖ … ‖ chunk_{n−1}) ≠ M.mail_id
             | Unreadable             the recipient's key does not open c
             | Opened(m)
  opening(x) = max { open(M) | M ∈ manifests, M.mail_id = x }
               under Incomplete < Unreadable < Opened

Laws:

  • Integrity. A chunk is read only through a manifest that lists its element’s digest, in that manifest’s order, and the mail opens only if the listed chunks concatenate to the preimage of its mail_id: a forged chunk, or a manifest listing one, never alters a mail.
  • All or nothing. The AEAD tag covers all of c: a missing chunk leaves the mail Incomplete, and an altered one is a different element, so its digest is not listed.
  • Content address. A manifest whose chunks do not concatenate to H⁻¹(mail_id) is forged and ignored: no forger can make a mail Unreadable and so stop it being retried.
  • Join. The outcome per mail_id is the maximum over its manifests, so the result does not depend on the order of elements, and a forged manifest never hides a genuine one.
  • Round trip. seal(m, (d, ek)) opens to Opened(m) under ek’s secret.

Structs§

OpenedMail
A mail opened from its recipient’s topic.

Enums§

Opening
What one mail id in a topic opens to.

Functions§

open_mail
Open the mail in elements for recipient with the secret of key, skipping every mail id fresh rejects: one outcome per mail id with a well-formed manifest whose chunks are not forged (the laws of this module).