Status Draft. Protocol version 1 (sv1) of the Sloppy Voice v2 product
Date 2026-12-04
Depends on 00 (overview and conventions), 04 (crypto conventions), 07 (identity objects and the sv_device credential)
Decisions used D-006, D-007, D-008, D-017, D-018, D-023, D-025, D-027, D-028, D-030, D-032, D-033, D-034, D-035, D-036, D-037, D-038, D-041, D-042, D-046, D-048, D-049, D-050, D-054, D-055, D-057, D-059, D-061, D-062, D-066, D-069, D-071, D-083, D-086
Owns The MLS profile (ciphersuite, wire formats, capabilities, extensions); the sv_participants GroupContext extension (0xF5A1); the MLS group_id format and group generations; external-sender rules; the Delivery Service API /v1/contexts/{ctx}/mls/…; /v1/me/keypackages, /v1/keypackages/claim, /v1/federation/keypackages/claim; the commit policy and epoch fence; the removal, freeze and designated-committer procedure; housekeeping, eviction, fork detection and resync; maxSecureLeaves and maxMlsUploadBytes; every mls.* event and error code

Conformance. This document is normative for the Server class (Delivery Service, channel Authentication Service hooks, KeyPackage store, KeyPackage federation) and for every client class that supports secure mode (Full client, Web client, and a Bot client of a secure bot) (00 §1.5, D-066). A server conforms only if it implements every server MUST here, even if no context on it is secure yet. A client conforms only if it implements every client MUST here before it shows a closed lock for any context (SM-12).

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in BCP 14 (RFC 2119, RFC 8174) when, and only when, they appear in all capitals, as shown here. Rationale notes start with "Rationale:" and are informative. Examples are informative unless the text says otherwise.

1. Scope

This document profiles MLS (RFC 9420) for Sloppy Voice v2. It specifies:

  • the single ciphersuite, the wire formats, the leaf capabilities and the extensions every secure group uses (§3);
  • the MLS group_id and the group generation of a context (§4);
  • the sv_participants GroupContext extension that pins who may be in a secure DM or group DM (§5);
  • the hosting server's roles as MLS Delivery Service (DS) for every secure context, as Authentication Service (AS) for channels, and as the group's only external sender (§6);
  • the DS API under /v1/contexts/{ctx}/mls/ (§7) and the mls.* events (§8);
  • KeyPackages: publication, claiming through the home server, federation, last-resort KeyPackages and replenishment (§9);
  • how devices join: bootstrap, external commits, Welcome, a person's later devices, and resync (§10);
  • ordering through a single sequencer and a compare-and-set epoch fence (§11);
  • the commit policy for channels and DMs (§12);
  • removals, the content freeze and commit duty (§13);
  • housekeeping: self-updates, epoch acknowledgements, log retention and eviction (§14);
  • fork detection and resync (§15), the client group state machine (§16), limits and timers (§17), error codes (§18), example transcripts (§19) and test vectors (§20).

This document does not define:

  • the contents of the sv_device credential, the IdentityCertificate, DeviceCertificate, IdentityState or DeviceRevocation, or the credential validation algorithm (07). This document says when that algorithm runs and what happens when it fails;
  • SealedMessage, K_hist, ekid, visibility (visibleFromSeq) and HistoryShares (14);
  • SFrame keys, KIDs and MediaAttestation (18), or call.epoch_ready and call.epoch_switch (15);
  • who may add or remove people in a DM or group DM, DM security computation, dm.request and the DM index (12);
  • channel membership, bans, kicks and permissions (09, 10), which are the triggers for the removals specified here;
  • warning copy (20). Nothing in this document shows a warning; §4.12.5 of 00 lists MLS joins, leaves, epoch changes and KeyPackage replenishment as things that never prompt.

2. Conventions and terminology

2.1 Notation

  • MLS structures use the TLS presentation language as profiled by RFC 9420 §2.1, including variable-length vectors <V> whose length prefix is the RFC 9420 §2.1.2 variable-length integer (1, 2 or 4 bytes, minimal encoding).
  • In JSON, an MLS object is carried as base64url without padding of its MLSMessage encoding (00 §7.2). The JSON member name says which MLS object it is (commit, groupInfo, welcome, keyPackage, proposal).
  • ekid values are the 8-byte epoch key IDs of 14, carried as base64url (11 characters).
  • Durations are integer milliseconds in JSON (…Ms) and are written with units in prose. All timers in this document are listed again in §17.

2.2 Terms

This document uses the terms of 00 §2 exactly (MLS group, epoch, leaf, Authentication Service, Delivery Service, external commit, external sender, commit duty, designated committer, sv_participants). It adds:

Term Definition
Group generation A positive integer, per context, that numbers successive MLS groups of the same context. It is the last component of group_id (§4).
Current group The group of a context's current generation while its state is active or frozen (§4.3).
Member commit A commit whose sender type is member.
Server proposal A proposal (Remove or GroupContextExtensions) whose sender type is external and whose sender is the hosting server's external-sender key (§6.3).
Pending proposal A server proposal for the current epoch that no accepted commit has covered yet.
Removal proposal A pending server proposal of type Remove.
Freeze The state of a group with at least one pending removal proposal; the server refuses new secure content in it (§13.3).
Roster The server's map from leaf index to the leaf's (canonical address, did, igen, ikf, dkf, plat), derived from the ratchet tree (§6.5).
Reference ekid The ekid the server records for an epoch, used to detect forks. It is provisional (the committer's value) until the server settles it from the members' acknowledgements (§15.2).
Entitled device-level removal A removal with reason evicted, stale_leaf or identity_changed (§13.1). The removed device's account may still be in the context, so the device may rejoin with a new leaf if the AS checks pass (§13.2).
Resync Rejoining the current group by external commit from current GroupInfo after lost, stale or divergent state, removing the device's own old leaf if it is still in the tree (§10.5).
Positive rejection A client's determination that a sequenced commit or a received ratchet tree violates this profile or fails a mandatory credential check (§15.4).
Online device A device with a session that is online for the context's stream (03 §1.3: a connected session whose socket holds a full subscription to it). A heads subscription doesn't count.

2.3 Wire values used in this document

Name Value Source
Protocol version mls10 (0x0001) RFC 9420
Ciphersuite 0x0001 MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519 00 §7.15, D-034
Credential type basic 0x0001 RFC 9420
Credential type sv_device 0xF5A0 (private use) 07, D-034
Extension required_capabilities 0x0003 RFC 9420
Extension ratchet_tree 0x0002 RFC 9420
Extension external_pub 0x0004 RFC 9420
Extension external_senders 0x0005 RFC 9420
Extension sv_participants 0xF5A1 (private use) this document, D-036
Wire formats used mls_public_message (1), mls_welcome (3), mls_group_info (4), mls_key_package (5) RFC 9420
Wire format forbidden mls_private_message (2) D-034, D-038

0xF5A0 and 0xF5A1 lie in the RFC 9420 private-use range (0xF000–0xFFFF). If they are later registered with IANA, a new protocol version will switch to the registered values; v1 never negotiates them.

3. Profile parameters

3.1 Protocol version and ciphersuite

  1. Every secure group, KeyPackage, Welcome and GroupInfo MUST use protocol version mls10 and ciphersuite 0x0001.
  2. Clients MUST NOT create, and servers and clients MUST reject, any MLS object with another version or ciphersuite. A server answers mls.policy_violation with rule: "ciphersuite".
  3. There is no ciphersuite negotiation (D-027). A future crypto suite (sv1-c2, 04) will define its own MLS ciphersuite and a new group generation.

Rationale: 0x0001 is the RFC 9420 mandatory-to-implement suite. Its Ed25519 signature scheme lets the device signing key (DSK) of 07 be the leaf signature key directly (D-034), so one key type serves MLS, SealedMessage signatures and MediaAttestations.

3.2 Wire formats

  1. Every handshake message (Commit and Proposal) MUST be sent as PublicMessage. This includes member commits, external commits and server proposals.
  2. PrivateMessage MUST NOT be used for anything. A server MUST reject a submission that carries one (mls.policy_violation, rule: "wire_format"). A client MUST reject one that appears in the handshake log.
  3. MLS application messages are never sent. Secure application content travels as SealedMessage (14, D-038). The MLS group provides keys only: the exporter outputs listed in §3.10 and the epoch structure.
  4. The authenticated_data of every FramedContent MUST be zero-length. Servers reject a non-empty one (rule: "authenticated_data").
  5. Welcome, GroupInfo and KeyPackage are carried as MLSMessage with their own wire formats (§2.3).

Rationale: PublicMessage lets the hosting server check commit policy, maintain the roster and verify signatures by parsing, without holding any group secret (D-034). Because no application data uses MLS, the extra metadata PublicMessage exposes (sender leaf, proposal types) is limited to membership changes, which the server knows anyway (00 §5.4).

3.3 Credentials

  1. Every leaf MUST carry a credential of type sv_device (0xF5A0). Its content and validation algorithm are defined by 07. A leaf with any other credential type MUST be rejected by servers and clients.
  2. The leaf signature_key MUST equal the raw 32-byte DSK public key named in the DeviceCertificate (07, HP-1).
  3. The identity key MUST NOT appear as any leaf's signature_key or encryption_key.
  4. The hosting server's entry in external_senders uses a basic credential (§6.2). The basic type is used for nothing else.
  5. The DeviceCertificate also names the device's X25519 box public key dbk (07, 08 §10.1). MLS doesn't use it. A device MUST NOT use its box key as a leaf encryption_key or a KeyPackage init_key. 14 §7.5 reads dbk from a validated leaf to wrap a HistoryShare's key to the device.

3.4 Leaf capabilities

Every LeafNode (in KeyPackages, UpdatePaths and the ratchet tree) MUST carry these capabilities. GREASE values (RFC 9420 §13.5) MAY be added to any list; receivers MUST ignore them.

Field Required contents Notes
versions mls10
cipher_suites 0x0001
extensions 0xF5A1 Default extension types MUST NOT be listed (RFC 9420 §7.2).
proposals empty No non-default proposal types are used.
credentials 0x0001 (basic) and 0xF5A0 (sv_device) basic is listed so that every member supports the external sender's credential type. required_capabilities lists both (§3.5), so MLS libraries enforce this.

Test vector T-CAP in §20 gives the exact encoding.

3.5 GroupContext extensions

The GroupContext of every secure group carries exactly the extensions below, in ascending order of extension type. A receiver MUST reject a GroupContext with a missing, duplicated or additional extension.

Extension Channels (ch:) DMs and group DMs (dm:, gdm:) Content
required_capabilities (0x0003) REQUIRED REQUIRED extension_types = [0xF5A1], proposal_types = [], credential_types = [0x0001, 0xF5A0]
external_senders (0x0005) REQUIRED REQUIRED Exactly one entry: the hosting server's mls-external-sender key (§6.2). Rotation replaces the entry; there are never two.
sv_participants (0xF5A1) MUST NOT be present REQUIRED §5

Rationale: requiring 0xF5A1 in every group, including channels, keeps one capability set for every device and every group, so a device's KeyPackage works in any DM. Listing basic makes MLS libraries refuse a leaf that couldn't verify the external sender's credential type, instead of relying on §3.4 alone.

3.6 GroupInfo extensions

Every GroupInfo, whether uploaded to the DS (bootstrap or commit) or placed in a Welcome, MUST carry exactly two GroupInfo extensions, in this order: ratchet_tree (0x0002) with the full public tree, and external_pub (0x0004). Receivers MUST reject a GroupInfo that lacks either or carries any other GroupInfo extension.

A client MUST NOT build a Welcome without ratchet_tree, whatever the tree's size. A carrier that can't fit a whole Welcome (for example 12's dm.request under maxDmRequestBytes) leaves out the Welcome, never the tree, and the recipient fetches the Welcome with GET …/mls/welcome (§7.9) after Accept.

Rationale: with both extensions, any eligible device can join by external commit from the DS alone (HP-3), and a Welcome recipient needs nothing but the Welcome, which is what lets it read the first messages before Accept without contacting the hosting server (D-049). A Welcome without the tree would need the tree of its join epoch, which the DS doesn't keep once the epoch moves on (§14.3).

3.7 Leaf nodes

  1. One leaf per device. A group MUST NOT contain two leaves with the same (canonical address, did), except inside a resync external commit that removes the old leaf (§10.5) (HP-1 item 6).
  2. One identity per address. All leaves of one canonical address MUST carry the same IdentityCertificate, except while Remove proposals for the leaves with the other IdentityCertificate are pending (07 L5; §13.1, reason identity_changed). The server enforces this before sequencing (A6, §6.1.1). For a client, a violation is a positive rejection in DMs and a diagnostic only in channels (07 L5 and 07 §13.6 S3). The user's own stale leaves with a lower igen never raise W4b (07 §18.2).
  3. Uniqueness. Every leaf's signature_key and encryption_key MUST be unique within the tree (RFC 9420 §7.3). The server checks signature_key uniqueness; clients check both.
  4. Credential is fixed for the life of a leaf. A commit's UpdatePath leaf node MUST carry a credential byte-identical to the one the leaf already has, and the same signature_key. A device that needs a different credential (for example after its account's identity generation changed) leaves the old leaf behind by resync (§10.5). Servers reject a change (rule: "credential_changed").
  5. Leaf extensions MUST be empty in v1. Receivers MUST accept unknown leaf extensions that RFC 9420 permits (forward compatibility), and servers MUST NOT reject them.
  6. Lifetimes. Only KeyPackage leaf nodes carry lifetime (RFC 9420 §7.2). not_after − not_before MUST NOT exceed 90 days (§9.1). Clients MUST check the lifetime of a KeyPackage they add. Clients MUST NOT reject a ratchet tree because a leaf with source key_package has an expired lifetime (RFC 9420 §7.3 allows this): such a leaf was valid when it was added, and §14.5 makes the device replace it soon after joining.

3.8 Proposal types

Proposal Channels DMs and group DMs Sent by
Add Never By value in member commits (§12.2) Members
Update Never Never —
Remove By reference to server proposals; by value only as the joiner's own old leaf in a resync external commit By reference to server proposals; by value in member commits (§12.2); own old leaf in a resync external commit Server, members
PreSharedKey Never Never —
ReInit Never Never —
ExternalInit Exactly one in each external commit Same Joiners
GroupContextExtensions By reference only, to a server proposal that changes external_senders By reference to such a server proposal, or by value in a member commit that changes only sv_participants Server, DM members

Rationale: v1 never needs PSKs or ReInit. A new group generation (§4.2) replaces ReInit, which keeps the server's structural checks small. Update proposals are unnecessary because every commit carries an UpdatePath (§12).

3.9 Other parameters

  • Padding: PublicMessage has no padding. Welcome and GroupInfo sizes are visible to the server; this is accepted metadata (00 §5.4).
  • Out-of-order tolerance: irrelevant, because no MLS application messages are sent.
  • Commit path: every commit MUST include a path (§12). This makes every commit a full commit and gives post-compromise security for the committer on every commit.

3.10 Exporter use (index)

This document defines no exporter label. The group is used by:

Label Owner Use
sv1 history 14 K_hist(e) per epoch, from which ekid and K_msg derive
SFrame 1.0 Base Key (RFC 9605 §5.2) 18 Media keys

The 04 registry is authoritative for labels.

4. Group identity and lifecycle

4.1 group_id

The group_id of a context's group is the UTF-8 encoding of this string (00 §7.6):

group-id      = "sv1:" host-domain ":" ctx-ref ":" generation
host-domain   = 1*253( ALPHA-LC / DIGIT / "-" / "." )
                ; the hosting server's canonical domain as a lowercase A-label (01, 02)
ctx-ref       = ch-ref / dm-ref / gdm-ref
ch-ref        = "ch:" uuid
gdm-ref       = "gdm:" uuid
dm-ref        = "dm:" 22b64url
uuid          = 8HEXLC "-" 4HEXLC "-" 4HEXLC "-" 4HEXLC "-" 12HEXLC
                ; lowercase hyphenated UUIDv7 (RFC 9562)
generation    = NZDIGIT *9DIGIT
                ; 1 to 2147483647, no leading zeros
ALPHA-LC      = %x61-7A
HEXLC         = DIGIT / %x61-66
NZDIGIT       = %x31-39
b64url        = ALPHA / DIGIT / "-" / "_"

Example: sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1.

Rules:

  1. A group_id is at most 320 bytes. Its domain is always canonical (D-032); a group_id naming an alias domain is invalid.
  2. A parser splits off the generation at the last colon. The domain contains no colon, and the context reference contains exactly one.
  3. The creator of a group (§10.1) builds the group_id. The server rejects a bootstrap or commit whose group_id differs from the one it expects for the context's current generation (mls.group_id_mismatch).
  4. Clients reject mismatching GroupInfo. Before using a GroupInfo or Welcome, a client MUST compute the expected group_id from (a) the canonical domain of the hosting server it resolved itself (for a 1:1 DM, the host the client computes with the hosting rule of 12; for a group DM, the hosting server named in the DM index entry or dm.request of 12), (b) the context reference it asked for, and (c) the generation, which MUST be at least the highest generation the client has pinned for that (hosting canonical domain, context reference) pair (§4.4). A GroupInfo or Welcome whose group_id differs is rejected and treated as a positive rejection (§15.4).
  5. The generation's value MUST be between 1 and 2,147,483,647. A parser rejects a larger value even though the ABNF admits it, and a server never allocates one.

Rationale: binding the hosting domain and the context into the group ID stops a server replaying one context's group as another's, and the generation pin stops it replaying an older generation.

4.2 Group generations

A context's first group has generation 1. The server allocates a new generation (normally previous + 1, but see the high-water mark below) only in these cases:

Case Trigger Owner of the trigger
G-a A 1:1 DM becomes secure again after having been insecure (SM-8) 12
G-b The server has lost or rolled back the group's DS state (for example a restore from backup); see §15.6 This document
G-c An operator retires a group that can't be repaired (§15.6) 21 (runbook), this document (mechanics)

A group generation is never reused. When a new generation is allocated, the previous one is retired (§4.3). A context that is secure for the first time (a channel upgrade, a server upgrade, a newly created secure channel, a new secure DM, or a group DM that became secure) gets generation 1.

Generation high-water mark. A server MUST keep, per context, the highest generation it has ever allocated, in storage that a restore of its DS state doesn't roll back (for example 21's security journal, 21 §11.6.1). After a restore it allocates the high-water mark + 1. If it can't be sure that the high-water mark survived, it MUST allocate the restored generation + 1,000 instead. Clients additionally refuse to move backwards within a generation (§4.4).

Proposed decision (PD-13-01): group generations, not MLS ReInit, restart a context's group. Rationale: a restart needs no member online and no secret from the old group, and the server can enforce it with the same compare-and-set as a bootstrap.

Proposed decision (PD-13-14): servers keep a per-context generation high-water mark outside restorable DS state, and skip 1,000 generations when they can't trust it. Rationale: a restore from an old backup must never hand out a generation number that clients already pinned with different keys, which would break the key archive's de-duplication by (group ID, epoch) and the ekid checks.

4.3 Server group state machine

The hosting server keeps one state per context with a secure mode, for the current generation.

State Meaning
none The context is secure, and the current generation has no group yet. The next eligible device bootstraps it (§10.1).
active The group exists and has no pending removal proposal.
frozen The group exists and has at least one pending removal proposal (§13.3).
retired The generation is closed: the context became insecure (a 1:1 DM, SM-8) or was deleted, or a later generation replaced it. Nothing new is accepted for it.
State Event Action Next state
(insecure context) Context becomes secure (09, 12) Allocate generation g (1, or previous + 1 in case G-a) none
none Valid bootstrap accepted (§7.4) Store epoch-0 GroupInfo and roster; emit mls.group_created active
none 09 channel upgrade PATCH carrying a GroupBootstrap As above, atomically with the upgrade (09) active
active Accepted commit (§11) Advance epoch; store GroupInfo, log entry and roster; emit mls.handshake active
active Server issues a Remove proposal (§13.2) Cut delivery; revoke leases; store proposal; emit mls.proposal; start commit duty frozen
active or frozen Server issues a GroupContextExtensions proposal (§6.2) Store; emit mls.proposal; start commit duty unchanged
frozen Accepted member commit covering every pending proposal Advance epoch; clear pending proposals active
frozen Accepted external commit Advance epoch; reissue pending proposals in the new epoch, dropping those whose target is gone (§13.5) frozen, or active if no Remove remains
active or frozen Context becomes insecure (12) Emit mls.group_retired (nextGeneration: null); delete GroupInfo; keep the log for its retention period retired
active or frozen Context deleted (09, 12) Emit mls.group_retired (reason context_deleted, nextGeneration: null); delete GroupInfo, the handshake log, pending proposals and Welcomes, and stop serving them at once (09 §6.4) retired
active or frozen Case G-b or G-c Emit mls.group_retired with nextGeneration: g+1; allocate g+1 retired (for g), none (for g+1)
retired Any submission for that generation mls.generation_retired retired

