Specification · document 00
00 Overview, architecture and conventions
| Status | Draft. Protocol version 1 (sv1) of the Sloppy Voice v2 product |
| Date | 2026-12-04 |
| Decisions used | D-001 to D-013 and D-015 to D-024 (fixed inputs); D-069 to D-077 (owner and lead decisions of 2026-12-04); D-078 to D-083 (revisions and adopted proposals of 2026-12-04); the revised D-007, D-084 to D-087 and D-089 to D-093 (owner decisions of 2026-12-04, second round); D-094 (owner decision of 2026-12-05) |
| Decisions made here | D-025 to D-068 (listed in §9.2; to be added to spec/DECISIONS.md by the lead) |
| Owns | Glossary; roles; security-mode model and matrix; security.* error codes; warning, gate-card, marker and UX-moment IDs; trust model; conformance classes; cross-cutting conventions; initial registry contents; requirements traceability |
1. Purpose and scope
1.1 What Sloppy Voice v2 is
Sloppy Voice v2 is a federated voice, video and text chat system. It has the features of Discord and federates like e-mail. Anyone can run a server. A user's address looks like an e-mail address, for example saxon@sloppyvoice.com. The domain part tells a client which server to talk to (D-001, D-005).
The system is insecure by default. In an insecure context the server can read messages, hear calls and see shared screens. People can opt in to secure accounts, channels and servers. Inside a secure context everything is end-to-end encrypted: text, files, voice, screen share, application sound and webcam (D-008, D-018).
The top design goal is usability for people who aren't IT-literate. Every user-visible flow must need as few decisions and as little security knowledge as possible. Three rules follow from that goal and shape the whole design:
- The insecure path has no security friction at all. Sign in with a familiar provider, confirm a pre-filled name, and you're in. Insecure accounts hold no cryptographic keys (D-021).
- Turning on security is one switch. If the person's last sign-in with their provider was more than a day ago, one provider sign-in comes first (D-085). After it, the client does every group-key, media-key, join, leave and rotation operation without asking anything. The user acts only at the few moments listed in §4.12.4.
- Warnings are rare, specific and from a closed list. Clients show only the warnings in §4.12.1 (D-055).
1.2 What this document does
This document is the foundation for every other document in spec/. It:
- defines every core term (§2) and the roles in the system (§3);
- defines the security-mode model, the full matrix of mixed-security combinations, and the warnings each one produces (§4);
- states what each party is trusted for, in each mode (§5);
- gives the architecture-level design for each hard problem and names the document that specifies it in detail (§6);
- fixes the conventions every document follows: encodings, envelopes, names, IDs, errors, crypto (§7);
- walks through the key end-to-end flows (§8);
- maps every owner requirement and decision to the documents that satisfy it (§9).
It doesn't define wire details that belong to another document. Where this document gives a field list or an example for another document's object, the owning document is the normative source and MUST include at least those fields with those names and meanings.
1.3 How to read the specification
Read this document first. Then read in this order, depending on your interest:
- Everyone: 01 (addresses), 02 (discovery), 03 (transport), 04 (crypto conventions).
- Server implementers: 05, 06, 09, 10, 11, 12, then 13 and 14 for secure mode, then 15 to 19, then 21.
- Client implementers: 05, 07, 08, 11, 12, 13, 14, 15 to 18, 19, then 20 (UX rules, which are normative for clients).
- Security reviewers: §4 and §5 of this document, then 07, 13, 14, 18 and 22.
Each document contains normative text, rationale notes and examples. Rationale notes start with "Rationale:" and are informative. Examples are informative unless the text says otherwise. Where an example and the normative text disagree, the normative text wins.
1.4 Conformance language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this specification 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.
Grammars use ABNF (RFC 5234) with the core rules from its Appendix B. Wire examples use JSON (RFC 8259). Decisions are cited by their ID from spec/DECISIONS.md, for example (D-007) (D-024).
1.5 Conformance classes
An implementation claims one or more of these classes (D-066). A class is met only when every MUST in the listed documents that applies to that class is met.
| Class | What it must implement | Documents |
|---|---|---|
| Server | Discovery and metadata; home-server role (OIDC login, sessions, devices, bots, IdentityState publication, KeyBackup and AccountVault storage, KeyPackage store, DM index, notification records, push sending); hosting-server role (communities, channels, roles, moderation, messages, attachments, DMs, MLS Delivery Service, MLS Authentication Service for channels, sealed-content storage, manual history sharing (HistoryShare and VisibilityGrant, D-007), call control, voice leases); a media relay; federation in both directions. Every server supports the server side of secure mode, even if no context on it is secure yet. | 01–15, 16 and 17 (relay parts), 18 (relay and control parts), 19, 21 (§6 relay-control interface, and the requirements 21 marks normative) |
| SFU-capable server | Server, plus the sfu-rtp/1 media profile through an SFU reached via the server's control plane. |
15, 17, 21 §7.1 |
| Full client | Desktop and mobile apps. Everything a client does, including secure mode, calls, voice-dc/1, video-dc/1, sfu-rtp/1, SFrame, MediaAttestation and, on mobile, push. |
All, especially 20 |
| Web client | Full client, with the web-specific rules for discovery (02) and key storage (08). | All, especially 02, 08, 20 |
| Bot client | Login with a bot token, messaging and DMs. A secure bot also implements identity, MLS and SealedMessage. Media is optional. A bot that joins a call in a secure context MUST implement SFrame and MediaAttestation. | 05, 07, 11–14, 20; 15–18 for a bot that joins calls |
| Push gateway | The gateway API. | 19 |
Rationale: requiring every server to support secure mode on the server side keeps the security matrix small. A secure DM can be hosted on any server (D-048), and any user can turn on encryption at any time (D-019), so every server needs the identity registry and the MLS Delivery Service. These are storage and structural checks, not content cryptography.
1.6 Document map
| File | Title | Scope in one line |
|---|---|---|
00-overview.md |
Overview, architecture and conventions | This document: terms, roles, security model, trust model, conventions, flows, traceability. |
01-addressing.md |
Addresses, display names and links | Address grammar, normalization, display-name linkage, canonicalization, address lookup, the sloppyv:// URI and HTTPS share links. |
02-discovery.md |
Discovery, server metadata and server keys | _sloppyv TXT, .well-known, /v1/resolve, ServerMetadata, domain list, delegation evidence, server key rotation, caching. |
03-transport.md |
Client transport, envelopes and errors | HTTPS API rules, the event WebSocket, envelope, IDs, errors, pagination, idempotency, rate limits, versioning, CORS. |
04-crypto-conventions.md |
Cryptographic conventions | Crypto suite, JWS profile, labelled signatures, label registries, fingerprints, AEAD, CPace and Argon2id profiles, test vectors. |
05-accounts-auth.md |
Accounts, login, sessions, devices and bots | OIDC login, sign-up, provider linking, tokens, device records, revocation orchestration, bots, account states, deletion. |
06-federation.md |
Federation | HomeAssertion, DeviceProof, remote sessions, S2S request tokens, S2S event delivery, profile lookup, revocation fan-out, blocking, outages. |
07-identity.md |
Identity keys, certificates and verification | IdentityCertificate, DeviceCertificate, IdentityState, DeviceRevocation, the sv_device credential, validation rules, reset, pins, safety numbers, self-alerts. |
08-device-setup-recovery.md |
Turning on encryption, pairing, backup and the vault | Upgrade ceremony, recovery phrase, KeyBackup, pairing with CPace, AccountVault and key archive, platform key storage, web keys. |
09-communities-channels.md |
Communities, membership, channels and security transitions | Community, membership, channels, invites, join gates, channel and server upgrades, community list. |
10-roles-moderation.md |
Roles, permissions, moderation and reports | Permission registry, roles, moderation actions in every mode, bans, reports workflow, audit log, anti-spam. |
11-messaging-attachments.md |
Messages, attachments, read state and presence | Content schema, insecure carrier, edits, deletes, reactions, mentions, typing, read state, presence, timeline sync, retention, attachments. |
12-direct-messages.md |
Direct messages and group DMs | DM hosting rule, DM IDs, creation, message requests, DM index, security selection and transitions, DM membership, DM calls. |
13-mls-profile.md |
MLS profile | Ciphersuite, group IDs, extensions, DS and AS duties, KeyPackages, external commits, Welcome, commit policy, removals, commit duty, eviction, resync, limits. |
14-secure-content-history.md |
Sealed messages, history visibility and sharing | History and message keys, SealedMessage, signatures, key commitment, the visibility rule (visibleFromSeq), manual history sharing (HistoryShare, VisibilityGrant, /history/shares), key archive rules, report verification. |
15-calls-control.md |
Calls: control, leases, routing and continuity | Calls, VoiceLease and lease ticks, relay connection, routing, SFU signalling, epoch switch, auto-rejoin, Move voice here, diagnostics. |
16-audio.md |
Audio | voice-dc/1 frames, Opus, jitter buffer, loss concealment, voice activation, push-to-talk, game sound, clocks, receiver lease enforcement. |
17-video.md |
Screen share and webcam | video-dc/1 fragments, screen audio, sync and latency targets, adaptation, sfu-rtp/1 profile, path selection. |
18-media-e2ee.md |
Media end-to-end encryption | SFrame profile from MLS, KID layout, transport framing, key rotation, MediaAttestation. |
19-notifications-push.md |
Notifications and push | notify, notification settings, notification records, push registration, push gateway API, mobile and web push, ringing, badges. |
20-client-requirements.md |
Client behaviour and user experience | UX moments, exact warning copy, gate cards, markers, never-prompt list, lock indicator, onboarding, links, talk indicator, web hardening, diagnostics UX. |
21-deployment-operations.md |
Deployment and operations | Deployment profiles, scaling, relay-control and SFU adapter interfaces, key rotation runbooks, outages, version skew, limits table. |
22-security-considerations.md |
Security considerations and threat model | Whole-system threat model per party and mode, metadata exposure, residual risks. Written last. |
1.7 Rules for every document
These rules keep about twenty independently written documents consistent.
- Template. Each document starts with a header table (Status, Depends on, Decisions used, Owns). Its first section is "Scope". It ends with three sections in this order: "Security considerations", "Open questions" (only items that genuinely need the owner's decision), and "References" (D-024).
- Terms. Use the terms in §2 exactly. Don't introduce a synonym. A document MAY define a term that §2 lacks, in its own "Terminology" subsection, but MUST NOT redefine a §2 term.
- Ownership. Each object, message, endpoint, registry and error prefix has one owning document (§1.6, §7.3, §7.9). Other documents reference it ("see 07 §4") and never redefine it. Where this document lists fields of another document's object, the owner MUST keep them.
- Conventions. Follow §7 for every wire element.
- Decisions. Cite decisions by ID. When a document needs a decision that isn't in the log, it writes it inline as a block starting "Proposed decision:" with a one-line rationale, so the lead can log it.
- UX text. Normative user-facing strings for warnings and gate cards live in 20. Other documents describe the trigger and refer to the warning ID.
- Timers and limits. Where this document gives a number, the owning document MUST use it. Where it doesn't, the owning document chooses one and states it.
2. Glossary
Every document uses these names. Object names in PascalCase are wire objects. Each entry names the document that owns the details.
2.1 Names and discovery
| Term | Definition | Owner |
|---|---|---|
| Address | An identifier of the form local@domain. It names a user account, a bot account or a channel. Users and channels share one namespace per server (D-020). |
01 |
| Local part | The part of an address before @. Unicode letters and digits following UTS #39 Highly Restrictive (01 §3.5.1), case-insensitive, no spaces (D-005, D-031, D-092). |
01 |
| Display name | The local part with spaces and capitalization added, for example "Public Lobby" for PublicLobby. Removing the spaces and folding the case gives back the local part exactly. Every user, bot and channel always has one: until another capitalization or spacing is chosen, or when a chosen one collides at registration, it is the prepared local part itself (01 §5.3, §6.3). |
01 |
| Canonical domain | The one domain a server treats as its primary name (D-002). | 02 |
| Alias domain | Another domain the same server accepts. Addresses on aliases name the same accounts and channels (D-002). | 02 |
| Canonical address | An address with a normalized (PRECIS-prepared, case-folded, NFC) local part and the server's canonical domain as its domain part. Every stored, signed, compared or hashed address uses this form (D-032). | 01 |
| Base URL | The HTTPS URL at which a server is reached, for example https://chat.sloppyvoice.com/server. Every endpoint path is relative to it. |
02 |
| Discovery record | The TXT record at _sloppyv.<fqdn> that gives a domain's base URL (D-001). |
02 |
| ServerMetadata | The JSON document at {base}/meta describing a server: canonical domain, domains, security flag, keys, features, limits, login providers, link templates. |
02 |
| Delegation evidence | How strongly a discovery result is authenticated: dnssec, same-site, wellknown or dns-only (D-030). |
02 |
| Deployment | A machine or cluster that runs one or more servers. Two servers on one deployment are unrelated at protocol level. | 21 |
sloppyv URI |
A link of the form sloppyv://PublicLobby@sloppyvoice.com, optionally with an invite code. |
01 |
| Share link | An HTTPS link built from the links.join template of the target's server (the server of the channel, user or community it names, 01 §11.2), offered next to every sloppyv URI because many apps don't make custom schemes clickable. |
01 |
2.2 Servers and roles
| Term | Definition | Owner |
|---|---|---|
| Server | One Sloppy Voice instance at one base URL, with one canonical domain and zero or more alias domains. Every server is a community, a home server for the accounts registered on it, and a hosting server for its contexts. | 00 |
| Community | A server seen as a group: members, roles and channels, like a Discord guild (D-003). "Server" names the protocol endpoint; "community" names the membership and roles. They are the same entity. | 09 |
| Home server | The server on which an account is registered. It handles login, sessions, the account's devices, IdentityState, KeyBackup, AccountVault, KeyPackages, the DM index, the community list, notification records and push (D-004, D-022). | 05 |
| Hosting server | The server that sequences and stores a context. For a channel it's the server that contains the channel. For a DM it's the server chosen by the DM hosting rule (D-048). Documents MUST use this term, not "DM host". | 09, 12 |
| Remote server | From a client's point of view, any server other than its home server. | 06 |
| Secure server | A server whose secure flag is set. All its channels are secure and all accounts homed there are secure (D-003, D-018). |
09 |
| Relay | The media relay: a WebRTC data-channel forwarder run by the hosting server, for example a Go/Pion process (D-009). Every server has one (D-066). | 15 |
| SFU | A Selective Forwarding Unit: any open-source WebRTC SFU, optional, used for sfu-rtp/1 (D-045). |
15, 17 |
| Push gateway | A service run by the publisher of a mobile app build. It holds that build's APNs and FCM credentials and forwards wake-ups from home servers (D-022). The project runs the official gateway for its official iOS and Android apps and publishes it as open source; servers deliver to any gateway by default (gatewayPolicy any, D-093). |
19 |
| OIDC provider | An external OpenID Connect identity provider configured by a home server's admin, for example Google (D-016). | 05 |
2.3 Accounts, devices and sessions
| Term | Definition | Owner |
|---|---|---|
| Account | A user account or a bot account (kind: user or bot), homed on one server. |
05 |
Account incarnation (inc) |
An immutable random value that the home server gives an account when it creates it. A local part registered again after a deletion gets a new one, so an address together with its inc names exactly one account ever. Carried in HomeAssertions, IdentityStates and the public profile; other servers key their records about an account on (address, inc) (D-086). |
05 |
| Account security state | insecure or secure (D-019, D-021). |
05 |
| Device | One installation of a client signed in to one account. Each has a device record on the home server and a device ID (did). |
05 |
| Enrolled device | A device of a secure account that holds the identity key and has an active DeviceCertificate listed in IdentityState. | 07, 08 |
| Unenrolled device | A device of a secure account that is signed in but hasn't been paired or restored. It can use insecure contexts only (D-058). | 08 |
| Home session | A session between a device and its home server, created by OIDC login. | 05 |
| Remote session | A session between a device and a remote server, created from a HomeAssertion (D-004). | 06 |
| HomeAssertion | A short-lived, single-use, audience-bound JWS issued by a home server that vouches for one of its accounts and devices to one remote server (D-004, D-062). | 06 |
| DeviceProof | A JWS signed by an enrolled device's device signing key that binds a HomeAssertion to that device (D-062). | 06 |
| Bot token | A server-issued bearer credential for a bot account (D-016). | 05 |
2.4 Identity (secure accounts)
| Term | Definition | Owner |
|---|---|---|
| Identity key (IK) | The Ed25519 key pair that all enrolled devices of one secure account share (D-006). Other users only ever reason about this key. | 07 |
| IdentityCertificate | A JWS signed by the identity key that binds the canonical address to the identity key and identity generation. | 07 |
Identity generation (igen) |
An integer that increases at every identity reset, upgrade and downgrade. | 07 |
| Device signing key (DSK) | An Ed25519 key pair unique to one device. It is the device's MLS leaf signature key and signs SealedMessages, HistoryShares, MediaAttestations and DeviceProofs. | 07 |
| DeviceCertificate | A JWS signed by the identity key that binds a device ID to that device's DSK and its box key (dbk). |
07 |
Box key (dbk) |
A per-device X25519 key pair generated at every enrolment. Its public key is the DeviceCertificate's dbk claim, so it is bound to the identity key. It only receives keys sealed to one device: VaultKeyGrants (08) and the key of a HistoryShare (14) (D-007). |
07, 08 |
| Device credential | What a device presents in MLS: an MLS credential of type sv_device carrying the IdentityCertificate and the device's DeviceCertificate (D-034). Revoking a device credential means delisting the device from IdentityState (D-017). |
07 |
| IdentityState | A JWS signed by the home server, valid for at most 24 h, stating an account's security state, identity generation, current IdentityCertificate and active and revoked devices. Published for every account (D-033). | 07 |
| DeviceRevocation | An optional JWS signed by the identity key that permanently revokes one device ID. | 07 |
| Device validity | A device is valid only if its DeviceCertificate verifies under the current identity key, it is listed active in a fresh IdentityState, and no DeviceRevocation covers it (D-033). | 07 |
| Identity pin | A client's stored record of the identity key it has accepted for a contact's canonical address (trust on first use). Pins live in the AccountVault and sync across the user's devices (D-054). | 07 |
| Verified contact | A contact whose identity key the user confirmed by safety number or QR scan. | 07 |
| Safety number | A 60-digit number computed from both parties' identity keys and canonical addresses, for out-of-band verification. | 07 |
| Identity reset (account reset) | Replacing an account's identity key with a new one, or downgrading to insecure, which also counts as a reset (D-006, D-019). | 07 |
| Self-alert | A warning shown only on a user's own devices about that user's own identity, or about a new sign-in to the account (W4; W4d is the new-sign-in notice, D-084). | 07, 05, 20 |
2.5 Key storage
| Term | Definition | Owner |
|---|---|---|
| Recovery phrase | Eight words generated by the client that unlock the KeyBackup. The server never sees them (D-006, D-052). User interfaces call it the recovery key. | 08 |
| KeyBackup | The encrypted blob on the home server holding the identity key, IdentityCertificate, vault keys and phrase entropy, encrypted under a key derived from the recovery phrase. | 08 |
| AccountVault | Encrypted per-account storage on the home server holding the key archive, identity pins, verification state and private settings (D-054). | 08 |
Vault key (K_vault) |
The symmetric key, in numbered generations, that encrypts AccountVault records. | 08 |
| Key archive | The AccountVault records holding every history key a user's devices have learned, and every message key received through manual history sharing, so the user's new devices can read everything the user could read (D-007, D-054). | 08, 14 |
| Pairing | Moving the identity key and vault keys from an enrolled device to a new device of the same account using a PAKE over the home server (D-006, D-053). | 08 |
2.6 Contexts and communities
| Term | Definition | Owner |
|---|---|---|
| Context | Anything with members and a message timeline: a channel, a 1:1 DM or a group DM. | 03 |
Context reference (ctx) |
A typed ID for a context on its hosting server: ch:…, dm:… or gdm:… (D-028). |
03 |
| Channel | A context inside a community. It has an address, a kind (text or voice) and a security mode (D-064). |
09 |
| DM | A 1:1 direct-message conversation between two accounts. | 12 |
| Group DM | A direct-message conversation among three or more accounts, outside any community. | 12 |
| Membership | An account's relationship to a community or channel, with a state active, pending, needs_encryption, banned or left (09); or its participation in a DM or group DM, with a state reserved, pending, active, declined, left or removed (12). |
09, 12 |
needs_encryption |
The membership state of an insecure account in a context that became secure. The member keeps the membership and can read pre-upgrade history but nothing new. | 09 |
| Security mode | Whether a context is insecure or secure (§4). |
00 |
| Secure context / insecure context | A context whose security mode is secure / insecure. |
00 |
| Permission | A named right, such as speak_and_share (D-015). |
10 |
| Role | A named, ordered set of permissions granted to members. | 10 |
| Moderation action | Delete, timeout, mute, kick or ban, available in every mode (D-023). | 10 |
2.7 End-to-end encryption
| Term | Definition | Owner |
|---|---|---|
| MLS group | The RFC 9420 group of one secure context. There is exactly one per secure channel, secure DM or secure group DM (D-034). | 13 |
| Epoch | An MLS epoch of the context's group. | 13 |
| Leaf | One device's position in an MLS group. | 13 |
| Authentication Service (AS) | The party that decides whether a leaf's credential is acceptable. In channels it is the hosting server. In DMs it is each client (D-035). | 07, 13 |
| Delivery Service (DS) | The hosting server's role of ordering and storing MLS messages and GroupInfo. | 13 |
| External commit | An RFC 9420 commit by which a device joins a group from GroupInfo without any member being online. | 13 |
| External sender | The hosting server's key in the group's external_senders extension. It lets the server propose removals. |
13 |
| Commit duty | The rules for which member device commits pending server proposals, and when (D-037). | 13 |
| Designated committer | The one online member device the hosting server asks to commit pending proposals. | 13 |
sv_participants |
An MLS GroupContext extension listing the people (canonical address and identity-key fingerprint) in a secure DM. Only member commits change it (D-036). | 13 |
History key (K_hist) |
A 32-byte key exported from the MLS group for one epoch (D-038). | 14 |
Message key (K_msg) |
A key derived from a history key and a message ID that encrypts exactly one message. | 14 |
| SealedMessage | The wire form of every piece of secure application content (D-038). | 14 |
visibleFromSeq |
For an account in a secure context (channel, 1:1 DM or group DM), the seq at which its current membership began. The hosting server serves it no sealed item, and nothing else derived from content, from before that point, except what a VisibilityGrant covers (D-007). |
14 (rule); 09, 12 (membership start) |
| HistoryShare | A member's deliberate, signed share of earlier messages with one specific current member of the same secure context: the message keys (K_msg) of the chosen sealed items, encrypted under a fresh key that is HPKE-sealed to each of the recipient's devices' box keys. Never automatic and never prompted (D-007, HP-4). |
14 |
| VisibilityGrant | The hosting server's record {account, ctx, shareId, fromSeq, toSeq, sharer, createdAt}, created when it accepts a HistoryShare, which makes it serve those sealed items and their attachments to the recipient account. It holds no key (D-007). |
14 |
2.8 Calls and media
| Term | Definition | Owner |
|---|---|---|
| Call | A real-time session attached to a voice channel or a DM (D-064). | 15 |
| Participant | One device in a call, identified by a small participant index (pid) within the call. |
15 |
| VoiceLease | A participant's short-lived right to stay in a call and to send the media types it's allowed to send. | 15 |
| Lease tick | A room-wide snapshot of current leases, sent every second, that keeps leases alive (D-046). | 15 |
| Bounded authority | The rule that a sender's rights expire within 3 s unless renewed and a revoked participant is cut off within 4 s, enforced by the relay, the SFU and each receiver's audio engine. | 15, 16 |
| Media profile | A named media format: voice-dc/1, video-dc/1 or sfu-rtp/1 (D-045). |
15–17 |
| SFrame | RFC 9605 frame encryption, used for media in secure contexts (D-008, D-041). | 18 |
| MediaAttestation | A batch signature by a sender's DSK over the hashes of its recent encrypted frames (D-043). | 18 |
| Auto-rejoin | Automatic reconnection after an unexpected call drop (D-012, D-047). | 15 |
| Move voice here | Moving a user's call to another of their devices: the old device is fully revoked before the new one is admitted. A user has at most one call per hosting server (D-067). | 15 |
| Talk indicator | The client's display of whether the user is currently being heard. | 16, 20 |
2.9 Notifications and user experience
| Term | Definition | Owner |
|---|---|---|
notify |
The server-to-server event (wire type notify.event) that a hosting server sends to a recipient's home server when something needs the recipient's attention. |
19 |
| Notification record | The home server's stored record of one notification, fetched by the device after a push. | 19 |
| Push registration | A device's registration of a push channel (APNs, FCM through a gateway, or Web Push) with its home server. | 19 |
Warning (W1…W9) |
A security message from the closed catalogue in §4.12.1 (D-055). | 00 (IDs), 20 (copy) |
Gate card (G1, G2) |
An inline card that blocks a secure context and offers the one action that fixes it. | 00 (IDs), 20 (copy) |
| Timeline marker | A system line in a timeline that marks a change, such as "Messages from here on are end-to-end encrypted". | 00 (IDs), 20 (copy) |
UX moment (M1…M11) |
A point where the user must act because nothing else can (§4.12.4). | 00 (IDs), 20 |
3. Roles and components
3.1 Components
| Component | Responsibilities | Holds | Specified in |
|---|---|---|---|
| Home server (role of a server) | OIDC login; home sessions; device records; bot accounts; issuing HomeAssertions; publishing IdentityState; storing KeyBackup, AccountVault and KeyPackages; the community list and DM index; message requests; notification records; sending pushes; S2S revocation fan-out. | Account database; server signing keys; ciphertext blobs it can't open. | 05, 06, 07, 08, 12, 19 |
| Hosting server (role of a server) | Community, channels, membership, roles, invites, moderation; sequencing and storing messages and attachments; hosting DMs; MLS DS for every secure context and MLS AS for secure channels; storing GroupInfo, handshakes, SealedMessages, HistoryShares and VisibilityGrants; call control and voice leases; running the relay and, optionally, an SFU; sending notify. |
Content (plaintext in insecure contexts, ciphertext in secure ones); MLS external-sender key. | 09–15, 19 |
| Relay | Forwards voice-dc/1 frames and video-dc/1 fragments over WebRTC data channels. Checks each recipient separately. Enforces leases. Never holds media keys. |
Lease state; plaintext media only in insecure contexts. | 15, 16, 17 |
| SFU (optional) | Forwards sfu-rtp/1 RTP with simulcast or SVC. Driven by the hosting server through an adapter. |
Same as the relay. | 15, 17, 21 |
| Push gateway | Forwards opaque wake-ups to APNs and FCM for one app build. | Push tokens. | 19 |
| OIDC provider | Authenticates people to their home server. | External identities. | 05 |
| Client | Desktop, web, mobile or bot (D-010). All speak the same protocol. Secure clients hold keys and do all end-to-end cryptography. | Session tokens; for secure accounts the identity key, DSK, vault keys, MLS state, pins. | All |
3.2 Architecture diagram
DNS: _sloppyv.<fqdn> TXT or https://<fqdn>/.well-known/sloppyv
|
| discovery (02)
v
+------------+ OIDC +----------------------------+ S2S over HTTPS +-----------------------------+
| OIDC |<-------->| HOME SERVER a.com | (sv-s2s+jwt, 06) | HOSTING SERVER b.com |
| provider | (05) | accounts, sessions, |<------------------->| community, channels, roles, |
+------------+ | devices, IdentityState, | notify, dm.request,| messages, attachments, |
| KeyBackup, AccountVault, | identity.changed, | DMs, MLS DS (+AS channels), |
| KeyPackages, DM index, | device.revoked, | HistoryShares, call control,|
| notification records | KeyPackage claim | voice leases |
+----------------------------+ +-----------------------------+
^ | ^ |
home session | | wake-up {h} (19) | | lease snapshots,
HTTPS + WS | v remote session | | SFU adapter (21)
(03, 05) | +-----------------+ HTTPS + WS | v
| | PUSH GATEWAY |--> APNs (06) | +-----------+ +-----+
| +-----------------+ FCM | | RELAY | | SFU |
| Web Push (no gateway) | +-----------+ +-----+
| | ^ data ^ RTP
+---------------------------------------------------------+ | channels |
| CLIENT alice@a.com (one device) |---+-------------+
| secure accounts: IK, DSK, K_vault, MLS state, pins | WebRTC (15-18)
+---------------------------------------------------------+The client talks directly to every server whose contexts it uses (D-004). The home server is never in the chat or media path of a remote context. Clients never communicate with each other directly: every exchange between two clients, call media included, goes through servers (D-094).
3.3 Planes
| Plane | Between | Carries | Specified in |
|---|---|---|---|
| Control | Client and a server | HTTPS JSON commands; one WebSocket for server-to-client events (D-026) | 03 |
| Federation | Server and server | HTTPS JSON with a sv-s2s+jwt bearer per request; a single event-ingest endpoint plus lookups; retries for up to 24 h (D-027) |
06 |
| Media | Client and relay; client and SFU. Never client and client (D-094) | WebRTC data channels (voice-dc/1, video-dc/1, control); RTP (sfu-rtp/1) |
15–18 |
| Push | Home server, push gateway, APNs/FCM; home server and Web Push services | An opaque notification ID only (D-051) | 19 |
3.4 Several servers on one deployment
A deployment MAY run several servers, for example https://chat.sloppyvoice.com/server for sloppyvoice.com and https://chat.sloppyvoice.com/server2 for guild.sloppyvoice.com. Each server has its own base URL, ServerMetadata, canonical domain, signing keys, accounts and community. At protocol level they are unrelated servers that happen to share a host (D-003).
4. The security-mode model
4.1 Definitions
| Entity | Property | Values | Where it is stated | Changes |
|---|---|---|---|---|
| Account | security |
insecure, secure |
IdentityState sec claim, signed by the home server (07) |
Upgrade any time; downgrade counts as a reset (D-019) |
| Device of a secure account | enrolment | enrolled, unenrolled | Device listed (or not) in IdentityState | Pairing or recovery enrols it (08) |
| Server | secure |
false, true |
ServerMetadata secure and the Community object (02, 09) |
Upgrade only (D-018, D-057) |
| Channel | security |
insecure, secure |
Channel object (09) | Upgrade only (D-018) |
| 1:1 DM | security |
computed | DM object (12) | Follows its two participants (D-050) |
| Group DM | security |
computed | DM object (12) | Upgrades automatically; never downgrades (D-050) |
| Context | security mode | the channel's security, or the DM's computed security |
— | — |
A secure context is a context whose security mode is secure. An insecure context is any other context.
4.2 Invariants
These rules are normative for servers and clients. Every other document MUST be consistent with them.
- SM-1 Insecure by default. New accounts, channels and servers are insecure. Exception: a channel created on a secure server is secure (D-018). An account created on a secure server starts in the account state
upgrade_requiredand must complete M4 before it can do anything else (SM-3, 05 §8.6). - SM-2 Secure server channels. Every channel on a secure server is secure. A request that would create or keep an insecure channel there fails with
security.server_requires_secure. - SM-3 Secure server accounts. Every account homed on a secure server is secure. After a server upgrade, an insecure local account is in the account state
upgrade_requiredand can only turn on encryption or delete itself (05, 09). - SM-4 Secure doors. Only a secure account using an enrolled device can read, post to, join the MLS group of, or join a call in a secure context. Exception: an existing member whose membership became
needs_encryptionkeeps the reads that 09 §9.3 check H6 lists: timeline items, attachments and membership events of the pre-upgrade era (seq≤upgradeSeq+ 1, never a SealedMessage), the Channel object, its member list, its call state and the call's mutes (HP-12 step 5, D-057). Such a member can't post anything there, deletes included (11 §4.7 rule 2); once it turns on encryption, it can delete its own pre-upgrade messages with a sealeddelete(11 §4.7 rule 3). A server MUST refuse an insecure account withsecurity.account_requiredand an unenrolled device withsecurity.device_not_enrolled. Joining a secure server's community requires a secure account; the device may be unenrolled, but it then can't open any channel there. One further bounded exception: the event ticket of 19 §4.7 lets a recipient's devices fetch the notified events of a secure context from the hosting server without a remote session. It returns only SealedMessages and metadata the server already holds, never anything readable without the history keys, and the home server gives secure-context tickets only to enrolled devices (19 PD-19-16). - SM-5 Insecure contexts accept everyone. A secure account in an insecure context uses no keys there: nothing is signed or encrypted end to end (D-021).
- SM-6 Everything inside is encrypted. In a secure context these are end-to-end encrypted: message text and formatting, edits, reaction values, replies, attachments and their names, history keys, voice, screen video, screen and application sound, and webcam. Metadata isn't; §5.4 lists it.
- SM-7 Upgrade only. A channel never goes from secure to insecure, and neither does a server. A downgrade request fails with
security.downgrade_forbidden. To go back, create a new channel (D-018). A secure server never goes back to insecure (D-073). - SM-8 1:1 DMs follow their participants. A 1:1 DM is secure exactly when both accounts are secure. It changes mode, in the same conversation, when either account changes, unless SM-10 forbids its hosting server to hold it in the new mode. Then 12 §13.1 closes it (K5) and it continues at the host the rule now selects, or, when both homes are secure servers, it stays in place in state
encryption_pendingwith no content until the insecure participant turns on encryption. Each change adds a timeline marker (D-050). - SM-9 Group DMs never downgrade. A group DM is created secure exactly when all participants are secure. An insecure group DM becomes secure automatically when all remaining participants are secure. A secure group DM never becomes insecure: adding an insecure account fails with
security.would_downgrade, and a participant whose account becomes insecure is removed (D-050, D-069). - SM-10 Secure servers take no plaintext. A secure server never accepts or sequences new plaintext content in any context, and never stores plaintext content it receives from other servers (12 §8.2, 19 §6.2 H6). The only plaintext it may hold is content it sequenced before it or the channel became secure: pre-upgrade channel history (K3) and the history of insecure DMs it closed (K5) or holds in
encryption_pending(12 §13.1), kept read-only unless an admin deletes it (D-057). The DM hosting rule never creates an insecure DM that accepts content on a secure server (D-048, 12 §13.2). - SM-11 Calls inherit. A call has the security mode of its context.
- SM-12 Clients check, not trust. A client shows the closed lock for a context only when the context is advertised secure and the client holds current MLS state for its group. A client that has seen a channel, server or group DM as secure and later sees it as insecure shows W9 and refuses to send (D-056).
- SM-13 Secure contexts start at the join (D-007). In a secure channel, group DM or 1:1 DM (where a reopening or a re-add after an identity change starts a new membership, 12 §6.4, §11.5), an account is served sealed items, and anything else derived from content (edits, reactions, attachments, notification content), only from the start of its current membership (
visibleFromSeq, 14). Earlier memberships aren't served again; devices keep what they stored locally. There is no history setting and nothing hands keys to newcomers, bots and participants re-added after an identity change included. Two exceptions only: a user's own devices recover keys for what the account is served through the key archive (D-054), and a member may deliberately share earlier messages with one specific member (HistoryShare, VisibilityGrant, HP-4). Pre-upgrade plaintext of an upgraded channel is served only to accounts that were members at the upgrade (HP-12). Insecure contexts show earlier history to new members as their permissions allow.
4.3 Matrix A: channels (server × channel × account)
"Secure, enrolled" means a secure account using an enrolled device.
| # | Server | Channel | Account and device | Allowed? | Text and files | Voice, screen, app sound, webcam | Identity validated by | What the user sees |
|---|---|---|---|---|---|---|---|---|
| A1 | insecure | insecure | insecure | Yes | TLS to the hosting server. Stored in plaintext; the server can read it. | DTLS to the relay or SFU, which can hear and see it. | Hosting server, from the HomeAssertion | Nothing about security. |
| A2 | insecure | insecure | secure (any device) | Yes | As A1. The account's keys aren't used. | As A1 | As A1 | W1 once per community, then a permanent open-lock "Not encrypted" indicator. Never a modal on join. |
| A3 | insecure | secure | insecure | No: security.account_required |
— | — | — | G1 gate card: "Turn on encryption to join". The join resumes by itself after the upgrade. |
| A4 | insecure | secure | secure, unenrolled | No from this device: security.device_not_enrolled |
— | — | — | G2 gate card: "Set up encryption on this device". |
| A5 | insecure | secure | secure, enrolled | Yes | MLS + SealedMessage. Attachments encrypted by the client. The server stores ciphertext only. | SFrame keyed from MLS, plus MediaAttestation, over relay or SFU. | Hosting server as AS, against the IdentityState published by the user's home server. Clients run silent checks only (D-035). | Closed lock. No prompts. Joins, leaves, other people's new devices and resets are silent. A newcomer sees nothing from before their join and marker K6 at their join point (D-007). "Loading earlier messages…" (K4) only on a user's own new device restoring from the key archive, or while messages shared with them load. |
| A6 | secure | secure | insecure | No: security.account_required at community join |
— | — | — | G1 at community level. |
| A7 | secure | secure | secure, unenrolled | Community membership yes; every channel refused with security.device_not_enrolled |
— | — | — | G2 inside each channel. |
| A8 | secure | secure | secure, enrolled | Yes | As A5 | As A5 | As A5 | As A5, plus a "secure community" badge on the community. |
| A9 | secure | insecure | any | Can't exist (SM-2): security.server_requires_secure |
||||
| A10 | (home) secure | — | insecure account homed there | Can't exist (SM-3), except transiently as upgrade_required |
Blocking "Turn on encryption to continue" at next sign-in. |
4.4 Matrix B: joining a community
| Server | Account | Result | What the user sees |
|---|---|---|---|
| insecure | insecure | Joins. Secure channels are listed with the outline gated lock (§4.12.6). | Opening a secure channel shows G1. |
| insecure | secure | Joins. | W1 once for this community: secure-lock channels are encrypted, the others can be read by this server. |
| secure | insecure | Refused, security.account_required. |
G1. |
| secure | secure | Joins (an unenrolled device sees G2 inside channels). | Nothing. |
4.5 Matrix C: 1:1 DMs
| Alice | Bob | DM mode | Text and files | Calls | Identity validated by | Alice sees | Bob sees |
|---|---|---|---|---|---|---|---|
| insecure | insecure | insecure | Hosting server can read | Relay, DTLS hop by hop (D-094). The relay can hear the media | Hosting server, from HomeAssertions | Nothing | Nothing |
| secure | insecure | insecure | Hosting server can read | As above | As above | W7 banner in this DM: Bob hasn't turned on encryption, so this chat isn't end-to-end encrypted. | Nothing (a client MAY show a one-time, dismissable suggestion to turn on encryption; it is not a warning). |
| secure | secure | secure | MLS + SealedMessage | Relay (D-094); SFrame + MediaAttestation | Clients: identity pins (trust on first use), synced across own devices; optional verification | Closed lock. W2 when Bob's identity key changes. | Same |
| secure, unenrolled device | secure | secure | That device can't read | That device can't join | — | G2 on that device | — |
Transitions (12): insecure → secure happens automatically, in the same conversation, when both accounts are secure, with the marker "Messages from here on are end-to-end encrypted". Secure → insecure happens when one side downgrades (D-019) (when the DM is hosted on a secure server, 12 §13.1 instead closes it with K5 and continues it at the rule host, or keeps it in encryption_pending when both homes are secure servers); the other side sees W2 (downgrade variant) and then W7, with the marker "Messages from here on aren't end-to-end encrypted".
4.6 Matrix D: group DMs
| Participants | Mode | Content | Calls | Identity | Warnings |
|---|---|---|---|---|---|
| All insecure | insecure | Hosting server can read | Relay or SFU (D-094) | Hosting server | None |
| Mixed | insecure | Hosting server can read | Relay or SFU | Hosting server | W3 banner for every secure participant, naming the insecure ones. |
| All secure | secure | MLS + SealedMessage; membership pinned in sv_participants |
Relay or SFU; SFrame + MediaAttestation | Clients (pins per participant) | W2 per participant whose key changes. |
| Secure group, someone is added (or re-added after an identity change) | secure | They are served nothing from before their join, plaintext of an earlier insecure period included; K6 at their join point (D-007). Any participant may deliberately share earlier messages with them (K7 for them, K8 for the others). | As above | As above | None |
| Secure group, someone tries to add an insecure account | Refused, security.would_downgrade |
— | — | — | The client explains and offers "Start a new group without encryption" (D-069). |
| Insecure group whose remaining participants are all secure | Becomes secure automatically | — | — | — | Marker "Messages from here on are end-to-end encrypted". |
| Secure participant downgrades to insecure | That participant is removed from the secure group | — | — | — | System line "Bob left because they turned off encryption". |
| Pinned secure group presented as insecure by the hosting server | — | — | — | — | W9; sending and calls disabled; "Leave" offered (12 §11.1) |
4.7 Matrix E: calls
All call media (voice, screen share, application sound and webcam) travels through the hosting server's relay or SFU, in every context and security mode. Clients MUST NOT send media to each other directly (D-094).
| Context | Allowed routes | Media protection | Who can hear and see |
|---|---|---|---|
| Insecure channel | Relay (voice-dc/1, video-dc/1), SFU (sfu-rtp/1) |
DTLS hop by hop | Participants and the hosting server |
| Secure channel | Relay, SFU | SFrame + MediaAttestation | Participants only |
| Insecure 1:1 DM | Relay | DTLS hop by hop | Participants and the hosting server |
| Secure 1:1 DM | Relay | SFrame + MediaAttestation | Participants only |
| Insecure group DM | Relay or SFU | DTLS hop by hop | Participants and the hosting server |
| Secure group DM | Relay or SFU | SFrame + MediaAttestation | Participants only |
4.8 Matrix F: bots
| Bot | Context | Allowed | What users see |
|---|---|---|---|
| Insecure bot | Insecure contexts | Yes | Bot badge |
| Insecure bot | Secure contexts | No: security.account_required in secure channels and secure communities; adding it to a secure group DM fails with security.would_downgrade (D-069) |
Admin UI explains that a secure bot is needed |
| Secure bot | Secure contexts | Yes, as a full MLS member. kind: "bot" in its IdentityCertificate. |
Bot badge plus W6 system line: the bot can read everything sent here from when it joined. Like every newcomer it gets nothing earlier (D-007, D-061 as amended) unless a member deliberately shares it. |
| Webhook or other non-member integration | Insecure contexts only | Secure contexts refuse with security.context_secure_unsupported (D-061) |
— |
4.9 Matrix G: notifications
| Context | notify from hosting server to home server |
Push payload | Lock-screen text |
|---|---|---|---|
| Insecure | Event reference, kind, sender, context name; MAY include a preview of at most 140 characters; a home server that is a secure server discards the preview on receipt (SM-10, 19 §6.2 H6) | Opaque notification ID only (D-051) | Preview from the notification record, if the user allows previews |
| Secure | Event reference, kind, sender, context name. No content (D-022) | Opaque notification ID only | The device fetches and decrypts the SealedMessage itself and shows it if the user allows previews; otherwise, or on timeout, "New message from Alice in #Lobby" |
4.10 Transitions
| Transition | Allowed | Who triggers it | Effect | Owner |
|---|---|---|---|---|
| Account insecure → secure | Yes | The user, with one tap ("Turn on encryption"), after a provider sign-in when the last one is more than 23 h old (the home server requires one within 24 h, D-085; 08 §3.2) | Identity key and first enrolled device created; KeyBackup uploaded; igen +1; IdentityState sec: secure. Other signed-in devices become unenrolled and show "Approve this device" (pairing). Eligible DMs upgrade. No warnings for anyone (there is no previous pin). |
05, 07, 08 |
| Account secure → secure with a new key (reset) | Yes, last resort | The user, after a fresh OIDC login, when pairing and recovery are both impossible | New identity key, igen +1. DM contacts see W2. Channels: no warnings; old leaves removed; new device rejoins by external commit. The user's old devices, if any, see W4. |
07, 08 |
| Account secure → insecure (downgrade) | Yes; counts as a reset (D-019) | The user | igen +1, sec: insecure. Secure channel memberships become needs_encryption. Removed from secure group DMs. 1:1 DMs become insecure (one hosted on a secure server is closed with K5 and continued at the rule host, or set to encryption_pending when both homes are secure servers, 12 §13.1); contacts see W2 (downgrade variant) and W7. |
05, 07, 12 |
| Address reused by a new account (after deletion and the 365-day quarantine, 01 §5.7) | Yes | A new sign-up | A new account with a new inc (D-086); ver and igen continue (07 §11.9). Every server treats the earlier account as deleted the first time it sees the new inc, so nothing carries over except bans (06 §11.6, 10 §9.2). A 1:1 DM with the address restarts as a new conversation, and contacts see W2's new-account wording. |
01, 05, 06, 07, 12 |
| Device unenrolled → enrolled | Yes | The user: pairing or recovery phrase | New DeviceCertificate listed in IdentityState. Own other devices see W4c. Contacts see nothing. | 08 |
| Channel insecure → secure | Yes | A member with manage_channels on an enrolled device |
Dry run, then W5 confirmation naming members who can't follow; atomic switch at upgradeSeq; secure members join automatically; insecure members become needs_encryption; accounts that were members before the switch keep reading the pre-upgrade plaintext (K3), and accounts that join later see nothing from before their join, that plaintext included (D-007); calls restart as secure without changing mic or PTT state. |
09 |
| Channel secure → insecure | No | — | security.downgrade_forbidden |
09 |
| Server insecure → secure | Yes, irreversible | An admin on an enrolled device | Every channel upgrades; local insecure accounts become upgrade_required; remote insecure members become needs_encryption; insecure DMs hosted there are closed read-only (K5), except an insecure 1:1 DM whose rule host is now itself a secure server (both homes are secure servers), which stays in place as encryption_pending and accepts no content until the insecure participant turns on encryption (12 §13.1, §13.2). |
09, 12 |
| Server secure → insecure | No (D-073) | — | security.downgrade_forbidden |
09 |
| 1:1 DM insecure ↔ secure | Automatic | The participants' account changes | Same conversation; marker | 12 |
| Group DM insecure → secure | Automatic | The last insecure participant upgrades or leaves | Marker K1. Participants at the switch keep reading the earlier plaintext; people added later see nothing from before they were added (D-007). | 12 |
| Group DM secure → insecure | Never | — | — | 12 |
4.11 The security.* error codes
This document owns these codes (§7.9 gives the error object).
| Code | HTTP status | userAction |
retryable |
data (all members optional) |
Meaning |
|---|---|---|---|---|---|
security.account_required |
403 | enable_encryption |
false | scope (community or channel) with domain (community) or ctx (channel, DM or group DM) |
The account is insecure and the context or community is secure. |
security.device_not_enrolled |
403 | set_up_device |
false | ctx |
The account is secure but this device holds no identity key. |
security.upgrade_required |
403 | enable_encryption |
false | None | The account is homed on a secure server and hasn't turned on encryption yet. |
security.server_requires_secure |
409 | none |
false | None | An insecure channel was requested on a secure server. |
security.downgrade_forbidden |
409 | none |
false | None | A channel or server downgrade was requested. |
security.would_downgrade |
409 | none |
false | insecure (array of the canonical addresses of the insecure accounts, 12) |
Adding this insecure account would downgrade a secure group DM. |
security.context_secure_unsupported |
403 | none |
false | feature (the refused feature, for example webhooks) |
The feature (for example a webhook) isn't available in secure contexts. |
Receivers treat an unknown scope as channel.
4.12 User-visible security surface
This section fixes the IDs, triggers, blocking rules and frequencies. Document 20 owns the exact copy and presentation. Clients MUST NOT show any security warning that isn't in this section (D-055).
4.12.1 Warning catalogue
| ID | Trigger | Who sees it | Where | Blocking? | Frequency |
|---|---|---|---|---|---|
| W1 | A secure account enters an insecure community or channel. | The secure user | Inline card on first visit, then a permanent open-lock indicator | No | Once per community |
| W2 | A DM contact's identity key changed (reset), or the contact downgraded to insecure, or the contact's address now belongs to a new account (a different incarnation, D-086; 07 §16.8). | Each participant who pinned that contact. New account: also every participant of a 1:1 DM with that address, with or without encryption | Timeline line and banner in the 1:1 DM and in every secure group DM with that contact, with "Verify" (07 §16.3; in a secure group DM a downgrade is a system line only, 20 §3.2). New account: line and banner in the 1:1 DM only, where the conversation restarts, reading "This is a new account using address", with no "Verify" | Only for a verified contact: sending is blocked until the user taps "Accept new key" (key change) or "Continue without encryption" (downgrade). Never for a new account | Once per change; once per new account |
| W3 | A group DM has insecure participants. | Each secure participant | Group header banner naming them, with "Ask them to turn on encryption" | No | Persistent until resolved; collapsible |
| W4 | Own-account alert. W4a: your identity was reset from elsewhere. W4b: a device that isn't one of yours appears under your address in a channel, DM or group DM roster (a different identity key, or your identity key on a device your home server doesn't list; 07 §18.2). W4c: a new device was enrolled on your account. W4d: someone signed in to your account on a new device with one of its linked providers (a device record created by a login, 05 §12.12; D-084). | The user's own devices only. W4d: every other device of the account that was signed in at the time, with or without encryption; never the new device | System alert (W4a, W4b); a fading notice (W4c, W4d). W4d reads "New sign-in on device (provider)" with one action, "This wasn't me", which opens the device list and linked providers | W4a and W4b need a tap; W4c and W4d don't | Per event. W4d: once per new sign-in on each other device, never pushed |
| W5 | An admin is upgrading a channel or server to secure. | That admin | Confirmation dialog that names the members who can't follow | Yes (a confirmation) | Per action |
| W6 | A bot joined a secure context. | Every member | Timeline system line: the bot can read everything sent here from when it joined | No | Per bot added |
| W7 | A 1:1 DM is insecure because the contact is insecure. | The secure participant | DM header banner | No | Persistent; collapsible |
| W8 | The recovery key hasn't been saved. | The user's own devices | Settings badge and a gentle banner | No | At most weekly; stops once saved |
| W9 | A channel, server or group DM the client has pinned as secure is now presented as insecure (09 §13, 12 §11.1). | Any member; also a non-member who holds a pin for the context (from an invite preview or an earlier membership), only when they try to open or join it, with "Close" as the only action (09 §13.6) | Hard error in that context; sending and speaking disabled; "Leave" offered | Yes | Per context |
4.12.2 Gate cards
| ID | Trigger | Action offered | Then |
|---|---|---|---|
| G1 | security.account_required, or security.upgrade_required from a remote server (from the home server, or for an account in state upgrade_required, the client shows the blocking screen of Matrix A row A10 instead, 20 §4.4) |
"Turn on encryption" (starts the account upgrade, M4) | The interrupted join or action resumes by itself. |
| G2 | security.device_not_enrolled |
"Set up encryption on this device" (pairing M5, or recovery key) | The interrupted action resumes by itself. |
4.12.3 Timeline markers
| ID | Text intent | Where |
|---|---|---|
| K1 | "Messages from here on are end-to-end encrypted." | A context that became secure |
| K2 | "Messages from here on aren't end-to-end encrypted." | A 1:1 DM that became insecure |
| K3 | "Sent before encryption was turned on." | Above pre-upgrade history in an upgraded channel |
| K4 | "Loading earlier messages…" | Above the earliest readable item while keys for items the account is served are still arriving: on a user's own new device restoring from the key archive (D-007, D-054), and above messages shared with the user manually while they load (D-007). Never for a newcomer's join. |
| K5 | "This conversation moved." | A DM closed with reason host_secure: its hosting server is a secure server and the DM is or became insecure (12 §13.1) |
| K6 | "Earlier messages are end-to-end encrypted and aren't available to people who join later." | At a newcomer's join point in a secure channel or group DM, and at the re-add point after an identity change in a secure group DM or secure 1:1 DM (12 §11.5 item 4), when the context holds earlier items the account isn't served (D-007; position from 11's withheldBeforeSeq, copy in 20) |
| K7 | "<Name> shared earlier messages with you." | Above the earliest of the messages a member shared with the user through manual history sharing; K4 while they load (D-007, 14) |
| K8 | "<Name> shared earlier messages with <Name2>." | System line for the other members, at the point where a share was made (history.shared, 14); channels also write an audit-log entry (10) (D-007) |
4.12.4 UX moments nobody can avoid
| ID | Moment | Why it can't be avoided | How it's kept painless |
|---|---|---|---|
| M1 | OAuth consent | D-016 | The provider's familiar screen; the last provider used is remembered. When the client isn't already trusted (05 §5.4), the home server shows one 'Continue to …' page (copy in 20 §9.2). |
| M2 | Choosing an address | The address is the identity | Pre-filled from the provider's name; availability checked live. |
| M3 | Operating-system permission prompts | Platform rule | Asked just in time, with one sentence explaining why. |
| M4 | Turning on encryption and saving the recovery key | D-006: the server must never see the key | One tap to turn on (after one provider sign-in only when the last one was more than 23 h ago, which keeps D-085's 24 h limit from running out during the ceremony, 08 §3.2); one-tap "Save to password manager"; print as an alternative; "Later" allowed with W8. No quiz (D-052). |
| M5 | Approving a new device | D-006 | A prompt on the old devices, then scan a QR code or type 6 digits (D-053). |
| M6 | A contact's key changed (W2) | Owner requirement for DMs | Non-blocking banner in that DM only, except for verified contacts. |
| M7 | A secure account entering an insecure community (W1) | Owner: SHOULD warn | Once per community; never a modal. |
| M8 | An insecure account at a secure door (G1) | Owner: CANNOT join | One button; the join resumes afterwards. |
| M9 | An admin upgrading a channel or server (W5) | Members may lose access | One confirmation that names who is affected. |
| M10 | Every device and the recovery key lost | D-006 | An honest "Start fresh" screen. Earlier encrypted messages don't come back on the new identity, because nothing hands history over (D-007); an old device found within 30 days can restore channel history (08 §11.4). |
| M11 | Waiting for history on the user's own new device, or for messages shared with them | D-007, D-054 | Inline marker K4; nothing blocks. |
4.12.5 Things that never prompt
Clients MUST NOT prompt, warn or interrupt for any of these: MLS joins, leaves and epoch changes; other users' new or removed devices; other users' resets in channels; media key rotation; route changes between relay and SFU; reconnects and auto-rejoins (apart from the talk and mute indicators of D-012 and the sharing and camera indicators of D-090); other people joining or being re-added to a secure context (nothing ever asks or suggests that anyone share earlier messages; manual history sharing happens only when a member chooses it, D-007); restoring history from the key archive; vault and key-archive sync; KeyPackage replenishment; bot key handling; server key rotation; silent credential-check failures in channels (diagnostics only, D-035); MediaAttestation failures (diagnostics only, D-043).
4.12.6 Lock indicator
- A closed lock (filled) is shown for a context only when SM-12 holds.
- A secure account sees an open lock ("Not encrypted") on insecure contexts.
- An insecure account sees no lock on insecure contexts. An insecure account, or a secure account on an unenrolled device, sees an outline gated lock ("Encrypted") on secure contexts it can't open. The gated lock appears only in lists, previews and on the gate card, never beside content, and leads to G1 or G2 (20 §8.1).
5. Trust model
5.1 Principles
- Insecure mode is conventional client–server trust. Confidentiality and integrity rest on TLS and an OAuth/OIDC-derived session (D-021). The servers involved can read, alter and forge anything in their insecure contexts. The protocol's only promise there is that no third party (a network attacker or an unrelated server) can read or impersonate.
- Secure mode removes servers from the content path, not from the membership path. Servers never hold content keys. They still order messages, store ciphertext, see metadata, and decide membership in channels.
- Identity is server-validated in channels and client-validated in DMs. This is an owner requirement (brief §2) and the main asymmetry in the model (§5.3).
- Every key that matters to other people chains to one identity key per account. Every leaf, message signature and media attestation chains through a DeviceCertificate to the account's identity key, and the identity key is bound to the canonical address by the home server's IdentityState.
5.2 What each party is trusted for
| Party | Insecure contexts | Secure channels | Secure DMs and group DMs | Can never do, in any mode |
|---|---|---|---|---|
| OIDC provider | Full account takeover if compromised. | Can obtain a home session, which reaches insecure contexts only. Can start an identity reset, which takes effect at once (D-071) and is silent in channels; only the victim's own devices see W4a. The reset gives no access to earlier content of secure channels or group DMs (D-007). | Same, but a reset shows W2 to every contact. | Obtain the identity key, decrypt the KeyBackup, or enrol a device. Learn the Sloppy Voice address from the external e-mail. |
| Home server | Asserts its users' identity anywhere (HomeAssertion); can impersonate its own users. Reads what it hosts. | Asserts which identity key and devices are current (IdentityState). A malicious home server can publish a key it generated and be accepted in channels silently for other members; only the victim's own devices notice (W4a, W4b). Can withhold service; sees metadata. | Can't introduce a new identity key without W2 for contacts who pinned the old one. Can hide devices or withhold IdentityState (denial of service). | Decrypt KeyBackup or AccountVault (80-bit phrase + Argon2id). Add a device under the existing identity key (needs the identity key). Read secure content. |
| Hosting server (channel) | Reads, alters, records and forges all text, files, voice, screen and webcam in its insecure channels. | As AS: decides who is admitted. It could admit an account it controls, which appears in the member list. Orders and delays messages, deletes ciphertext, enforces moderation, sees metadata. It can also admit into its own channels a leaf with a fabricated IdentityCertificate for a user of another server; member clients detect this only through silent diagnostics (07 §13.6, D-035), and the impersonated user, if present, sees W4b. | — | Read secure content or media. Forge one member's messages or media as another member's. Downgrade a channel or server that the client has already seen as secure without W9 (one it never saw as secure can't be told apart, 09 §18 item 2). |
| Hosting server (DM) | Reads and alters insecure DMs. | — | DS only: orders, delays and drops messages; sees metadata; can remove participants (denial of service). | Add a person to a secure DM: sv_participants is changed only by member commits and clients reject others (D-036). Read content. |
| Relay and SFU | Hear and see all media they forward. | Forward SFrame ciphertext; see sizes, timing and who speaks when; enforce leases. | Same. | Decrypt secure media. Forge secure media without a member's help; with it, only for seconds (§10 item 9). |
| Push gateway, APNs, FCM, Web Push services | Learn which device gets a wake-up, and when. | Same. | Same. | See any content or sender: pushes carry only an opaque ID (D-051). |
| DNS | Can redirect discovery. Limited by WebPKI for same-site and wellknown evidence, by DNSSEC where validated, and by key-set pinning after first contact (D-030). Without DNSSEC, the domain list alone does not stop a spoofer who runs their own server (§6 HP-7). |
Same, plus: a spoofed home domain could let an attacker publish fake IdentityStates to servers that have never contacted the real one. | Pins limit damage to first contact. | — |
| WebPKI CAs | Trusted for every TLS connection. | Same. | Same. | — |
| Other members | See what the context shows. | Decrypt everything their membership covers. Deliberately share earlier messages with one specific current member through manual history sharing, which the other members see (K8) (D-007); nothing is ever handed over automatically. | Same. | Forge another member's text (device-signed). Forge another member's media without the relay's or SFU's help; with it, only for seconds before MediaAttestation stops playback (§10 item 9). |
| Bot operators | See what the bot sees. | A secure bot is a member: whoever runs it reads everything it can read (W6): what is sent from its join on, plus anything a member deliberately shares with it (D-007). | Same. | — |
| Client software and web origin | Fully trusted. | Fully trusted. A web client is only as trustworthy as the origin that serves its code. | Same. | — |
5.3 Channels versus DMs
Channels: the hosting server validates identity. The hosting server is the MLS Authentication Service. It admits a leaf only when the leaf's device credential chains to the identity key in the IdentityState published by the user's home server, the device is listed active there, and the user may join. Clients accept its decision. Clients keep no pins in channels and show no warning when another member's identity changes. Clients still run silent checks (D-035): the credential chain inside the leaf, and the home server's signature on the IdentityState the hosting server relays. A failure is a diagnostic and a report to the servers, never a user warning. The one exception is about the user's own identity (W4a, W4b).
DMs: clients validate identity. Each client is the Authentication Service for its DMs and group DMs. It pins each contact's identity key on first use, keeps the pin in the AccountVault so all the user's devices share it, accepts the contact's new devices silently when they chain to the pinned key and appear in a fresh IdentityState, and shows W2 when the key changes. Safety numbers and QR codes give optional verification. For a verified contact, W2 blocks sending until the user accepts the new key.
5.4 Metadata visible to servers in secure contexts
Servers see, by design: membership and rosters (including device counts); context names, topics and settings; who sends, when, and how big; message kinds (message, edit, reaction, delete), but not reaction values; reply and thread structure where 11 makes it cleartext; mention hints unless the sender turned them off (D-063); typing and read state; who shared earlier messages with whom, and which seq ranges (VisibilityGrants, D-007); who is in a call, who speaks when, and media bitrates; IP addresses of connecting clients; push timing. Attachment sizes are padded to buckets (11). Document 22 has the full exposure table.
5.5 Plain-language statements for clients
Document 20 owns final copy. Intended meaning:
- Open lock: "The server running this community can read messages and hear calls."
- Closed lock in a channel: "Only members can read and hear this. The community's server decides who is a member."
- Closed lock in a DM: "Only you and the people here can read and hear this. You'll be told if someone's security key changes."
6. Architecture designs for the hard problems
Each subsection gives the decisive design. The named owning document specifies it in full and MUST NOT contradict it. HP-1 to HP-12 are the problems in brief §6. HP-13 to HP-15 are added problems that the design must also solve.
HP-1. One shared identity key versus MLS leaf uniqueness
RFC 9420 §7.3 requires every leaf's signature_key and encryption_key to be unique within a group, but D-006 requires one identity key per account.
- The identity key is one Ed25519 key pair, held by every enrolled device of the account.
- Each device generates its own device signing key (DSK), an Ed25519 key pair that never leaves the device, and its own box key, an X25519 key pair that never leaves it either.
- The identity key signs an IdentityCertificate (
sv-idcert+jwt) with claimssub(canonical address),ik(public key as a JWK),igen,kind(userorbot) andiat. - The identity key signs one DeviceCertificate (
sv-devcert+jwt) per device, with claimssub,igen,did,dsk(public key as a JWK),dbk(the box public key as an X25519 JWK, used to seal keys to that one device: VaultKeyGrants, 08, and HistoryShare keys, 14),plat(desktop,web,ios,androidorbot) andiat. Any enrolled device can issue a DeviceCertificate for itself, because it holds the identity key. - The MLS credential is a new credential type
sv_device, code point0xF5A0in the private-use range until registered. Its content isstruct { opaque identity_certificate<V>; opaque device_certificate<V>; }, holding the two JWS compact strings as ASCII bytes. - Leaf rules:
signature_keyMUST equal the DeviceCertificate's DSK;encryption_keyis fresh per leaf as usual; a group MUST NOT contain two leaves with the same (canonical address,did), except transiently in a resync external commit that removes the old one; all leaves of one address MUST carry the same IdentityCertificate; the identity key MUST NOT appear as any leaf key. - The identity key signs only IdentityCertificates, DeviceCertificates and DeviceRevocations. It never signs MLS messages, content or media.
- Users, pins, safety numbers and every user interface reason only about (canonical address, identity key). Rosters group leaves by address and show one person.
Why. Every leaf chains to the same identity key, so adding a device warns nobody, while every leaf key stays unique. A stolen DSK is one removable leaf. Owners: 07 (objects, credential, validation), 13 (use in MLS).
HP-2. Who validates identity
Common evidence (D-033). The home server publishes an IdentityState for every account: a JWS (sv-idstate+jwt) signed with a home-server key, valid for at most 24 h. Claims: iss, sub, inc (the account's incarnation, D-086), ver (strictly increasing), sec (insecure or secure), igen, idc (the IdentityCertificate JWS; absent when insecure), devices (list of {did, dkf, plat, since}), revoked (list of {did, at, rev}, where rev is an optional DeviceRevocation JWS), iat, exp. It is served publicly at GET {home}/v1/users/{local}/identity with CORS, returned with every HomeAssertion for a secure account, and relayed by hosting servers with commits. Verifiers keep the highest ver they have seen and reject lower ones.
Device validity (dual control). A device is valid only if (a) its DeviceCertificate verifies under the identity key in the current IdentityCertificate, (b) it is listed active in a fresh IdentityState, and (c) no DeviceRevocation covers it. A home server can't add a device (it lacks the identity key), and a thief holding a copy of the identity key can't add one either (they have no home session to get it listed).
Channels (D-035).
- The hosting server is the Authentication Service. When creating a remote session it verifies the IdentityState and the device. For every commit that adds or updates a leaf it checks: the credential chain; that the DeviceCertificate's
didis the session's device; that the identity key matches the IdentityState; that the device is active in an IdentityState it fetched or validated within the last 300 s (cache invalidated byidentity.changedanddevice.revoked) (for an UpdatePath of an existing leaf whose credential is unchanged, an unexpired IdentityState suffices when the home server can't be reached, D-083, 13 §6.1.1); and that the account may join and isn't banned. Failure:mls.credential_rejected. - When an identity changes or a device is revoked, the hosting server proposes removal of the stale leaves (HP-3).
- The hosting server delivers each commit in an
mls.handshakeevent annotated with the affected member's IdentityState. - Member clients MUST check the leaf's internal chain (a local check). A commit whose leaf fails it is invalid under RFC 9420 credential validation; the client rejects it, reports
mls.verification_failed, and resynchronizes later. An honest hosting server never sequences such a commit. - Member clients SHOULD verify the relayed IdentityState against the member's home-server keys in the background. A positive failure is reported to the hosting server and to the client's own home server as a diagnostic. It is never shown to the user.
- Clients keep no pins in channels. A reset is silent.
- Self-alerts: a client that sees its own canonical address in a roster with an identity key other than its own, or on a device its home server doesn't list, raises W4b (07 §18.2). A client that sees its own
igenchange without having caused it raises W4a. - A client MAY show a positive "known contact" badge when a member's identity key equals the user's DM pin for them. The absence of the badge is never shown as a warning.
DMs and group DMs.
- Each client is the Authentication Service. It accepts a leaf only if the chain verifies, the identity key equals its pin for that address, and the person is listed in
sv_participants(HP-3). To admit a new device it also requires an IdentityState no older than 24 h that lists the device. An existing leaf is never removed just because the IdentityState it was admitted under has expired; removal needs positive evidence (a newer IdentityState or a DeviceRevocation). - First contact pins the identity key silently. A changed key raises W2. A verified contact's change blocks sending until the user accepts the new key. Every replacement of a pinned key raises W2, including a re-upgrade after a downgrade.
- Pins and verification state live in the AccountVault, so all the user's devices share them and a new device never re-pins.
- Verification: a 60-digit safety number (two 30-digit halves, each from 5,200 iterations of SHA-512 over a version, the identity key and the canonical address) or a mutual QR scan.
Owners: 07 (IdentityState, validation rules, pins, verification, self-alerts), 13 (AS hooks), 12 (DM use), 20 (W2, W4 copy).
HP-3. Transparent joins and leaves
Joins (D-036).
- Channels: every join is an MLS external commit using GroupInfo stored by the hosting server. No member needs to be online. Every committer MUST upload the new GroupInfo with the
ratchet_treeandexternal_pubextensions. The same path serves a first join, a user's new device, and resync after lost or corrupt state (an external commit that removes the device's own old leaf). - DMs and group DMs: the creator adds participants with Welcome messages built from KeyPackages claimed through the creator's own home server (which forwards the claim to the participant's home server). Offline recipients can then read the first message. Adding a person to an existing secure group DM works the same way. A listed person's later devices join by external commit. Every device keeps a last-resort KeyPackage published.
sv_participants: every secure DM group carries this GroupContext extension, listing each person's canonical address and identity-key fingerprint. Only member commits change it. Clients reject an external commit from an identity that isn't listed. The hosting server therefore can never add a person to a DM.- Bootstrap: when a context becomes secure and has no group yet, the first enrolled member device to open it creates the group (one member) and uploads GroupInfo, using the same compare-and-set as commits.
group_idis the UTF-8 stringsv1:+ hosting server canonical domain +:+ context reference +:+ group generation (decimal). Clients reject GroupInfo whosegroup_iddoesn't match the context.
Ordering (D-037). The hosting server is the single sequencer per group. It accepts a commit only if the commit's epoch equals the group's current epoch, and updates epoch and GroupInfo in one transaction (compare-and-set). Otherwise it answers 409 mls.epoch_conflict, which carries the current GroupInfo for an external commit (a member catches up from the handshake log; 13 §11.3, §11.5), and the client retries after 0–500 ms of random jitter. Handshakes are PublicMessage so the server can check policy by structural parsing; it doesn't need a full MLS stack.
Commit policy (enforced by the server, checked by clients). Channels: an external commit contains ExternalInit and at most one Remove of the joiner's own stale leaf; a member commit contains only proposals by reference to server-issued proposals, plus an UpdatePath; Add by value is forbidden; GroupContextExtensions only when the server requests them. DMs: as specified in 13, with Adds by members, removals as allowed by 12, and sv_participants changes by members only.
Removals (D-037). For a kick, ban, leave, device revocation, identity change or inactivity eviction, the hosting server immediately:
- stops delivering application messages, handshakes, GroupInfo and media to the removed leaves' sessions;
- revokes their voice leases (cut within 4 s, HP-15);
- sends Remove proposals as the group's external sender;
- freezes the group for content: it rejects SealedMessages with 409
mls.commit_requireduntil a commit covers every pending proposal (commit-before-send, enforced by the server); - sends
mls.commit_neededto a designated committer: the online member device with the lowest leaf index. If no valid commit arrives within 3 s, it designates the next device. Any member device that wants to send commits first anyway.
If an external commit advances the epoch first, the server reissues its pending proposals in the new epoch. If no member is online, the group stays frozen and nothing is lost: removed devices already receive nothing, and the next member to act commits first.
Housekeeping. Devices SHOULD commit an UpdatePath after at most 7 days of activity. Devices post mls.epoch_ack after processing each commit (used for media switching and log cleanup). The server keeps the handshake log for at least 30 days. Devices not seen for 90 days (30 days for web devices) are evicted by server proposals and rejoin silently by external commit when they return. The default maximum group size is 1,000 leaves (limits.maxSecureLeaves, at most 65,536); when more than 3 commits for a group are in flight, the server answers 425 with retryAfterMs (D-059). A server advertises maxMlsUploadBytes large enough for full-tree GroupInfo uploads at its maxSecureLeaves (13 §17.1).
Owners: 13 (all of the above), 12 (DM membership rules), 09 (bootstrap trigger on upgrade).
HP-4. History in secure contexts
Keys (D-038). For each epoch e of a secure group:
K_hist(e) = MLS-Exporter("sv1 history", "", 32), computed in epoche;ekid(e) = HKDF-Expand(K_hist(e), "sv1 ekid", 8), a public key identifier carried in every SealedMessage (it also exposes forks: a forked epoch has a differentekid);K_msg = HKDF-Expand(K_hist(e), "sv1 msg" || mid, 32), wheremidis the 16-byte binary form of the message ID.
SealedMessage. Every piece of secure application content (messages, edits, reactions, deletes by the author, attachment keys) travels as a SealedMessage. It is encrypted with AES-256-GCM under K_msg with a random 96-bit nonce and the header as associated data. It carries a key commitment kc = HMAC-SHA256(K_msg, "sv1 kc") truncated to 16 bytes, and a signature by the sender's DSK (labelled signature sealed) over the header and ciphertext. The hosting server verifies that signature against the session's device at ingress, stores the SealedMessage, and can't decrypt it. MLS PrivateMessage isn't used for application data.
No history before the join (D-007). In a secure channel or group DM, the hosting server serves an account sealed items, and anything else derived from content, only from visibleFromSeq: the seq at which the account's current membership began (09, 12). Earlier memberships aren't served again; devices keep what they stored locally. There is no history setting, and nothing hands keys to newcomers: a newcomer's devices hold keys only for epochs they were in, read from their join on, and show marker K6 at the join point. Nobody is prompted. Bots follow the same rule (D-061). A participant re-added to a DM after an identity change starts a new membership at the re-add (12 §11.5), so a login takeover that forces a reset (D-071) can't read a group's past. Pre-upgrade plaintext follows HP-12. Insecure contexts show earlier history to new members as their permissions allow (09, 12).
Own devices, always (D-007, D-054). Every enrolled device appends every history key it learns to the key archive in the AccountVault, encrypted under the vault key, with a record ID that is a keyed hash of (group ID, epoch) so duplicates merge. Because the server serves sealed items from the account's visibleFromSeq, not from a device's enrolment, a user's new device fetches the same ciphertext and finds the keys in the archive, which it downloads lazily per context; it shows K4 while it restores. The archive also covers DMs, resync of an existing member device by external commit, and restores when no other member is online.
Manual history sharing (D-007). A client MAY offer "Share earlier messages with <name>…": one member deliberately shares earlier messages with one specific current member of the same secure context. It is never automatic, never a default and never prompted. The sharer's client builds a HistoryShare: a bundle listing {mid, K_msg} for each selected sealed item its account can decrypt, within a range {fromSeq, toSeq} and at most 5,000 items per share (clients split larger shares), encrypted with AES-256-GCM under a fresh random K_share. K_share is HPKE-sealed (sv1-c1, info sv1 history-share) to the box key dbk (07) of each of the recipient account's devices in the group, read from their leaves, and the sharer's DSK signs the share (labelled signature history-share). Attachment file keys travel inside the sealed content. The client posts the share to POST /v1/contexts/{ctx}/history/shares. The hosting server checks that the sharer is a current member allowed to share (share_history in channels, 10; any participant in group DMs and 1:1 DMs, 12, 14 §7.2) and isn't a bot account (bots never create shares, 14 §11), that the recipient is a current member of the same context, and that the range lies within the sharer's own visibility. It then records a VisibilityGrant {account, ctx, shareId, fromSeq, toSeq, sharer, createdAt}, serves those sealed items and their attachments to the recipient account, and emits history.shared. It never sees a key. The recipient checks every K_msg against the stored SealedMessage's key commitment and the sender's DSK signature, as for reports (HP-11), stores the keys in its key archive so all its devices can read them, and shows K7 above the shared range (K4 while loading). Other members see K8; channels also write an audit-log entry (10). Insecure contexts don't use it.
Who stores and encrypts what.
| Data | Stored by | Encrypted to | Written by |
|---|---|---|---|
| SealedMessage | Hosting server | K_msg (from K_hist(e)) |
The sending device |
| HistoryShare | Hosting server | Bundle under K_share; K_share HPKE-sealed to each recipient device's dbk |
The sharing device |
| VisibilityGrant | Hosting server | Not encrypted (metadata, no keys) | The hosting server, on accepting a HistoryShare |
| GroupInfo, handshake log | Hosting server | Public (PublicMessage) | Committers |
| Key archive records | Home server | Vault key | Each of the user's enrolled devices |
| KeyBackup | Home server | Recovery phrase (Argon2id) | Any enrolled device |
Owners: 14 (keys, SealedMessage, server acceptance rules, visibleFromSeq, HistoryShare, VisibilityGrant and /history/shares), 08 (archive record format and API), 07 (dbk), 09 and 12 (membership start), 10 (share_history, audit log), 20 (K4, K6 to K8 and the share action).
HP-5. Media E2EE
Design (D-041 to D-043, D-080).
- Keys: SFrame (RFC 9605) with the MLS key schedule of RFC 9605 §5.2, using the context's own MLS group. There is no separate per-call group. Cipher suite
AES_128_GCM_SHA256_128(0x0004) is mandatory. - KID:
KID = (context_id << (S + E)) + (leaf_index << E) + (epoch mod 2^E)withE = 4andS = 16.context_id = (joinNonce << 4) | sourceId, wherejoinNonceis a fresh random 32-bit value chosen for every encryptor instance: every call join, every rejoin, every start of the media process and every new SFU session (18 §4.3), andsourceIdis 0 microphone, 1 screen video, 2 screen or application sound, 3 webcam (4–15 reserved). Because SFrame keys depend on the KID, a crash or auto-rejoin within one epoch never reuses a key and counter pair. - Framing: on the relay path, a data-channel message is a cleartext route header (used as SFrame metadata, so it is authenticated) followed by the SFrame ciphertext of one Opus frame or one whole encoded video frame; video is fragmented after encryption. On the SFU path, SFrame is applied per encoded frame through WebRTC encoded transforms; a codec-defined clear prefix stays readable and is authenticated as SFrame metadata (18's SfuFrameMetadata: version, codec and clear prefix, 18 §8.5.3). The RTP payload descriptors and the Dependency Descriptor header extension, including its layer IDs, stay readable for layer switching but are unauthenticated forwarding hints, because an SFU may rewrite them on each leg.
- Rotation without glitches: after processing a commit, each participant installs the new epoch's keys and posts
call.epoch_ready. When every remaining participant is ready, the server broadcastscall.epoch_switch. Senders switch on that event, or 2 s after processing the commit by their own clock, whichever comes first; a sender that can't install the epoch call control has switched to keeps sending in its newest epoch for at most 8 s after learning of the switch, then closes its transmit gate until it can (18 §6.3). Receivers keep an old epoch's keys for 10 s after they learn that call control has switched the call past it (fromcall.epoch_switch, a lease tick'sepochor the join response'smediaEpoch, 18 §6.6), and hold frames of a not-yet-known newer epoch for up to 200 ms. A frame that still can't be decrypted counts as lost, so concealment covers it. Removed participants are cut by lease revocation independently of the commit. - Sender authentication: SFrame keys are derivable by every member, so each sender sends a MediaAttestation every 500 ms per active source: a DSK labelled signature (
media-attest) over a version, the context group'sgroup_idand epoch, the call ID, the KID, the first and last counter, and an 8-byte truncated SHA-256 of each frame's SFrame metadata and SFrame ciphertext in the batch (18 §9.2, §9.4). It travels on the reliable control data channel of every relay connection; attestations for SFU-routed sources travel on the relay's, because the SFU path has no Sloppy Voice data channel (15 §8.1, 18 §9.6). Receivers play frames at once and verify late. If a validly signed attestation contradicts a received frame, or frames stay unattested for more than 3 s, the receiver stops playing that stream and records a diagnostic. An attestation whose signature doesn't verify is discarded and stops nothing (18 §9.7, §9.8). No warning is shown. - Insecure contexts: the same framing with no SFrame and no attestations.
Owners: 18 (SFrame profile, attestation), 15 (epoch-switch messages), 16 and 17 (framing).
HP-6. Mixed-security matrix
§4 is the normative matrix. The mechanisms behind it are:
- servers enforce SM-4 using the HomeAssertion's
secandenrclaims and the IdentityState; - DM security is computed from participants' IdentityStates (
sec), never chosen by a user (D-050); - the DM hosting rule keeps insecure DMs that accept content off secure servers (SM-10, D-048);
- clients pin the secure state of channels, servers and group DMs and treat a downgrade as W9 (D-056);
- warnings come only from §4.12.
Owners: 00 (matrix), 09 (channels and servers), 12 (DMs), 20 (presentation).
HP-7. Federation trust
Server keys (D-030). Each server publishes Ed25519 public keys as JWKs in ServerMetadata keys, each with kid, purpose (sign or mls-external-sender), status (next, active, retired or revoked), nbf and exp. A new key is published as next at least 25 h before first use. A sign key of the server signs a KeyRotation JWS (sv-keyrot+jwt) naming the new key (for a new sign key, the previous active sign key; for a new mls-external-sender key, the current active sign key; 02 §12.1); these form keyChain. A sign key that replaces a revoked one has no KeyRotation (02 §11.7). A retired key stays published and verifiable for at least 7 days. A compromised key is listed as revoked with a revocation time. A verifier that meets an unknown kid refetches metadata, at most once per minute per domain.
HomeAssertion (D-004, D-062). A JWS (sv-assert+jwt) signed by the home server with claims iss, sub, aud (the remote server's canonical domain), iat, exp (at most iat + 300 s), jti (single use at the audience), sec, did, enr (enrolled), kind (user or bot), inc (the account's incarnation, D-086), isv (the ver of the IdentityState the claims were derived from), an optional name (display name), and for enrolled devices igen, ikf and dkf (RFC 7638 thumbprints of the identity key and DSK). An enrolled device adds a DeviceProof (sv-devproof+jwt, signed by its DSK) with aud, ajti (the assertion's jti), iat and exp (at most 60 s). The remote server resolves iss itself, verifies everything, consumes the jti, and issues a remote session with an opaque access token valid for 1 h, renewed silently with a fresh assertion. If the home server is unreachable at renewal, the remote server MAY extend the session up to 24 h in total after probing the home server itself.
Server-to-server requests (D-027). Every S2S request carries Authorization: Bearer <sv-s2s+jwt>: a JWS signed with a sending-server key with claims iss, aud, htm (method), htu (target URI), bh (base64url SHA-256 of the body; omitted for an empty body), iat, exp (at most iat + 60 s) and jti. The receiver resolves iss through discovery, requires iss to equal that server's canonical domain, and checks the method, URI, body hash and jti. Events go to one ingest endpoint, POST {base}/v1/federation/events. Each event has an ID; senders retry with exponential backoff from 1 s up to 1 h for 24 h, and receivers deduplicate.
Lookups. GET {base}/v1/users/{local}/identity (IdentityState) and GET {base}/v1/users/{local}/profile are public, CORS-enabled and rate-limited. KeyPackage claims are S2S only (13).
Revocation fan-out. The home server tracks each account's audiences: servers that received a HomeAssertion for it in the last 30 days, plus the hosting servers in its DM index and the servers on its community list (06 §11.1). On a device revocation or identity change it sends device.revoked or identity.changed to all of them, with a target of 10 s. Audiences end the affected sessions within 60 s and start leaf removal. Every record a server keeps about another server's account is keyed on (address, inc); a server that first sees a new inc for an address treats the earlier account as deleted (06 §11.6, D-086).
DNS spoofing (D-030).
- Every resolution records its delegation evidence:
dnssec(the TXT answer validated under DNSSEC),same-site(the base-URL host is the queried domain or shares its registrable domain under the Public Suffix List, so WebPKI vouches for it),wellknown(https://<fqdn>/.well-known/sloppyvover TLS agrees with the TXT answer) ordns-only. - What the domain list adds: a server accepts a domain only if it is in that server's metadata
domains. This stops a stranger pointing their own domain at someone else's server to gain addresses there (D-002). - What it doesn't add: without DNSSEC, an attacker who controls the DNS answer can point a victim domain at a server the attacker runs, whose metadata lists the victim domain. HTTPS only authenticates the attacker's own base URL.
- Defences: servers MUST pin the first-seen base URL and key set per domain. Afterwards, a different key set is accepted only through
keyChain, or withdnssec,same-siteorwellknownevidence (same-siteonly when the new base-URL host is the queried domain, a subdomain of it, or the pinned host; a sibling host in the same registrable domain doesn't override a pin, 02 §10.2, D-081). Otherwise federation with that domain is suspended and the admin is alerted, and users see that the server is temporarily unreachable. Servers SHOULD use validating resolvers. Operators SHOULD use same-site delegation (a CNAME and an ACME certificate), which needs no DNSSEC. Secure DMs are additionally protected after first contact by identity pins.
Blocking. Federation blocks are keyed by canonical domain and cover every alias.
Owners: 02 (keys, evidence, pinning, caching), 06 (assertions, sessions, S2S, fan-out, blocks), 04 (JWS profile).
HP-8. Alias canonicalization everywhere
Design (D-032). One function, canonicalize(input), owned by 01: parse leniently; normalize the local part (remove white space, then apply the PRECIS UsernameCaseMapped profile of RFC 8265, which applies case folding and NFC, and validate it, including the UTS #39 Highly Restrictive script rule of D-031 and D-092); convert the domain to a lowercase A-label (IDNA2008, UTS #46 mapping); run discovery; replace the domain with the metadata's canonicalDomain.
- MUST be canonical: IdentityCertificate and DeviceCertificate
sub; IdentityStatesub; HomeAssertioniss,subandaud; S2S tokenissandaud; MLS credentials,group_idandsv_participants; DM context IDs and the hosting-rule sort; identity pins and safety numbers; membership, ban, role and audit records; S2S events; notification records. - A verifier MUST reject a signed object that names an alias, with
address.non_canonical. - Accepted as input only: typed text,
sloppyvURIs, share links, discovery lookups, and API path parameters on the server that owns the alias (which rewrites them). - Links are generated with the canonical domain. Clients accept alias links and silently show the canonical form after resolution.
- Display always uses the canonical domain. The alias a user typed is never shown back.
- Changing a server's canonical domain is unsupported in v1 because it changes every identity. Aliases can be added and removed freely; removing one breaks only unresolved old links.
Owners: 01 (algorithm, field list), 02 (metadata), 07 (signed-object checks).
HP-9. Where DMs live, and how recipients are notified
Hosting rule (D-048).
- 1:1 DM: let
P1 < P2be the participants' canonical addresses, ordered byte-wise, with home serversH1andH2. If exactly one ofH1,H2is a secure server, the hosting server is the other one. Otherwise it isH1. The context reference isdm:+ base64url of the first 16 bytes ofSHA-256("sv1 dm" || 0x00 || P1 || 0x0A || P2). Both sides compute the same host and ID, so two people starting a DM at once get one conversation. - Group DM: hosted by the creator's home server, unless the group DM is insecure and that server is a secure server; then by the home server of the first insecure participant, in canonical-address order, whose home isn't a secure server; failing that, by the first participant whose home isn't a secure server. If every home is a secure server, creation fails with
dm.encryption_pending(12 §4.3 is normative). The context reference isgdm:+ a UUIDv7. The host never changes, even if the creator leaves. Default limit: 25 participants (D-059). - Server upgrade: when a hosting server becomes secure, every insecure DM it hosts is closed read-only with marker K5, and the next message starts a new DM at the host the rule now selects (it has the same
dm:ID on a different host). When both participants' homes are secure servers, an insecure 1:1 DM can't move anywhere; it stays in place instead, in stateencryption_pending, refuses content and calls until the insecure participant turns on encryption, and then becomes secure in the same thread (12 §13.1, §13.2).
Index and first contact (D-049). The hosting server sends dm.request to each recipient's home server (local delivery when it is the same server). It carries the context reference, hosting server, sender, security mode and the first events, up to 64 KiB: plaintext messages for an insecure DM (without their content when the recipient's home is a secure server, 12 §8.2); the Welcome and first SealedMessages for a secure one. The recipient's home server adds a DmIndexEntry and either auto-accepts (the sender shares a community on the recipient's community list, or they have an accepted DM) or files it as a message request. The recipient's client renders a request from its own home server and doesn't contact the hosting server, or reveal its IP address, until the user accepts. Decline and Block are reported to the hosting server.
Notifications (D-051). For each event that needs a recipient's attention, the hosting server sends notify to the recipient's home server: for message notifications, only to recipients with no attentive session on the hosting server (a foreground session whose user isn't idle, 19 §4.3), coalesced over 30 s; DM call rings, their ends and withdrawals of earlier notifications are sent at once whatever the recipient's sessions are, and are never coalesced (15 §13.1, 19 §4). The home server applies the user's global settings, stores a notification record, and sends a push carrying only the opaque record ID {h} through the push gateway (APNs, FCM) or Web Push. The device fetches the record from its home server, then the event from the hosting server, using the event ticket carried in notify (19 §4.7), and decrypts it locally. The mobile notification extension needs only symmetric history keys from shared key storage and never touches MLS state; 19 covers the iOS and Android time and memory limits and the fallback text. Push registrations exist only at the home server; remote servers never see push tokens.
Outages. If the hosting server is down, clients queue outgoing messages with their client-generated IDs and retry; the UI says the message is waiting for that server.
Owners: 12 (hosting, IDs, requests, index, security), 19 (notify, records, push), 06 (S2S delivery).
HP-10. Bots and web clients
Bots (D-061).
- A bot is an account with
kind: "bot", created on its home server by a user who holdsmanage_bots, and authenticated with a bot token (Authorization: Bot <token>). - An insecure bot holds no keys and can't enter secure contexts.
- A secure bot's SDK generates its identity key and one DSK per bot process (each process is a device) and registers them with the bot token. Its IdentityCertificate says
kind: "bot", so clients show a bot badge that can't be faked. Key backup is optional; a lost bot key means a reset, and its DM contacts see a bot-worded W2. - Adding a bot to a secure context produces W6. Like every newcomer, a bot is served nothing from before its join (D-007; D-061 as amended, which withdraws
botsGetHistory). - Webhooks and other integrations that aren't MLS members work only in insecure contexts (
security.context_secure_unsupported).
Web clients (D-065).
- The identity key, DSK and vault keys are stored in IndexedDB, wrapped with AES-GCM under a non-extractable WebCrypto key generated on that origin. They are unwrapped only inside a dedicated Worker, and the identity key only for rare operations (issuing this device's certificate, pairing out, updating the backup, signing a revocation), then zeroed.
- The client requests persistent storage. If storage is evicted, the device becomes unenrolled and the user pairs or restores again (eviction is device loss).
- A user MAY mark a browser as a shared computer from the sign-in screen, without being asked by default. Keys are then kept in memory only, and the home server revokes the device 12 h after its last activity.
- Trust statement (normative): a web client is exactly as trustworthy as the origin that serves its code. Web clients for secure accounts MUST be served with a strict Content Security Policy (no inline script, no third-party script origins) and Subresource Integrity on every script, except the service worker script, which browsers can't integrity-check: it MUST NOT handle any key except the notification key subset of 08 §13.5 and the push fetch token of 19, and follows 20 §16.6 (dedicated Worker scripts are loaded through an integrity-checked fetch, 20 §16.4), SHOULD be served from an origin separate from the API, and SHOULD publish reproducible build hashes.
- Web clients can't query DNS TXT records, so they resolve through
GET {home}/v1/resolve?domain=on their home server (before sign-in, on the server that served the web client) or through DNS-over-HTTPS (RFC 8484), and then check the domain list themselves (D-029).
Owners: 05 (bot accounts), 07 (bot certificates), 08 (key storage on every platform), 02 (/v1/resolve), 20 (web hardening profile).
HP-11. Abuse handling in secure contexts
Design (D-040). A report reveals the per-message keys of exactly the reported messages.
- The reporter's client sends
POST {host}/v1/reportswith the context, the reported message IDs and theirK_msgvalues, a reason and an optional note. By default it also includes up to 10 surrounding messages on each side; the user can turn that off. - The hosting server and its moderators verify each item: the stored SealedMessage's DSK signature against the sender's DeviceCertificate;
kcagainst the revealedK_msg; then decrypt. This proves the sender's device sent exactly this content, and that the reporter neither altered nor forged it. - A recipient of a manual history share checks every shared
K_msgwith the same procedure (key commitment and the sender's DSK signature) before it stores or shows anything (HP-4, 14). - Attachments are reported with their file key.
- Reports go to the community's moderators (members with
manage_reports) and, for server-wide abuse, to the server admin. The reporter is told in one line that the reported messages will be shared with the server's moderators. - For DMs, reports go to the DM's hosting server, except a report about an unaccepted message request (D-049) or about a DM hosted on the target's own home server, which goes to the reporter's own home server (10 §10.10). Either server's admins MAY forward it (
report.forwarded) to the sender's home server, which can block the sender's account or server. - Moderators act with the normal tools (D-023).
Owners: 10 (Report object, queue, workflow), 14 (verification procedure).
HP-12. Upgrades
Account (D-019). One action: "Turn on encryption", in Settings or from a G1 card. If the session's last provider sign-in was more than 23 h ago, one provider sign-in comes first (the home server requires fresh authentication with maxAgeMs 24 h, 05 §9.1, D-085; the client keeps a one-hour margin, 08 §3.2); the home server refuses PUT {home}/v1/me/identity without it, so a stolen session token can't attach a key that DM contacts would pin silently.
- The client generates the identity key, a DSK, the first vault key and 80 bits of recovery-phrase entropy.
- It registers the IdentityCertificate and DeviceCertificate (
PUT {home}/v1/me/identity) and uploads the KeyBackup. - The home server publishes IdentityState with
igen+1 andsec: secure, and sendsidentity.changedto the account's audiences. - The client shows M4 (save the recovery key).
- The account's other devices become unenrolled and show "Approve this device", which starts pairing.
- Eligible DMs upgrade (K1). Contacts pin the new key without a warning.
Secure → insecure is a reset (§4.10).
- A member with
manage_channelson an enrolled device asks for a dry run:PATCH {base}/v1/channels/{id}with{"security": "secure", "dryRun": true}. The server answers with the members who can't follow. - The client shows W5, naming them, with an option (default off) to delete pre-upgrade plaintext history.
- On confirmation, the client sends the same PATCH with
dryRun: falseand a bootstrap one-member GroupInfo. The server applies it atomically: it recordsupgradeSeq(the channel's last plaintext sequence number), rejects plaintext posts after it, and emitschannel.security_changed. - Secure members' devices join by external commit on their next sync, without prompting. Every account that was a channel member before the upgrade keeps reading the pre-upgrade plaintext under K3 (D-007).
- Insecure members move to
needs_encryption. They keep membership and roles, can read history up toupgradeSeq(shown under K3, unless the admin deleted it), and see G1. - An active call ends with reason
security_upgraded. Clients rejoin it as a secure call automatically, keeping mic and push-to-talk state, because this is a planned migration.
Pre-upgrade plaintext is never sealed, archived or shared through a HistoryShare (14). An account whose channel membership begins after the upgrade, including a former member who rejoins, is served nothing from before its join, that plaintext included, and sees K6 at its join point (D-007).
Server. PATCH {base}/v1/community {"secure": true} is irreversible. Every channel upgrades as above (the group is bootstrapped lazily by the first enrolled member device to open it); local insecure accounts become upgrade_required; remote insecure members become needs_encryption; insecure DMs hosted there are closed, or put in encryption_pending (HP-9, 12 §13.1).
Owners: 08 (account ceremony), 05 (account states, fresh authentication), 09 (channel and server procedures), 12 (DM effects), 20 (W5, G1 copy).
HP-13. Auto-rejoin that matches the physical push-to-talk control
All three source proposals got D-012 wrong. This is the normative design (D-012, D-047).
- After an unexpected drop, the client rejoins automatically with retries at 0, 1, 2, 4, 8 and 15 s, then every 30 s while the call screen is open. It presents a rejoin token (valid 60 s). The hosting server holds the participant's seat as
reconnectingfor 30 s, so others see a small badge and hear no leave or join sound. - Transmit state follows the physical PTT control. If PTT is held when the rejoin completes, whether held since before the drop or pressed during the outage, the client transmits immediately.
- The client never captures audio during the outage to send later. Transmission resumes with live audio only.
- Releasing PTT at any time, including during the outage, stops transmission. Pressing it again resumes it.
- While PTT is held but the client can't transmit (reconnecting, or, in a secure call, holding no SFrame sending key for the epoch it must send in, 16 §7.2, 18 §6.3; an epoch switch by itself never stops transmission), the talk indicator MUST say plainly that the user isn't being heard, for example "Reconnecting — you're not being heard". It MUST never look like it is transmitting.
- Voice-activation and open-mic users come back muted after an automatic rejoin and must unmute deliberately. The mute indicator shows this.
- Planned migrations (channel upgrade, server-requested failover, route changes) keep mic and PTT state and aren't treated as drops.
- The seat is restored only if the user still has the right to be in the call;
speak_and_shareis re-checked. - Video after an automatic rejoin (D-090). The webcam is turned off when the drop is detected and comes back off. A screen share is held during the outage, with its indicator saying plainly that the user isn't being seen, and resumes by itself only if the seat was restored within 30 s of the drop; otherwise it stops and the user shares again deliberately. Planned migrations keep both.
Owners: 15 (state machine, timers), 16 (audio-engine gating), 17 (video after a rejoin), 20 (indicators and copy).
HP-14. Recovery and pairing that non-IT-literate people complete
Recovery phrase (D-052). Eight words from the BIP-39 English 2,048-word list: 80 bits of entropy plus an 8-bit checksum (the first byte of SHA-256 of the entropy). Input is forgiving: case-insensitive, the first 4 letters of each word are enough, with autocomplete. The backup key comes from Argon2id (RFC 9106) with m = 64 MiB, t = 3, p = 1, a 16-byte salt and a 32-byte output; clients MUST refuse weaker parameters. The save step offers "Save to password manager" (username = the address, password = the phrase), "Print or save as PDF", "Show words", and "Later" (with W8). There is no quiz. The phrase entropy travels in pairing and the backup, so any enrolled device can show the recovery key again.
Pairing (D-053). The new device signs in with OIDC, learns the account is secure, and shows a QR code (pairing ID plus a 128-bit secret) and a 6-digit code. The home server sends pairing.requested to the account's enrolled devices ("Is this you signing in on Chrome · Windows?"). On an old device the user scans the QR code or types the code. The two devices run CPace (CPACE-X25519-SHA512) over messages relayed by the home server, with mandatory key confirmation. A failure ends the session; the home server gets at most one online guess against each device per session, and only a correct guess against the approving device exposes the payload (04 §11.7). Codes expire after 10 minutes, with at most 5 pairing sessions per account per hour. The old device then sends the identity key, IdentityCertificate, vault keys and phrase entropy, encrypted. The new device creates its DSK and box key, issues its own DeviceCertificate (which binds both), registers it through its own home session, downloads the vault and joins its groups. Either direction works.
Vault key generations (D-054, D-082). After a device revocation, a remaining device creates a new vault key generation and encrypts the older generations' keys under it. When the device was removed as lost or stolen, the same flow makes a new recovery key, and the KeyBackup receives the new vault key only under that new phrase; after a routine removal the KeyBackup is updated under the current phrase (08 §10.8). A revoked device can still read what it could already read, and nothing written after the rotation, as long as it was removed as lost or stolen or the KeyBackup stays out of an attacker's hands.
Owners: 08, 04 (CPace and Argon2id profiles), 20 (screens).
HP-15. Bounded authority at scale
Design (D-046). The hosting server's call control sends the relay a lease snapshot for each call every second: {callId, seq, validMs: 3000, audio: [pid…], video: [pid…], listeners: [pid…]}. Revocations are pushed immediately. The relay stops forwarding any sender not in a snapshot newer than 3 s, and stops forwarding everything in a call whose snapshots stop for 3 s. The relay re-emits each snapshot to every participant as a lease tick on the control data channel. The same ticks also arrive over the WebSocket as call.tick. Each receiver's audio engine drops frames from any sender not covered by a tick less than 3 s old, measured on the audio clock. Every path goes through the relay or SFU (D-094), so the server enforces leases on all of them: a revoked participant is cut off within 4 s, whatever its client does. On the SFU path, control disables the participant's tracks within 1 s of a revocation. "Mute for everyone" removes the person from audio only; revoking speak_and_share removes them from both lists (D-015).
Owners: 15 (snapshots, ticks, API), 16 (receiver enforcement), 21 (relay-control interface).
7. Cross-cutting conventions
Every document MUST follow this section. Document 03 owns the transport rules and registries in detail, and 04 owns the cryptographic rules in detail. Both MUST include everything stated here.
7.1 Versions and names
Sloppy Voice v2 is the product. Its wire protocol is protocol version 1, written sv1 (D-025).
| Where | Value |
|---|---|
| Discovery record | v=sv1 (D-001) |
| HTTP API path | {base}/v1/… |
| WebSocket subprotocol | sloppyv.v1 |
| Cryptographic labels | Start with sv1 (for example sv1 history) |
MLS group_id prefix |
sv1: |
| Error type URIs | urn:sloppyv:error:<code> |
ServerMetadata versions |
["1.0"] |
The URI scheme is sloppyv (01).
7.2 Wire encodings
- Control and federation payloads are JSON (RFC 8259) restricted to I-JSON (RFC 7493), UTF-8, sent with
Content-Type: application/json. Producers MUST NOT emit duplicate member names. Consumers MUST ignore unknown members. Exceptions (03 §2.9):/v1/auth/parand/v1/auth/tokenalso acceptapplication/x-www-form-urlencodedwith RFC 6749 parameter names,/v1/auth/consentaccepts the form post of 05's consent page, and 05's browser-navigation endpoints may return HTML pages and redirects. - Integers in JSON are at most 2^53 − 1. A value that may exceed that is a decimal string.
- Binary values in JSON (keys, MLS messages, ciphertexts, hashes, nonces) are base64url without padding (RFC 4648 §5). Decoders MUST reject padding and characters outside the alphabet.
- MLS objects use the TLS presentation-language encoding of RFC 9420 and are carried as base64url strings.
- Signed objects are JWS compact serializations (§7.13). They are never re-serialized; signatures cover exact bytes, so no JSON canonicalization is needed.
- Media uses compact big-endian binary headers on WebRTC data channels (
voice-dc/1,video-dc/1, defined in 16 and 17) and RTP on the SFU path (sfu-rtp/1, 17).
7.3 Endpoints and HTTP rules
- Every endpoint is relative to the base URL. The base URL has no trailing slash.
{base}/metais unversioned. Everything else is under{base}/v1/.- Commands are HTTPS requests (
GET,POST,PUT,PATCH,DELETE) with JSON bodies (D-026). Request and response bodies are plain JSON objects defined by the endpoint's owner; they are not wrapped in the envelope. Server-to-client events use one WebSocket per client session per server (§7.4). - The only non-JSON request bodies are attachment bytes (11), the form-encoded OAuth endpoints
/v1/auth/parand/v1/auth/token, and the consent form posted to/v1/auth/consent(05, 03 §2.9). - HTTPS only. TLS 1.2 minimum, TLS 1.3 RECOMMENDED. Any HTTP version.
- Authentication headers:
Authorization: Bearer <token>for home and remote session tokens (opaque strings);Authorization: Bot <token>for bots;Authorization: Bearer <sv-s2s+jwt>on server-to-server endpoints. No cookie or other ambient credential ever authorizes an API request. The only cookie in the protocol is 05's short-lived, path-scoped transaction cookie on the browser-navigation endpoints/v1/auth/authorize,/v1/auth/callbackand/v1/auth/consent(05 §6.4, 03 §2.9); it authorizes nothing, and every other endpoint ignores it. - CORS:
/.well-known/sloppyv,/metaand every/v1/endpoint answer withAccess-Control-Allow-Origin: *and allow theAuthorization,Content-Type,Idempotency-KeyandIf-None-Matchrequest headers (03 §4 gives the full CORS rules). - Context references in paths:
ch:…,dm:…andgdm:…appear as one path segment. Clients MAY percent-encode the colon; servers MUST accept both forms.
Path ownership. A document MUST NOT define endpoints under another document's paths.
| Path | Purpose | Owner |
|---|---|---|
https://<fqdn>/.well-known/sloppyv |
Discovery fallback | 02 |
/meta |
ServerMetadata | 02 |
/v1/resolve, /v1/resolve/pins… |
Resolution proxy for web clients; federation pin administration | 02 |
/v1/events |
Event WebSocket | 03 |
/v1/addresses/{local} |
What an address names (user or channel) and its display name |
01 |
/v1/auth/… |
OAuth authorization, token, sign-up, sign-out | 05 |
/v1/me, /v1/me/devices…, /v1/me/providers…, /v1/me/avatar, /v1/bots…, /v1/users/{local}/profile, /v1/users/{local}/profile/avatar |
Account, device records, linked providers, avatars, bots, public profile | 05 |
/v1/federation/assertions, /v1/federation/sessions…, /v1/federation/events, /v1/federation/policy, /v1/federation/blocks… |
HomeAssertion issuance, remote sessions, S2S event ingest, federation policy and blocks | 06 |
/v1/users/{local}/identity, /v1/me/identity… |
IdentityState; registering identity and devices, resets, revocations | 07 |
/v1/me/backup, /v1/me/vault…, /v1/me/pairing… |
KeyBackup, AccountVault, pairing | 08 |
/v1/community…, /v1/channels…, /v1/invites…, /v1/me/communities |
Community, membership, channels, invites, community list | 09 |
/v1/roles…, /v1/moderation/…, /v1/bans…, /v1/reports…, /v1/audit-log |
Roles, moderation, bans, reports, audit log | 10 |
/v1/contexts/{ctx}/messages…, …/reactions…, …/read, …/typing, …/attachments…, …/webhooks…, /v1/me/presence, /v1/me/read-states |
Timeline, read state, typing, attachments, webhooks (insecure contexts only), own presence, all read states | 11 |
/v1/dms…, /v1/me/dms…, /v1/me/dm-requests… |
DM creation, DMs and group DM membership, DM index, settings and blocks, message requests | 12 |
/v1/contexts/{ctx}/mls/…, /v1/me/keypackages, /v1/keypackages/claim, /v1/federation/keypackages/claim |
MLS Delivery Service, KeyPackages | 13 |
/v1/contexts/{ctx}/history/…, including /v1/contexts/{ctx}/history/shares |
Manual history sharing: POST creates a HistoryShare, GET lists the shares addressed to the caller's account (D-007); any other history endpoint 14 keeps |
14 |
/v1/contexts/{ctx}/call…, /v1/diagnostics, {relayUrl}/connect |
Calls, SFU signalling, diagnostics, relay connection | 15 |
/v1/me/push-registrations…, /v1/me/notifications…, /v1/contexts/{ctx}/notification-settings |
Push registration, notification records, per-context settings (/v1/me/notifications/events is served in the hosting role and authenticated by an event ticket, 19 §8.6) |
19 |
{gatewayUrl}/v1/register, {gatewayUrl}/v1/push |
Push gateway API | 19 |
7.4 The event WebSocket and the envelope
A client opens at most one WebSocket per client session per server it uses (two accounts signed in on one server are two client sessions, 03 §5.12), at {base}/v1/events, with subprotocol sloppyv.v1. The first client message is session.hello, which carries the token (browsers can't set headers on WebSockets, and tokens never go in URLs). Apart from a few session.* messages, the socket is server-to-client only. Every frame is one JSON envelope:
| Member | Type | Meaning |
|---|---|---|
v |
integer | Envelope version, 1. |
t |
string | Message or event type, <area>.<name> (§7.5). |
id |
string | UUIDv7 of this envelope. |
re |
string | Only on replies: the id being answered. |
ctx |
string | The stream the event belongs to: a context reference, me for account-level events, or community for events about the server's community as a whole (03 §7.1, D-078). Absent on session messages. |
seq |
integer | The event's sequence number in its stream. Present on durable events only. |
ts |
string | Server timestamp (§7.7). |
d |
object | The payload, defined by the owner of t. |
{
"v": 1,
"t": "message.created",
"id": "01938f2e-7c1a-7b3e-9d1e-5f2a8c7d9e01",
"ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
"seq": 4182,
"ts": "2026-12-04T18:22:31.512Z",
"d": {
"mid": "01938f30-1b2c-7d4e-8f90-a1b2c3d4e5f6",
"carrier": "plain",
"sender": { "addr": "alice@a.com", "name": "Alice", "did": "q2bS9xVg3m0yJpQe1vT0Aw", "kind": "user" },
"createdAt": "2026-12-04T18:22:31.512Z",
"content": { "text": "Hello", "replyTo": null, "attachments": [] },
"mentionAll": false,
"editedAt": null,
"deleted": null,
"reactions": [],
"updatedSeq": 4182
}
}{
"v": 1,
"t": "session.hello",
"id": "01938f2f-0000-7000-8000-000000000001",
"d": {
"token": "rs_4kJ…",
"client": "sloppyvoice-desktop/1.0.3",
"features": ["video-dc/1", "sfu-rtp/1"],
"resume": { "ch:01938a11-2b3c-7d4e-8f90-112233445566": 4182, "me": 77 }
}
}Posting a message. The same content schema travels in two carriers (11, 14). In an insecure context the body carries content; in a secure context it carries sealed, whose plaintext is the same content JSON. The exact schemas belong to 11 and 14.
POST {base}/v1/contexts/ch:01938a11-2b3c-7d4e-8f90-112233445566/messages
{ "mid": "01938f30-1b2c-7d4e-8f90-a1b2c3d4e5f6",
"content": { "text": "Hello", "replyTo": null, "attachments": [] } }POST {base}/v1/contexts/ch:01938a11-2b3c-7d4e-8f90-112233445566/messages
{ "mid": "01938f30-1b2c-7d4e-8f90-a1b2c3d4e5f6",
"sealed": {
"v": 1,
"ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
"gen": 1,
"mid": "01938f30-1b2c-7d4e-8f90-a1b2c3d4e5f6",
"epoch": 42,
"ekid": "q83vEjRWeJA",
"kind": "message",
"did": "q2bS9xVg3m0yJpQe1vT0Aw",
"nonce": "3q2-7wAAAAAAAAAA",
"kc": "mZ8rQ1cX0vB7nT4yL2kP9w",
"ct": "Vt1yQm9…",
"sig": "Jk3b0xW…"
},
"mentions": ["bob@b.com"],
"mentionAll": false }The sender's address is never taken from the body; the server knows it from the session and adds it to events. mentions and mentionAll are the cleartext hint of D-063.
- Durable events (timeline, membership, MLS handshakes, DM index changes) carry a per-stream
seq(per context, per accountmestream, and for thecommunitystream) that starts at 1 and has no gaps. On reconnect the client sends, inresume, the lastseqit processed per stream. The server replays everything after it, or sendssession.resync_requiredfor a stream whose gap is too large; the client then refetches over HTTP. - Ephemeral events (typing, presence, lease ticks, call state) carry no
seqand are never replayed. - Heartbeat: the server sends
session.pingevery 30 s; a client that hears nothing for 75 s reconnects. - A WebSocket error is an envelope with
t: "error",reset if it answers a client message, and the problem object (§7.9) ind.
7.5 Naming
- JSON members are lowerCamelCase (
createdAt,maxSecureLeaves). JWS claims use short names (§7.13). - Enum values are lowercase snake_case (
needs_encryption,upgrade_required). Every enum MUST say how a receiver treats an unknown value. Exceptions fixed by D-030 and 02: the delegation evidence valuessame-siteanddns-only, and the server-keypurposevaluemls-external-sender. - Event and message types are
<area>.<name>, lowercase, withnamein snake_case. Events that report something that happened use a past-tense verb (message.created,member.removed,channel.security_changed). Requests and state snapshots use a noun or imperative (session.hello,call.tick,mls.commit_needed). The same names are used for S2S events. - Error codes are
<area>.<reason>, lowercase snake_case (mls.epoch_conflict). - Object names in prose are PascalCase (IdentityState, SealedMessage).
- Permissions are lowercase snake_case (
speak_and_share). - Media profiles are
<name>/<major>(voice-dc/1). - Warning, gate-card, marker and moment IDs are
W<n>,G<n>,K<n>andM<n>(§4.12).
Area ownership. A document defines event types and error codes only in its own areas.
| Area | Owner | Area | Owner | |
|---|---|---|---|---|
core (errors only) |
03 | role, permission, moderation, report |
10 | |
session |
03 | message, reaction, typing, read, presence, attachment |
11 | |
address |
01 | dm |
12 | |
discovery |
02 | mls |
13 | |
crypto |
04 | history, sealed |
14 | |
auth, account, device, bot |
05 | call, relay, sfu |
15 | |
federation |
06 | media |
18 | |
identity |
07 | notify, push, notification |
19 | |
pairing, backup, vault |
08 | security (errors only) |
00 | |
community, member, channel, invite |
09 | relayctl (messages of the sloppyv-relay-control.v1 subprotocol only; no event types or error codes) |
21 | |
x-<name> |
implementation extensions (03 §10.4) |
Exception: the event type device.revoked, in 05's device area, is defined by 07.
S2S event types are indexed, with their delivery parameters, in 06 §10.1, and registered in 03's event-type registry: identity.changed and device.revoked (payloads in 07, delivery in 06), account.deleted, account.suspended and account.profile_changed (05), dm.request, dm.response and dm.entry_updated (12), notify.event (19), report.forwarded (10) and discovery.metadata_changed (02).
7.6 Identifiers
| Identifier | Format | Generated by |
|---|---|---|
| Address | Canonical local@domain on the wire (local part PRECIS-prepared and case-folded, UTF-8 NFC; domain a lowercase A-label); the display form goes in a separate name member |
01 |
Context reference (ctx) |
ch:<UUIDv7> (channel), dm:<22-char base64url> (1:1 DM, HP-9), gdm:<UUIDv7> (group DM); in the envelope's ctx the stream names me (account-level events) and community (community-level events) also appear, which are stream names, not context references (03 §8.3) |
Hosting server; dm: computed by anyone |
Message ID (mid) |
UUIDv7, lowercase hyphenated | The sending client. It is the idempotency key and is bound into K_msg. |
| Other object IDs (channels, roles, invites, reports, calls, notification records, events, pairing sessions) | UUIDv7, lowercase hyphenated (RFC 9562) | Server |
Device ID (did) |
16 random bytes, base64url (22 characters) | Home server, at device registration |
Account incarnation (inc) |
16 random bytes, base64url (22 characters), the same grammar as did (05 §12.4) |
Home server, when it creates the account (05 §11.1). Never changes; a local part registered again after a deletion gets a new one (D-086) |
Participant index (pid) |
Integer 0–65535, unique within a call | Hosting server |
jti |
At least 128 random bits, base64url | Issuer |
| Server key ID | <canonical-domain>#<keyId>, keyId = 1–32 of [A-Za-z0-9._-] |
Server |
| Identity and device key IDs | RFC 7638 SHA-256 JWK thumbprint, base64url (ikf, dkf) |
Anyone |
MLS group_id |
UTF-8 sv1: + hosting canonical domain + : + ctx + : + generation (decimal) |
Group creator |
Sequence number (seq) |
Integer per stream (context, me or community), from 1, gap-free for durable events |
The server that holds the stream |
Ordering within a context always uses seq, never an ID.
7.7 Timestamps and durations
- JSON timestamps are RFC 3339 in UTC with millisecond precision and a
Zsuffix, for example"2026-12-04T10:15:30.123Z". Member names end inAt(createdAt). - JWS claims (
iat,exp,nbfand other times inside signed objects) and the JWK-style time members of a ServerKey (nbf,exp,retiredAt,rvt, 02 §11.1) are NumericDate integer seconds. - Durations are integer milliseconds with names ending in
Ms(retryAfterMs,validMs). - Verifiers allow ±60 s of clock skew for
iat,nbfandexp. - Media timestamps are 32-bit counters: 48 kHz for audio, 90 kHz for video (16, 17).
- Lease expiry is measured on the audio engine's monotonic clock (15, 16).
7.8 Versioning and capability negotiation
- ServerMetadata carries
versions(supported protocol versions),features(optional capabilities),limitsandminClient. - Clients send their own
featuresinsession.hello. Federation peers read each other's metadata. The effective feature set is the intersection. - A minor version is additive only. Receivers MUST ignore unknown members and unknown event types, and MUST treat unknown enum values as the owning document says. An unknown endpoint returns 404
core.not_found, which the caller treats as "feature absent". - A client older than
minClientshows an "update required" screen. - A breaking change needs a new path version (
/v2), served alongside/v1for at least 12 months. - Initial feature names (each owner defines semantics):
voice-dc/1(16, mandatory),video-dc/1(17, mandatory),sfu-rtp/1(17, optional),webhooks(11, optional, insecure contexts only), Secure-mode support is mandatory and has no flag (D-066). - There is no cryptographic negotiation inside a suite (§7.15).
7.9 Errors
HTTP errors use RFC 9457 problem details with Content-Type: application/problem+json. WebSocket errors carry the same object in d.
{
"type": "urn:sloppyv:error:security.account_required",
"code": "security.account_required",
"title": "This channel is end-to-end encrypted",
"status": 403,
"detail": "Turn on encryption for your account to join this channel.",
"retryable": false,
"retryAfterMs": null,
"userAction": "enable_encryption",
"data": { "scope": "channel", "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566" }
}| Member | Required | Meaning |
|---|---|---|
type |
Yes | urn:sloppyv:error: + code |
code |
Yes | The registered code |
title |
Yes | Short English summary; clients don't parse it |
status |
Yes | HTTP status |
detail |
No | Human-readable detail |
retryable |
Yes | Whether the same request may succeed later |
retryAfterMs |
No | When to retry |
userAction |
Yes | One of none, retry, wait, sign_in, enable_encryption, set_up_device, update_app, contact_admin. Clients render one-tap fixes from it without parsing text. |
data |
No | Code-specific structured data, defined by the code's owner |
The registry of codes is owned by 03. Each document registers codes only in its own areas (§7.5). Core codes (03): core.invalid_request, core.unauthenticated, core.token_expired, core.forbidden, core.not_found, core.conflict, core.gone, core.too_large, core.rate_limited, core.idempotency_conflict, core.unsupported_version, core.unsupported_feature, core.internal, core.unavailable, core.method_not_allowed, core.unsupported_media_type, core.too_early (core.unsupported_feature is 501; 03 §10.5 is the complete list with statuses). Codes named elsewhere in this document: security.* (§4.11), address.non_canonical (01), discovery.domain_not_served (02), mls.epoch_conflict, mls.commit_required, mls.credential_rejected, mls.verification_failed (13).
7.10 Pagination
- Timelines (sequenced contexts) page by
seq:?before=<seq>or?after=<seq>, withlimitfrom 1 to 100 (default 50). The response is{"items": [...], "hasMore": true}. Items carry theirseq. - Collections (members, roles, invites, reports, DM index) page by opaque cursor:
?cursor=<c>&limit=<n>. The response is{"items": [...], "nextCursor": "…"}, withnextCursornull at the end.
{ "items": [ { "seq": 4181, "mid": "01938f2f-…", "content": { "text": "hi" } } ], "hasMore": true }7.11 Idempotency and rate limits
- A create request that carries a client-generated ID (such as
mid) is idempotent on that ID: a resend returns the existing object. - Other mutating requests MAY carry
Idempotency-Key(1–64 characters). Endpoints whose response carries a newly issued credential ignore it (03 §14.2). Servers keep keys for at least 24 h. A reuse with a different body fails with 409core.idempotency_conflict. - Rate limits answer 429
core.rate_limitedwithRetry-Afterand the IETFRateLimitandRateLimit-Policyheaders. Over the WebSocket, the error carriesretryAfterMs. Limits apply per session, per IP address and per federation peer.
7.12 Size limits
Limits are advertised in ServerMetadata limits as max<Thing><Unit> integers. The owning document defines each limit with a default and a floor: every conforming server MUST accept at least the floor, so clients can rely on it.
| Limit | Default | Floor | Owner |
|---|---|---|---|
maxRequestBytes (JSON body) |
1 MiB | 256 KiB | 03 |
maxEventBytes (one WebSocket envelope) |
1 MiB | 256 KiB | 03 |
maxMessageBytes (content JSON, or SealedMessage plaintext) |
16 KiB | 8 KiB | 11 |
maxAttachmentBytes |
25 MiB | 8 MiB | 11 |
maxSecureLeaves |
1,000 (at most 65,536) | 100 | 13 |
maxGroupDmParticipants |
25 | 10 | 12 |
maxDmRequestBytes |
64 KiB | 64 KiB | 12 |
maxSubscriptions (streams per socket, excluding me) |
1,000 | 250 | 03 |
maxReplayEvents (durable events replayed per stream per resume; replay window at least 24 h) |
5,000 | 1,000 | 03 |
maxMlsUploadBytes (bodies of …/mls/commits and …/mls/bootstrap; at least 2,048 × maxSecureLeaves + 65,536) |
8 MiB | 3 MiB | 13 |
maxFederationEventBytes (one S2S event) |
128 KiB | 128 KiB | 06 |
maxDevices (active device records per account) |
30 | 10 | 05 |
maxLinkedProviders |
10 | 2 | 05 |
maxAvatarBytes |
1 MiB | 256 KiB | 05 |
maxBotsPerAccount |
10 | 1 | 05 |
maxBotTokens (active tokens per bot) |
10 | 2 | 05 |
maxPushRegistrationsPerDevice |
4 | 4 | 19 |
MLS commit and bootstrap uploads are bounded by maxMlsUploadBytes instead of maxRequestBytes (13 §7.1). 03 §16.3 is the complete index.
7.13 Signed objects (JWS)
Every signed object outside MLS and SFrame is a JWS in compact serialization (RFC 7515) (D-027).
algMUST beEdDSA(RFC 8037) with an Ed25519 key. Verifiers MUST reject any otheralg.typis mandatory and MUST match the expected type exactly. Verifiers MUST reject a JWS whosetypisn't the one the context expects.kidis mandatory:<canonical-domain>#<keyId>for server keys, or the RFC 7638 thumbprint for identity and device keys.- The protected header has exactly the members
alg,typandkid; verifiers MUST reject any other member (includingcrit,jwk,jku,x5uandx5c) and MUST NOT take keys from any header (04 §6.2). 04 §6 is the complete profile. - Signed payloads name addresses in canonical form only (D-032).
typ |
Object | Signed by | Maximum lifetime | Owner |
|---|---|---|---|---|
sv-assert+jwt |
HomeAssertion | Home server key | 300 s | 06 |
sv-devproof+jwt |
DeviceProof | DSK | 60 s | 06 |
sv-s2s+jwt |
S2S request token | Sending server key | 60 s | 06 |
sv-relay+jwt |
RelayTicket | Hosting server key | 60 s | 15 |
sv-idstate+jwt |
IdentityState | Home server key | 24 h | 07 |
sv-idcert+jwt |
IdentityCertificate | Identity key | Until reset | 07 |
sv-devcert+jwt |
DeviceCertificate | Identity key | Until revoked or reset | 07 |
sv-devrevoke+jwt |
DeviceRevocation | Identity key | Permanent | 07 |
sv-keyrot+jwt |
KeyRotation | A sign server key: the previous active sign key for a new sign key, the current active sign key otherwise; none for a sign key that replaces a revoked one (02 §11.7, §12.1) |
Permanent | 02 |
sv-push+jwt |
Push gateway request token | Home server key | 60 s | 19 |
04 §6.3 is the complete registry (it also lists the test-only sv-test+jwt).
Example HomeAssertion (header and payload shown decoded):
{ "alg": "EdDSA", "typ": "sv-assert+jwt", "kid": "a.com#2026-12a" }
{
"iss": "a.com",
"sub": "alice@a.com",
"aud": "b.com",
"iat": 1764872400,
"exp": 1764872700,
"jti": "Kc1o2Q8bTzR3fLw9yH0aVg",
"kind": "user",
"inc": "sLGys7S1tre4ubq7vL2-vw",
"sec": "secure",
"did": "q2bS9xVg3m0yJpQe1vT0Aw",
"enr": true,
"isv": 17,
"igen": 1,
"ikf": "NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs",
"dkf": "0f4mJ0yZ8tq3mX2l0b4vC1y9Zr6pQhN7sW3eK5uT8dA"
}Example IdentityState payload:
{
"iss": "a.com",
"sub": "alice@a.com",
"inc": "sLGys7S1tre4ubq7vL2-vw",
"ver": 17,
"sec": "secure",
"igen": 1,
"idc": "eyJhbGciOiJFZERTQSIsInR5cCI6InN2LWlkY2VydCtqd3QiLCJraWQiOiJOemJMc1…",
"devices": [
{ "did": "q2bS9xVg3m0yJpQe1vT0Aw", "dkf": "0f4mJ0yZ8tq3mX2l0b4vC1y9Zr6pQhN7sW3eK5uT8dA", "plat": "ios", "since": 1764800000 }
],
"revoked": [
{ "did": "Yx3kP0aL9qR2sT5uV8wZ1A", "at": 1764700000 }
],
"iat": 1764872400,
"exp": 1764958800
}7.14 Labelled signatures
A signature made with a DSK outside JWS and MLS (on SealedMessages, HistoryShares and MediaAttestations) is a labelled signature:
SignLabelled(key, label, content) = Ed25519-Sign(key, "sv1 sig" || 0x00 || label || 0x00 || content)content is a deterministic binary encoding defined by the owning document (length-prefixed fields; never JSON). The prefix can't collide with MLS's "MLS 1.0 " labels or with a JWS signing input (which is base64url text without spaces). Initial labels: sealed (14), history-share (14), media-attest (18). history-link is reserved and retired (revised D-007) and MUST NOT be reused. 04 owns the registry.
7.15 Cryptographic suite and label registries
Version 1 has exactly one suite, sv1-c1 (D-027). There is no algorithm negotiation within it. A future suite gets a new ID; sv1-c2 is reserved for a post-quantum hybrid.
| Use | Primitive |
|---|---|
| Signatures (server keys, identity keys, DSKs) | Ed25519 (RFC 8032). Verifiers MUST reject a signature whose S isn't less than the group order L, a public key or R that isn't canonically encoded, and a public key of small order or of mixed order, and MUST use the cofactorless equation [S]B = R + [k]A. The complete rules, including those for libraries that use the cofactored equation and for web clients, are 04 §4.3 and §4.5, which every verifier follows. |
| Public keys in JSON and JWS | JWK {"kty": "OKP", "crv": "Ed25519", "x": …}; raw 32 bytes inside MLS and binary structures |
Key fingerprints (ikf, dkf) |
RFC 7638 JWK thumbprint with SHA-256, base64url |
| MLS | RFC 9420 ciphersuite 0x0001 MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519, the only one in v1. Credential type sv_device = 0xF5A0; GroupContext extension sv_participants = 0xF5A1 (private-use values until registered). |
| Media | SFrame (RFC 9605) cipher suite 0x0004 AES_128_GCM_SHA256_128, MLS key schedule of RFC 9605 §5.2, E = 4, S = 16 |
| Application AEAD | AES-256-GCM, random 96-bit nonce, 128-bit tag: SealedMessage, HistoryShare bundles (under K_share), vault records, KeyBackup, pairing payload, VaultKeyGrants (inside HPKE) |
| Key grants to one device | HPKE (RFC 9180) base mode, single-shot: DHKEM(X25519, HKDF-SHA256), HKDF-SHA256, AES-256-GCM; only for keys sealed to one device's X25519 box key (dbk, 07): VaultKeyGrants (08) and HistoryShare keys K_share (14) (04 §9.8) |
| Attachments | AES-256-GCM in 64 KiB plaintext chunks (STREAM): nonce = 7-byte random prefix ‖ 32-bit big-endian chunk counter ‖ 1-byte final-chunk flag |
| KDF and MAC | HKDF-SHA256 (RFC 5869); HMAC-SHA256 |
| Hash | SHA-256 |
| Safety numbers | Iterated SHA-512, 5,200 rounds, two 30-digit halves (07) |
| PAKE | CPace, CPACE-X25519-SHA512 (draft-irtf-cfrg-cpace; 04 pins the revision). SPAKE2 (RFC 9382) is used only if 04 records that CPace can't be pinned. |
| Password KDF | Argon2id (RFC 9106): m = 65,536 KiB, t = 3, p = 1, 16-byte salt, 32-byte output. These are floors. |
| Web Push | RFC 8030, RFC 8291 encryption, VAPID (RFC 8292); subscription keys are managed by the browser |
| Transport | TLS 1.2 minimum (1.3 recommended); DTLS 1.2 or later for WebRTC |
| Randomness | A cryptographically secure generator for every key, nonce, jti, did and joinNonce |
MLS exporter labels (04 owns the registry):
| Label | Context | Length | Use | Owner |
|---|---|---|---|---|
sv1 history |
empty | 32 | K_hist(e) |
14 |
SFrame 1.0 Base Key |
empty | 16 | SFrame epoch secret, as defined by RFC 9605 §5.2 | 18 |
HKDF info and HMAC labels (04 owns the registry; owners define inputs exactly):
| Label | Use | Owner |
|---|---|---|
sv1 ekid |
Epoch key ID from K_hist (8 bytes) |
14 |
sv1 msg |
K_msg from K_hist and mid |
14 |
sv1 kc |
Key commitment (HMAC label) | 14 |
sv1 vault |
Vault record keys from K_vault |
08 |
sv1 vault id |
Vault record IDs | 08 |
sv1 backup |
KeyBackup wrap key from the Argon2id output | 08 |
sv1 pair |
Pairing payload key from the CPace session key | 08 |
sv1 dm |
1:1 DM context ID hash prefix | 12 |
HPKE info labels (04 owns the registry): sv1 vault grant (08) and sv1 history-share (14).
Retired labels. sv1 link, sv1 anchor and the labelled-signature label history-link belonged to the withdrawn automatic history handover. They are reserved and retired in 04's registry and MUST NOT be reused (revised D-007).
A document that needs another label defines it in its own text with the sv1 prefix and lists it in a "Registry additions" subsection.
Interpretation of D-021 (D-060). "Insecure accounts hold no cryptographic keys" refers to account keys: identity keys, device signing keys, box keys, vault keys and MLS state. Ephemeral transport keys (TLS, WebRTC DTLS, browser-managed Web Push subscription keys) are not account keys and are used by every client.
7.16 Specification style
- RFC 2119/8174 keywords; ABNF (RFC 5234) for grammars; JSON examples for wire messages; state machines as tables (state, event, action, next state); every timer and limit with a number and a unit (D-024).
- Every wire object is specified as a table: member, type, required, meaning, constraints.
- Test vectors (inputs and outputs in hexadecimal or base64url) are required for: canonicalization (01), the DM ID (12), JWS objects (04, 07), safety numbers (07), the recovery phrase and KeyBackup (08),
K_hist/ekid/K_msg/SealedMessage and HistoryShare (14), and SFrame KIDs and keys (18). - Rationale notes are short and start with "Rationale:".
8. Key end-to-end flows
These flows are informative summaries. The owning documents in parentheses are normative. Endpoint paths follow §7.3.
F1. First login with Google
Saxon installs the app. sloppyvoice.com is an insecure server that allows sign-up with Google.
- The app asks where the account is. Saxon types
sloppyvoice.com(if the app was opened from an invite link, the link's server is pre-filled) (01, 20). - The client resolves
_sloppyv.sloppyvoice.comTXTv=sv1 url=https://chat.sloppyvoice.com/server, fetches{base}/meta, and checks thatsloppyvoice.comis indomains(02). - The client shows the login providers from the metadata. Saxon taps "Continue with Google" (M1).
- The client starts OAuth 2.0 Authorization Code with PKCE against its home server,
{base}/v1/auth/authorize?provider=google, in the system browser (RFC 8252) (05). - The home server, as an OIDC relying party, sends Saxon to Google. Google authenticates him and returns him to the home server, which sees a new external identity.
- The home server returns an authorization code to the client. The client exchanges it at
POST {base}/v1/auth/token. The response says sign-up is needed and suggestsSaxonJones, from the provider's name claim (05). - The client shows "Choose your name", pre-filled with "Saxon Jones" (M2), checking availability live with
GET {base}/v1/addresses/saxonjones(01). POST {base}/v1/auth/signupcreatessaxonjones@sloppyvoice.comwithsecurity: insecure, a new incarnation value (inc, D-086), a device record and tokens. The Google e-mail address is not used as, or linked to, the address (D-016, D-021).- The client opens
{base}/v1/events. The account is a member of thesloppyvoice.comcommunity by default (D-068, 09). - There are no keys and no security prompts. Later the app suggests once, optionally, "Add a backup sign-in". If
sloppyvoice.comwere a secure server, step 8 would continue straight into M4 (SM-1, 08).
F2. An insecure user joins PublicLobby@sloppyvoice.com from a link
Bob (bob@a.com, insecure) receives sloppyv://PublicLobby@sloppyvoice.com.
- Bob taps the link, or its share link, which opens the app or offers to continue in the browser (01, 20).
- The client canonicalizes the address: local part
publiclobby; discovery forsloppyvoice.com(a web client uses{home}/v1/resolve); canonical domainsloppyvoice.com(01, 02). GET {base}/v1/addresses/publiclobbysays it is a voice channel and gives itsctx, its display name "Public Lobby" andsecurity: insecure(01, 09). The client shows the join preview (with the community's name and policy fromGET {base}/v1/community), and Bob taps "Join" (01 §10.5, 20 §10.2). Nothing is joined before that tap.- The client asks its home server for a HomeAssertion:
POST {a.com base}/v1/federation/assertionswithaud: "sloppyvoice.com"(06). POST {base}/v1/federation/sessionswith the assertion.sloppyvoice.comresolvesa.com, checks the signature,aud,exp, the single-usejtiand its block list, and opens a remote session (06).POST {base}/v1/community/join(with one checkbox if the community's join gate asks to accept rules), thenPOST {base}/v1/channels/ch:…/join, which makes him a channel member without a further prompt (09 §4.3, §4.5). The client opens{base}/v1/eventsand subscribes to the community stream and the channel's stream, which only channel members may do (09 §14.1, 03).- The timeline loads with
GET {base}/v1/contexts/ch:…/messages?before=…(11). - Bob joins the voice call:
POST {base}/v1/contexts/ch:…/call/joinreturns hispid, the relay URL, a RelayTicket and his allowed media. The client connects to the relay and speaks if his role grantsspeak_and_share(15, 10). - Bob sees nothing about security. If Bob had no account at all, the share link would offer the app or the web client, whose onboarding offers sign-up on
sloppyvoice.com(if open), and the link would resume after sign-up: Bob, then already a member of thesloppyvoice.comcommunity (D-068), would see the preview with "Open", and that one tap joins the channel (20 §9.1, §10.1, §10.3).
F3. A secure user joins a secure channel on a remote server
Alice (alice@a.com, secure, enrolled device) opens Ops@b.com, a secure channel.
- As F2 steps 1–3. The address lookup says
security: secure. - Her home server issues a HomeAssertion with
sec: secure,enr: true,igen,ikfanddkf, and returns her current IdentityState. The client adds a DeviceProof and sendsPOST {b.com base}/v1/federation/sessionswith the assertion, the DeviceProof, its DeviceCertificate and the IdentityState (06 §6.1, 07). b.comverifies the assertion, the DeviceProof, the DeviceCertificate (under the identity key in the IdentityState) and the IdentityState (device listed, identity key current), and opens a remote session allowed into secure contexts (06).- Alice joins the community and the channel:
POST {base}/v1/community/join, thenPOST {base}/v1/channels/ch:…/join(09 §4.3, §4.5). - The client fetches
GET {base}/v1/contexts/ch:…/mls/groupinfo, builds an external commit with itssv_devicecredential, and posts it to…/mls/commits(13, 07). b.com, as Authentication Service, checks the credential against the IdentityState, her membership and bans, sequences the commit, and sendsmls.handshakewith her IdentityState to members. Their clients process it and run silent checks (13, 07).- Alice sees new messages at once. She wasn't a member before, so
b.comserves her nothing sequenced before her join, and her client shows K6 at her join point: earlier messages are end-to-end encrypted and aren't available to people who join later (D-007, 14). Nothing is handed over, and nobody is asked to share. - Her device appends the history keys it learns to her key archive, so her other devices can read the same messages (08).
- In the call, SFrame keys come from the current epoch. Later membership changes trigger
call.epoch_readyandcall.epoch_switch(15, 18). - She sees no prompt at any step.
F4. Adding a second device by pairing
- The new device signs in with OIDC (F1 steps 1–6). The home server reports that the account is secure and this device is unenrolled (05). The account's other signed-in devices show W4d, "New sign-in on Chrome · Windows (Google)" (D-084); on enrolled devices the approver prompt of step 2 replaces it (05 §12.12).
- The new device shows "Approve from your other device" with a QR code and a 6-digit code.
POST {home}/v1/me/pairingcreates the pairing session, and the home server sendspairing.requestedto the enrolled devices: "Is this you signing in on Chrome · Windows?" (M5, 08). - On the old device the user scans the QR code or types the code. The devices run CPace over
pairing.messageenvelopes relayed by the home server, with key confirmation. On failure both screens say it didn't work and the session ends (08, 04). - The old device sends the pairing payload (identity key, IdentityCertificate, vault keys, phrase entropy), encrypted under the
sv1 pairkey (08). - The new device creates its DSK, signs its own DeviceCertificate, and registers it through its own home session:
POST {home}/v1/me/identity/devices. The home server publishes IdentityStatever+ 1 and sendsidentity.changedto the account's audiences (07, 06). - The new device downloads the AccountVault (pins, key archive), publishes KeyPackages, and joins its secure groups by external commit. The user's other devices show W4c. Contacts see nothing, because the identity key hasn't changed (08, 13, 20).
F5. Recovering with the recovery phrase
- The new device signs in with OIDC. No enrolled device is available, so the user picks "Use recovery key". Any other signed-in device of the account shows W4d (D-084).
- The user types the 8 words, or picks the entry saved in the password manager. The client checks the checksum locally.
GET {home}/v1/me/backupreturns the KeyBackup (authenticated home session required; rate-limited). The client runs Argon2id and decrypts the identity key, IdentityCertificate, vault keys and phrase entropy (08).- The client continues as F4 steps 5–6. Contacts and channel members see nothing.
F6. Account reset and the DM warning
- Saxon signs in with OIDC but has no enrolled device and no recovery key. He picks "Start fresh" (M10). The screen explains in plain words: earlier encrypted messages, in DMs and in channels, can't be read on this device, contacts will see a notice, and his account, address and communities stay the same; encrypted channels and groups let him back in without their earlier messages.
- The client generates a new identity key, DSK, vault key and phrase; the device keeps its device ID. It calls
POST {home}/v1/me/identity/resetwith a new IdentityCertificate (igen+ 1), its DeviceCertificate and its first KeyPackages. It uploads a new KeyBackup and shows M4 (07, 08, 13). - The home server publishes the new IdentityState, delists the old devices, and sends
identity.changedto every audience (07, 06). - Channels: hosting servers propose removal of the old-generation leaves; the new device rejoins by external commit; nobody sees a warning. Saxon's channel memberships continue, but nothing hands the new identity a history key (D-007), so the new device reads from its join on, and earlier channel messages stay unreadable on it unless an old device of his is set up again within 30 days (08 §11.4) (13, 14).
- DMs: each DM's hosting server removes the old leaves. Each contact's client fetches the new IdentityState, compares it with its pin, and shows W2 in the 1:1 DM and every secure group DM with Saxon. For an unverified contact, the client accepts the new key, updates
sv_participantsand adds Saxon's new device by Welcome the next time it is online. For a verified contact, sending is blocked until the contact taps "Accept new key" (07, 12, 13, 20). Until a contact's client has added his new device, Saxon's device stays subscribed to the DM and shows "Waiting for {person}'s app to come online"; it then joins from the Welcome, or by external commit if no KeyPackage could be claimed. The re-add starts a new membership: the hosting server serves his new identity nothing from before it (12 §11.5, 13 §16, D-007). - Any old device of Saxon's that comes back online shows W4a (07).
F7. A secure 1:1 DM and call
Alice (alice@a.com) and Dan (dan@d.com) are both secure and have never talked.
- Alice starts a message to
dan@d.com. Her client canonicalizes the address and fetchesGET {d.com base}/v1/users/dan/identity: Dan is secure, so the DM will be secure (SM-8, 01, 07). - The client computes the hosting server (HP-9; say
a.com) and thedm:context reference (12). - It pins Dan's identity key silently (first contact) in Alice's vault (07).
- It claims Dan's KeyPackages through her home server:
POST {a.com base}/v1/keypackages/claim;a.comclaims one per enrolled device fromd.comover S2S (13). POST {a.com base}/v1/dmscreates the DM. The client creates the MLS group withsv_participants, adds Dan's devices and her own other devices with Welcome, uploads the commit, Welcome and GroupInfo, then sends her first SealedMessage (12, 13, 14).a.comsendsdm.requesttod.comwith the Welcome and the first SealedMessages.d.comadds a DmIndexEntry and, because they share no community and have no earlier DM, files it as a message request. It pushes{h}to Dan (12, 19).- Dan's client shows the request from his own home server. It processes the Welcome locally, checking Alice's IdentityState and the group's external sender with server keys that
d.comrelays (12 §10.1, 13 §6.2), and decrypts the message (no pin yet, 07 §14.7). Nothing has gone toa.comyet. Dan taps Accept, and his client opens a remote session ata.com(12), fetches Alice's IdentityState froma.comand pins her identity key (07). - Alice calls:
POST {a.com base}/v1/contexts/dm:…/call/join.a.comsendsnotify.event(kindcall_ring) tod.com, which pushes, and Dan's phone rings. Both connect toa.com's relay, which carries all the call's media; Alice and Dan never connect to each other (D-094). Media is SFrame from the DM group, with MediaAttestations (15, 18, 19).
F8. A group DM with one insecure member
- Alice (secure) creates a group DM with Carol (secure) and Bob (insecure). Her client reads their IdentityStates. Bob is insecure, so the group is insecure (SM-9, 12).
- The hosting server is Alice's home server (it isn't a secure server).
POST {a.com base}/v1/dmsreturnsgdm:…(12). dm.requestgoes to each recipient's home server. Messages are plaintext JSON (12).- Alice and Carol see W3, naming Bob, with "Ask them to turn on encryption". Bob sees nothing (20).
- Calls go through the relay or SFU, and because the group is insecure the hosting server can hear them (15).
- If Bob turns on encryption, the hosting server emits
dm.security_eligible. The first online secure participant device creates the MLS group and adds everyone by Welcome. Marker K1 appears and W3 disappears (12, 13). Everyone in the group was a participant before the switch, so all keep reading the earlier plaintext messages. - Had the group been secure, adding Bob would fail with
security.would_downgrade, and the client would offer "Start a new group without encryption" (D-069, 12). - Later Alice adds Dan (secure) to the now-secure group. Dan reads from his join on and sees K6 there; he is served nothing earlier, not even the plaintext from before K1 (D-007). Carol may choose "Share earlier messages with Dan…", which can cover only encrypted messages from after K1: Dan then sees K7 above them, and Alice sees K8 (12, 14, 20).
F9. A moderator removes a member from a secure channel
- A moderator with
ban_memberssendsPOST {b.com base}/v1/bansnamingcarol@c.com(10). b.comimmediately marks Carol banned, stops delivering events, GroupInfo and media to her sessions, revokes her voice leases (the next lease snapshot excludes her, and the relay cuts her within 4 s), and stops delivering every community and channel event to her sessions, which stay usable for DMs hosted there (10 §9.4, 15).- For each secure channel group where Carol has leaves,
b.comsends Remove proposals as external sender and freezes content withmls.commit_required(13). b.comsendsmls.commit_neededto the designated committer, which commits within 3 s and uploads GroupInfo (13).- In a running call, participants post
call.epoch_ready,call.epoch_switchfollows, and SFrame keys rotate (15, 18). - Members see a system line saying Carol was removed, and an audit-log entry is written. Nobody is prompted, and the server never read any content (10, 11).
F10. Sharing earlier messages with a newcomer
- Grace joins
Ops@b.com, a secure channel, as F3 describes. Her client shows K6 at her join point. Nobody is prompted. - Frank, a member who holds
share_history(10), opens Grace's profile in the channel and chooses "Share earlier messages with Grace…" and how far back. His client says how many messages that is and that the other members will see it (20 §5.1). Nothing suggested this to him. - His client takes the sealed items in that range that his devices can decrypt, derives each
K_msg, builds the HistoryShare (bundle under a freshK_share, sealed to thedbkof each of Grace's devices, read from her leaves, signed by his DSK) and posts it withPOST {b.com base}/v1/contexts/ch:…/history/shares, in several shares if it holds more than 5,000 items (14). b.comchecks that Frank is a current member holdingshare_history, that Grace is a current member, and that the range lies within Frank's own visibility. It records a VisibilityGrant for Grace, writes thehistory_sharedaudit entry (10) and emitshistory.shared(14).- Grace's client lists the share (
GET …/history/shares), opensK_sharewith its box key, checks everyK_msgagainst the stored SealedMessage's key commitment and its sender's signature, and adds the keys to her key archive (08). It shows K4 while the messages load, then K7, "Frank shared earlier messages with you", above them. Her other devices read them through the archive. - The other members see K8, "Frank shared earlier messages with Grace".
b.comnever held a key.
9. Requirements traceability
9.1 Owner requirements (brief §2)
| ID | Owner requirement (condensed) | Where it is met |
|---|---|---|
| R-01 | Servers federate with DNS-based discovery. | 02, 06 |
| R-02 | Usernames are user@fqdn; the server is found from the fqdn's TXT record, which points to the server URL. |
01, 02 (D-001) |
| R-03 | Two domains pointing to the same URL are the same server. | 02, 01 (D-002, HP-8) |
| R-04 | guild.sloppyvoice.com pointing to /server2 is a separate server on the same host. |
02 §14, 09 §3.1, 00 §3.4 |
| R-05 | Channel names use the same format as usernames (PublicLobby@sloppyvoice.com). |
01, 09 (D-020) |
| R-06 | Spaces are valid only in the displayed name and are removed in the protocol. | 01 (D-005, D-031) |
| R-07 | sloppyv://PublicLobby@sloppyvoice.com links can be copied and pasted to invite. |
01, 20 |
| R-08 | Accounts, channels and servers are insecure by default. | §4 SM-1, 05, 09 |
| R-09 | When insecure, the server can read messages, hear voice and see screen shares. | §4, §5, 11, 15 |
| R-10 | Channels and servers MAY be secure; then everything in that context MUST be E2E encrypted. | §4 SM-6, 09, 11, 13, 14, 18 |
| R-11 | An insecure account CANNOT join a secure channel or server. | §4 SM-4, 09 (G1) |
| R-12 | A secure account can join both kinds and SHOULD be warned when joining an insecure channel or server. | §4 Matrix A and B, W1, 20 |
| R-13 | OAuth authentication; the external account needn't match the address. | 05 (D-016) |
| R-14 | Reuse most of the old audio and video components. | 15, 16, 17 |
| R-15 | Old encryption requirements apply only to secure paths. | 16, 17, 18 (D-021) |
| R-16 | Secure clients with secure clients or secure channels: everything E2E encrypted. | §4, 12, 13, 14, 18 |
| R-17 | Clients handle events like joins transparently. | 13 (external commits, commit duty), 14 (no history before the join, key archive), §4.12.5 (D-007) |
| R-18 | All of a user's devices share one identity cert, so new devices cause no warnings. | 07, 08 (HP-1) |
| R-19 | In channels the server validates identity, not devices. | 07, 13 (HP-2, D-035) |
| R-20 | In user-to-user communication devices validate identity and warn when the remote user reset. | 07, 12, 20 (W2) |
9.2 Decisions
D-001 to D-024 are fixed inputs. D-025 to D-068 are made in this document and are returned to the lead for the decision log. D-069 to D-077 were decided by the owner and the lead on 2026-12-04, and D-078 to D-083 record revisions and other documents' proposals that the lead adopted the same day. The revised D-007 and D-084 to D-093 are the owner's second-round answers of 2026-12-04 (§11); they supersede D-039 and D-070 and amend D-061. D-094 is the owner's decision of 2026-12-05 that clients never communicate with each other directly; it supersedes D-014, D-044 and D-088.
| ID | Decision (short) | Owning documents |
|---|---|---|
| D-001 | _sloppyv.<fqdn> TXT with .well-known fallback |
02 |
| D-002 | Canonical domain, aliases, published domain list | 01, 02, 07 |
| D-003 | A server is a community; the secure flag covers all its channels | 09, 10 |
| D-004 | Direct connection to remote servers with home-issued tokens | 06, 07, 15 |
| D-005 | Display name linked to the local part; case-insensitive | 01, 20 |
| D-006 | One identity key on all devices; pairing or backup; else reset | 07, 08 |
| D-007 | Revised by the owner (2026-12-04): no history from before the join in secure channels and group DMs, no history setting and no handover to newcomers; own devices get everything through the key archive; optional manual history sharing (HistoryShare, VisibilityGrant) | 14, 09, 12, 08, 07, 10, 11, 20 |
| D-008 | MLS for groups, SFrame for media | 13, 14, 18 |
| D-009 | Vendor-neutral, self-hostable | 15, 19, 21 |
| D-010 | Desktop, web, mobile, bots | 05, 08, 19, 20, 02 |
| D-011 | Group DMs, attachments, roles and moderation, webcam | 12, 11, 10, 17 |
| D-012 | Auto-rejoin; transmit follows physical PTT; VAD and open mic return muted | 15, 16, 20 (HP-13) |
| D-013 | No call length cap | 15 |
| D-014 | Superseded by D-094: all call media goes through the hosting server's relay or SFU | See D-094 |
| D-015 | One speak_and_share permission |
10, 15 |
| D-016 | OAuth/OIDC login only; bots use tokens | 05 |
| D-017 | Revoke a lost device without losing identity | 05, 07, 13 |
| D-018 | Channels upgrade only; secure servers make everything secure | 09, §4 |
| D-019 | Accounts upgrade any time; downgrade is a reset | 05, 07, 08 |
| D-020 | Users and channels share a namespace | 01, 09 |
| D-021 | Insecure accounts hold no keys | 05, 04, §7.15 |
| D-022 | Push via home server and gateway; no content in secure contexts | 19 |
| D-023 | Moderation in every mode | 10, 13, 15 |
| D-024 | Markdown spec with RFC 2119, ABNF and JSON | All |
| D-025 | Protocol version 1 (sv1): /v1 paths, sloppyv.v1 subprotocol, sv1 crypto labels |
03, 04 |
| D-026 | HTTPS JSON commands; one server-to-client event WebSocket per client session per server; open CORS; bearer tokens only; context-scoped paths under /v1/contexts/{ctx}/ |
03 |
| D-027 | JWS (EdDSA only, typed) is the only signed-object format, including S2S request tokens bound to method, URL and body hash instead of RFC 9421; one crypto suite sv1-c1, no negotiation |
04, 06 |
| D-028 | Wire conventions: I-JSON, lowerCamelCase, dotted types and error codes, RFC 9457 with userAction, base64url, RFC 3339 ms, UUIDv7, client-generated message IDs, typed context references |
03 |
| D-029 | Web clients resolve discovery through their home server's /v1/resolve or DNS-over-HTTPS |
02 |
| D-030 | Delegation evidence levels; servers pin key sets per domain; KeyRotation continuity; keys pre-published ≥ 25 h and kept ≥ 7 days after retirement | 02, 06 |
| D-031 | Unicode local parts, prepared with PRECIS UsernameCaseMapped, following UTS #39 Highly Restrictive (readings confirmed by D-092), with per-server confusable-skeleton collision checks; receivers check display names against local parts; domains are shown when they differ from the context's | 01, 20 |
| D-032 | Only canonical addresses in stored and signed objects; aliases rejected in signed objects; canonical-domain change unsupported in v1 | 01, 07 |
| D-033 | Identity objects: IdentityCertificate, DeviceCertificate, home-signed IdentityState (≤ 24 h, for every account), optional DeviceRevocation; dual-control device validity | 07 |
| D-034 | MLS profile basics: sv_device credential (0xF5A0), leaf key = DSK, one leaf per device, ciphersuite 0x0001, PublicMessage handshakes, hosting server as sole external sender |
07, 13 |
| D-035 | In channels the hosting server is the AS; clients run silent checks whose failures are diagnostics only; only self-alerts (W4) concern identity in channels | 07, 13, 20 |
| D-036 | Channels join by external commit only; DMs add people with Welcome from KeyPackages claimed through the home server; own later devices and resync by external commit; sv_participants controlled by members |
12, 13 |
| D-037 | Removal: server Remove proposal, immediate delivery cut and lease revocation, content freeze until commit, designated committer (3 s each); compare-and-set epoch fence | 13 |
| D-038 | Secure application content is a SealedMessage under exporter-derived K_hist and per-message K_msg, with key commitment and a DSK signature; MLS PrivateMessage isn't used for content |
14 |
| D-039 | Superseded by the revised D-007: the HistoryLink/AnchorLink chain is removed; own devices get history through the key archive (D-054) | 14, 08 |
| D-040 | Reports reveal per-message keys; verified with the sender's signature and key commitment; visible to the hosting server's moderators | 10, 14 |
| D-041 | SFrame per RFC 9605 §5.2 from the context group, suite 0x0004, KID with a random per-join nonce and a source ID | 18 |
| D-042 | Media epoch switch: call.epoch_ready, call.epoch_switch, 2 s sender cap, 10 s key retention, 200 ms hold |
15, 18 |
| D-043 | MediaAttestation every 500 ms per source, verified late; failures stop playback silently | 18 |
| D-044 | Superseded by D-094: all call media goes through the hosting server's relay or SFU | See D-094 |
| D-045 | Media profiles voice-dc/1, video-dc/1 (successor of screen-media/1, screen and webcam), sfu-rtp/1; relay mandatory; SFU optional and driven by the server's control plane |
15, 16, 17 |
| D-046 | Room-level lease snapshots and ticks every 1 s, valid 3 s, via relay and WebSocket | 15, 16 |
| D-047 | Auto-rejoin specifics: 30 s reconnecting seat, 60 s rejoin token, backoff schedule, planned migrations keep mic and PTT state |
15, 20 |
| D-048 | DM hosting rule and DM context IDs; insecure DMs never on secure servers | 12 |
| D-049 | First contact by dm.request to the recipient's home server, carrying the first events; no contact with the hosting server before Accept |
12 |
| D-050 | DM security: 1:1 follows participants both ways in one thread; group DMs upgrade automatically and never downgrade | 12, §4 |
| D-051 | Push payloads are an opaque notification ID in every mode; previews only in insecure notify; push registrations only at the home server |
19 |
| D-052 | Recovery phrase: 8 BIP-39 words (80 + 8 bits), Argon2id floors, password-manager save, no quiz, viewable on any enrolled device | 08 |
| D-053 | Pairing: CPace over the home server, QR (128-bit) or 6-digit code, one attempt, prompt on own devices | 08 |
| D-054 | AccountVault holds key archive, pins, verification state and settings under generational vault keys, rotated after a revocation | 08, 07 |
| D-055 | Closed catalogue of warnings W1–W9, gate cards G1–G2, markers K1–K8, moments M1–M11, and a never-prompt list | 00, 20 |
| D-056 | Clients pin the secure state of channels, servers and group DMs; a presented downgrade is W9 | 09, 12, 20 |
| D-057 | Channel and server upgrade mechanics: dry run, W5, atomic switch with bootstrap GroupInfo and upgradeSeq, needs_encryption, pre-upgrade history kept and labelled (admin may delete), server upgrade irreversible |
09 |
| D-058 | Unenrolled devices of secure accounts can use insecure contexts only | 08, 05 |
| D-059 | Limits: 1,000 secure leaves by default (max 65,536); inactive devices evicted after 90 days (30 for web); 25 group DM participants by default | 13, 12 |
| D-060 | D-021 covers account keys only; ephemeral transport keys are allowed | 04 |
| D-061 | Bots: secure bots are full MLS members with kind: bot; W6; webhooks insecure only. Amended 2026-12-04: botsGetHistory is withdrawn, bots follow D-007 like people |
05, 07, 09, 11 |
| D-062 | HomeAssertion ≤ 300 s, single use; DeviceProof for enrolled devices; remote sessions 1 h, extendable to 24 h when the home server is down | 06 |
| D-063 | Secure messages carry a cleartext mention hint list for notifications; a user can turn it off | 11, 19 |
| D-064 | Channels are text or voice; calls exist only in voice channels and DMs |
09, 15 |
| D-065 | Web key storage: wrapped in IndexedDB, used in a Worker; optional shared-computer mode; eviction counts as device loss; strict CSP and SRI; the service worker, exempt from SRI, holds only the notification key subset and the push fetch token | 08, 19, 20 |
| D-066 | Every server implements the server side of secure mode and a relay; SFU optional; conformance classes of §1.5 | 00, 21 |
| D-067 | Servers allow one call per user per hosting server ("Move voice here"); one call across servers is enforced by the client | 15 |
| D-068 | Accounts homed on a server are members of its community by default; the admin can turn this off | 09 |
| D-069 | Adding an insecure account to a secure group DM is refused; the client offers a new unencrypted group | 12, 20 |
| D-070 | Superseded by the revised D-007: secure group DMs follow the same rule as secure channels, with no history from before joining | 12, 14 |
| D-071 | Identity resets and downgrades take effect at once, with no hold | 07, 08, 22 |
| D-072 | Identity rollover after theft is deferred until after v1 | 07 |
| D-073 | A secure server never goes back to insecure | 09 |
| D-074 | Cross-site TXT delegation without DNSSEC is accepted on first use, with pinning | 02 |
| D-075 | Passkey unlock of the recovery phrase is deferred until after v1 | 08 |
| D-076 | Secure servers can't forbid their accounts from joining insecure contexts elsewhere | 09, 20 |
| D-077 | Reported content from secure contexts is visible to the hosting server's moderators in v1 | 10, 14 |
| D-078 | One durable community stream per server for events every community member receives; events for one or a few accounts stay on their me streams |
03, 09, 10 |
| D-079 | /v1/auth/par and /v1/auth/token accept RFC 6749 form or JSON bodies with snake_case parameters and answer with RFC 6749 member names; errors stay problem objects that also carry error |
05, 03 |
| D-080 | Refines D-042 and D-043: old media keys kept 10 s after learning of the switch, a lagging sender stops after 8 s; MediaAttestation hashes SFrame metadata with ciphertext, binds group, epoch and call, travels on the relay's control channel; an invalid signature stops nothing | 18, 15 |
| D-081 | same-site evidence justifies a pin change only for the queried domain, its subdomains or the pinned host |
02 |
| D-082 | Revoking a device as lost or stolen also replaces the recovery phrase in the vault-rotation flow (revises D-054) | 08, 05 |
| D-083 | In channels, an existing leaf's UpdatePath with a byte-identical credential needs only an unexpired IdentityState when the home server can't be reached | 13, 07 |
| D-084 | A new sign-in shows W4d on the account's other devices: "New sign-in on device (provider)" with "This wasn't me"; never blocks; once | 05, 20, 00 |
| D-085 | Turning on encryption needs a provider sign-in within the last 24 h (fresh authentication, maxAgeMs 24 h) |
05, 07, 08, 20 |
| D-086 | Immutable account incarnation inc in HomeAssertion, IdentityState and the profile; cross-server records keyed on (address, inc); W2 "new account" wording |
01, 05, 06, 07, 09, 10, 11, 12, 13, 20 |
| D-087 | In a group DM, once the creator has left, every participant may remove others; nobody takes the creator's place | 12, 20 |
| D-088 | Superseded by D-094: all call media goes through the hosting server's relay or SFU | See D-094 |
| D-089 | Clients upload call-failure reports (counters only) to the server involved by default (failures); mentioned in onboarding and privacy settings; can be turned off |
15, 20, 21 |
| D-090 | After an automatic rejoin, a screen share resumes only if the seat was restored within 30 s; the webcam comes back off; the sharing indicator says the user isn't being seen during the outage | 17, 15, 20 |
| D-091 | Account deletion is immediate after fresh authentication and a confirmation; no grace period | 05, 20 |
| D-092 | D-031's Unicode rule confirmed: UTS #39 Highly Restrictive (Latin may combine with Han, Kana or Hangul as that level allows), U+0130 maps to I before case folding, Limited_Use living scripts allowed; skeleton collision check unchanged | 01 |
| D-093 | The project runs the official push gateway for its official iOS and Android apps and publishes it as open source; servers default to gatewayPolicy any |
19, 21, 02 |
| D-094 | Clients never communicate with each other directly: all call media (voice, screen share, application sound, webcam) goes through the hosting server's relay or SFU in every context and security mode, and every other exchange between clients goes through servers; no client-to-client signalling, no STUN or TURN. A client connecting directly to a remote server (D-004) is unaffected | 15, 12, 16, 17, 18, 20, 21, 22, 00 |
10. Security considerations
Document 22 holds the full threat model. The most important points for every writer:
- A malicious home server can impersonate its own users in secure channels without warning other members. This follows from the owner's rule that servers validate identity in channels. Mitigations that cost users nothing: the self-alerts W4a and W4b on the victim's own devices, silent chain and IdentityState checks whose failures reach the servers as diagnostics (D-035), and DM pins. Users must not be told that a channel lock protects against their contacts' home servers.
- A malicious hosting server can admit accounts it controls into its own secure channels. They appear in the member list. The lock text says the server decides who is a member.
- Nobody reads a secure context's past without a member's deliberate act (D-007). Newcomers, re-added participants and bots are served nothing from before their current membership began, so a login takeover or an identity reset (D-071) can't read a group's past content. What remains: content keys don't expire on members' devices, and a user's own devices share everything through the key archive, so anyone holding one current member's device, or a user's vault plus vault key, reads what that member could read; and a member may deliberately share earlier messages with one specific member, which every member sees (K8) and channels log (10). Self-updates every 7 days limit exposure after a compromise.
- Web clients are only as trustworthy as the origin serving their code. A compromised origin can take the identity key.
- Discovery without DNSSEC is trust on first use for cross-site delegations. Pinning detects later changes; same-site delegation avoids the problem.
- Metadata is visible to servers in secure mode (§5.4).
- All call media goes through the hosting server's relay or SFU (D-094). Other call participants never learn a user's IP address from a call, and the server enforces leases on every path, so moderation of calls holds against modified clients (HP-15).
- An OIDC account takeover can force a reset, which is silent in channels. The owner chose no reset hold (D-071). Mitigations: W4a on the victim's own devices, and W2 for every DM contact. The attacker's new identity gets no earlier encrypted group or DM content: nothing hands it keys, and a DM re-add starts a new membership (D-007). Only the pre-upgrade plaintext of channels the user joined before their upgrade, which was never encrypted, stays readable to the account (22 RR-46). W4d tells the victim's signed-in devices about the attacker's sign-in itself, even when no reset follows, and it is the only signal for an insecure account (D-084). A stolen session token alone can turn on encryption for an insecure account only within 24 h of the session's last provider sign-in (D-085).
- A member colluding with a relay can inject media under another member's key for a few seconds before MediaAttestation stops playback: normally under 1 s; at most about 3 s per episode when the attacker also suppresses the real sender's attestations, with at most 3 counted episodes per minute per participant and source, plus up to about 3 s of media per minute that receivers excuse as route disruptions (18 §14 item 2).
- Insecure contexts offer no protection against servers. The protocol only protects them against third parties.
- A deleted address can be registered again after its 365-day quarantine (01 §5.7). The new account has a new incarnation (
inc, D-086), so servers carry nothing of the earlier account over to it, even if they missedaccount.deleted, and DM contacts see W2's new-account wording instead of a key change. Bans deliberately stay with the address (10 §9.2). Deleting an account is immediate, with no grace period (D-091).
11. Questions resolved by the owner
The architecture's open questions were settled on 2026-12-04. No overview-level questions remain open. Later documents raise their own questions in their own "Open questions" sections.
| Former ID | Question | Resolution |
|---|---|---|
| OQ-1 | Should local parts allow letters outside ASCII? | Yes. Local parts may use Unicode, with PRECIS, the UTS #39 Highly Restrictive script rule, and per-server confusable checks (D-031, revised by the owner; readings confirmed by D-092). |
| OQ-2 | Should adding an insecure account to a secure group DM be refused, or downgrade the group? | Refuse and offer "Start a new group without encryption" (D-069). |
| OQ-3 | What history should a new member of a secure group DM see by default? | None from before their join, as in channels; there is no history setting (D-007 as revised on 2026-12-04, which supersedes D-070). Members may share earlier messages manually. |
| OQ-4 | Should a reset started from a session with no enrolled device be held for 24 h? | No hold. Resets take effect at once (D-071). |
| OQ-5 | Should v1 include an identity rollover after theft? | Deferred until after v1 (D-072). |
| OQ-6 | Can a secure server go back to insecure? | No (D-073). |
| OQ-7 | Should a cross-site TXT delegation without DNSSEC be accepted on first use? | Yes, with pinning (D-074). |
| OQ-8 | Should a passkey be able to unlock the recovery phrase? | Deferred until after v1 (D-075). |
| OQ-9 | Can a secure server forbid its accounts from joining insecure contexts elsewhere? | No; W1 warns instead (D-076). |
| OQ-10 | Should reports go to an end-to-end encrypted moderator inbox? | Deferred. In v1, reported content is visible to the hosting server's moderators (D-077). |
Second round. The owner answered the specification's consolidated open questions on 2026-12-04 (spec/OPEN-QUESTIONS.md §1). The answers are the revised D-007 and D-084 to D-093. Among them: no history from before the join in secure channels and group DMs, with optional manual history sharing (revised D-007, HP-4), which also settles the questions about history handover, the floor for re-added participants and switching a history setting; the new-sign-in notice W4d (D-084, §4.12.1), a provider sign-in within 24 h before turning on encryption (D-085, HP-12), the account incarnation (D-086, §7.6, HP-7) and immediate account deletion with no grace period (D-091).
Relay-only media. On 2026-12-05 the owner decided that clients never communicate with each other directly: all call media, in every context and security mode, goes through the hosting server's relay or SFU (D-094, §4.7).
12. References
12.1 Normative
- RFC 2119, RFC 8174 — requirement key words
- RFC 3339 — timestamps; RFC 3986 — URIs; RFC 4648 — base64url
- RFC 5234 — ABNF; RFC 8259 — JSON; RFC 7493 — I-JSON
- RFC 9562 — UUIDv7; RFC 9457 — problem details
- RFC 6455 — WebSocket; RFC 8615 — well-known URIs; RFC 1035 — DNS (TXT); RFC 4033–4035 — DNSSEC; RFC 8484 — DNS over HTTPS
- RFC 5890, RFC 5891 — IDNA2008; Unicode UTS #46 — IDNA compatibility processing; Public Suffix List
- RFC 6749 — OAuth 2.0; RFC 7636 — PKCE; RFC 8252 — OAuth for native apps; RFC 9700 — OAuth security best practice; OpenID Connect Core 1.0
- RFC 7515 — JWS; RFC 7517 — JWK; RFC 7519 — JWT; RFC 8037 — EdDSA in JOSE; RFC 7638 — JWK thumbprint
- RFC 8032 — Ed25519; RFC 5869 — HKDF; RFC 2104 — HMAC; RFC 9106 — Argon2
- RFC 9420 — MLS; RFC 9605 — SFrame
- draft-irtf-cfrg-cpace — CPace (revision pinned in 04); RFC 9382 — SPAKE2 (fallback only)
- RFC 8030 — Web Push; RFC 8291 — Web Push encryption; RFC 8292 — VAPID
- RFC 6716 — Opus; RFC 7587 — RTP payload for Opus; RFC 8825 and RFC 8827–8835 — WebRTC; RFC 8445 — ICE (client-to-relay and client-to-SFU connections)
- W3C WebRTC Encoded Transform; W3C Web Cryptography API
- draft-ietf-httpapi-ratelimit-headers — rate-limit headers
12.2 Informative
- RFC 9750 — MLS architecture
- RFC 8264, RFC 8265 — PRECIS (D-031)
- Unicode UTS #39 — security mechanisms (confusables)
- BIP-39 — mnemonic word list
- Signal safety numbers (numeric fingerprint construction)
spec/DECISIONS.md— decision log- The project brief (Sloppy Voice v2 protocol specification brief), §5 — the old voice and video design