R5 — a partial receive. If the relay fails after some mailboxes were processed, the client's state already includes them. Returning an error here would lose those messages: the app would not save them, and fetching them again gives MLS replays that are dropped. So receive returns what it has, with interrupted set.
R8 — the library has no clock. An unclaimed invite's welcome mailbox would be fetched for ever: wasted requests, and one more mailbox linked by timing (PROTOCOL.md section 1). forget_invite lets the app stop it after the relay's 7 days, or when the user cancels.
R7 — an Outgoing carries a post token. An app that keeps an outbox must keep it in encrypted storage too. Debug prints only the size. The blob itself is MLS ciphertext.
R6 — a claimed invite is used up before anything is saved. If the app dies between the claim and saving, the link no longer works; the person asks for a new one. Unavoidable with a one-time claim, and harmless: nothing readable is exposed.
R2 — written whole after every change. A few KB per contact. Fine for 1:1 chats with dozens of people; a table per key would scale better. Not measured with many contacts; for later, when measured.
R1 — the snapshot is the identity. It holds every secret: MLS private keys, fetch and post tokens. It must live only in encrypted storage (Amicitia: SQLCipher), never in a log or a backup in the clear. The library writes no file and implements no Debug for it. Encrypting it again inside the library would need a second key stored somewhere; not done, stated in the analysis.
Licence and Android done in PR #14 (merged as 47ed9eef1814814f18b5e359fbd65e5f5f17701e): MIT/Apache/BSD except hpke-rs (MPL-2.0, needs a source notice in Amicitia); no C code; builds for aarch64,…
Merged into main with --no-ff as 47ed9eef1814814f18b5e359fbd65e5f5f17701e (remote hash verified). The self-review is review 374 on this PR.
Done in PR #14, merged as 47ed9eef1814814f18b5e359fbd65e5f5f17701e.