4.4 Client pins for group identity

For every secure context it has joined, a client MUST store, keyed by (hosting server canonical domain, context reference), which is the group_id without its generation: the group_id, the highest generation seen, its current epoch and the reference ekid of that epoch when known. A client MUST NOT accept a GroupInfo, Welcome or handshake for a lower generation under the same key. A successor 1:1 DM on another hosting server (12) has a different key, so its generations start afresh. A generation change is accepted only after a mls.group_retired event or a mls.generation_retired error that names a higher generation; the client then discards the old group's MLS state (keeping the history keys it learned, which are already in its key archive, 08, 14) and joins or bootstraps the new generation (§10).

No rollback within a generation. A client that holds epoch E of generation g and is shown, for the same g, a current epoch lower than E (in GET …/mls or a GroupInfo) MUST NOT resync into g. A server can show this only after losing state without retiring the generation (§15.6). The client treats it as a positive rejection (§15.4), posts an MlsReport verification_failed with reason epoch_rollback, and waits for a higher generation.

5. The sv_participants extension (0xF5A1)

5.1 Encoding

struct {
    opaque address<V>;      /* canonical address, UTF-8, 3..320 bytes */
    opaque ikf<V>;          /* raw 32-byte SHA-256 RFC 7638 thumbprint of the person's identity key */
} SvParticipant;

struct {
    SvParticipant participants<V>;
} SvParticipants;           /* extension_data of extension type 0xF5A1 */
Field Constraint
address A canonical address (01, D-032): PRECIS-prepared, case-folded, NFC local part; canonical domain as a lowercase A-label. Length 3–320 bytes.
ikf Exactly 32 bytes: the raw SHA-256 output of the RFC 7638 thumbprint of the identity key JWK (the same value as the base64url ikf of 00 §7.13, decoded).
participants 1 to 1,024 entries, sorted by address in ascending byte order, with no two entries sharing an address.

A receiver MUST reject an sv_participants value that fails any constraint. Test vector T-SVP in §20.

5.2 Meaning and who may change it

  1. sv_participants lists the people (not devices) who may have leaves in a secure DM or group DM, together with the identity key each person is accepted under (D-036).
  2. Only member commits change it, with a GroupContextExtensions proposal by value (§12.2). A server GroupContextExtensions proposal MUST carry sv_participants byte-identical to the current value; clients reject one that doesn't (§6.3).
  3. Which changes are allowed (adding and removing people) is decided by 12. This document fixes the mechanics: the committer's client builds the new list, and every member client checks the invariants of §5.3.
  4. When a listed person's identity key changes (reset, 07), a member whose client has accepted the new key (07: automatically for an unverified contact, after "Accept new key" for a verified one) updates that person's ikf with a member commit that, in the same commit, adds the person's new devices by Welcome from KeyPackages claimed with purpose dm_readd (§9.4; F6 in 00 §8). If no KeyPackage could be claimed for the person, the commit still updates the ikf, and the person's devices join by external commit once they see it (§10.4). 12 §11.5 says who commits and when.

5.3 Invariants checked by every DM client

