[docs] F21: PROTOCOL.md section 4, the pairing as built — proposed, waits for Mark's approval

This commit is contained in:
2026-11-14 13:23:25 +01:00
parent 4a4e82e0e9
commit 580b8d50e3
+17 -4
View File
@@ -27,10 +27,23 @@ is a protocol version bump: documented, reviewed, approved (`CLAUDE.md` §2.2).
- **Block** = the owner rotates the post token; the old one is refused. The blocked person is not told.
## 4. Invitations
A QR code (in person) or a link carries: relay URL, an invite id, and a one-time fetch secret. The
invitee fetches the inviter's MLS KeyPackage from the relay with it, replies with their own, and
both sides exchange mailbox ids and post tokens **inside** MLS. Unclaimed invites expire after
**7 days** *(decided 2026-11-08)*.
A QR code (in person) or a link carries: relay URL, an invite id, and a one-time secret. Unclaimed
invites expire after **7 days** *(decided 2026-11-08)*.
1. **The inviter** leaves its MLS KeyPackage on the relay under the invite id and the secret's hash.
It also creates a **welcome mailbox**, whose id and post token are derived from the secret with
HKDF-SHA256: empty salt, info `tabellarius v0 welcome mailbox` (16 bytes) and
`tabellarius v0 welcome mailbox post` (32 bytes).
2. **The invitee** claims the KeyPackage with the secret, which deletes the invite. It creates the
MLS group with the inviter in it, and posts to the welcome mailbox:
- the Welcome;
- an MLS message carrying its own mailbox id, a post token for it, and its name.
3. **The inviter** joins from the Welcome and answers inside MLS with its own mailbox, post token and
name.
From then on each side posts to the other's mailbox. Names and post tokens travel **only inside
MLS**. To the relay, the welcome mailbox is an ordinary mailbox.
*(Changed 2026-11-14 from "the invitee replies with their own KeyPackage", pending Mark's
approval: the invitee needs no KeyPackage, because it creates the group itself.)*
## 5. What the relay stores — the complete list
| Table | Columns |