After applying any commit in a DM group, a client MUST check:

  1. Every leaf's (canonical address, ikf of its IdentityCertificate) appears in sv_participants.
  2. An external commit's joiner is listed with the ikf of the joiner's IdentityCertificate before the commit (an external commit can't change sv_participants). Clients reject an external commit from an identity that isn't listed (D-036).
  3. An sv_participants change came from a member commit, never from a server proposal.
  4. Every ikf change for a person is passed to the identity-pin logic of 07, which decides on W2. A client MUST NOT reject a valid member commit only because it changes a pinned person's ikf; it processes the commit and lets 07 raise W2 and, for a verified contact, block sending.

A violation of 1, 2 or 3 is a positive rejection (§15.4).

Rationale: the hosting server orders and stores DM handshakes but can't sign member commits, so it can never add a person to a secure DM; at most it can deny service (00 §5.2).

5.4 Server checks

The DS of a DM MUST also enforce §5.3 items 1–3 at ingress and reject a violation with mls.policy_violation (rule: "sv_participants"). It MUST apply the membership policy of 12 to sv_participants changes (for example, refusing to list an insecure account in a secure group DM, which fails with security.would_downgrade, D-069).

6. The hosting server's roles

6.1 Delivery Service and Authentication Service

Role Channels DMs and group DMs
Delivery Service The hosting server: sequences handshakes, stores GroupInfo, the handshake log, Welcomes and pending proposals (D-037) Same
Authentication Service The hosting server (D-035). Clients run silent checks (§6.1.2). Each client (07, D-035). The server runs 07's identity filter (07 §14.6) and the listing checks of §5.4, so that it never sequences a commit honest clients would reject (V11).
External sender The hosting server, alone (D-034) Same

6.1.1 Channel AS checks by the server

For every bootstrap, and for every commit that adds a leaf or carries an UpdatePath leaf node, the hosting server of a channel MUST run 07's checks C1–C9 (07 §13.3) on the new or updated leaf. 07 owns the checks and their results. This document groups them as A1–A6 so that its own rules can name them:

# 07 checks What is checked Failure
A1 C1, C8 ValidateSvDeviceCredential (07 §10.4): the chain, sub and igen agree, DSK equals the leaf signature_key; and L6, L7 (the identity key is never a leaf key; the credential never changes in place). mls.credential_rejected, reason as 07 returns
A2 C2 The leaf's canonical address and did are the submitting session's account and device. It applies only to the committer's own leaf (an external commit's new leaf, or the committer's UpdatePath leaf node). mls.credential_rejected: subject_mismatch, device_mismatch
A3 C3, C4 The server holds an IdentityState for the address that is fresh for the channel AS (validated at most 300 s ago and unexpired, 07 §13.1), fetching one with a 5 s timeout if not; its sec is secure and its idc is byte-identical to the leaf's IdentityCertificate. mls.credential_rejected: state_unavailable (retryable, retryAfterMs 30,000), account_insecure, generation_mismatch, key_mismatch
A4 C5 IsDeviceValid (07 §9): the device is listed active with the leaf's dkf and isn't revoked. mls.credential_rejected, reason as 07 returns (for example device_not_listed, device_revoked)
A5 C9 The account may be in the channel: an active member with view_channel, not banned, not needs_encryption (09, 10). An insecure bot never gets here, because V1 refuses insecure accounts (D-061). mls.credential_rejected: not_permitted, with data.membershipCode set to the code 09 or 10 would return (for example moderation.banned, 10)
A6 C6, C7 One leaf per device (L4) and one identity per address (L5). For L5, if other leaves of the address carry another IdentityCertificate and have no pending Remove, the server first issues those Remove proposals (reason identity_changed, §13.1) and then accepts, as 07 C7 says. mls.credential_rejected: duplicate_device_leaf; mixed_identity only if it can't issue them

Every mls.credential_rejected answer carries data.reason (an identity check result of 07 §10.6) and data.subject (the leaf's canonical address). Only state_unavailable is retryable. During a home-server outage, new secure joins from that home therefore wait (07 §13.3).

Member commits. The server MUST run A1–A6 again on a member commit's UpdatePath leaf node. Because §3.7 item 4 fixes the credential, only A3, A4 and A5 can change between commits. When the leaf is an existing leaf with a byte-identical credential and the home server can't be reached to refresh the IdentityState, A3 accepts the newest IdentityState the server holds for the address that is still unexpired (at most 24 h old, 07 §7.6) instead of failing with state_unavailable. A new leaf (an external commit, or an Add in a DM) always needs the freshness of A3.

Proposed decision (PD-13-09, adopted as D-083): in channels, a member commit's UpdatePath by an existing leaf with a byte-identical credential (a self-update or a removal commit) needs only an unexpired IdentityState (at most 24 h old) when the home server can't be reached, not one validated within 300 s. Rationale: the credential can't change (§3.7 item 4), revocations and resets are pushed (device.revoked, identity.changed) and the server never removes a leaf on stale evidence alone (07 §13.4), so the 300 s rule adds little for an existing leaf. Without this, a member whose home server is down (and whose session D-062 keeps alive for up to 24 h) couldn't commit pending removals, and a frozen group with only that member online would stay frozen.

6.1.2 Channel silent checks by clients

A member client of a channel MUST check the internal chain (A1) of every leaf it accepts, both in commits it processes and in every ratchet tree it joins from (07 §13.6 S1). A failure is a positive rejection (§15.4) and is reported with an MlsReport verification_failed (§7.10). A client SHOULD, in the background, verify the IdentityState the server attached (§8.3) against the member's home-server keys (02, 07). A positive failure of that background check, and an L5 violation in a channel, is an identity diagnostic of 07 §13.6, which the client sends through 15's diagnostics endpoint to the hosting server and to its own home server (07 S4), not as an MlsReport. It is never shown to the user (D-035, 00 §4.12.5). Self-alerts W4a and W4b are 07's.

6.2 External sender

  1. The group's external_senders extension has exactly one entry:

    ExternalSender {
        signature_key = raw 32-byte Ed25519 public key of the hosting server's key
                        whose ServerMetadata purpose is "mls-external-sender" (02)
        credential    = Credential { credential_type = basic (0x0001),
                                     identity = UTF-8 "<canonical-domain>#<keyId>" }
    }

    The identity string is that key's server key ID (00 §7.6). Test vector T-EXT in §20.

  2. Client check. Before using a GroupInfo or Welcome, a client MUST check that the external sender's identity domain equals the group_id's host-domain, and that its signature_key equals the key with that kid in the hosting server's ServerMetadata, with purpose mls-external-sender and status next, active or retired. As the only exception, a key that is no longer listed (or is revoked) is accepted if a pending server GroupContextExtensions proposal, signed by it, replaces it with a key that passes the check. Any other mismatch is a positive rejection. Before Accept (D-049). A recipient that processes a Welcome carried in a message request (§10.3 item 3) doesn't fetch the hosting server's ServerMetadata, because 12 §10.4 and 02 §5.8 forbid it. It runs this check against the hosting server's mls-external-sender keys that its own home server relays in the DmRequest (serverKeys, 12 §10.1), with the statuses given there, or against metadata for that server it already holds. If no such key passes, the client doesn't reject the Welcome: it defers it until after Accept (12 §10.4). After Accept, once it has caught up with the group (§10.3 item 4), it runs this check again on the group's current external sender, against the hosting server's ServerMetadata that it resolved itself (02 §5.2); a mismatch then is a positive rejection (§15.4).

  3. No other external senders. A server MUST NOT accept, and clients MUST reject, any proposal or commit that adds a second external sender or names a key of another server.

  4. Allowed external proposals. The external sender sends only Remove and GroupContextExtensions proposals. Clients MUST reject an external Add, PreSharedKey or ReInit proposal.

  5. Rotation. When the server's mls-external-sender key changes from next to active (02 publishes it at least 25 h earlier), the server sends, in every current group, a GroupContextExtensions proposal (reason key_rotation) signed with the old key that replaces the single external_senders entry with the new key and keeps every other extension byte-identical to the current GroupContext. This proposal is pending but does not freeze the group (§13.3). It is committed by the next member commit, through commit duty (§13.4), or, in a DM, absorbed into a member's own GroupContextExtensions proposal (§12.2 D4). The server keeps signing proposals for a group with the key that group's extension names until that group has committed the rotation. A retired key stays listed for at least 7 days (02); a group that remains dormant longer is still joinable under item 2's exception.

  6. Client check of the new key. When processing a server GroupContextExtensions proposal, a client MUST check that the new external_senders entry passes item 2's check (same domain as the group_id, listed in the hosting server's ServerMetadata with purpose mls-external-sender), with status next or active. Otherwise the proposal, and any commit that covers it, is a positive rejection (§15.4).

  7. Key retention. The server MUST keep the private key of every mls-external-sender key that a current group's GroupContext names, including a retired or revoked key, until no current group names it.

  8. Revocation and loss. When the active mls-external-sender key is revoked (02 §11.7 makes another key active at once, without the 25 h wait), the server issues the rotation proposal of item 5 at once in every current group, signed with the revoked key. Clients accept a proposal signed by a revoked or unlisted key only when it is that replacement (item 2's exception). If the server has lost the private key, so that it can't sign the rotation, it retires every current group that names the key (case G-c of §4.2, reason operator); the next generation names the new key.

Proposed decision (PD-13-02): the external sender uses a basic credential whose identity is the server key ID, and every leaf lists basic in its capabilities. Rationale: clients can find the key in ServerMetadata from the credential alone, and no second private credential type is needed.

6.3 Server proposals

A server proposal is an MLSMessage with wire format mls_public_message whose FramedContent has:

  • group_id and epoch of the current epoch;
  • sender = { sender_type: external, sender_index: 0 };
  • zero-length authenticated_data;
  • content_type = proposal, with a Remove (removed = target leaf index) or a GroupContextExtensions proposal;
  • a signature with the external-sender key over FramedContentTBS (RFC 9420 §6.1). For sender type external the TBS contains no GroupContext: it is version, wire_format and the FramedContent only. The proposal is bound to its group only through group_id and epoch;
  • no membership_tag (RFC 9420 §6.2 has one only for sender type member).

The server computes each proposal's ProposalRef (RFC 9420 §5.2, RefHash("MLS 1.0 Proposal Reference", AuthenticatedContent)) and uses it as the proposal's identifier. Test vector T-PREF in §20.7 gives a complete example. A GroupContextExtensions proposal is always built from the GroupContext of the epoch it is bound to: its extensions list is that GroupContext's list with only the external_senders entry replaced. A client MUST verify the signature against the external sender in its own GroupContext, and MUST reject a server GroupContextExtensions proposal that changes anything but external_senders or whose new entry fails §6.2 item 6.

6.4 DS validation pipeline

For every bootstrap and commit submission, the server MUST run these steps in order and stop at the first failure, or at the early answer of V2a. "Structural" means parsing the TLS encoding; no group secret is involved.

Step Check Failure
V1 Authentication and SM-4: a secure account on an enrolled device (D-058); for a channel, an active member (09); for a DM, a participant (12); a remote session in state extended (06 §7.3) may submit only member commits for its existing leaf: a bootstrap, an external commit, or a DM commit that adds a leaf for the session's own account fails with 503 federation.home_unreachable (06) security.account_required, security.device_not_enrolled, federation.home_unreachable, or the owner's membership code; on bootstrap and commit submissions a channel membership failure is answered as A5
V2 Body size within maxMlsUploadBytes (§17.1) core.too_large
V2a Idempotency. Compute the commitHash (SHA-256 of the decoded commit bytes). If the accepted-commit index holds it, return the stored CommitResult with 200 and stop. For a bootstrap, the same with the hash of the epoch-0 GroupInfo (§7.4). This needs no MLS parsing, and it runs before every check that depends on the group's current state, so a resubmission of an accepted commit always gets its original answer (§11.2 item 4). — (success)
V3 Context state: not retired; group exists (commits) or not yet (bootstrap) mls.generation_retired, mls.group_not_found, mls.group_exists
V4 Each MLS object parses; version mls10; ciphersuite 0x0001; commit wire format mls_public_message mls.verification_failed (reason: "malformed") or mls.policy_violation
V5 group_id equals the expected value (§4.1) mls.group_id_mismatch
V6 In-flight limit (§11.4) mls.commit_busy (425)
V7 Commit epoch equals the current epoch (the fence) mls.epoch_conflict
V8 Sender: a member leaf whose roster entry matches the session's (address, did) and has no pending removal; or new_member_commit from the session's device mls.not_member
V9 FramedContent signature verifies under the sender's leaf key (member) or the UpdatePath leaf key (external); the UpdatePath LeafNode signature verifies mls.verification_failed (reason: "signature")
V10 Commit policy for the context type (§12) mls.policy_violation
V11 AS checks. Channels: A1–A6 (§6.1.1) on the committer's own leaf (the external commit's new leaf, or the UpdatePath leaf node). DMs (07 §14.6): C1, C2 (committer's own leaf only), C6 and C8 on every commit; C3, C4 and C5 with an IdentityState fresh for admission (at most 24 h old and listing the device; fetched with a 5 s timeout if the server holds none) only for a leaf whose (address, did) is new to the group and for the leaf node of every KeyPackage added by value; for the UpdatePath of a known (address, did), only the byte-identical credential check (07 L7); then §5.4 and the server part of rule D2 (§12.2). mls.credential_rejected (07's reason; state_unavailable retryable), mls.credential_rejected (not_permitted) for A5, mls.policy_violation
V12 Member commit covers every pending proposal (§12.1 rule M3), counting a rotation absorbed under §12.2 D4 mls.proposals_changed
V13 Leaf count after the commit ≤ maxSecureLeaves (§17.1); no duplicate signature_key mls.group_full, mls.policy_violation
V14 New GroupInfo: group_context.group_id and epoch (current + 1) correct; extensions per §3.5 and §3.6 and unchanged except by a committed GroupContextExtensions proposal; confirmation_tag equal to the commit's; confirmed_transcript_hash equal to the value the server computes from the stored interim transcript hash and the commit (RFC 9420 §8.2); signer equals the committer's leaf index in the new tree; signature valid mls.verification_failed (reason: "group_info")
V15 Roster consistency: the GroupInfo's tree leaves equal the previous roster minus removed leaves, plus added leaves (with their KeyPackage leaf nodes) and the committer's new leaf node, at the positions RFC 9420 prescribes mls.verification_failed (reason: "tree")
V16 The tree hash of the ratchet_tree equals group_context.tree_hash, and parent hashes verify (RFC 9420 §7.8, §7.9) mls.verification_failed (reason: "tree")
V17 DMs: a Welcome is present exactly when the commit adds leaves, and its secrets name exactly the added KeyPackages' KeyPackageRefs mls.policy_violation (rule: "welcome")

Then, in one transaction: advance the epoch, store the GroupInfo and roster, append the log entry, record the provisional reference ekid (§15.2), clear or reissue pending proposals, record the commit hash, update lastSeenAt for the committer, assign the event seq, and emit events. Commit acceptance is atomic: either all of these happen or none.

Proposed decision (PD-13-03): the DS MUST verify signatures, the transcript hash, the confirmation-tag equality, roster consistency, and the tree and parent hashes. Rationale: these checks need only public data and hashing, and they stop a buggy or malicious committer from uploading a GroupInfo that doesn't match its commit or whose tree joiners must reject, which would leave every later joiner unable to enter until another commit replaced the GroupInfo.

6.5 Per-group server state

Item Kept
Context reference, generation, state (§4.3) Always
Current epoch, current GroupInfo, interim transcript hash of the current epoch While not retired
Roster: per leaf index, (address, did, igen, ikf, dkf, plat), joinedAt, lastSeenAt, last acknowledged epoch, pending-removal flag While not retired
Pending proposals with their reasons and targets Until covered or reissued
Handshake log (§7.6) At least 30 days (§14.3)
Reference ekid and extPub hash per epoch, whether settled, and the votes until settlement (§15.2) The reference and its settled flag: as long as the log entry, and at least as long as 14 keeps any sealed item of that epoch (14 §5.5). The votes: until settlement.
Pending Welcomes per target device Until fetched and acknowledged, at most 30 days
Index of accepted commit hashes with their CommitResults, and the hash of the accepted epoch-0 GroupInfo At least 24 h (idempotency, §6.4 V2a)
Join queue (§11.5) and per-account fork disputes (§15.2) While in use; disputes 24 h
Generation high-water mark (§4.2) Always, outside restorable DS state

The server never holds any MLS secret, history key or SFrame key.

7. Delivery Service API

7.1 Common rules

  1. Every endpoint in this section is relative to the hosting server's base URL and lives under /v1/contexts/{ctx}/mls/ (00 §7.3). {ctx} is a ch:, dm: or gdm: reference; the colon MAY be percent-encoded.
  2. Every request needs a home session (when the hosting server is the caller's home server), a remote session (06), or, at a secure bot's own home server, the bot token of one of its devices (each bot token is one device record, 05 §15.4); a bot elsewhere uses a remote session like any device. Step V1 of §6.4 applies to every endpoint, except that GET …/mls, GET …/mls/groupinfo, GET …/mls/proposals, GET …/mls/handshakes and GET …/mls/welcome don't require the device to have a leaf: an eligible device needs them to join, and so does a device after an entitled device-level removal (§13.2).
  3. For a context whose security mode is insecure and which never had a group, every endpoint answers 409 mls.context_not_secure.
  4. POST …/mls/commits and POST …/mls/bootstrap accept bodies up to maxMlsUploadBytes (§17.1) instead of maxRequestBytes. Servers SHOULD support HTTP response compression for GroupInfo responses.
  5. All MLS objects are base64url MLSMessage encodings (§2.1). All error answers use the problem object of 00 §7.9; codes are listed in §18.
  6. Clients handle every mls.* error without involving the user. None of them produces a warning (00 §4.12.5).

7.2 GET /v1/contexts/{ctx}/mls — group status

Returns an MlsGroupStatus. It is cheap, carries no GroupInfo, and lets a client decide whether to join, bootstrap, catch up or resync.

Member Type Req. Meaning
ctx string yes The context reference.
groupId string yes The group_id of the current generation (even in state none, so the bootstrapper knows it).
generation integer yes Current generation.
state string yes none, active, frozen or retired (§4.3). Unknown values: treat as retired and re-fetch after 60 s.
epoch integer or null yes Current epoch; null in none and retired.
ekid string or null yes Reference ekid of the current epoch (provisional until settled, §15.2); null when unknown.
ekidSettled boolean yes Whether that reference is settled.
leafCount integer yes Non-blank leaves, including leaves with pending removal.
maxSecureLeaves integer yes The effective limit for this group (§17.1).
pendingProposals array yes ServerProposal summaries (ref, type, reason, target) for the current epoch.
lastCommitAt string or null yes Timestamp of the last accepted commit or bootstrap.
self object or null yes For the calling device: {"leaf": <int>, "lastAckedEpoch": <int or null>, "removalPending": <bool>}; null if it has no leaf.
removedFor string or null yes When self is null or removalPending is true: the §13.1 reason of the calling device's most recent removal in this generation, if the server knows it; otherwise null.
bootstrapAllowed boolean yes In state none: whether this device may bootstrap (§10.1). Otherwise false.
{
  "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
  "groupId": "sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1",
  "generation": 1,
  "state": "frozen",
  "epoch": 41,
  "ekid": "q83vEjRWeJA",
  "ekidSettled": true,
  "leafCount": 212,
  "maxSecureLeaves": 1000,
  "pendingProposals": [
    { "ref": "3Jk0b1Yq9v2Lw8sN4mXcRk1oT6uZp7aQe5fH2dGc9Bw", "type": "remove", "reason": "banned",
      "target": { "addr": "carol@c.com", "did": "Yx3kP0aL9qR2sT5uV8wZ1A", "leaf": 17 } }
  ],
  "lastCommitAt": "2026-12-04T18:20:02.114Z",
  "self": { "leaf": 4, "lastAckedEpoch": 41, "removalPending": false },
  "removedFor": null,
  "bootstrapAllowed": false
}

7.3 GET /v1/contexts/{ctx}/mls/groupinfo — current GroupInfo

Query parameters (optional): include=identityStates adds the cached IdentityState of every address in the roster (channels only; ignored for DMs, whose clients fetch IdentityStates from home servers); intent=join marks a fetch made to build an external commit, which the join queue paces (§11.5). Servers MUST answer with an ETag derived from the generation, the epoch, a hash of the pending proposal refs and the value of include, and honour If-None-Match with 304.

Response GroupInfoResponse:

Member Type Req. Meaning
groupId string yes As in §7.2.
generation integer yes
epoch integer yes The GroupInfo's epoch.
ekid string or null yes Reference ekid for this epoch.
groupInfo string yes The GroupInfo (mls_group_info) uploaded by the epoch's committer or bootstrapper, with ratchet_tree and external_pub.
pendingProposals array yes Full ServerProposal objects (§7.7) for this epoch. A joiner needs them to commit right after joining (§13.5).
identityStates object no Map from canonical address to IdentityState JWS (only with include=identityStates).

Errors: 404 mls.group_not_found in state none (data: groupId, generation, bootstrapAllowed); 410 mls.generation_retired in state retired; 425 mls.commit_busy for a queued joiner (intent=join, §11.5); 503 core.unavailable (retryable, retryAfterMs 5,000) while the stored GroupInfo is marked stale (§15.2 item 5).

{
  "groupId": "sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1",
  "generation": 1,
  "epoch": 41,
  "ekid": "q83vEjRWeJA",
  "groupInfo": "AAEABAABAAEzc3YxOmIuY29tOmNoOjAxOTM4YTExLTJiM2Mt…",
  "pendingProposals": []
}

7.4 POST /v1/contexts/{ctx}/mls/bootstrap — create the group

GroupBootstrap is the normative object for creating a group, wherever it appears. 09 embeds it unchanged as the member bootstrap of the channel-upgrade PATCH /v1/channels/{id}, and 12 embeds it unchanged as the member bootstrap of POST /v1/dms. An embedding operation processes it exactly as this section says, atomically with its own change, and returns this document's mls.* errors unchanged.

Member Type Req. Meaning
generation integer yes MUST equal the context's current generation, whose state MUST be none.
groupInfo string yes Epoch-0 GroupInfo with ratchet_tree (exactly one leaf, index 0: the calling device) and external_pub.
ekid string yes ekid(0) computed by the creator (14).

Endpoint body. The body of POST /v1/contexts/{ctx}/mls/bootstrap is a GroupBootstrap. For a DM or group DM it MAY also carry a member commit: the group's first CommitSubmission (§7.5), epoch 0 → 1, which adds the devices of the KeyPackages the creator claimed, with its Welcome. commit isn't part of the GroupBootstrap object; 12's POST /v1/dms carries the same CommitSubmission as its own member commit beside bootstrap. A DM creator that claimed any KeyPackage MUST send the first commit in the same request. The server applies the bootstrap and the first commit in one transaction: the commit runs the pipeline of §6.4 against the bootstrap's epoch 0, and either both are accepted or neither is.

Checks. The server runs §6.4 steps V1–V5 and then checks: epoch 0; one leaf; GroupContext extensions per §3.5 with the server's current active external-sender key; for DMs, sv_participants per 12's rules and listing the creator with its own ikf; the AS checks of V11 on leaf 0 (channels: A1–A6; DMs: 07 §14.6); the GroupInfo signature by leaf 0; confirmed_transcript_hash empty (RFC 9420 §11). The state test-and-set from none to active is atomic: of several concurrent bootstraps exactly one succeeds.

Idempotency. A bootstrap whose groupInfo is byte-identical to the accepted epoch-0 GroupInfo (and whose commit, if any, has the same commitHash as the accepted first commit) gets the original 201 response again, for at least 24 h (§6.4 V2a).

Response 201 (with commit only when a first commit was sent; it is that commit's CommitResult):

{ "groupId": "sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1",
  "generation": 1, "epoch": 0, "ekid": "Xc0mY2n4QbE", "seq": 9921 }

Errors: 409 mls.group_exists (another device won; data carries a GroupInfoResponse plus bootstrap: {"creator": {"addr", "did"}, "ekid": <ekid(0)>}; a client whose own GroupBootstrap matches that creator and ekid keeps its group, because its earlier request was accepted; any other client discards its group and joins as §10.1 item 4 says); 410 mls.generation_retired; 400 mls.group_id_mismatch; 403 mls.credential_rejected; 403 mls.policy_violation (rule: "bootstrap"); 403 mls.bootstrap_not_allowed (12's DM rules reserve bootstrap to another participant); and the errors of §7.5 for a rejected commit.

7.5 POST /v1/contexts/{ctx}/mls/commits — submit a commit

Body CommitSubmission:

Member Type Req. Meaning
epoch integer yes The epoch the commit was built in. MUST equal the FramedContent epoch.
commit string yes The commit as mls_public_message.
groupInfo string yes The GroupInfo for epoch + 1, signed by the committer, with ratchet_tree and external_pub.
ekid string yes ekid(epoch + 1) as the committer computed it (14). It becomes the provisional reference ekid (§15.2).
welcome string DM commits with Add The Welcome for every added leaf. MUST be absent otherwise.

The server runs the pipeline of §6.4. On success it answers 200 with CommitResult:

Member Type Meaning
groupId string
epoch integer The new epoch (epoch + 1).
ekid string The reference ekid recorded for the new epoch.
seq integer The context seq of the mls.handshake event.
commitHash string base64url SHA-256 of the commit's MLSMessage bytes.

A resubmission of a commit whose commitHash was already accepted returns the original CommitResult with 200, even if the epoch has moved on since (§6.4 V2a, §11.2).

POST {b.com base}/v1/contexts/ch:01938a11-2b3c-7d4e-8f90-112233445566/mls/commits

{ "epoch": 41,
  "commit": "AAEAATNzdjE6Yi5jb206Y2g6MDE5MzhhMTEtMmIzYy03ZDRl…",
  "groupInfo": "AAEABAABAAEzc3YxOmIuY29tOmNoOjAxOTM4YTExLTJiM2Mt…",
  "ekid": "Lm9pRk2wQs4" }
HTTP/1.1 200 OK

{ "groupId": "sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1",
  "epoch": 42, "ekid": "Lm9pRk2wQs4", "seq": 4190,
  "commitHash": "uM0mUf2c4X0yW0k8Vq4v1V3m3j6bq6b8n8V7oQkZ9Yc" }

7.6 GET /v1/contexts/{ctx}/mls/handshakes — handshake log

Query: fromEpoch (required, integer ≥ 0) and limit (1–100, default 50). Returns the accepted commits of the current generation whose commit epoch ≥ fromEpoch, in epoch order: {"items": [HandshakeRecord…], "hasMore": true}. If the log no longer holds the commit for fromEpoch, the server answers 410 mls.log_truncated with data.oldestEpoch, and the client resyncs (§10.5).

HandshakeRecord (also the payload of mls.handshake, §8.3):

Member Type Req. Meaning
groupId string yes
epoch integer yes The epoch the commit was made in.
newEpoch integer yes epoch + 1.
kind string yes external or member. Unknown values: process the commit by its MLS content.
commit string yes The commit exactly as submitted.
committer object yes {"addr", "did", "leaf"}: the committer's canonical address, device ID and leaf index in the new epoch.
proposals array yes The full ServerProposal objects the commit references, so a client replaying the log can process it. Empty if none.
identityStates array yes IdentityState JWSs attached by the server (§8.3). Never empty: it always holds at least the committer's IdentityState.
ekid string yes Reference ekid of newEpoch: the settled value once settled, otherwise the committer's provisional value (§15.2).
ekidSettled boolean yes Whether ekid is settled. Always false in the mls.handshake event, which is sent at acceptance.
commitHash string yes As in §7.5.
welcomeFor array no DMs: {"addr", "did"} of each device added by Welcome.
at string yes Acceptance time.

7.7 GET /v1/contexts/{ctx}/mls/proposals — pending proposals

Returns {"epoch": <current>, "items": [ServerProposal…]}.

ServerProposal (also the payload of mls.proposal, §8.4):

Member Type Req. Meaning
groupId string yes
epoch integer yes The epoch the proposal is bound to.
ref string yes base64url ProposalRef (RFC 9420 §5.2).
type string yes remove or group_context_extensions.
proposal string yes The proposal as mls_public_message.
reason string yes §13.1. Unknown values: treat as lost_access.
target object for remove {"addr", "did", "leaf"} of the leaf to remove.
evidence object no {"identityState": <JWS>} and/or {"deviceRevocation": <JWS>} supporting reasons device_revoked, identity_changed and account_downgraded.
reissueOf string no The ref of the proposal this one replaces after an external commit (§13.5).
issuedAt string yes

The reason, target and evidence members are server annotations, not part of the signed MLS content (§3.2 item 4). Clients use them for diagnostics and for the DM rules of §13.6, never as proof.

7.8 POST /v1/contexts/{ctx}/mls/epoch-ack — acknowledge an epoch

mls.epoch_ack, the name 00, 03, 15 and 18 use, is the EpochAck message a device posts to this endpoint (03 §6.2: the socket carries no client commands).

Member Type Req. Meaning
epoch integer yes The newest epoch the device has fully processed.
ekid string yes ekid(epoch) as the device computed it (14).
extPub string yes base64url SHA-256 of the external_pub public key the device derived for that epoch (RFC 9420 §8.3: the public half of KEM.DeriveKeyPair(external_secret)).

Answers:

  • 200 {"epoch": <int>, "status": "match"}: the epoch's reference is settled and equals the device's (ekid, extPub) pair (§15.2).
  • 202 {"epoch": <int>, "status": "pending"}: the reference is still provisional. The server has recorded the device's vote; the device carries on as a member and doesn't repeat the acknowledgement. If its vote loses, it hears so through mls.resync_required (§15.2 item 4).
  • 200 {"epoch": <int>, "status": "ignored"}: an acknowledgement for an epoch lower than the device's last acknowledged one.
  • 409 mls.fork_detected: the reference is settled and differs; data: {"epoch", "ekid", "extPub"} of the reference. The client resyncs (§15.5).
  • 403 mls.not_member: the device has no leaf in that epoch (data.reason, data.removedFor, §18).
  • 409 core.conflict with data.epoch set to the current epoch: an acknowledgement for an epoch greater than the current epoch.

Unknown status values: treat as match.

The server uses acknowledgements for lastSeenAt (§14.4), commit duty (§13.4), fork settlement (§15.2), deleting delivered Welcomes, and, where 15 says so, media epoch readiness.

7.9 GET /v1/contexts/{ctx}/mls/welcome — fetch a pending Welcome

Returns the Welcome that added the calling device under its current identity generation (the added KeyPackage's credential carries the igen of the device's session), if one is pending: {"groupId", "generation", "epoch", "welcome", "addedBy": {"addr", "did"}}, where epoch is the epoch the device joins at. Otherwise 404 mls.welcome_not_found. The Welcome always carries the ratchet tree (§3.6). The server deletes a Welcome when the device posts an EpochAck for an epoch ≥ its epoch, or after 30 days. A recipient that received the Welcome inside a dm.request (12, D-049) doesn't need this endpoint; one whose dm.request left the Welcome out because it didn't fit fetches it here after Accept. When the server starts the identity_changed procedure for an account (§13.2), it deletes that account's pending Welcomes of the older generation, because its devices can no longer process them.

7.10 POST /v1/contexts/{ctx}/mls/reports — client MLS diagnostics

Body MlsReport:

Member Type Req. Meaning
kind string yes verification_failed, commit_unprocessable, fork_suspected, group_info_invalid. Unknown values: store as other.
generation integer yes
epoch integer yes The epoch concerned.
commitHash string no The commit concerned.
mid string for fork_suspected The message ID of the SealedMessage whose ekid differs (§15.3).
subject object no {"addr", "did", "leaf"} of the leaf or member concerned.
reason string no A short machine reason, for example an identity check result of 07 §10.6, unlisted_identity, ekid_mismatch, epoch_rollback, external_sender. At most 64 characters.
detail string no At most 1,024 characters. MUST NOT contain message content or key material.

Response 202 with no body. Limit: 10 reports per device per group per hour; excess reports are answered 429 core.rate_limited. The server uses reports for operator diagnostics and as §15.3 and §15.4 say; it never acts on a report it can't verify from data it holds. Identity diagnostics about IdentityStates (07 §13.6 S4) don't use this endpoint; they go through 15's diagnostics endpoint.

8. Events

8.1 Catalogue

All mls.* events are defined here (00 §7.5). Durable events carry the context's seq and are replayed on resume (03); ephemeral events aren't.

Type Class ctx Recipients Payload
mls.group_created durable the context Every subscriber of the context stream §8.2
mls.handshake durable the context Every subscriber of the context stream HandshakeRecord (§7.6); reduced payload for subscribers that aren't eligible devices
mls.proposal durable the context Every subscriber of the context stream ServerProposal (§7.7); reduced payload for subscribers that aren't eligible devices
mls.group_retired durable the context Every subscriber of the context stream §8.2
mls.commit_needed ephemeral the context Exactly one device (the designated committer) §8.5
mls.welcome ephemeral the context Sessions of each device added by Welcome {"groupId", "generation", "epoch"}
mls.resync_required ephemeral the context One device §8.6
mls.keypackages_low ephemeral me (home server) The device whose KeyPackages ran low §9.3

Durable mls.* events go to every subscriber of the context stream, because 03 (D3, D4) forbids skipping a seq for some subscribers. A subscriber that isn't an eligible device gets a reduced payload with no MLS bytes: {"groupId", "epoch", "newEpoch", "kind"} for mls.handshake, and {"groupId", "epoch", "ref", "type"} for mls.proposal. mls.group_created and mls.group_retired carry no MLS bytes and go out in full. A device whose delivery was cut by a removal (§13.2) isn't skipped either: the server has ended its subscription to the context stream (03 session.subscription_ended).

An eligible device is an enrolled device of a secure account that is an active member of the channel (09) or a participant of the DM (12), whose delivery hasn't been cut by a removal (§13.2; an identity_changed cut doesn't extend to the same did under the account's current identity generation). Devices of needs_encryption members, and unenrolled devices, aren't eligible.

8.2 mls.group_created and mls.group_retired

{ "v": 1, "t": "mls.group_created", "id": "01938f40-0a1b-7c2d-8e3f-405162738495",
  "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566", "seq": 9921,
  "ts": "2026-12-04T17:02:11.020Z",
  "d": { "groupId": "sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1",
         "generation": 1, "epoch": 0, "ekid": "Xc0mY2n4QbE",
         "creator": { "addr": "alice@a.com", "did": "q2bS9xVg3m0yJpQe1vT0Aw" } } }

mls.group_retired payload: groupId, generation, reason (context_insecure, context_deleted, state_lost, operator; unknown values: treat as operator), and nextGeneration (integer, or null when the context is no longer secure).

8.3 mls.handshake

The payload is the HandshakeRecord of §7.6. The server attaches IdentityStates in identityStates (D-035, HP-2, 07 §13.5):

  • for every commit (every commit carries an UpdatePath, §3.9), the committer's IdentityState that the server used in V11: for A3 and A4 in channels, or in DMs, the state used for a new-device check, or for other commits the newest state the server holds for the committer (07 §13.5);
  • in DMs, for each Add by value, the added person's IdentityState that the server used for C5 on that KeyPackage;
  • for each referenced Remove proposal with reason device_revoked, identity_changed or account_downgraded, the target's newer IdentityState, when the server has it.

Because the DS of a DM checks the same evidence before it sequences a commit (V11), a client holds a DM commit for missing evidence (§15.4, 07 §14.5) only when a server misbehaves.

{ "v": 1, "t": "mls.handshake", "id": "01938f41-55aa-7b10-9c3d-0e1f2a3b4c5d",
  "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566", "seq": 4190,
  "ts": "2026-12-04T18:22:40.008Z",
  "d": { "groupId": "sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1",
         "epoch": 41, "newEpoch": 42, "kind": "member",
         "commit": "AAEAATNzdjE6Yi5jb206Y2g6MDE5MzhhMTEtMmIzYy03ZDRl…",
         "committer": { "addr": "dora@b.com", "did": "Pq7vX2mN0bL4sK8tR1yZcA", "leaf": 0 },
         "proposals": [ { "groupId": "sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1",
                          "epoch": 41, "ref": "3Jk0b1Yq9v2Lw8sN4mXcRk1oT6uZp7aQe5fH2dGc9Bw",
                          "type": "remove", "proposal": "AAEAATNzdjE6Yi5jb206…", "reason": "banned",
                          "target": { "addr": "carol@c.com", "did": "Yx3kP0aL9qR2sT5uV8wZ1A", "leaf": 17 },
                          "issuedAt": "2026-12-04T18:22:31.590Z" } ],
         "identityStates": [ "eyJhbGciOiJFZERTQSIsInR5cCI6InN2LWlkc3RhdGUrand0Ii…" ],
         "ekid": "Lm9pRk2wQs4",
         "ekidSettled": false,
         "commitHash": "uM0mUf2c4X0yW0k8Vq4v1V3m3j6bq6b8n8V7oQkZ9Yc",
         "at": "2026-12-04T18:22:40.001Z" } }

8.4 mls.proposal

The payload is the ServerProposal of §7.7. A client stores every proposal it receives for its current epoch until a commit covers it or the epoch changes.

8.5 mls.commit_needed

Member Type Meaning
groupId string
epoch integer The epoch whose pending proposals need a commit.
proposalRefs array of string Every pending proposal's ref.
reason string removal, key_rotation, reissue, or group_info_refresh (the stored GroupInfo is stale and needs replacing by any member commit, §15.2 item 5; proposalRefs may then be empty, and the device sends a self-update). Unknown values: commit anyway.
deadlineMs integer 3000 (§13.4).
round integer 1 for the first pass over the candidates, then 2, 3…
{ "v": 1, "t": "mls.commit_needed", "id": "01938f41-4c00-7a11-8b22-334455667788",
  "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566", "ts": "2026-12-04T18:22:31.602Z",
  "d": { "groupId": "sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1",
         "epoch": 41, "proposalRefs": ["3Jk0b1Yq9v2Lw8sN4mXcRk1oT6uZp7aQe5fH2dGc9Bw"],
         "reason": "removal", "deadlineMs": 3000, "round": 1 } }

8.6 mls.resync_required

Payload: groupId, generation, epoch (the server's current epoch), and reason: fork (§15.2), commit_unprocessable (§15.4), duplicate_leaf (the server found two leaves for this device), or state_lost. Unknown values: resync. The device resyncs as in §10.5 after a random delay of 0–2 s.

9. KeyPackages

KeyPackages let a device be added to a DM or group DM by Welcome while it is offline (D-036). Channels never use them. Every enrolled device of a secure account (including a secure bot process) MUST keep KeyPackages published at its home server.

9.1 KeyPackage profile

A KeyPackage MUST have: version mls10; ciphersuite 0x0001; a fresh X25519 init_key used in no other KeyPackage (the last-resort KeyPackage excepted, §9.3); a LeafNode with source key_package, the device's sv_device credential, the DSK as signature_key, a fresh encryption_key different from init_key, the capabilities of §3.4, empty leaf extensions, and a lifetime whose not_before is at most 1 h in the future at upload, whose not_after is after the upload time, and whose span is at most 90 days; empty KeyPackage extensions; and a valid signature.

Proposed decision (PD-13-04): the last-resort property is a flag in the KeyPackage API (lastResort), not an MLS extension. Rationale: RFC 9420 doesn't define a last-resort extension, and only the home server needs to know which KeyPackage it may hand out more than once.

9.2 /v1/me/keypackages — publish and manage (home server)

All three methods require a home session of an enrolled device, or the bot token of an enrolled device of a secure bot (a bot token is one device record, so it names the calling device, 05 §15.4); otherwise security.account_required or security.device_not_enrolled. They act only on the calling device's KeyPackages.

POST /v1/me/keypackages — body KeyPackageUpload:

Member Type Req. Meaning
keyPackages array of string yes 0 to 100 KeyPackages (mls_key_package).
lastResort string no One KeyPackage to store as this device's last-resort KeyPackage, replacing any previous one.

The home server MUST validate each KeyPackage: §9.1; the credential chain (07) with sub equal to the account, did equal to the calling device, and igen equal to the account's current one; the device listed active in the account's IdentityState. It stores the valid ones atomically: if any is invalid, nothing is stored and the answer is 400 mls.keypackage_invalid with data: {"index": <int or "lastResort">, "reason": "<short reason>"}. Storing more than 100 regular KeyPackages per device fails with 409 mls.keypackage_limit (data.max: 100). A KeyPackage whose KeyPackageRef is already stored is ignored.

At a reset. A device that resets its identity uploads its first KeyPackages (at least the last-resort one) inside POST /v1/me/identity/reset (07 §11.6) instead of here, so that they exist before identity.changed reaches any DM participant (12 §11.5). The home server validates them exactly as above, against the new generation, and stores them in the reset transaction (07 §15.2 step 6).

Response 200 KeyPackageStatus: {"did", "available": <int>, "lastResort": <bool>, "lastResortUsed": <bool>, "lowWatermark": 10, "target": 50}.

GET /v1/me/keypackages returns the KeyPackageStatus.

DELETE /v1/me/keypackages deletes every KeyPackage of the calling device, including its last-resort one, and returns the KeyPackageStatus. A client calls it when it discards its MLS key store.

The home server MUST delete a device's KeyPackages when the device is revoked (05, 07), and every KeyPackage of an older igen when the account's identity changes (reset, downgrade). It MUST delete regular KeyPackages whose not_after has passed.

9.3 Replenishment and the last-resort KeyPackage

  1. A device keeps at least 10 regular KeyPackages (the low watermark) and refills to 50 (the target). It checks on start-up, after enrolment (08), after every mls.keypackages_low, and at least once every 24 h while running.
  2. Each device keeps exactly one last-resort KeyPackage. The home server hands it out only when the device has no regular KeyPackage left, and doesn't delete it when it does so. The device replaces it within 24 h after it was first handed out (lastResortUsed: true) and otherwise at least every 30 days.
  3. The home server sends mls.keypackages_low (ctx me) to the device's sessions when a claim leaves it with fewer than 10 regular KeyPackages, and each time it hands out the last-resort KeyPackage. Payload: {"did", "available", "lastResort", "lastResortUsed", "target": 50}.
  4. Replenishment is silent (00 §4.12.5).
  5. After a restore. A home server that restores its KeyPackage store from a backup, or may otherwise have lost its record of claims, MUST delete every stored regular KeyPackage before it answers any claim, because one restored from before the backup point may already have been handed out. It keeps each device's last-resort KeyPackage, and sends mls.keypackages_low to each device's sessions when the device next connects, so that the device refills (21 §11.6.4 step 7).

Rationale: 50 KeyPackages cover a burst of new DMs while the device is offline; the last-resort KeyPackage means a device can always be added, at the cost of reusing one init_key until it is replaced, which §14.5's early update repairs.

9.4 POST /v1/keypackages/claim — claim through the home server

A client never contacts another person's home server for KeyPackages. It asks its own home server, which claims locally or over S2S (D-036). Requires a home session of an enrolled device, or the bot token of an enrolled device of a secure bot (§9.2).

Body KeyPackageClaim:

Member Type Req. Meaning
purpose string yes dm_create, dm_add_person, dm_readd (re-adding a person after a reset), or dm_secure (a DM or group DM becoming secure). Unknown values are refused with core.invalid_request.
ctx string no The dm: or gdm: context, when it already exists.
claimId string no A UUIDv7 chosen by the client for this claim. A client that retries a claim whose answer it didn't receive MUST reuse it.
targets array yes 1 to 64 entries {"addr": "<canonical address>", "devices": ["<did>", …]}. devices is optional; when absent, one KeyPackage is claimed for every active device of that account.

Idempotency. For 10 minutes, the claimant's home server answers a repeated (account, claimId) with the result it gave before, and forwards claimId in the S2S claim; the target's home server hands out the same KeyPackages again for a repeated (claimant, claimId, target device) instead of consuming new ones. A claim without claimId isn't idempotent.

The claimant MAY list its own address to add its own other devices; the home server never returns a KeyPackage for the calling device itself.

The home server groups targets by home domain, claims local targets directly, and sends one POST /v1/federation/keypackages/claim per remote domain (§9.5), in parallel, with a 10 s timeout per domain. Response 200 KeyPackageClaimResult:

Member Type Meaning
results array One entry per target, in request order.
results[].addr string The target.
results[].status string ok, not_found (no such account), not_secure (the account is insecure), no_devices (secure, but no device had a KeyPackage), unavailable (refused by the target's home server, for example because the target blocked the claimant; the reason is deliberately not disclosed), rate_limited, unreachable (the home server didn't answer). Unknown values: treat as unavailable.
results[].identityState string The target's current IdentityState JWS (for ok and no_devices).
results[].keyPackages array For ok: {"did", "keyPackage", "lastResort": <bool>} for each device that had one. Devices without one are omitted; they join later by external commit (§10.4).

For purpose dm_readd, a target result other than ok, or KeyPackages that fail §9.6, doesn't stop the re-add: the client commits the thumbprint change without Adds for that person, whose devices then join by external commit (12 §11.5 item 3, §10.4).

POST {a.com base}/v1/keypackages/claim

{ "purpose": "dm_create",
  "targets": [ { "addr": "dan@d.com" }, { "addr": "alice@a.com" } ] }
{ "results": [
    { "addr": "dan@d.com", "status": "ok",
      "identityState": "eyJhbGciOiJFZERTQSIsInR5cCI6InN2LWlkc3RhdGUrand0Ii…",
      "keyPackages": [
        { "did": "Hk2pW9qZ0sV3nC7xB1mL5g", "keyPackage": "AAEABQABAAEg…", "lastResort": false },
        { "did": "Tz8cN4vQ6rP0kJ2wE5yH1a", "keyPackage": "AAEABQABAAEg…", "lastResort": true } ] },
    { "addr": "alice@a.com", "status": "ok",
      "identityState": "eyJhbGciOiJFZERTQSIsInR5cCI6InN2LWlkc3RhdGUrand0Ii…",
      "keyPackages": [
        { "did": "Rr5tY7uI9oP1aS3dF5gH7j", "keyPackage": "AAEABQABAAEg…", "lastResort": false } ] } ] }

Limits at the claimant's home server: at most 300 targets per account per hour and at most 10 claims per (claimant, target address) per hour; excess targets get rate_limited. A repeated claimId counts once.

Errors of the request as a whole (per-target failures are statuses in results):

Status Code When
403 security.account_required, security.device_not_enrolled The caller's account is insecure, or its device isn't enrolled.
400 core.invalid_request More than 64 targets, an unknown purpose, or a malformed claimId.
400 address.non_canonical A target address isn't in canonical form (01).
429 core.rate_limited The caller's own request rate is exceeded (03), as distinct from per-target rate_limited.

9.5 POST /v1/federation/keypackages/claim — S2S claim

Server-to-server only, authenticated with sv-s2s+jwt (06). The receiving server is the targets' home server.

Body:

Member Type Req. Meaning
claimant string yes The canonical address of the user on whose behalf the caller claims. Its domain MUST equal the token's iss (otherwise 403 federation.not_authorized, 06).
purpose string yes As in §9.4.
ctx string no As in §9.4.
claimId string no As in §9.4, forwarded unchanged.
targets array yes 1 to 64 entries {"addr", "devices"?}, each homed on the receiving server. A target on another domain gets status not_found.

The receiver applies, per target: the account exists and is secure; the claimant isn't blocked by the target (12) and the claimant's domain isn't federation-blocked (06), otherwise unavailable; rate limits of at most 10 claims per (claimant, target) per hour and at most 1,000 targets per federation peer per hour, otherwise rate_limited. For each requested active device it hands out one regular KeyPackage, deleting it in the same transaction, or the last-resort KeyPackage if none remain. The response has the same shape as KeyPackageClaimResult (without unreachable).

Per-target limit. Whatever the claimant or peer, the target's home server hands out at most 20 regular KeyPackages per target device per hour; beyond that it hands out the last-resort KeyPackage. When a device hits this limit in 3 or more hours of one day, the home server SHOULD alert its operator. Rationale: per-claimant limits alone let a peer that names many claimants drain a victim continuously, so every real Welcome would use the reused last-resort init_key.

Rationale: claiming through the home server means a client needs no session at the target's home server, the target's home server sees an accountable peer it can rate-limit and block, and the claimant's IP address isn't exposed to it.

9.6 Client checks on claimed KeyPackages

Before adding a claimed KeyPackage, the client MUST check: the IdentityState verifies under the target's home-server keys (07) and is at most 24 h old; the KeyPackage passes §9.1 (including its lifetime); its credential chain verifies (07); its sub is the target and its did is listed active in that IdentityState; the identity key equals the client's pin for the target, or the pin logic of 07 accepts it (first contact pins silently; a changed key goes through W2); the target's ikf is what the client puts into sv_participants. A KeyPackage that fails is skipped silently and reported as a diagnostic; the device can still join later by external commit once it is listed.

10. Joining

10.1 Bootstrap when a context becomes secure

When a context becomes secure (09: channel created secure, channel upgrade, server upgrade; 12: a secure DM or group DM is created, or becomes secure) and its current generation is in state none, the group is created by one enrolled member device:

  1. Who.

    • Channel created secure (on a secure server, or created secure directly): the first enrolled member device that opens it (lazy bootstrap). The creator's client, on an enrolled device, SHOULD open the new channel at once and so normally bootstraps it with POST …/mls/bootstrap. 09's create request carries no GroupBootstrap, because the client can't build the group_id before the server assigns ctx (09).
    • Channel upgrade: the upgrading admin's client, inside the PATCH (09, D-057).
    • Server upgrade, and a later generation: the first enrolled member device that opens the context (lazy bootstrap).
    • Secure 1:1 DM created by POST /v1/dms: the creating device, inside that request (12). Other DMs and group DMs: the device that holds 12's bootstrap grant (12 §11.4).

    bootstrapAllowed in §7.2 says whether this device may.

  2. Build. The device creates an MLS group (RFC 9420 §11) with: the group_id from §4.1 for the current generation; itself as the only leaf; the GroupContext extensions of §3.5, with external_senders naming the server's current active mls-external-sender key from fresh ServerMetadata, and, for DMs, sv_participants listing every participant with the ikf from their verified IdentityState (12 decides who is listed).

  3. Upload. It posts a GroupBootstrap (§7.4) with the epoch-0 GroupInfo and ekid(0). In a DM or group DM it sends, in the same request, the first commit that adds the claimed devices of every participant (and its own other devices) with its Welcome (§7.4, §10.3). The server's compare-and-set accepts exactly one bootstrap per generation.

  4. Lost race. On 409 mls.group_exists, a device whose own bootstrap was in fact accepted keeps its group (§7.4). Any other device discards its group, then:

    • in a channel, joins by external commit (§10.2);
    • in a DM or group DM, fetches GET …/mls/welcome at once and processes the Welcome if there is one (the winner's first commit, applied atomically with its bootstrap, added every device it could claim, 12 §5.3); on mls.welcome_not_found it joins by external commit, which E6 allows because it is listed in sv_participants (§10.4).
  5. DMs. The first commit is how the other participants' devices enter (§10.3); devices for which no KeyPackage could be claimed join later by external commit (§10.4).

Pre-upgrade plaintext is never fed into the group or into sealed content (14 §10.7, D-057).

10.2 Channels: external commit

Every join of a channel group is an external commit (D-036). The same procedure serves a first join, a user's new device, a returning evicted device and a resync.

  1. GET …/mls/groupinfo?intent=join (§7.3). On 404 mls.group_not_found with bootstrapAllowed: true, bootstrap (§10.1). On 425 mls.commit_busy, wait retryAfterMs (§11.5).
  2. Verify the GroupInfo (RFC 9420 §12.4.3): signature, group_id (§4.1), extensions (§3.5, §3.6), external sender (§6.2), tree hash and parent hashes, and the internal chain (A1) of every leaf (§6.1.2). On a failure the device doesn't join: it posts an MlsReport group_info_invalid (§7.10) and fetches GroupInfo again after 60 s, doubling to 1 h, while the context shows its loading state (20). It doesn't enter blocked, because it holds no state for this group. The server re-verifies the GroupInfo on such a report; if it confirms the failure, it marks the GroupInfo stale and requests a refresh exactly as in §15.2 item 5. A device that was already a member and is resyncing follows §10.5 item 5 instead.
  3. Build the external commit (§12.1, rule E1–E5) from the GroupInfo's external_pub, with an UpdatePath and the device's sv_device credential. If the tree holds a leaf with this device's (address, did), include a Remove of it (resync).
  4. Build the GroupInfo for the new epoch and compute ekid(e+1) (14).
  5. POST …/mls/commits (§7.5). Handle mls.epoch_conflict and mls.commit_busy as in §11.3 to §11.5.
  6. On 200, merge the pending commit (§11.2) and post epoch-ack.
  7. If proposals are pending, the server designates the device that has just joined first (§13.4), because it is online and often the only one: on mls.commit_needed it commits them at once. If it isn't designated, it commits them before it sends content (§13.3).
  8. Take the history keys of epochs its account was in from the key archive (14 §10.4) and, in a call, proceed with media keys (15, 18).

User experience. The user sees the channel open. Until step 6 completes the client shows the timeline loading; it shows a closed lock only once it holds current MLS state (SM-12). Messages arrive at once. A newcomer sees K6 at its join point and nothing from before it; a user's own new device shows K4 while keys arrive from the key archive (14 §7.9). There is no prompt.

10.3 DMs and group DMs: Welcome

  1. People are added to a secure DM or group DM by a member commit with Add proposals by value, built from KeyPackages claimed through the committer's home server (§9.4), and a GroupContextExtensions proposal that lists any new person in sv_participants (§12.2). Whether the committer may add that person is 12's rule.
  2. The CommitSubmission carries the Welcome (§7.5), always with the ratchet tree (§3.6). For a new DM or a DM becoming secure, this is the first commit sent with the bootstrap (§10.1). The server stores one copy per added device (§7.9), sends mls.welcome to each added device that has a session, and hands the Welcome to 12 for any dm.request to a recipient who hasn't accepted the DM yet (D-049). If the Welcome doesn't fit in the dm.request, 12 leaves it out and the recipient fetches it after Accept (§3.6, §7.9).
  3. A recipient processes the Welcome (RFC 9420 §12.4.3.1): it verifies the GroupInfo inside it as in §10.2 step 2 (before Accept, the external-sender check uses the keys relayed in the DmRequest, §6.2 item 2), checks that sv_participants lists itself with its own ikf, runs the DM client AS checks of 07 on every leaf, and checks the group_id against the context it was told about (§4.1 item 4). It can then read the first messages without contacting the hosting server.
  4. When it later connects to the hosting server, it fetches the handshake log from its join epoch (§7.6), catches up, repeats the external-sender check of §6.2 item 2 against the hosting server's own ServerMetadata if it processed the Welcome before Accept, and posts epoch-ack. If the log is truncated, it resyncs (§10.5).
  5. The recipient commits an UpdatePath under §14.5.

10.4 A person's later devices

A device of a person who is already in a group (a new device of a channel member, or of a person listed in a DM's sv_participants) joins by external commit exactly as in §10.2 (D-036). In a DM, the hosting server refuses the external commit unless it holds an IdentityState at most 24 h old that lists the joining device (V11; mls.credential_rejected with state_unavailable, retryable, if it can't get one), and attaches that state to the mls.handshake (§8.3). Every member client checks that the joiner's (address, ikf) is listed in sv_participants and runs the DM AS checks of 07 §14.2 with the attached IdentityState; only if that evidence is missing or doesn't verify does it follow §15.4's deferral rule. After an identity reset, the person's new identity isn't listed until a member updates sv_participants (§5.2 item 4, 12 §11.5). Until then the person's new devices, including the device that reset under its old did, wait in state awaiting_readd (§16): they are subscribed to the context (§13.2) but can't join (E6). The member commit that lists the new key normally adds them by Welcome (F6 in 00 §8); a device that commit didn't add, because no KeyPackage could be claimed for it, joins by external commit as soon as it sees that commit. In a DM or group DM, a device first fetches its pending Welcome (§7.9), and joins by external commit only on mls.welcome_not_found and only when sv_participants lists its person with the ikf of its own identity key (12 §11.4).

10.5 Resync

A device resyncs when it has lost or corrupted its MLS state for a group, when mls.log_truncated, mls.fork_detected or mls.resync_required tells it to, when it can't process a sequenced commit (§15.4), or when it finds it was removed, or is about to be removed, for an entitled device-level reason (mls.not_member with reason no_leaf, §13.2, §14.4). The procedure is §10.2 from step 1, with these rules:

  1. The external commit MUST include a Remove of the device's own old leaf if the tree still holds a leaf with its (address, did), and MUST NOT remove any other leaf. This holds even while a server Remove proposal for that leaf is pending; the server then drops the satisfied proposal (§13.5).
  2. The device keeps every history key it already holds (they are in its key archive, 08, 14) and discards only MLS state.
  3. Resync is silent. It is not a warning and has no prompt (00 §4.12.5).
  4. A device removed for reasons kicked, banned, left, lost_access, account_downgraded, participant_removed, participant_left, account_deleted, federation_blocked or device_revoked MUST NOT resync while they hold; its external commit would be refused anyway (V1, A4 or A5, or 06's block).
  5. If the GroupInfo a resyncing device fetched fails its own checks (§10.2 step 2), the device posts an MlsReport group_info_invalid and enters blocked (§15.4, §16); the server's re-verification of §10.2 step 2 then normally gets the GroupInfo replaced.

11. Ordering and the epoch fence

11.1 Single sequencer

The hosting server is the only sequencer of each group (D-037). It accepts a bootstrap or commit only if, in one transaction, the group's stored epoch equals the submission's epoch (or, for a bootstrap, the state is none) and every other check of §6.4 passes; it then advances the epoch, replaces the GroupInfo and appends the log entry (compare-and-set). There is no consensus among members, and no two commits are ever accepted for one epoch.

A server that runs a group on several machines MUST give each group exactly one serialization point (for example a row lock or a single actor per group). The same rule covers the content freeze (§13.3).

11.2 Client commit lifecycle

  1. A client builds a commit against its current epoch and keeps it as a pending commit. It MUST NOT use any key of the new epoch, send SealedMessages under it, or post epoch-ack for it until the server has accepted the commit (RFC 9420 §14).
  2. On 200, it merges the pending commit, installs the new epoch and posts epoch-ack.
  3. On mls.epoch_conflict, mls.proposals_changed, mls.commit_busy or any other rejection, it discards the pending commit.
  4. Unknown outcome (timeout, connection loss): the client resubmits the same CommitSubmission. The server answers from its commit-hash index (§6.4 V2a, kept at least 24 h) with the original CommitResult if the commit was accepted, before any check that depends on the group's current state, or processes it as new. If the answer is nevertheless mls.epoch_conflict (for example after the index expired), the client looks for its own commitHash in the handshake log at its epoch: if present, it merges; otherwise it discards. The same holds for a bootstrap (§7.4).
  5. A client processes other devices' commits strictly in epoch order, from mls.handshake events or the handshake log. It MUST NOT process a commit whose epoch isn't its current epoch.

11.3 Conflicts, retry and jitter

On 409 mls.epoch_conflict the data member carries {"epoch": <current>, "pendingProposals": [...]}, plus "groupInfo": <GroupInfoResponse> when the rejected submission was an external commit (subject to the join queue, §11.5). The problem object's top-level retryAfterMs (00 §7.9) is set when the server sees contention (3 or more conflicts for the group in the last second).

  1. A member catches up: it processes the missing commits from events or GET …/mls/handshakes. An external joiner uses the returned GroupInfo.
  2. It decides again whether its commit is still needed. For example, if another device already committed the pending proposals, a commit made only for them is dropped.
  3. It waits a uniformly random 0–500 ms (or retryAfterMs, if larger), rebuilds against the new epoch and resubmits.
  4. After 5 consecutive conflicts for the same intent it switches to exponential backoff: 1 s, 2 s, 4 s … up to 30 s, each plus 0–500 ms of jitter. It never gives up while it still needs to commit; a joining device keeps showing the loading state meanwhile.

Rationale: the fence makes forks impossible on an honest server, and jitter spreads a burst of commits so they don't collide forever. GroupInfo goes only to external committers, the only submitters that need it, because a member catches up from the log, which is far smaller than a full-tree GroupInfo (about 2 MiB at 1,000 leaves).

Proposed decision (PD-13-15): mls.epoch_conflict carries GroupInfo only for external commits that the join queue doesn't hold back (00 HP-3).

11.4 In-flight limit

The server counts, per group, the commit and bootstrap submissions it has received and not yet answered. If a submission arrives while more than 3 are in flight, the server answers 425 mls.commit_busy with retryAfterMs (250–5,000 ms, chosen by the server from its queue length) (D-059). The server MAY make this check before parsing the MLS objects (that is, before step V4 of §6.4), but only after the idempotency lookup of V2a, so that a resubmission of an accepted commit always gets its CommitResult. The client waits retryAfterMs plus 0–500 ms of jitter and retries with the same body (it doesn't need to rebuild unless the epoch changed meanwhile).

11.5 Join pacing

Only one external commit can succeed per epoch, and each failed attempt would otherwise download a full-tree GroupInfo. After a channel or server upgrade, hundreds of devices join at once; without pacing, attempts and GroupInfo downloads grow roughly with the square of the number of joiners. The server therefore paces joins:

  1. It keeps, per group, a first-in first-out join queue of devices (canonical address, did) waiting to join or resync by external commit. A device enters the queue when one of its external commits, or a GET …/mls/groupinfo?intent=join, arrives while another device's external commit is in flight or was accepted less than 2 s earlier. It leaves the queue when one of its external commits is accepted, or when 10 s pass after its turn came without a submission from it (it then re-enters at the back if it tries again).
  2. While the queue holds more than two devices, the server answers an external commit or a GET …/mls/groupinfo?intent=join from any device other than the first two with 425 mls.commit_busy, data.position (1-based) and retryAfterMs = (position − 2) × the mean interval between the group's last 10 accepted commits, clamped to 250–30,000 ms. It sends no GroupInfo to those devices, and mls.epoch_conflict answers for them carry none.
  3. A client waits retryAfterMs plus 0–500 ms, then fetches GroupInfo with intent=join and If-None-Match. Member commits are never queued; they keep the fence and jitter of §11.3.

Expected join time. With pacing, about one external commit is accepted per 0.5–2 s for a 1,000-leaf group (each joiner downloads and uploads a GroupInfo of about 2 MiB). A channel upgrade with 1,000 enrolled member devices therefore completes in roughly 10 to 30 minutes. A device waiting in the queue shows 20's "Joining…" state, never a prompt; it can still read pre-upgrade history (09).

Proposed decision (PD-13-10): the server paces external commits through a per-group join queue with 425 mls.commit_busy. Rationale: it keeps a mass join after an upgrade to about one GroupInfo download per join instead of one per failed attempt, with no change to the epoch fence.

12. Commit policy

The server enforces these rules at ingress (§6.4 V10) and rejects a violation with 403 mls.policy_violation, whose data.rule names the rule. Clients MUST check the same rules on every commit they process; a violation in a sequenced commit is a positive rejection (§15.4). Every commit, of every kind, MUST include a path (UpdatePath).

12.1 Channels

External commits (sender type new_member_commit):

Rule Requirement
E1 Proposals, all by value: exactly one ExternalInit, and at most one Remove. No proposal by reference. No other proposal type.
E2 The Remove, if present, targets a leaf whose (address, did) equals the joiner's (resync of its own stale leaf).
E3 If the tree holds a leaf with the joiner's (address, did), the Remove of E2 is REQUIRED (one leaf per device).
E4 The UpdatePath leaf node passes the context's AS checks (§6.4 V11: A1–A6 in channels, 07 §14.6 in DMs) and §3.4, §3.7.
E5 The GroupContext extensions are unchanged.

Member commits (sender type member):

Rule Requirement
M1 The sender's leaf matches the session's (address, did) and isn't the target of a pending removal.
M2 Every proposal is by reference to a pending server proposal of the current epoch. No proposal by value. In particular, Add by value is forbidden.
M3 The commit references every pending proposal. Otherwise the server answers 409 mls.proposals_changed with the full current list in data.proposals, and the client rebuilds. The only exception is a DM key rotation absorbed under §12.2 D4.
M4 The UpdatePath leaf node keeps the leaf's credential and signature_key (§3.7 item 4) and passes the context's AS checks again (§6.4 V11; in channels only A3–A5 can change, §6.1.1).
M5 GroupContextExtensions appear only by reference to a server proposal, that is, only when the server requests them.

A member commit with no proposals is a self-update (§14.1).

Proposed decision (PD-13-05): a member commit MUST cover every pending server proposal (M3). Rationale: the freeze lifts on exactly one commit, the server needs no partial bookkeeping, and the race window (a proposal issued while a commit is in flight) costs one rebuild.

12.2 DMs and group DMs

External commits: rules E1–E5, plus:

Rule Requirement
E6 The joiner's (canonical address, ikf) is listed in sv_participants before the commit (§5.3 item 2).

Member commits: rules M1, M3 and M4 apply. Instead of M2 and M5:

Rule Requirement
D1 Proposals by reference MUST each reference a pending server proposal.
D2 Add by value. Server part (checked at ingress, V11): each KeyPackage passes §9.1 (including its lifetime) and 07 §14.6's checks on its leaf node, belongs to a person listed in sv_participants after the commit with the same ikf, and isn't for a device that already has a leaf (unless the same commit removes that leaf). Client part (checked by every member client): additionally 07 §14.2 on every added leaf, including the pin check, and, for the committer, §9.6 on the KeyPackages it claimed. 12 decides whether the committer may add that person.
D3 Remove by value is allowed only for a leaf that (a) belongs to a person this commit drops from sv_participants, (b) carries an ikf that no longer matches its person's entry after this commit, or (c) belongs to the committer's own account. A committer MUST NOT remove its own leaf (RFC 9420).
D4 GroupContextExtensions by value: at most one per commit, and a commit never carries two GroupContextExtensions proposals in total (RFC 9420 §12.2). It changes only sv_participants, keeping required_capabilities and external_senders byte-identical, with one exception: if a server GroupContextExtensions proposal (reason key_rotation, §6.2 item 5) is pending, the committer doesn't reference it, and its own proposal sets external_senders to the value in the pending server proposal. The server checks that value byte for byte and treats the commit as covering the rotation proposal (the exception to M3). The new sv_participants value satisfies §5.1 and the membership rules of 12 (for a 1:1 DM, exactly the two participants).
D5 After the commit, the invariants of §5.3 hold.
D6 A Welcome accompanies the commit exactly when it contains Adds (§6.4 V17).

Rationale: DM membership is controlled by people, not by the hosting server (D-036), so DM members may change sv_participants and add devices; the server can only propose removals, which at worst deny service. The D4 exception exists because a member commit that must change sv_participants (§13.6 item 2, a reset, an added person) couldn't otherwise satisfy M3 while a key rotation is pending: RFC 9420 allows only one GroupContextExtensions proposal per commit, and the group would stay frozen.

Proposed decision (PD-13-12): in DMs, a member's by-value GroupContextExtensions proposal absorbs a pending key-rotation proposal by carrying its new external_senders value. Rationale: it is the only way to change sv_participants and complete a rotation in one valid commit, and it costs the server one byte comparison.

12.3 What every commit carries

Item Where Rule
UpdatePath In the commit Always (§3.9).
GroupInfo for the new epoch with ratchet_tree and external_pub groupInfo Always (§3.6).
ekid of the new epoch ekid Always (§15.2).
Welcome welcome DM commits with Adds.

13. Removals and commit duty

13.1 Triggers and reasons

The hosting server starts the procedure of §13.2 for each of these triggers (D-037). The trigger itself is owned by the document named.

reason Trigger Owner Leaves removed DM effect on sv_participants (§13.6)
kicked A member is kicked 10 Every leaf of the account in the community's channels —
banned A member is banned 10 Every leaf of the account in the community's channels; for a server-scope ban (10 §9.4 step 7), also every leaf in the secure 1:1 DMs hosted here (group DMs use participant_removed) 1:1 DM: unchanged; the DM is closed while the ban lasts (12 §6.2). Group DMs use participant_removed (12 §12.4).
left A member leaves a channel or the community 09 The leaves in the channels left —
lost_access The account can no longer be in the channel: it lost view_channel, became needs_encryption, or its membership otherwise ended 09, 10 The account's leaves in the affected channels —
device_revoked device.revoked for a device, or a DeviceRevocation 05, 06, 07 That device's leaves in every group on this server Unchanged
identity_changed identity.changed with a higher igen and sec: secure (a reset) 07, 06 Every leaf of the account with an older igen Unchanged until a member accepts the new key (§5.2 item 4)
account_downgraded identity.changed with sec: insecure 07, 06 Every leaf of the account Person dropped (secure group DM, SM-9). A 1:1 DM becomes insecure instead and its group is retired (§4.3). Channels: the member becomes needs_encryption (09).
account_deleted account.deleted for the account's recorded incarnation, or a new incarnation of the address (06 §11.6, D-086) 05, 06 Every leaf of the account (of the earlier incarnation) Person dropped
participant_left A participant leaves a group DM 12 Every leaf of that person Person dropped
participant_removed A participant is removed from a group DM under 12's rules 12 Every leaf of that person Person dropped
evicted Inactivity (§14.4), or room needed in a full group (§17.1) 13 That device's leaf Unchanged
stale_leaf A leaf found invalid on re-check (A1–A4), or a duplicate leaf for one device 13 That leaf Unchanged
federation_blocked The hosting server blocks the account's domain (06 §12) 06 Every leaf of the domain's accounts in every group on this server Unchanged (they stay participants, 06 §12.5)

A group_context_extensions server proposal has reason key_rotation (§6.2).

Identity evidence from any source. The triggers device_revoked, identity_changed and account_downgraded don't depend on the S2S event alone. Whenever the hosting server accepts a verified IdentityState with a higher ver from any source (its own fetch, one accompanying a HomeAssertion, or an S2S event, 07 §13.1), it determines the leaves that state makes stale (07 §13.4) and starts this procedure for them. It does so before, or in the same transaction as, accepting any leaf under the new identity (A6, 07 C7). So a device that resets and joins at once, before identity.changed arrives, finds its old leaves already pending removal instead of being refused. A verified IdentityState whose inc differs from the incarnation the hosting server recorded for the account is an account_deleted trigger for every leaf of the earlier incarnation, never identity_changed, although its igen is higher (07 §11.9, §13.4): the earlier account's person is dropped from sv_participants, and the new account is a stranger to the group.

13.2 Server procedure

When a trigger occurs, the hosting server MUST, in this order and without waiting for any member (D-037):

  1. Cut delivery. The cut applies per removed device and depends on the reason:

    Reasons What is cut Requests to this context answer The cut ends
    Account-level: kicked, banned, left, lost_access, account_downgraded, account_deleted, participant_left, participant_removed, federation_blocked Everything about this group and context: the server ends the device's subscription to the context stream (03 session.subscription_ended) and delivers no events, GroupInfo, handshake log, Welcomes, SealedMessages, HistoryShares or media. The membership error of 09, 10 or 12 (a bootstrap or commit submission in a channel gets A5's answer, §6.1.1); 403 federation.blocked for federation_blocked (06) When the account is admitted to the context again (09, 10, 12); for federation_blocked, when the block is deleted (06 §12.5)
    device_revoked As for account-level reasons. The device's sessions end anyway within 60 s (06). 403 mls.not_member, reason: "removal_pending" until the removal commit, then "no_leaf", with removedFor Never for that device; A4 refuses any rejoin
    Entitled device-level: evicted, stale_leaf, identity_changed The removed leaf's share of the context: the subscription to the context stream ends, and no events, Welcomes, SealedMessages, HistoryShares or media are delivered to the device. The server keeps answering the GET endpoints of §7.1 item 2, and accepts a resync external commit from the device whose Remove (E2) targets the pending leaf; the AS checks decide whether the device may rejoin. 403 mls.not_member, reason: "no_leaf", removedFor set, even while the removal is pending When the device's new leaf is accepted. For identity_changed the cut covers only the old identity generation (below)

    14 gives SealedMessage uploads, HistoryShare uploads and the /history/ endpoints the same mls.not_member answers, with the same reason and removedFor (14 §5.2 step 9, §7.7 step 7, §8.1).

    removedFor is the §13.1 reason, so the device knows whether to rejoin (§10.5, §16).

    Scope of an identity_changed cut. A device keeps its did across its own reset (07 §3.2 item 3, 08 §7, 08 §11.2 S2), so an identity_changed cut is bound to the removed leaf's identity generation, not to the did. It covers the device's sessions of the old generation: a remote session whose HomeAssertion carries the old igen (06 §7.2 ends it anyway) and, at the device's own home server, the subscriptions to this context made while the device was enrolled in the old generation, which the server ends. A session of the same did under the account's current igen (a remote session created from a HomeAssertion with the current igen, 06 §6.3, or a home session once the device is enrolled in the current generation, 07 §15.2) isn't cut. It is an eligible device without a leaf (§8.1): it may subscribe to the context stream; it receives mls.handshake, mls.proposal, mls.group_retired and mls.welcome; it may use the GET endpoints of §7.1 item 2, including its pending Welcome (§7.9); and it joins as §10.2 (channels) or §10.4 (DMs) allows. In a DM that still lists its person with the old ikf it waits in awaiting_readd (§16, 12 §11.5). Requests that need a leaf answer as the row above says until its new leaf is accepted. What it is served of a DM's timeline is limited by 12 §11.5 item 4 (D-007).

    Rationale: HP-3 cuts the removed leaf off from handshakes, GroupInfo and media. Serving GroupInfo to a device that rejoins with a new leaf after eviction doesn't serve the removed leaf, and HP-3 itself expects evicted devices to rejoin silently. Without this, a returning device in a quiet group would wait for some other member to commit its removal before it could rejoin. The same reasoning binds an identity_changed cut to the old generation: a device under the new generation holds no removed leaf (D-036, D-037).

  2. Revoke voice leases. Call 15's lease revocation for each removed device's participant in this context's call, so the next lease snapshot excludes it and every honest path cuts it within 4 s (D-046). A stale_leaf removal of a duplicate leaf, while the device keeps another leaf for the same did, doesn't revoke the device's seat (15 §12.4).

  3. Propose. Issue the Remove server proposals for the first trigger at once (one per removed leaf, §6.3) and emit mls.proposal for each. Further triggers that arrive within the next 1 s add their proposals to the same epoch.

  4. Freeze. Enter state frozen (§13.3) with the first proposal.

  5. Designate. Start commit duty (§13.4) 1 s after the first trigger, so that the first mls.commit_needed lists every proposal of the batch; a commit made earlier (for example before sending content) must still cover every pending proposal (M3).

Proposed decision (PD-13-13): after an entitled device-level removal (evicted, stale_leaf, identity_changed) the device keeps read access to the GroupInfo, status, proposals and log, and may resync at once, even while its removal is pending. Rationale: these devices' accounts are still in the context; making them wait for a member to commit their removal would leave a returning user stuck on "loading" in a quiet channel, while the AS checks still stop any device that is no longer valid.

For triggers that arrive by S2S (identity.changed, device.revoked, account.deleted), steps 1–5 start as soon as the event is processed; 06 bounds that at 60 s after the home server's fan-out.

13.3 Content freeze

While a group is frozen, the server MUST reject every SealedMessage submission for the context (messages, edits, reactions, author deletes and every other kind 14 defines) with 409 mls.commit_required, retryable: true, and data: {"epoch": <current>, "proposals": [ServerProposal…]} (commit-before-send, D-037).

The freeze doesn't block: commits, bootstraps, epoch acknowledgements, proposal and GroupInfo fetches, HistoryShare uploads, read state, typing, and the call control and media of remaining participants. A pending GroupContextExtensions proposal alone never freezes a group.

The freeze predicate. A group is frozen exactly when its state is frozen (§4.3), that is, when at least one server Remove proposal is pending. 14's SealedMessage acceptance step "Freeze" (14 §5.2 step 10) MUST use this predicate, and nothing else, to decide whether to answer mls.commit_required.

Client behaviour. On mls.commit_required, the sending client commits every pending proposal itself (§12.1 M3), waits for acceptance, then re-seals the queued content under the new epoch and resends it with the same mid (11). The user sees, at most, a brief "Sending…" state. A client that already knows of pending proposals SHOULD commit before sending instead of waiting for the error.

Proposed decision (PD-13-06): only pending Remove proposals freeze a group; a key-rotation proposal doesn't. Rationale: the freeze exists so that no new content is encrypted to a removed device; rotating the server's external-sender key carries no such risk and shouldn't block conversation.

13.4 Designated committer

The server runs this state machine per group while proposals are pending (D-037).

Candidates: online devices (§2.2) with a leaf in the current epoch, not targeted by a pending removal and not on the skip list, ordered by leaf index, lowest first.

State Event Action Next state
idle Proposals become pending (new or reissued) If there is a candidate: send mls.commit_needed to the first, start a 3 s timer designating
idle Same, no candidate — waiting
designating An accepted commit covers every pending proposal Cancel timer idle
designating An accepted external commit advances the epoch Reissue (§13.5); designate the external committer first if it is a candidate (it is online and holds the new epoch), otherwise the first candidate designating
designating Timer expires, or the candidate goes offline, or its submission fails validation or gets a retryable refusal (core.unavailable, or mls.credential_rejected with state_unavailable) Designate the next candidate at once, restart the 3 s timer designating
designating Candidates exhausted Start a 30 s pause; round + 1 waiting
waiting A candidate comes online, or the pause ends with a candidate available Designate the first candidate designating
any A device was designated in 3 consecutive rounds without committing Put it on the skip list for 10 min unchanged

Device obligations. On mls.commit_needed, a device first catches up to the named epoch if it is behind, then builds a member commit covering every pending proposal (with an UpdatePath) and submits it within 3 s. A device that can't do so ignores the event; the server moves on. Devices that weren't designated SHOULD NOT commit pending proposals spontaneously, except before sending content (§13.3) or as their own self-update (§14.1), so that commits don't collide.

If no member is online, the group stays frozen and nothing is lost: removed devices already receive nothing (§13.2), and the next member to act, including a device that joins by external commit, commits first.

13.5 Proposal reissue after an external commit

An external commit can't include proposals by reference (RFC 9420 §12.4.3.2). When the server accepts an external commit at epoch e while proposals are pending, it MUST, in the same transaction: for each pending Remove, find its target (address, did) in the new tree; if the target is still present, issue an equivalent proposal for epoch e + 1 with reissueOf set to the old ref; if not (for example, the joiner's resync removed its own pending leaf), drop it. A pending GroupContextExtensions proposal is reissued too, rebuilt from the GroupContext of epoch e + 1 (§6.3). It emits mls.proposal for each new proposal and restarts commit duty with reason reissue. The group stays frozen while any reissued proposal is a Remove, and becomes active if none is.

13.6 DM-specific removal rules

  1. In DMs and group DMs, member clients commit server proposals exactly as in channels. The DM client AS doesn't refuse to commit a server Remove: the hosting server could deny service to that device anyway (00 §5.2).
  2. When a committer covers Remove proposals with reason participant_left, participant_removed, account_downgraded or account_deleted that remove all of a person's leaves, the same commit MUST include a GroupContextExtensions proposal by value that drops that person from sv_participants (D4). If a key-rotation proposal is pending, that by-value proposal absorbs it (D4's exception). For the other reasons, sv_participants is unchanged.
  3. When an existing secure 1:1 DM becomes insecure (SM-8), its group is retired (§4.3) rather than shrunk; a later return to secure uses a new generation (§4.2 case G-a).
  4. 12 decides which DM membership changes produce which reason and what system line the timeline shows.

14. Housekeeping

14.1 Self-update

A device MUST commit an UpdatePath (a member commit with no proposals, or covering pending proposals if there are any) in each group where it has been active and whose own leaf hasn't been refreshed by one of its commits, or by its join, for 7 days. Active means the device opened the context, sent content in it, or took part in its call during those 7 days. The device commits at its next opportunity after a random delay of 0–60 s. An inactive device doesn't need to; eviction (§14.4) handles devices that stay away.

Rationale: a weekly self-update bounds how long a compromised leaf key stays useful (post-compromise security) at a cost of roughly one commit per active device per week, which a 1,000-leaf group handles easily.

14.2 Epoch acknowledgements

After processing one or more commits, a device MUST post epoch-ack (§7.8) for the newest epoch it holds, within 5 s, and again after any reconnect once it has caught up. A device MUST follow the answer: on mls.fork_detected, it resyncs (§15.5); on 202 pending, it carries on and resyncs only if mls.resync_required (reason fork) or a later mls.fork_detected tells it to (§15.2).

14.3 Handshake log retention

The server MUST keep every accepted commit of the current generation in the handshake log for at least 30 days after acceptance, and MAY keep it longer. It keeps only the current GroupInfo. A device that falls further behind than the log reaches resyncs (§10.5).

14.4 Eviction and silent rejoin

  1. For each leaf, the server keeps lastSeenAt: the latest of the leaf's join, and the device's last epoch acknowledgement, commit or bootstrap in that group.
  2. When lastSeenAt is more than 90 days old (30 days when the device's platform is web according to its DeviceCertificate), the server issues a Remove proposal with reason evicted (§13.2). The server SHOULD run eviction once a day and batch the results per group. Devices of a secure bot (plat: bot) use the 90-day limit (D-059).
  3. A device that returns finds its leaf gone or pending removal: the server answers its requests (for example its epoch-ack) with 403 mls.not_member, reason: "no_leaf" and removedFor: "evicted" (§13.2), and GET …/mls shows the same in removedFor. It rejoins silently by external commit (§10.5) the next time it needs the group, even if the removal hasn't been committed yet. The keys of the epochs it missed come from the account's key archive, written by the account's other devices that were in those epochs (14 §10.4, 08 §9); items of epochs in which no device of the account had a leaf stay unavailable (14 §6.4).
  4. To avoid needless evictions, a running client SHOULD bring every secure group it belongs to on a server up to date (fetch the log and acknowledge) at least once every 7 days, even for contexts the user hasn't opened.

Rationale: dead devices otherwise bloat the tree and make every commit larger; a returning device pays one external commit and notices nothing.

14.5 First update after a Welcome or last-resort KeyPackage

A device that joined by Welcome MUST commit an UpdatePath before it sends its first SealedMessage in that group, and within 24 h of processing the Welcome if it is active. This replaces the leaf keys that sat in a published KeyPackage, possibly the last-resort one (§9.3).

15. Fork detection and resync

15.1 How a device's state can diverge

With one sequencer and PublicMessage, every honest device processes the same byte sequence and derives the same epochs. Divergence comes only from: lost or rolled-back device storage; implementation bugs; a commit that one device can't process although others did; a server that lost or rolled back its own state; or a malicious committer. The tools below detect each case and resync is the cure. None of them is ever shown to the user as a warning.

15.2 Reference ekid and acknowledgement comparison

The server compares what each device derived for an epoch with a reference, using two public values: the ekid (14) and the hash of the epoch's external_pub (§7.8). Together they are the epoch's pair.

  1. Candidate. When the server accepts the bootstrap or commit that creates epoch e, the candidate pair is the submission's ekid and the SHA-256 of the external_pub in its GroupInfo. The reference of e is provisional until settled. An epoch 0 created by a bootstrap settles at once (there is no other member).

  2. Votes. Each account that had a leaf in epoch e − 1 has one vote: the pair in the first epoch-ack for e from any of its devices. The committer's account votes for the candidate through its submission. Votes from an account that is ignored under item 6 don't count.

  3. Settlement. The reference settles at the earliest of:

    • (a) at least two accounts other than the committer's have voted, and every vote equals the candidate: the candidate settles;
    • (b) every account with an online device (§2.2) that had a leaf in e − 1 has voted;
    • (c) 30 s after the commit was accepted.

    In cases (b) and (c) the reference is the pair with the most votes; a tie goes to the candidate, and so does an epoch with no vote but the committer's.

  4. Answers. While the reference is provisional, every acknowledgement for e is answered 202 pending (§7.8) and never with mls.fork_detected. At settlement the server sends mls.resync_required (reason fork) to every device whose recorded vote lost, and from then on answers acknowledgements for e with 200 match or 409 mls.fork_detected.

  5. When the candidate loses. The committer's device counts as a loser: it gets mls.resync_required (reason fork) and resyncs. If the settled external_pub hash differs from the stored GroupInfo's, the stored GroupInfo is stale: external joiners would build on a key the members don't hold. The server then answers GET …/mls/groupinfo and external commits with 503 core.unavailable (retryable, retryAfterMs 5,000), and sends mls.commit_needed (reason group_info_refresh) to an online device that voted for the settled pair, then to the next such device every 3 s as in §13.4. That device sends a member commit (covering any pending proposals, otherwise a self-update) whose new GroupInfo replaces the stale one. If only the ekid differs, the GroupInfo stays usable.

  6. Disputes. The server counts, per group, the settlements in which an account's vote lost. Votes from an account with 2 or more lost votes in that group within 24 h are ignored there for the next 24 h. A committer whose candidate lost isn't penalised beyond its resync.

  7. Clients. A device posts its acknowledgement whatever its own comparison with the candidate in the HandshakeRecord, and doesn't resync on its own judgement: it follows the server's answers (§14.2).

Rationale: an honest device that processed a commit successfully (the confirmation tag verified) holds the committer's epoch secrets, so a mismatch at acknowledgement means that someone misreported. The provisional window keeps one bad committer from making every member resync, and keeps two colluding members from making honest devices resync before the honest devices' votes are counted.

Proposed decision (PD-13-07): forks are detected by comparing each device's (ekid, external_pub hash) with a server-held reference that starts as the committer's value and settles by a vote of the accounts that were members in the previous epoch, within 30 s; ties go to the committer. Rationale: both values are public, the comparison needs no secret, a single bad committer or a small set of colluding members can't make everyone else resync, and a bad external_pub is caught before it breaks every later join.

15.3 ekid mismatch in SealedMessages

14 defines the ekid in every SealedMessage. Once the reference of (generation, epoch) is settled, the server checks the ekid at SealedMessage ingress and answers a mismatch with 409 mls.fork_detected (14 §5.2 step 11). While the reference is provisional it doesn't check (§15.2 item 4). A client therefore meets a mismatching ekid only in a message accepted while the reference was provisional, or from a misbehaving server. Otherwise forks are found through acknowledgements (§15.2) and client reports. A client that receives a SealedMessage for epoch e with an ekid different from its own ekid(e):

  • if the reference of e is still provisional, waits for it to settle (at most 30 s, §15.2) and then decides as below;
  • if its own value equals the settled reference, treats the message as one it can't decrypt (14 §6.6), and sends an MlsReport fork_suspected with the message's mid and the sender as subject. The server compares the ekid of the SealedMessage it stored (14 §5.5) with the settled reference of that (generation, epoch). Only if they differ does it send mls.resync_required (reason fork) to the sender's device; otherwise it records the report as a diagnostic and does nothing else;
  • otherwise, it is itself forked and resyncs (§10.5).

15.4 Commits a device can't or mustn't process

Case Examples Device action
Unprocessable Membership tag or confirmation tag mismatch; a path secret that won't decrypt; local state error Post MlsReport commit_unprocessable; resync (§10.5) after a random 0–2 s. The sequence is authoritative, so the device's own state is the likely problem.
Deferred (DMs only) A new device of a listed person, but neither the attached IdentityState (§8.3) nor a fetch gives one at most 24 h old that lists it. With an honest server this doesn't happen, because the DS checks the same evidence first (V11). Hold the commit, and every later handshake and message of the group, unprocessed, as 07 §14.5 says: retry fetching the person's IdentityState after 5 s, 15 s and 60 s, then every 5 minutes. Process when it arrives; after 24 h, treat it as rejected (state_unavailable) and resync.
Positive rejection A leaf whose internal chain (A1) fails; in a DM, an L5 violation (07; in a channel it is only a diagnostic, §3.7 item 2); an external DM commit from an unlisted identity (E6); a profile violation (§3, §12); a server proposal that changes sv_participants, or whose new external sender fails §6.2 item 6; a mismatching group_id or external sender (before Accept, an external sender that the relayed keys don't confirm defers the Welcome instead, §6.2 item 2); an epoch rollback within a generation (§4.4) Don't process it. Post MlsReport verification_failed with the reason. Enter blocked (§16).

A device in blocked:

  1. keeps showing everything it could already read, shows no closed lock (SM-12), and disables sending in that context. The context is presented like an unreachable server (20), never with a security warning (D-055);
  2. polls GET …/mls/groupinfo with backoff (60 s, doubling to 1 h);
  3. leaves blocked by resyncing (§10.5) when a GroupInfo passes every check of §10.2 step 2 and, for a DM, every person in its sv_participants was listed in the last sv_participants the device accepted (key changes for those people go through 07's pin logic). Otherwise it stays blocked; the user can still leave the conversation (12).

A server that receives verification_failed reports SHOULD alert its operator. If a report names a channel leaf, the server MUST re-run A1–A4 on it and, if it fails, remove it with reason stale_leaf.

15.5 Resync

Resync is §10.5. A device resyncs at most once per 10 s per group; repeated failures back off exponentially up to 10 min.

15.6 Server state loss and generation retirement

  1. A server that restores DS state from a backup, or otherwise may have lost accepted commits, MUST retire the current generation of every affected group (reason state_lost) and allocate the next before it accepts any new submission for those contexts (§4.2 case G-b). It allocates from its generation high-water mark, or adds 1,000 if it can't trust that mark (§4.2), so that it never hands out a generation number that clients already saw with different keys.
  2. An operator MAY retire a group that can't be repaired, for example after repeated positive rejections (reason operator, case G-c).
  3. Devices that receive mls.group_retired with a nextGeneration bootstrap or join that generation (§10). In DMs, the bootstrapping device lists in sv_participants exactly the people of the previous generation's last sv_participants that 12 still counts as participants, and adds their devices by Welcome.

Rationale: reusing an epoch number with different keys would give two different K_hist for one (group ID, epoch), which breaks the key archive's de-duplication (08) and the ekid checks. A new generation has a new group_id, so nothing collides.

16. Client group state machine

Per (context, generation), a client keeps one of these states.

State Meaning
absent No MLS state for this group.
bootstrapping A GroupBootstrap is in flight.
joining An external commit is in flight.
welcomed Joined from a Welcome; not yet caught up with the server's log. It may read, but MUST NOT send content or show the closed lock.
awaiting_readd DMs and group DMs only, after the user's own identity change: the group exists, no Welcome is pending for this device, and sv_participants doesn't list its person with the ikf of its own identity key (12 §11.5). The device stays subscribed to the context (§13.2), sends nothing (content waits in the outbox, 11 §13.3), shows no closed lock and shows 12 §11.7's status line. This is never a positive rejection: nothing is wrong with the group.
member Holds the current epoch. The only state in which the closed lock may be shown (SM-12) and content may be sent.
committing A member with a pending commit in flight (§11.2).
catching_up A member processing missed commits.
deferred Holding a commit for evidence (§15.4).
blocked After a positive rejection (§15.4).
removed Removed for a membership reason; won't rejoin.
retired The generation is retired.
State Event Action Next state
absent User opens the context, or a background sync needs it; mls.group_not_found with bootstrapAllowed Bootstrap (§10.1) bootstrapping
absent Same; channel; group exists Fetch GroupInfo with intent=join; on 425, wait retryAfterMs (§11.5); then external commit (§10.2) joining
absent DM or group DM; group exists GET …/mls/welcome (§7.9). If a Welcome is pending, process it. On mls.welcome_not_found, fetch GroupInfo (§7.3) and check it (§10.2 step 2): if sv_participants lists this device's person with the ikf of this device's own identity key, join by external commit (§10.4); otherwise (the user's own identity changed and no participant has listed the new key yet, 12 §11.5) wait welcomed, joining or awaiting_readd
awaiting_readd mls.welcome; an mls.handshake; a new subscription to the context; the user opens the context; or the re-add re-check timer (§17.2) Repeat the absent DM check above: GET …/mls/welcome, else GroupInfo welcomed, joining or awaiting_readd
absent Fetched GroupInfo fails §10.2 step 2 MlsReport group_info_invalid; fetch again after 60 s, doubling to 1 h; show loading absent
absent Welcome received (§10.3) Process the Welcome welcomed
bootstrapping 201 Post epoch-ack member
bootstrapping mls.group_exists naming this device's own bootstrap (§7.4) Keep the group; post epoch-ack member
bootstrapping mls.group_exists, otherwise Discard. Channel: external commit. DM: fetch the Welcome, else external commit (§10.1 item 4) joining or welcomed
bootstrapping Unknown outcome Resubmit the same body (§7.4 idempotency) bootstrapping
bootstrapping mls.credential_rejected with state_unavailable, or 503 federation.home_unreachable Wait retryAfterMs (default 30 s), then retry bootstrapping
joining 200 Merge; post epoch-ack; commit pending proposals if designated (§10.2 step 7) member
joining Unknown outcome Resubmit the same body (§11.2 item 4) joining
joining mls.epoch_conflict / mls.commit_busy Retry (§11.3 to §11.5) joining
joining mls.group_full, retryable Wait retryAfterMs, then retry joining
joining mls.group_full, not retryable Stop; show 20's "full" state; try again the next time the user opens the context absent
joining mls.group_id_mismatch Refresh GET …/mls, rebuild, retry joining
joining mls.generation_retired Discard; move to the named generation, if any retired
joining mls.credential_rejected with state_unavailable, 503 core.unavailable, or 503 federation.home_unreachable Wait retryAfterMs (default 30 s), then retry joining
joining mls.credential_rejected with another reason, or a membership error Stop; surface the owning document's gate (for example G1, G2) or nothing; §18 says when to retry once absent
welcomed Log fetched and processed (for a Welcome read before Accept, the repeated external-sender check of §6.2 item 2 has also passed) Post epoch-ack member
welcomed The repeated external-sender check of §6.2 item 2 fails MlsReport verification_failed with reason external_sender (§7.10); §15.4 blocked
welcomed mls.log_truncated Resync joining
member mls.handshake or log entry Process (§11.2 item 5) member, or deferred / blocked / joining (unprocessable)
member mls.commit_needed, mls.commit_required, self-update due Build and submit a commit committing
member epoch-ack answered 202 pending Nothing member
committing 200 Merge; post epoch-ack member
committing Unknown outcome Resubmit the same body (§11.2 item 4) committing
committing mls.commit_busy Wait retryAfterMs plus 0–500 ms; resubmit the same body committing
committing mls.handshake for another device's commit Hold it unprocessed until the submission is answered committing
committing mls.epoch_conflict / mls.proposals_changed Discard; process held commits and catch up; rebuild if still needed (§11.3) catching_up
committing mls.credential_rejected with state_unavailable, or core.unavailable Discard; retry after retryAfterMs (default 2 s, doubling to 60 s) if still needed member
committing mls.policy_violation, mls.verification_failed Discard; record a diagnostic; resync if it repeats member
catching_up Caught up Post epoch-ack member
member / catching_up mls.fork_detected, mls.resync_required, mls.log_truncated Resync (§10.5) joining
member / catching_up A processed commit removes this device, or mls.not_member with no_leaf If the reason (removedFor, or the Remove's reason) is evicted, stale_leaf or identity_changed, or unknown while the account is still allowed: discard MLS state and resync when next needed. Otherwise discard MLS state absent or removed
member mls.not_member with removal_pending Stop sending; check GET …/mls after 2 s, doubling to 60 s member until the outcome is known
deferred Evidence arrives / 24 h pass Process / reject and resync (07 §14.5) member / joining
blocked A GroupInfo passes §15.4 item 3 Resync joining
any mls.group_retired Discard MLS state (keep history keys) retired, then absent for the next generation if one is named

17. Limits and timers

17.1 Limits

Limits are advertised in ServerMetadata limits (02, 00 §7.12).

Limit Default Floor Maximum Meaning
maxSecureLeaves 1,000 100 65,536 Non-blank leaves in one group, counting leaves with pending removal (D-059). A commit that would exceed it fails with 409 mls.group_full, after the server has tried to make room as below.
maxMlsUploadBytes 8 MiB 3 MiB — Body size of POST …/mls/commits and POST …/mls/bootstrap. A server MUST set it to at least 2,048 × maxSecureLeaves + 65,536 bytes (2,113,536 bytes at the default maxSecureLeaves).

Rationale for the leaf maximum: adds fill the leftmost blank leaf, so while a group never holds more than maxSecureLeaves leaves every leaf index stays below it, and 65,536 keeps leaf indices within the 16-bit S field of the SFrame KID (18, D-041). That is why leaves with a pending removal still count.

Making room. When a join (an external commit, or Adds in a DM) would exceed maxSecureLeaves, the server first issues Remove proposals with reason evicted (§13.2) for as many leaves as the join needs, choosing leaves whose lastSeenAt (§14.4) is more than 7 days old, the longest-idle first. It then answers 409 mls.group_full with retryable: true and retryAfterMs 5,000 while removals it has issued, or other pending removals, will make room once committed. It answers retryable: false only when no leaf is pending removal and no leaf has been idle for 7 days. An evicted device rejoins silently when it returns, if there is room (§14.4).

Proposed decision (PD-13-11): a full group evicts its longest-idle devices (idle more than 7 days) to admit a new device. Rationale: a member who is allowed in a channel, or a member's new phone, shouldn't meet a permanent "full" state because of devices nobody has used for weeks; the idle devices lose nothing but a silent rejoin.

Rationale for maxMlsUploadBytes: a GroupInfo carries the whole ratchet tree, and each leaf with its sv_device credential is about 1.1–1.4 KiB before base64url, so a 1,000-leaf GroupInfo is about 1.6–2 MiB in JSON, more than maxRequestBytes (03). See open question OQ-13-1 for very large groups.

Proposed decision (PD-13-08): add the limit maxMlsUploadBytes (default 8 MiB, floor 3 MiB, and at least 2,048 × maxSecureLeaves + 65,536 bytes) for MLS uploads. Rationale: full-tree GroupInfo uploads for default-sized groups don't fit the general request limit, and a 3 MiB floor covers the sizing rule at the default 1,000 leaves.

Other fixed limits:

Item Value
Regular KeyPackages stored per device at most 100
Last-resort KeyPackages per device exactly 1
KeyPackage lifetime span at most 90 days
KeyPackages per upload request at most 100
Targets per claim request (client and S2S) at most 64
Claims per (claimant, target) at most 10 per hour
Targets claimed per account at most 300 per hour
Targets claimed per federation peer at most 1,000 per hour
Regular KeyPackages handed out per target device, all claimants together at most 20 per hour; then the last-resort KeyPackage
sv_participants entries (encoding) 1 to 1,024 (12's maxGroupDmParticipants is the policy limit)
group_id length at most 320 bytes
Commits or bootstraps in flight per group A submission that arrives while more than 3 are in flight gets 425
External committers served at once by the join queue the first 2 in the queue (§11.5)
MlsReports per device per group 10 per hour
Ignored fork votes an account with 2 lost votes in a group within 24 h, for 24 h (§15.2)

17.2 Timers

Timer Value Section
IdentityState freshness for channel AS checks 300 s (an existing leaf's UpdatePath during a home outage: unexpired) §6.1.1
IdentityState fetch timeout; retry after state_unavailable 5 s; 30 s §6.1.1, 07 §13.3
IdentityState age to admit a new device in a DM at most 24 h §10.4, V11, 07
Removal batching window; commit duty starts 1 s after the first trigger §13.2
Designated-committer deadline per candidate 3 s §13.4
Pause after all candidates fail 30 s §13.4
Skip list after 3 unanswered rounds 10 min §13.4
Conflict retry jitter uniform 0–500 ms §11.3
Conflict backoff after 5 conflicts 1 s doubling to 30 s, plus jitter §11.3
commit_busy retryAfterMs 250–5,000 ms §11.4
Self-update interval while active 7 days, then 0–60 s random delay §14.1
First update after a Welcome before first send; within 24 h if active §14.5
epoch-ack after processing within 5 s §14.2
Handshake log retention at least 30 days §14.3
Eviction 90 days without being seen; 30 days for web §14.4
Background group refresh by running clients at least every 7 days §14.4
Welcome retention until acknowledged, at most 30 days §7.9
Commit-hash and bootstrap idempotency index at least 24 h §6.4 V2a, §7.4, §11.2
Fork settlement window at most 30 s after the commit §15.2
Stale GroupInfo: retryAfterMs for joiners 5,000 ms §15.2
Fork-vote disputes 2 lost votes in 24 h ignore an account's votes for 24 h §15.2
Resync rate limit per group once per 10 s, backing off to 10 min §15.5
Delay before resync on mls.resync_required or unprocessable commit random 0–2 s §8.6, §15.4
Deferred-commit evidence retries 5 s, 15 s, 60 s, then every 5 min, up to 24 h (07 §14.5) §15.4
Blocked-state, and failed-join, GroupInfo polling 60 s doubling to 1 h §10.2, §15.4
removal_pending re-check 2 s doubling to 60 s §16
Re-add wait re-check (awaiting_readd) 30 s doubling to 10 min, only while the context is on screen or content waits to be sent; mls.welcome, mls.handshake and a new subscription trigger an immediate check §16, 12 §11.5
Join queue: wait per position; turn expiry; recent-commit window position × mean commit interval, 250–30,000 ms; 10 s; 2 s §11.5
mls.group_full retry while room is being made; idle threshold for making room 5,000 ms; 7 days §17.1
KeyPackage low watermark / target 10 / 50 §9.3
Last-resort KeyPackage replacement within 24 h of first use; otherwise every 30 days §9.3
KeyPackage claim timeout per remote domain 10 s §9.4
KeyPackage claim idempotency (claimId) 10 min §9.4
External-sender key pre-publication at least 25 h (02), waived after a revocation §6.2

18. Error codes

Every code is in the mls area (00 §7.5). title strings are informative. No code leads to a security warning; the client handles each one silently as described.

Code HTTP retryable userAction data Meaning and client handling
mls.epoch_conflict 409 true none epoch, pendingProposals, groupInfo (GroupInfoResponse; external commits not held back by the join queue, §11.5). The top-level retryAfterMs is set under contention. The commit's epoch isn't the current one. Catch up, rebuild, retry after jitter (§11.3).
mls.commit_required 409 true none epoch, proposals Content refused while the group is frozen. Commit pending proposals, then resend (§13.3).
mls.proposals_changed 409 true none epoch, proposals A member commit didn't cover every pending proposal (M3). Rebuild with the given list.
mls.commit_busy 425 true wait position (join queue only); the top-level retryAfterMs is always set More than 3 submissions in flight (§11.4), or the device is waiting in the join queue (§11.5). Retry with the same body after the delay.
mls.credential_rejected 403 only for state_unavailable none (retry for state_unavailable) reason: an identity check result of 07 §10.6; subject: the leaf's canonical address; membershipCode (with not_permitted) The AS checks refused a leaf (§6.1.1, V11). state_unavailable: retry after retryAfterMs (30,000). device_not_listed, generation_mismatch or key_mismatch shortly after this device was enrolled or its account was reset: refresh the remote session with a fresh HomeAssertion (06) and retry once; show G2 only if the home server itself reports the device unenrolled. Any other or unknown reason: don't retry now, record a diagnostic, and try again no sooner than the next time the user opens the context.
mls.verification_failed 400 false none reason: malformed, signature, group_info, tree A submitted MLS object failed parsing or verification (§6.4). A client bug; record a diagnostic. Also the kind clients use in MlsReports (§7.10).
mls.policy_violation 403 false none rule: a §3 rule name (ciphersuite, wire_format, authenticated_data, credential_type, credential_changed, capabilities, extensions, external_sender, duplicate_leaf, welcome, bootstrap, sv_participants) or a §12 rule ID (E1–E6, M1–M5, D1–D6) The commit breaks the profile or commit policy. A client bug; record a diagnostic.
mls.not_member 403 false none reason: no_leaf, removal_pending; removedFor: the §13.1 reason, when known no_leaf: the device has no usable leaf; it joins or resyncs if removedFor is null, evicted, stale_leaf or identity_changed and the account is still allowed (§13.2, §16). removal_pending: a non-entitled removal (for example device_revoked) is pending; stop sending and re-check GET …/mls after 2 s, doubling to 60 s. Unknown reason: treat as no_leaf.
mls.group_not_found 404 true none groupId, generation, bootstrapAllowed No group yet for the current generation (state none). Bootstrap if allowed (§10.1), else retry after 2 s, doubling to 60 s.
mls.group_exists 409 false none GroupInfoResponse, plus bootstrap: {"creator", "ekid"} of the accepted epoch 0 A bootstrap lost the race, unless bootstrap names this device's own request. Join as §10.1 item 4 says.
mls.group_id_mismatch 400 false none expected The group_id doesn't match the context and generation. Refresh status and rebuild.
mls.generation_retired 410 false none generation, nextGeneration (or null) The generation is retired (§4.3). Move to the next generation, or stop if null.
mls.group_full 409 true while room is being made, else false wait or none maxSecureLeaves; top-level retryAfterMs when retryable The group has reached maxSecureLeaves (§17.1). Retryable: wait and retry. Otherwise the client shows the context as full (copy in 20) and tries again the next time the user opens it; this is not a security warning.
mls.log_truncated 410 false none oldestEpoch The requested log entries are gone (§14.3). Resync.
mls.fork_detected 409 false none epoch, ekid, extPub (the settled reference) The device's acknowledged pair (§15.2), or the ekid of a SealedMessage it posted (14 §5.2 step 11), differs from the settled reference. Resync, then resend with the same mid.
mls.welcome_not_found 404 false none — No pending Welcome for this device. Join by external commit if listed, or wait for 12's flow.
mls.keypackage_invalid 400 false none index, reason An uploaded KeyPackage failed §9.2 checks. Regenerate.
mls.keypackage_limit 409 false none max More than 100 regular KeyPackages would be stored. Upload fewer.
mls.context_not_secure 409 false none — The context is insecure and never had a group.
mls.bootstrap_not_allowed 403 false none — 12's rules reserve bootstrap of this DM to another participant's device. Wait for the Welcome.

Codes from other areas used here: security.account_required, security.device_not_enrolled, security.would_downgrade (00); core.too_large, core.rate_limited, core.invalid_request, core.conflict, core.unavailable (03); address.non_canonical (01); membership codes of 09, 10 and 12 (for example moderation.banned, 10), which the GET endpoints still answer, while a channel bootstrap or commit submission carries them in mls.credential_rejected data.membershipCode (§6.1.1 A5); federation.home_unreachable (06); federation.* codes for S2S authentication (06).

Example:

{
  "type": "urn:sloppyv:error:mls.commit_required",
  "code": "mls.commit_required",
  "title": "The group must be updated before new messages are accepted",
  "status": 409,
  "retryable": true,
  "retryAfterMs": null,
  "userAction": "none",
  "data": {
    "epoch": 41,
    "proposals": [
      { "groupId": "sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1", "epoch": 41,
        "ref": "3Jk0b1Yq9v2Lw8sN4mXcRk1oT6uZp7aQe5fH2dGc9Bw", "type": "remove",
        "proposal": "AAEAAQA0c3Yx…", "reason": "banned",
        "target": { "addr": "carol@c.com", "did": "Yx3kP0aL9qR2sT5uV8wZ1A", "leaf": 17 },
        "issuedAt": "2026-12-04T18:22:31.590Z" }
    ]
  }
}

19. Example transcripts

These transcripts are informative. MLS objects are abbreviated with "…".

19.1 T1 — channel upgrade and the first joins

Ops@b.com (ch:01938a11-…) is upgraded by Dora (dora@b.com, enrolled). Alice and Bob are secure members.

  1. Dora's client creates a one-leaf group with group_id sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1 and external_senders naming b.com#mls-2026-12a, and sends 09's PATCH with {"security": "secure", "dryRun": false, "bootstrap": {"generation": 1, "groupInfo": "…", "ekid": "Xc0mY2n4QbE"}}.
  2. b.com runs the bootstrap checks of §7.4 and the upgrade of 09 in one transaction. It emits channel.security_changed (09) and mls.group_created (epoch 0).
  3. Alice's and Bob's clients fetch …/mls/groupinfo?intent=join (epoch 0) and both build external commits for epoch 0. Alice's arrives first and is accepted (epoch 1, seq 9922). Bob's gets 409 mls.epoch_conflict with the epoch-1 GroupInfo (only two joiners, so the join queue holds nobody back, §11.5).
  4. Bob's client waits 317 ms (random), rebuilds from the epoch-1 GroupInfo and is accepted (epoch 2).
  5. Dora's and Alice's clients process both mls.handshake events and post epoch-ack for epoch 2 with ekid Q1w2E3r4T5y. Two accounts other than Bob's have now voted for Bob's candidate, so the reference settles at once (§15.2 item 3a); the first answer is 202 pending, the second 200 match.
  6. Nobody sees a prompt. Each client shows the closed lock once it is member.

19.2 T2 — a ban in a secure channel

Carol (carol@c.com) has leaf 17 in the T1 channel, now at epoch 41. Leaf 0 is Dora's desktop (it bootstrapped the group in T1), leaf 1 Alice's laptop, leaf 2 a phone in the background (no WebSocket), and leaf 9 Bob's desktop.

  1. A moderator bans Carol (10). Within the same second b.com cuts delivery to Carol's sessions, revokes her lease (15), issues Remove(17) as external sender with reason banned, emits mls.proposal, and freezes the group.
  2. Online candidates in leaf order: 0 (Dora), 1 (Alice), 9 (Bob). One second after the ban (§13.2 item 5), b.com sends mls.commit_needed (round 1) to leaf 0.
  3. Dora's client is busy and doesn't answer within 3 s. b.com designates leaf 1.
  4. Meanwhile Bob tries to post a message and gets 409 mls.commit_required. Bob's client commits Remove(17) by reference with an UpdatePath (epoch 41 → 42) and is accepted first.
  5. Alice's commit for epoch 41 arrives 200 ms later and gets 409 mls.epoch_conflict. Her client catches up, sees nothing pending, and drops its commit.
  6. The group is active again. Bob's client re-seals his message under epoch 42 and resends it with the same mid. In the call, call.epoch_ready and call.epoch_switch rotate media keys (15, 18). Members see 10's system line about the ban; nobody is prompted.

19.3 T3 — an external commit while frozen

The group is frozen at epoch 50 with Remove(23) pending (reason device_revoked). No member is online. Eve's new laptop opens the channel.

  1. GET …/mls/groupinfo returns epoch 50 and the pending proposal.
  2. Eve's external commit (ExternalInit only) is accepted: epoch 51. In the same transaction b.com reissues Remove(23) for epoch 51 with reissueOf and keeps the group frozen.
  3. Eve's laptop is the external committer and the only candidate, so it is designated first (§13.4). It receives mls.commit_needed (reason reissue), commits Remove(23) (epoch 52), and posts epoch-ack.
  4. Only then can Eve's laptop send content. The whole sequence takes well under a second and is invisible to Eve.

19.4 T4 — creating a secure DM

Alice (alice@a.com, devices A1 and A2) writes to Dan (dan@d.com, devices D1 and D2) for the first time. By 12's rule the DM dm:… is hosted at a.com.

  1. A1 claims KeyPackages: POST {a.com}/v1/keypackages/claim with targets dan@d.com and alice@a.com (§9.4). a.com claims locally for A2 and sends POST {d.com}/v1/federation/keypackages/claim for Dan. Results: D1 regular, D2 last-resort, A2 regular, plus both IdentityStates.
  2. A1 checks the KeyPackages (§9.6) and pins Dan's identity key silently (07).
  3. A1 creates the group with sv_participants = [alice@a.com + Alice's ikf, dan@d.com + Dan's ikf] (test vector T-SVP) and sends POST {a.com}/v1/dms (12) with bootstrap (the GroupBootstrap) and commit (the first CommitSubmission, epoch 0 → 1) that adds D1, D2 and A2 by value, with a Welcome that carries the ratchet tree.
  4. a.com runs the bootstrap checks (§7.4) and, for the commit, V11 (07 §14.6 on A1's leaf and on the KeyPackage leaves of D1, D2 and A2, with IdentityStates at most 24 h old, fetching Dan's from d.com), the server part of D2, and V17. It accepts both in one transaction, stores the Welcome for A2, sends mls.welcome to A2, and gives the Welcome to 12's dm.request for Dan's home server d.com.
  5. A1 sends its first SealedMessage under epoch 1 (14).
  6. D1 processes the Welcome from the message request without contacting a.com: it checks the group_id against the host it computes itself, checks the external sender against a.com's mls-external-sender keys that d.com relays in the DmRequest (§6.2 item 2, 12 §10.1), checks sv_participants, and decrypts the message. After Dan accepts, D1 opens a remote session at a.com, fetches the log from epoch 1, repeats the external-sender check against a.com's ServerMetadata, posts epoch-ack, and commits an UpdatePath before replying (§14.5). D2 replaces its last-resort KeyPackage within 24 h (§9.3).

19.5 T5 — a reset in a group DM

Saxon resets his identity (07, F6). The group DM gdm:… hosted at a.com contains Alice, Carol and Saxon.

  1. a.com receives identity.changed for Saxon (new igen), cuts delivery to his old devices, issues Remove proposals with reason identity_changed and the new IdentityState as evidence, and freezes the group.
  2. Carol's client is designated and commits the removals by reference. sv_participants still lists Saxon with his old ikf.
  3. Saxon's device keeps its did but is now of the new igen, so the cut of step 1 doesn't apply to it (§13.2). It opens a new remote session at a.com, subscribes to the group DM, finds no pending Welcome and, from the GroupInfo, that sv_participants lists him with his old ikf. It can't join by external commit (E6), so it waits in awaiting_readd (§16) and shows 12's status line. Its first KeyPackages were uploaded with the reset (07 §11.6).
  4. Alice's client shows W2 (07). Saxon is an unverified contact for Alice, so her client accepts the new key, claims Saxon's KeyPackage (purpose dm_readd, §9.4), and commits a GroupContextExtensions proposal by value (Saxon's new ikf) together with an Add of his new device, with a Welcome (D2, D4).
  5. Carol's client processes that commit. Saxon is a verified contact of Carol's, so her client shows W2 and blocks sending until Carol taps "Accept new key" (07); it doesn't reject the commit (§5.3 item 4).
  6. Saxon's device receives mls.welcome, processes the Welcome and is a member. a.com serves his account nothing of the group DM from before Alice's commit (12 §11.5 item 4, D-007), and his client shows K6 at that point. Had Alice's claim returned no KeyPackage, her commit would only have replaced his ikf; Saxon's device, seeing that mls.handshake, would then have joined by external commit.

19.6 T6 — fork detection

A desktop restored its local storage from an old file-system backup, so its state for a channel's epoch 77 differs from everyone else's.

  1. It posts epoch-ack {"epoch": 77, "ekid": "AAAAAAAAAAA", "extPub": "…"}. The reference for epoch 77 settled long ago, so it gets 409 mls.fork_detected with the reference ekid Zz9Yy8Xx7Ww.
  2. It resyncs: it fetches GroupInfo (epoch 80), finds its own (address, did) at leaf 12, and sends an external commit containing ExternalInit and Remove(12).
  3. Other members acknowledge epoch 81 with the desktop's candidate, so the reference settles. Its history keys came from its key archive (08). The user noticed nothing.

19.7 T7 — eviction and silent rejoin

Bob's web client hasn't been used for 31 days.

  1. b.com's daily eviction issues Remove for Bob's web leaf with reason evicted, and commit duty removes it.
  2. Bob opens the web client. It posts epoch-ack for its last epoch and gets 403 mls.not_member with reason: "no_leaf" and removedFor: "evicted" (§13.2).
  3. It rejoins by external commit (§10.5) and takes the keys of the epochs it missed from Bob's key archive, which his other devices wrote (14 §10.4). The messages from those epochs fill in place as their keys arrive (14 §6.5); Bob sees no marker and no prompt. Had no other device of Bob's been in the group meanwhile, messages from those epochs would stay unavailable (14 §6.4). Had nobody committed the removal yet, the same external commit would have removed the old leaf itself.

20. Test vectors

All values are hexadecimal unless stated. Varint lengths follow RFC 9420 §2.1.2. The vectors in §20.1–§20.8 were computed from the definitions in this document and RFC 9420; implementations MUST reproduce them exactly.

20.1 T-VAR — variable-length integer prefixes

Length Encoding
37 25
300 412c
70000 80011170

20.2 T-GID — group_id bytes

String Length UTF-8 bytes
sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1 51 7376313a622e636f6d3a63683a30313933386131312d326233632d376434652d386639302d3131323233333434353536363a31
sv1:a.com:dm:3q2-7wAAAAAAAAAAAAAAAA:2 37 7376313a612e636f6d3a646d3a3371322d3777414141414141414141414141414141413a32

Negative cases a client MUST reject: sv1:B.com:ch:…:1 (uppercase domain), sv1:b.com:ch:…:01 (leading zero), sv1:b.com:ch:…:0 (generation 0), sv1:b.com:ch:…:2147483648 (generation above the cap), any group_id whose domain is an alias of the hosting server.

20.3 T-SVP — sv_participants

Inputs:

address ikf (base64url) ikf (hex)
alice@a.com NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs 3736cbb1787cb8309c77ee8c3705c5e16ffb9e859715901f1e4c59b11182f57b
dan@d.com 0f4mJ0yZ8tq3mX2l0b4vC1y9Zr6pQhN7sW3eK5uT8dA d1fe26274c99f2dab7997da5d1be2f0b5cbd66bea942137bb16dde2b9b93f1d0

extension_data (90 bytes):

4058
  0b 616c69636540612e636f6d
  20 3736cbb1787cb8309c77ee8c3705c5e16ffb9e859715901f1e4c59b11182f57b
  09 64616e40642e636f6d
  20 d1fe26274c99f2dab7997da5d1be2f0b5cbd66bea942137bb16dde2b9b93f1d0

Contiguous: 40580b616c69636540612e636f6d203736cbb1787cb8309c77ee8c3705c5e16ffb9e859715901f1e4c59b11182f57b0964616e40642e636f6d20d1fe26274c99f2dab7997da5d1be2f0b5cbd66bea942137bb16dde2b9b93f1d0

As an Extension (type f5a1, then the opaque extension_data with prefix 405a), 94 bytes:

f5a1405a40580b616c69636540612e636f6d203736cbb1787cb8309c77ee8c3705c5e16ffb9e859715901f1e4c59b11182f57b0964616e40642e636f6d20d1fe26274c99f2dab7997da5d1be2f0b5cbd66bea942137bb16dde2b9b93f1d0

Negative cases: the same two entries in the order dan, alice (unsorted); an ikf of 31 bytes; Alice@a.com (non-canonical); two entries for alice@a.com.

20.4 T-REQ — required_capabilities

extension_data: 02f5a1 (extension_types = [0xF5A1]) 00 (proposal_types = []) 040001f5a0 (credential_types = [0x0001, 0xF5A0]) = 02f5a100040001f5a0 (9 bytes).

As an Extension: 00030902f5a100040001f5a0.

20.5 T-EXT — external_senders

Inputs: signature_key = the RFC 8032 §7.1 TEST 1 public key d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a; identity b.com#mls-2026-12a.

  • ExternalSender (54 bytes): 20d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a 0001 12622e636f6d236d6c732d323032362d313261
  • extension_data (55 bytes: the prefix 36 and the 54-byte ExternalSender): 3620d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a000112622e636f6d236d6c732d323032362d313261
  • As an Extension: 0005373620d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a000112622e636f6d236d6c732d323032362d313261

20.6 T-CAP — leaf Capabilities

versions [0x0001], cipher_suites [0x0001], extensions [0xF5A1], proposals [], credentials [0x0001, 0xF5A0] (no GREASE):

02 0001 02 0001 02 f5a1 00 04 0001 f5a0, contiguous: 02000102000102f5a100040001f5a0.

20.7 T-PREF — a server Remove proposal and its ProposalRef

Inputs: group_id of §20.2 row 1; epoch 41 (0000000000000029); sender external, sender_index 0; empty authenticated_data; a Remove of leaf 17; signed with the RFC 8032 §7.1 TEST 1 private key 9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60 (the external-sender key of §20.5). Ed25519 is deterministic, so the signature is reproducible.

FramedContent (73 bytes):

33 7376313a622e636f6d3a63683a30313933386131312d326233632d376434652d386639302d3131323233333434353536363a31   group_id
0000000000000029                                                                                            epoch 41
02 00000000                                                                                                 sender: external, index 0
00                                                                                                          authenticated_data
02                                                                                                          content_type: proposal
0003 00000011                                                                                               Remove, removed = 17

FramedContentTBS = 0001 (mls10) ‖ 0001 (mls_public_message) ‖ FramedContent, with no GroupContext (sender type external, RFC 9420 §6.1). The signature is SignWithLabel(key, "FramedContentTBS", FramedContentTBS):

030c78b35b2e6fb339e4155750b0f6135b434e2ef39cb9ac29269005a4e05e07d4bbf18f3e619ec044688f450497df1abe4077aa53a949fb1ee20d5a3c04b10b

The MLSMessage (143 bytes) is 0001 0001 ‖ FramedContent ‖ 4040 ‖ signature, with no membership_tag:

00010001337376313a622e636f6d3a63683a30313933386131312d326233632d376434652d386639302d3131323233333434353536363a31
000000000000002902000000000002000300000011
4040030c78b35b2e6fb339e4155750b0f6135b434e2ef39cb9ac29269005a4e05e07d4bbf18f3e619ec044688f450497df1abe4077aa53a949fb1ee20d5a3c04b10b

In JSON (base64url): AAEAATNzdjE6Yi5jb206Y2g6MDE5MzhhMTEtMmIzYy03ZDRlLThmOTAtMTEyMjMzNDQ1NTY2OjEAAAAAAAAAKQIAAAAAAAIAAwAAABFAQAMMeLNbLm-zOeQVV1Cw9hNbQ04u85y5rCkmkAWk4F4H1Lvxjz5hnsBEaI9FBJffGr5Ad6pTqUn7HuINWjwEsQs

The ProposalRef is RefHash("MLS 1.0 Proposal Reference", AuthenticatedContent), where AuthenticatedContent (141 bytes) is 0001 (wire format) ‖ FramedContent ‖ 4040 ‖ signature, and RefHash is SHA-256 over 1a ‖ the 26-byte label ‖ 408d ‖ the 141 bytes:

  • ProposalRef (hex): 40fda27105fbf69d7ab4a7fe2f7e5fbd23237ccba289247c998207e3b3d8480f
  • ProposalRef (base64url, the ref of §7.7): QP2icQX79p16tKf-L35fvSMjfMuiiSR8mYIH47PYSA8

Because the TBS holds no GroupContext, the vector doesn't depend on the tree or transcript. A server proposal is bound to its group only by group_id and epoch (§21 item 15).

20.8 T-KPREF — a KeyPackage and its KeyPackageRef

Inputs, all reproducible:

Field Value
version, cipher_suite 0001, 0001
init_key X25519 public key of the RFC 7748 §6.1 Alice private key 77076d0a7318a57d3c16c17251b26645df4c2f87ebc0992ab177fba51db92c2a: 8520f0098930a754748b7ddcb43ef75a0dbf3a0d26381af4eba4a98eaa9b4e6a (distinct from the device's box key, §3.3 item 5)
encryption_key X25519 public key of the RFC 7748 §6.1 Bob private key 5dab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e0eb: de9edb7d7b7dc1b4d35b61c2ece435373f8343c85b78674dadfc7e146f882b4f
signature_key Alice's desktop DSK of 07 §21.1 (RFC 8032 TEST 2): 3d4017c3e843895a92b70aa74d1b7ebc9c982ccf2ec4968cc0cd55f12af4660c
credential f5a0 ‖ 4192 ‖ the 402-byte IdentityCertificate of 07 §21.2 ‖ 4233 ‖ the 563-byte DeviceCertificate of 07 §21.3, which carries dbk (971 bytes; 07 §21.7)
capabilities T-CAP (§20.6)
leaf_node_source, lifetime 01 (key_package); not_before 1764800000, not_after 1772576000 (90 days)
Leaf and KeyPackage extensions empty

Both signatures use the DSK private key (TEST 2, 4ccd089b28ff96da9db6c346ec114e0f5b8a319f35aba624da8cf6ed4fb8a6fb): SignWithLabel(…, "LeafNodeTBS", …) over the LeafNode fields (with no group context, because the source is key_package), then SignWithLabel(…, "KeyPackageTBS", …) over the KeyPackage fields.

  • LeafNode signature: fccc83186d72591281496fe575901f2ec83b2b8dd9a1d72558ec41a803cd7b09755298c1bb8618cb7d71a5998c747e3e79cf7aab6868179523cf8e88b289700f
  • KeyPackage signature: 7fa970119ed275be7f8c4e79b3aecf44370cb71b3d3e9cfcb0ca7daaf96fe2f476cf5c65d29f9b03d7eed73c2c23310f51b5be6b3807254591236a9d6894840d
  • KeyPackage: 1,240 bytes, SHA-256 ca683cc2e50881bc5b30cafe7e020f47dece9c321164ea37873fb92c287bd05c
  • KeyPackageRef = RefHash("MLS 1.0 KeyPackage Reference", KeyPackage): eb00247a5c65fd1eac2f2153a7fc31d9ace47b3150cef518a193e66dacea563d (base64url 6wAkelxl_R6sLyFTp_wx2azkezFQzvUYoZPmbazqVj0)

This KeyPackage passes §9.1 at any upload time between 1764800000 − 3,600 and 1772576000. The ekid a device posts in epoch-ack is computed exactly as in 14's ekid vector.

General MLS behaviour (tree math, key schedule, transcript hashes, external commits, Welcome) is covered by the MLS working group's interoperability test vectors for RFC 9420; implementations MUST pass those for ciphersuite 0x0001.

20.9 Policy vectors (server ingress)

Each row is a submission against a channel group at epoch 41 with no pending proposals unless stated, and the expected answer.

Submission Expected
Member commit at epoch 40 409 mls.epoch_conflict
Resubmission of a commit accepted at epoch 40, now at epoch 41 200 with the original CommitResult (V2a)
External commit containing an Add by value 403 mls.policy_violation, rule: "E1"
External commit by a device that already has leaf 9, with no Remove 403 mls.policy_violation, rule: "E3"
External commit removing leaf 5 of another account 403 mls.policy_violation, rule: "E2"
Member commit with Remove(17) by value 403 mls.policy_violation, rule: "M2"
Member commit without a path 403 mls.policy_violation, rule: "M4"
Member commit at epoch 41, Remove(17) pending, commit references nothing 409 mls.proposals_changed
SealedMessage post while Remove(17) is pending 409 mls.commit_required
SealedMessage post while only a key_rotation proposal is pending Not refused by the freeze (§13.3)
Commit sent as PrivateMessage 403 mls.policy_violation, rule: "wire_format"
External commit by an account banned from the channel 403 mls.credential_rejected, reason: "not_permitted", membershipCode: "moderation.banned" (V1, answered as A5)
External commit whose home server can't be reached for a fresh IdentityState 403 mls.credential_rejected, reason: "state_unavailable", retryable: true, retryAfterMs 30,000
External commit when the group has maxSecureLeaves leaves, none pending removal and none idle for 7 days 409 mls.group_full, retryable: false
A 5th concurrent submission 425 mls.commit_busy
DM external commit by eve@e.com, not in sv_participants 403 mls.policy_violation, rule: "E6"
DM member commit at epoch 10 with Remove(5) (participant_left, the person's last leaf) and a key_rotation proposal pending; the commit references Remove(5) only and carries one by-value GroupContextExtensions that drops the person and sets external_senders to the rotation proposal's value 200; both pending proposals are covered (D4)
The same, but the by-value proposal keeps the old external_senders 403 mls.policy_violation, rule: "D4"
The same, but the commit references the rotation proposal and also carries the by-value proposal 403 mls.policy_violation, rule: "D4" (two GroupContextExtensions proposals)
DM external commit by dan@d.com's device D1 under igen 2, after his reset, while sv_participants still lists Dan with his igen 1 ikf 403 mls.policy_violation, rule: "E6" (the device waits in awaiting_readd, §16)
The same external commit after an accepted member commit replaced Dan's ikf without adding D1 (its dm_readd claim returned no_devices) 200

21. Security considerations

  1. A malicious Delivery Service (any hosting server) decides the order of commits, because it is the sequencer, and it can delay or withhold handshakes, GroupInfo, Welcomes and proposals, or serve stale GroupInfo. All of these deny service only. It can't forge a member commit (PublicMessage signatures and membership tags), can't forge a GroupInfo (signed by the committer's leaf and checked against the tree hash), can't read content (it holds no group secret), and can't add a person to a secure DM (§5). It can partition a group by giving different members different sequences; each partition stays confidential to legitimate members, but members may not notice the partition. ekid comparison is run by the same server, so it doesn't detect a deliberate partition; it exists to catch accidents.
  2. A malicious channel hosting server is the channel AS and can admit leaves it controls, including a fabricated identity for a user of another server whose internal chain verifies. Such leaves appear in the roster. Clients' background check of the relayed IdentityState (§6.1.2) detects a fabricated identity of another server's user, but by design only as a diagnostic (D-035, 00 §10 items 1–2). The user's own devices raise W4b if their own address appears with a different key (07).
  3. External-commit abuse. GroupInfo contains no secrets; the external_pub key lets anyone build an external commit, which is why the server runs A1–A6 on every external commit in channels and why clients reject unlisted identities in DMs (E6). A device removed for an account-level reason or device_revoked can't rejoin: its delivery is cut, its requests are refused, and V1, A4 or A5 rejects its external commit. A device removed for an entitled device-level reason may rejoin only by passing every AS check again (§13.2). A device that reset its own identity keeps its did; the identity_changed cut binds to the old generation (§13.2), so under the new generation the device may follow a DM's events and fetch its Welcome, but it still can't join a DM until a member lists its new key (E6), and the hosting server serves it nothing from before that re-add (12 §11.5 item 4). An external joiner learns only the new epoch's secrets, never earlier ones. Earlier history reaches a device only through its own account's key archive (14 §10.4) or a member's deliberate HistoryShare (14 §7), and a newcomer account is served nothing from before its join (14 §10.2).
  4. Post-compromise security. Every commit carries an UpdatePath, active devices self-update at least weekly (§14.1), devices joined from a KeyPackage update soon after (§14.5), and a removal commit gives the removed leaf no new path secrets. Between a removal trigger and its commit, the removed device still knows the current epoch's keys: the freeze (§13.3) stops new content being encrypted to it, delivery is cut, and its lease is revoked within 4 s; media sent under the old epoch until the media switch could still be decrypted by it if it obtained the ciphertext, for example through a colluding relay (18).
  5. History keys outlive their epochs (D-007, D-054, 00 §10). MLS gives forward secrecy for its own secrets, but a user's devices and key archive keep K_hist so that the user's own new devices can read what the user could read (14 §3.7, §12). Nothing hands those keys to other accounts' newcomers. This document doesn't weaken that further.
  6. Last-resort KeyPackages reuse one init_key and leaf key across several groups until replaced. §9.3 bounds the reuse to 24 h after first use and §14.5 replaces the leaf keys quickly.
  7. KeyPackage exhaustion and social-graph exposure. A claimant can try to drain a target's regular KeyPackages. Per-claimant and per-peer limits (§9.4, §9.5), the per-target limit of 20 regular KeyPackages per device per hour (§9.5), claimId idempotency, and the last-resort KeyPackage keep the target reachable and bound how often Welcomes fall back to the reused last-resort init_key. A claim tells the target's home server who wants to message whom. This is the same information the later dm.request carries (12).
  8. Unauthenticated annotations. The reason, target and evidence members of server proposals aren't covered by the MLS signature. In DMs a lying server could make a committer drop a person from sv_participants (§13.6 item 2) or remove devices. Both deny service only: the server could withhold delivery anyway, and it still can't add anyone.
  9. External-sender key compromise lets an attacker send Remove and external_senders-only GroupContextExtensions proposals: denial of service only, because clients refuse any server change to sv_participants or other extensions and refuse external Adds (§6.2, §6.3). The attacker can't rotate a group to a key of its own, because clients accept a new external sender only if the hosting server's ServerMetadata lists it (§6.2 item 6). The operator revokes and rotates the key (§6.2 item 8, 02).
  10. Fork-detection gaming. Settlement counts one vote per account that was a member in the previous epoch, and no device is told to resync before the reference settles (§15.2). A single bad committer can therefore make only itself resync. Colluding members win a vote only if they control more voting accounts than the honest accounts that acknowledge within 30 s; then they can make the honest devices resync, at the cost of one external commit per honest device per attempt, and they reveal nothing. Accounts whose votes lose twice in 24 h stop counting (§15.2 item 6), which bounds repeated attempts.
  11. Server state rollback would reuse epoch numbers with different keys; §15.6 forbids accepting submissions on restored state without a new generation.
  12. Metadata. PublicMessage exposes to the hosting server the roster, each device's join and leave times, who commits when, tree size, and Welcome sizes. KeyPackage claims expose intended contacts to home servers. All of this is metadata the servers see anyway (00 §5.4), and none of it is content.
  13. Silent failures by design. Credential-check failures in channels, forks and resyncs are never shown (D-035, D-055). A user therefore can't tell from the lock alone that a channel's server is honest; 20's lock text says that the server decides who is a member.
  14. Resource exhaustion. Large GroupInfo uploads and fetches are bounded by maxMlsUploadBytes, the in-flight limit (§11.4), the join queue (§11.5), conditional GETs (§7.3) and rate limits (03).
  15. Server proposals bind to (group_id, epoch) only. For sender type external, RFC 9420 signs no GroupContext (§6.3). A server proposal can't be replayed into another context or generation, because group_id names both, and an epoch number is never reused within a generation (§4.2, §15.6). A replay within the same epoch is the server's own proposal again.
  16. Stale or bad GroupInfo. A committer could upload a GroupInfo whose external_pub doesn't match the epoch, which would make every later external commit unprocessable for members. The DS checks everything it can from public data (V14 to V16), and the members' acknowledgements carry the hash of the external_pub they derived, so a bad one is caught at settlement and replaced (§15.2 item 5).
  17. External sender before Accept. Before a message request is accepted, the recipient checks a Welcome's external sender against keys relayed by its own home server (§6.2 item 2, 12 §10.1), because D-049 forbids contacting the hosting server. A wrong or stale relayed key only defers the Welcome, and the check is repeated against the hosting server's own metadata after Accept, so neither a home server nor an inviter can make a client keep a group whose external sender the hosting server doesn't publish.

22. Open questions

ID Question Recommendation
OQ-13-1 Flaw in the overview (HP-3, D-059): "every committer MUST upload GroupInfo with ratchet_tree" doesn't scale to the allowed maximum. A 1,000-leaf tree is about 2 MiB in JSON (larger than maxRequestBytes), and a 65,536-leaf tree would be over 100 MiB per commit. Because external commits are serialized one per epoch, the same size also sets how long a mass join takes: with join pacing (§11.5), upgrading a channel with 1,000 enrolled devices takes roughly 10 to 30 minutes before every device is in. Keep the overview's rule for groups up to 2,000 leaves (this document's maxMlsUploadBytes covers that). For larger groups, let the committer omit ratchet_tree and have the server, which already checks roster consistency (§6.4 V15), maintain the public tree and serve it at GET …/mls/tree; joiners verify it against the signed GroupInfo's tree_hash, so trust is unchanged. Alternatively cap maxSecureLeaves at 2,000 in v1.
OQ-13-2 A malicious DM hosting server that sequences a commit honest clients must reject leaves them blocked (§15.4). The closed warning catalogue (D-055) has no entry for this, so this document presents it like an unreachable server. Keep it that way (no new warning); it is a denial of service the server could cause anyway. Revisit if field data shows it happens through bugs.

OQ-13-3 (history across generations) and OQ-13-4 (W4b during the user's own reset) of earlier drafts are closed: under the revised D-007 no history crosses to newcomers in any generation, and members' devices and key archives keep every generation's keys by group_id (14 §10.6), which covers the first; and 07 §18.2 already exempts the user's own stale leaves with a lower igen from W4b.

23. References

23.1 Normative

  • RFC 2119, RFC 8174 — requirement key words
  • RFC 5234 — ABNF
  • RFC 8259 — JSON; RFC 7493 — I-JSON
  • RFC 4648 — base64url
  • RFC 9420 — The Messaging Layer Security (MLS) Protocol
  • RFC 9457 — Problem Details for HTTP APIs
  • RFC 9562 — UUIDs (UUIDv7)
  • RFC 8032 — Ed25519; RFC 7638 — JWK thumbprint; RFC 7748 — X25519 (test keys of §20.8)
  • RFC 9110 — HTTP semantics (status codes 409, 410, 425, conditional requests)
  • RFC 8470 — Using Early Data in HTTP (definition of status 425)
  • 00-overview.md — conventions (§7), HP-1 to HP-3, matrices
  • 02-discovery.md — ServerMetadata keys, mls-external-sender purpose, rotation timings, revocation
  • 03-transport.md — envelope, seq, resume, delivery rules D3 and D4, session.subscription_ended, error object, rate limits
  • 05-accounts-auth.md — bot tokens as device records
  • 04-crypto-conventions.md — suite sv1-c1, label registries
  • 06-federation.md — S2S request tokens, identity.changed and device.revoked delivery
  • 07-identity.md — sv_device credential and validation, IdentityState, pins, W2 and W4
  • 09-communities-channels.md, 10-roles-moderation.md, 12-direct-messages.md — removal triggers and DM membership rules
  • 14-secure-content-history.md — K_hist, ekid, SealedMessage and its acceptance rules, visibility (visibleFromSeq) and HistoryShares, whose key wraps use the dbk of a leaf's DeviceCertificate
  • 15-calls-control.md — lease revocation, call.epoch_ready, /v1/diagnostics

23.2 Informative

  • RFC 9750 — The Messaging Layer Security (MLS) Architecture
  • RFC 9605 — Secure Frame (SFrame)
  • MLS working group interoperability test vectors for RFC 9420
  • 18-media-e2ee.md — SFrame KID layout (leaf-index width)
  • 20-client-requirements.md — presentation of loading, unreachable and full states
  • 21-deployment-operations.md — group-retirement runbook
  • spec/DECISIONS.md — decision log