Status Draft. Protocol version 1 (sv1) of the Sloppy Voice v2 product
Date 2026-12-04
Depends on 00 (overview), 04 (crypto conventions), 05 (accounts and devices), 07 (identity)
Decisions used D-006, D-007, D-017, D-019, D-021, D-025 to D-028, D-032, D-033, D-052, D-053, D-054, D-055, D-056, D-058, D-059, D-060, D-061, D-063, D-065, D-071, D-072, D-075, D-084, D-085, D-086
Owns Account upgrade ceremony (client procedure); recovery phrase encoding and input; KeyBackup and /v1/me/backup; pairing protocol, /v1/me/pairing…, the pairing QR payload; AccountVault, /v1/me/vault…, vault record types; key archive record formats (archive and shared_keys); vault key generations, box keys (also published as the DeviceCertificate's dbk claim, 07, and used for 14's HistoryShare key wraps) and grants; platform key-storage requirements (including web and the notification key subset); unenrolled-device behaviour; W8 policy; pairing.*, backup.* and vault.* events and error codes

Conformance and status

This document is normative for the Server class (home-server role), the Full client and Web client classes, and, where a section says so, the Bot client class (00 §1.5). The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in BCP 14 (RFC 2119, RFC 8174) when, and only when, they appear in all capitals. Grammars use ABNF (RFC 5234). Every wire element follows 00 §7. Examples are informative unless the text says otherwise; test vectors in §17 are normative.

Every endpoint in this document is a home-server endpoint. It accepts only a home session token (Authorization: Bearer, 05) unless the endpoint says that a bot token is accepted. A remote session token presented to any of these endpoints is refused with 403 core.forbidden. Nothing in this document travels between servers.

1. Scope

1.1 What this document covers

This document specifies how a secure account's keys come into existence, how they reach every device of that account, how they are kept safe on each platform, and how they are recovered:

  • the upgrade ceremony that turns an insecure account into a secure one (§3), and the client side of an identity reset ("Start fresh", §11);
  • the recovery phrase: its generation, encoding, forgiving input, the save step (M4), viewing it again, replacing it, and the W8 reminder (§4);
  • the KeyBackup and /v1/me/backup (§5);
  • pairing a new device with an enrolled one using CPace (§6), and completing enrolment (§7);
  • the AccountVault, its record types and /v1/me/vault… (§8), the key archive record formats, including the shared_keys record for message keys that others shared with the user (§9), and vault key generations and box keys (§10);
  • what unenrolled devices can do (§12);
  • platform key storage on every platform, the web rules of D-065, and the key subset a mobile notification extension may hold (§13);
  • the pairing.*, backup.* and vault.* events and error codes (§14, §15).

1.2 What this document does not cover

  • The identity objects (IdentityCertificate, DeviceCertificate, IdentityState, DeviceRevocation), their validation, the reset procedure on the server, pin semantics and the W2/W4 triggers belong to 07. This document only says how the keys behind them are created, stored and moved.
  • The meaning of history keys (K_hist, ekid) and of shared message keys (HistoryShares), and the rules for when a device appends to the key archive, belong to 14. This document defines the archive record formats and API.
  • Device records, sessions, token rules, sign-out and the orchestration of device revocation belong to 05.
  • MLS mechanics (KeyPackages, external commits) belong to 13.
  • Exact screen copy for M4, M5, M10, G2 and W8 belongs to 20. This document gives the intent and the rules.
  • The CPace and Argon2id profiles (inputs, message encodings, key confirmation, parameter ranges, the Argon2idParams object) belong to 04 (§11, §12). This document carries 04's CPace messages, supplies the session values 04's inputs name, and uses the outputs.
  • The members and semantics of pin records belong to 07 (§16), and those of sec_pin records to 09 (§13). This document owns their record framing, IDs and encryption.

1.3 Terminology

Terms from 00 §2 are used exactly as defined there (recovery phrase, KeyBackup, AccountVault, vault key, key archive, pairing, enrolled device, unenrolled device, identity key, DSK, IdentityState, igen). This document adds:

Term Definition
Phrase entropy (E) The 10 random bytes (80 bits) from which the recovery phrase is encoded.
Phrase ID (phraseId) 16 random bytes generated together with each new E. It names a phrase without revealing anything about it, so that devices and the home server can tell which phrase a KeyBackup and a recovery record belong to (§5.1, §8.6.5). It isn't secret.
Backup key (BK) The 32-byte AES-256-GCM key derived from E with Argon2id and HKDF that encrypts the KeyBackup payload (§5.3).
Vault generation (vgen) The number of a vault key within one identity generation, starting at 1. K_vault(g) is the vault key of generation g.
Vault ID key (K_vid) A 32-byte random key, fixed for one identity generation, from which vault record IDs and bucket tags are computed (§8.5). It travels with the vault keys.
Bucket An opaque 16-byte tag, computed from a context, that groups the key archive records of that context so they can be downloaded lazily (§8.5).
Box key A per-device X25519 key pair used only to receive keys sealed to that device with HPKE: new vault keys (§10.3) and HistoryShare keys (14 §7.5). Its public part is the dbk claim of the device's DeviceCertificate (07) (§10.1).
Shared message key A per-message key K_msg that another member shared with the user in a HistoryShare (14 §7). The key archive keeps them in shared_keys records (§9.5).
VaultKeyLink The current vault key's encryption of the previous one, stored by the home server (§10.2).
VaultKeyGrant A new vault key encrypted to one device's box key (§10.3).
Pairing session One server-side record of an attempt to pair, identified by a UUIDv7 pairingId (§6.2).
New device In a pairing session, the unenrolled device that receives the keys.
Approver In a pairing session, the enrolled device that sends the keys.
Displayer The device that shows the QR code and 6-digit code. It is the new device or the approver, fixed when the session is created.
Entering device The other device: it scans the QR code or has the 6-digit code typed into it.
Local key store A device's at-rest storage for long-term secrets, protected under a platform wrapping key (§13).
Notification key subset The history keys, and nothing else secret, that a mobile notification extension or web service worker may read (§13.5).

1.4 Notation

  • || is byte concatenation. 0x00 is a single zero byte.
  • u8(n), u16(n), u32(n), u64(n) are unsigned big-endian integers of 1, 2, 4 and 8 bytes.
  • lv(x) is the TLS presentation-language encoding of opaque x<V> (04 §3.2, RFC 9420 §2.1.2): a variable-length-integer length prefix followed by x, where a string is first encoded as UTF-8. A length below 64 takes one prefix byte, below 16,384 two bytes. Every binary structure in this document that is signed, MACed, used as associated data or fed into a KDF is built only from lv values, fixed-size integers and fixed-length byte strings, as 04 §3.2 requires.
  • HKDF-Expand and HMAC use SHA-256 (RFC 5869, RFC 2104). HKDF-Expand is applied directly to a uniformly random key of at least 32 bytes, used as the PRK (04 §8.1 rule 1): a CSPRNG key, the Argon2id output or the CPace ISK. This document never uses HKDF-Extract outside HPKE.
  • AEAD-Seal(k, n, pt, aad) and AEAD-Open are AES-256-GCM with a 96-bit nonce n and a 128-bit tag appended to the ciphertext (00 §7.15). Every nonce in this document is 12 bytes from a cryptographically secure random generator.
  • b64u(x) is base64url without padding (RFC 4648 §5).
  • did values are 16 bytes on the wire inside binary structures and 22-character base64url strings in JSON (00 §7.6). A pairingId is the 16-byte binary form of its UUID (RFC 9562) inside binary structures.
  • An address is always the canonical address (00 §7.6, D-032).

2. Key material

Every secret a secure account's device holds, and how it moves, is listed here. Nothing else secret exists for an account. Insecure accounts hold none of it (D-021, D-060).

Secret Size Created by Scope Reaches other devices by At rest on a device On the home server
Identity key (IK) private key 32-byte Ed25519 seed The upgrading or resetting device (§3, §11) Account, one per igen Pairing payload; KeyBackup Local key store, wrapped (§13) Only inside the KeyBackup
Device signing key (DSK) private key 32-byte Ed25519 seed Each device for itself Device Never Local key store; non-extractable where possible (§13.1 K-5) Never
Box key private key 32-byte X25519 key Each enrolled device for itself Device Never Local key store Never. The public part is in the BoxKey object (§10.1) and, as dbk, in the device's DeviceCertificate (07).
Vault keys K_vault(g) 32 bytes each The upgrading device (g = 1); a rotating device (g > 1) Account, per igen Pairing payload; KeyBackup; VaultKeyGrant; VaultKeyLink (older generations) Local key store Wrapped: in the KeyBackup, in grants, in links
Vault ID key K_vid 32 bytes The upgrading or resetting device Account, per igen Pairing payload; KeyBackup Local key store Only inside the KeyBackup
Phrase entropy E (with its public phraseId) 10 bytes (phraseId: 16 bytes) The upgrading or resetting device; a device that makes a new recovery key (§4.6) Account Pairing payload; KeyBackup; the recovery vault record Local key store Inside the KeyBackup and the recovery record (phraseId also in clear in the KeyBackup object)
Backup key BK 32 bytes Derived from E (§5.3) Account Never (re-derived) MAY be cached in the local key store Never
MLS state, history keys — 13, 14 Device History keys via the key archive (§9) Local key store History keys only inside archive records
Shared message keys (K_msg from HistoryShares) 32 bytes each Received from a sharer (14 §7.8) Account The key archive (shared_keys records, §9.5) Local key store Only inside shared_keys records

Rationale: there are exactly three things a user can lose (devices, the recovery phrase, the OIDC login), and every secret above is reachable from an enrolled device or from the recovery phrase plus a home session. That is the whole recovery model of D-006.

3. Turning on encryption: the upgrade ceremony

3.1 Entry points

A user starts the ceremony with one action, "Turn on encryption" (M4, HP-12). Clients MUST offer it:

  1. in account settings, for an insecure account;
  2. on every G1 gate card (security.account_required or security.upgrade_required), after which the interrupted action resumes by itself (00 §4.12.2);
  3. immediately after sign-up on a secure server, and at the next sign-in of an account in the upgrade_required state (SM-3, 05). In that case the client MUST NOT let the user continue to any other screen until the ceremony succeeds or the user signs out or deletes the account (05).

The client MUST NOT ask any question before generating keys. The only user decision in the whole ceremony is how to save the recovery key (§4.4), and "Later" is an accepted answer. The provider sign-in that §3.2 requires when the session's last one is more than 23 h old (D-085) isn't a question: it is the familiar sign-in of M1 (05 §9.4), and the ceremony continues by itself when it completes.

Rationale: M4 is "one tap to turn on". A confirmation dialog in front of an action that warns nobody and loses nothing would add a decision without adding safety.

3.2 Preconditions

The client MUST check all of these before step U2 and, if any fails, MUST NOT start:

  • the session is a home session of an account with kind: "user" (bots use §5.10);
  • the account's security state is insecure or its account state is upgrade_required (05);
  • the client implements secure mode (it is a Full client or Web client);
  • on the web, the local key store can be created (§13.3). If the browser refuses IndexedDB or WebCrypto, the client says that this browser can't hold encryption keys and offers to continue on another device;
  • if this device holds an identity key for the account after a rejected home-server pin change (02 §10.6), the account's IdentityState is secure and names that key (igen and ikf); otherwise the client says it can't reach the person's server and starts nothing.

The same check is a precondition of a reset (§11.2 S1), of taking part in pairing as approver or new device (§6.9), and of every KeyBackup write (§4.6, §5.6, §10.5.2).

Recent sign-in (D-085). Before U2, the client also checks that the session's last provider sign-in (authAt, from GET /v1/me or the token response, 05 §11.5) is less than 23 hours old. If it isn't, it runs 05 §9.2 (fresh authentication; the home server requires maxAgeMs 86,400,000 at U6, 07 §11.4) and starts U2 when the sign-in completes, without another tap. The one-hour margin keeps U6 from failing while the ceremony runs. If the user cancels the sign-in, the client generates no keys and leaves the entry point as it was. This check applies to the upgrade ceremony and to a re-upgrade after a downgrade (07 §15.5), not to the other operations listed in the previous paragraph. Bots skip it: their bot token stands in for fresh authentication (05 §15.5).

3.3 Client procedure

The client performs these steps in order. "Persist" means writing to the local key store (§13) and waiting for the write to complete.

Step Action
U1 Fetch the account's own IdentityState (GET {home}/v1/users/{local}/identity, 07) and read its igen as g0.
U2 Generate, with a cryptographically secure generator: the IK (Ed25519), this device's DSK, this device's box key (X25519), K_vault(1), K_vid, the phrase entropy E (10 bytes), its phraseId (16 bytes) and the backup salt S (16 bytes). Persist all of them with the local state pending_upgrade and g0 + 1.
U3 Build the IdentityCertificate with igen = g0 + 1 and kind: "user", and this device's DeviceCertificate, which names its DSK and its box key (dbk), as specified by 07. Persist both.
U4 Derive BK from E and S (§5.3). Build the backup payload (§5.2) with vgen 1 and encrypt it (§5.4).
U5 Stage the KeyBackup: PUT {home}/v1/me/backup with "stage": true (§5.6).
U6 Register the identity: PUT {home}/v1/me/identity with the IdentityCertificate and DeviceCertificate (07 §11.4). The home server activates the staged KeyBackup in the same transaction (07 §11.4 steps 7 and 8, §5.6.3), publishes IdentityState with igen = g0 + 1 and sec: "secure", and sends identity.changed to the account's audiences (07, 06). The home server accepts it only from a session whose last provider sign-in is at most 24 h old (07 §11.4, 05 §9.1, D-085).
U7 Set the local state to enrolled. Initialize the vault: POST {home}/v1/me/vault/keys for generation 1, signed by this device (§10.5.1). Upload the box key (§10.1). Write the recovery record with phraseId, reason: "new" and savedAt: null (§8.6.5).
U8 Show the save step (§4.4).
U9 In the background, without waiting for U8: publish KeyPackages (13); resume the action that a G1 card interrupted; let eligible DMs upgrade (12).

The client MUST NOT show the save step before U6 succeeds, so the user never saves a recovery key that doesn't work. U7 and U9 MAY run while the save step is on screen.

Progress: U4 runs Argon2id with 64 MiB of memory (§5.3) and typically takes 0.3–2 s. The client shows a single progress state ("Turning on encryption…") for U1 to U6 and no intermediate screens.

3.4 Failures, retries and concurrency

Situation Required behaviour
A network error or 5xx at U5 or U6 Retry with the same persisted material, with backoff 1, 2, 4, 8 s and then every 30 s while the screen is open. U5 replaces this device's earlier staged backup (§5.6.1); U6 is idempotent for identical certificates (07 §11.4 step 1).
The app stops between U2 and U6 On the next start, the client finds pending_upgrade, fetches IdentityState, and: if its idc equals the persisted IdentityCertificate byte for byte, continues at U7; if igen is still g0, continues at U4 with the persisted material, after the recent-sign-in check of §3.2; otherwise discards the pending material (next row).
U6 fails with 409 identity.already_secure or identity.generation_mismatch (07 §11.4 steps 1 and 2: another device registered an identity first), or IdentityState shows an igen above g0 that this device didn't cause Discard all pending material (zeroize it, §13.1 K-4). The device is now an unenrolled device of a secure account. Show "Approve this device" (§12.3). The home server deletes the unmatched staged backup (§5.6.3). No warning is shown: the user's other device turned encryption on.
U6 fails with backup.required The staged backup was lost (expired after 24 h). Repeat from U4 with the same material.
U6 fails with 403 auth.reauth_required (the session's last provider sign-in became more than 24 h old, 07 §11.4) Keep all persisted material. Run 05 §9.2 (the prompt of 20 §9.5) and retry U6 once with the same material. If the user cancels the sign-in, keep pending_upgrade and leave the entry point as it was; the next "Turn on encryption" runs the sign-in and continues at U4 with the persisted material.
The app stops between U6 and U8 On the next start, the client finds enrolled with no recovery record written, completes U7, and shows the save step.
U7 fails Retry in the background; U7 is idempotent (§10.5.1, §8.7). Vault initialization never blocks the save step.

3.5 Effects on the account's other devices

When the account becomes secure, every other signed-in device of the account is an unenrolled device (D-058):

  • it learns this from identity.changed on its home WebSocket (07), or at its next start from GET {home}/v1/me (05) and the account's IdentityState, where its own did isn't listed;
  • it keeps working in insecure contexts without interruption (§12.1);
  • it shows a non-blocking "Approve this device" banner once (§12.3). Tapping it opens the device-setup chooser (§12.3), whose default is pairing with this device as the new device (§6.9.1);
  • it is never shown W4c for the upgrade, because no device was added to an existing identity.

The upgrading device doesn't prompt the user about the other devices: each of them shows its own banner, and "Add a device" in settings (§6.9.3) is always available.

3.6 What contacts and channels see

Nothing. There is no earlier pin, so contacts pin the new identity key silently on first contact (07). Eligible 1:1 DMs and group DMs upgrade with marker K1 (12). In channels nothing changes until the user opens a secure channel. The upgrade creates no history: earlier insecure content stays plaintext on its hosting servers and is never fed into any archive.

3.7 Bots

A secure bot's SDK runs the same steps U1 to U7 with kind: "bot" in the IdentityCertificate (07, D-061), using the bot token, which stands in for the recent sign-in of §3.2 (05 §15.5). Steps U4, U5 and the recovery record are OPTIONAL for bots (§5.10). There is no save step. Pairing isn't available to bots (§6.10).

Each bot process is a device (00 HP-10). A second or later process of the same bot gets the IK, K_vid, the vault keys and E (if the bot keeps them) either from the operator's secret storage (§13.2), where the first process or the operator put them, or from the KeyBackup with the operator-held phrase (§5.8, with the bot token). It then generates its own DSK and box key and runs §7 E1 to E8 with the bot token. A bot process never copies another process's DSK.

4. The recovery phrase

User interfaces call the recovery phrase the recovery key (00 §2.5). This document uses "recovery phrase" for the protocol object and "recovery key" for what the user sees.

4.1 Generation and encoding (D-052)

The phrase encodes 80 bits of entropy and an 8-bit checksum as 8 words from the BIP-39 English word list (2,048 words, index 0 "abandon" to index 2047 "zoo"; the file english.txt of BIP-39 with SHA-256 2f5eed53a4727b4bf8880d8f3f199efc90e58503646d9ff8eff3a2ed3b24dbda).

Encoding, given E (exactly 10 bytes from a cryptographically secure generator):

  1. C = SHA-256(E)[0], the first byte of the hash.
  2. B = E || C, 11 bytes, read as one 88-bit big-endian unsigned integer N.
  3. For i from 0 to 7, w_i = (N >> (11 × (7 − i))) & 0x7FF. Word i is the word list entry at index w_i.

Decoding, given 8 word indices w_0 … w_7:

  1. N = Σ w_i << (11 × (7 − i)); B = the 11-byte big-endian form of N.
  2. E = B[0..10], C = B[10].
  3. The phrase is valid only if C = SHA-256(E)[0].

The phrase is not a BIP-39 mnemonic: it uses only the BIP-39 word list. It has a different length and checksum, and no BIP-39 seed derivation is applied. Clients MUST NOT present it to users as a cryptocurrency wallet phrase, and wallet software will reject it.

Rationale: 8 words is the shortest phrase that, with Argon2id at the floors of 04, makes offline guessing infeasible (80 bits; §18.1). The 8-bit checksum catches 255 in 256 typing mistakes locally, without any network round trip or download. The BIP-39 list is used because each word is uniquely identified by its first four letters (§4.3), the words are common and easy to spell, and the list is widely reviewed.

4.2 Canonical text form

recovery-phrase = word 7( SP word )          ; exactly 8 words, single spaces
word            = 3*8LCALPHA                 ; an entry of the BIP-39 English list
LCALPHA         = %x61-7A                    ; a-z

The canonical text form is the 8 words in lowercase, separated by single U+0020 spaces, with no leading or trailing white space. It is the form saved to password managers (§4.4) and the form a client shows. When shown on screen or printed, the words are numbered 1 to 8 in two rows of four; the numbers are not part of the phrase.

4.3 Forgiving input

Clients MUST accept the phrase leniently. The input algorithm is:

  1. Apply Unicode NFKC normalization, then map ASCII A–Z to lowercase.
  2. Replace every character that isn't a–z with a separator. This removes digits (so "1. abandon 2. ability …" works), punctuation, hyphens, line breaks and all white space.
  3. Split on separators and drop empty tokens.
  4. Resolve each token:
    • if it equals a word in the list, it is that word;
    • otherwise, if it has at least 4 letters and its first 4 letters equal the first 4 letters of exactly one word, it is that word (in the BIP-39 English list no two words share their first 4 letters, so this match is unique when it exists);
    • otherwise it is unresolved.
  5. If there aren't exactly 8 tokens, or any token is unresolved, the input is incomplete.
  6. Decode (§4.1). If the checksum fails, the input is wrong.

User-interface rules:

  • The entry screen has two ways in, and both feed the algorithm above:
    • a visible word entry with 8 numbered slots, for typing. It offers autocomplete from the second letter of each word, shows the resolved word as soon as a token resolves, and lets the user tab or space to the next slot. Pasting the whole phrase into any slot fills all of them;
    • a password-manager field: a username field pre-filled (read-only) with the account's canonical address and a password-type field with autocomplete="current-password" (or the platform equivalent), so a password manager offers the entry saved in §4.4 and fills it in one tap. A filled value is decoded at once and shown in the word slots. The algorithm above accepts the filled canonical form unchanged.
  • An unresolved token is marked inline. The client does not mark resolved words as wrong, because a checksum failure can't say which word is wrong; it says "One of the words doesn't look right. Check them against your saved recovery key." (copy in 20).
  • A phrase that passes the checksum but doesn't open the KeyBackup (§5.8 R5, a 1-in-256 event for a random typo) gets the message "That recovery key didn't work".
  • The screen says in one line where a saved key is usually found: in the password manager under "Sloppy Voice" or the account's address, or on the printed page (copy in 20).
  • There is no limit on local attempts. The only server-visible action is downloading the KeyBackup (§5.7), which the client does once and caches for the rest of the screen's lifetime.

4.4 The save step (M4)

After U6 (§3.3), after a reset (§11.2) and after making a new recovery key (§4.6), the client shows the save step. It offers exactly these options, in this order:

Option Required behaviour Counts as saved
Save to password manager (primary button) The client stores a credential with username = the canonical address and password = the canonical text form (§4.2), labelled "Sloppy Voice recovery key – " followed by the canonical address, using the platform's password-saving facility (for example iCloud Keychain on Apple platforms, the platform credential manager on Android, the Credential Management API PasswordCredential or a browser save prompt on the web). The credential is saved for the web domain the client is associated with. A web client served from the home server's canonical domain (or a subdomain of it) uses that origin, so the entry is found again in any browser that syncs the same password manager. Native clients use the domain their app is associated with. Because different clients may use different domains, the label and the restore screen's hint (§4.3) are what let the user find the entry by searching for "Sloppy Voice" or the address. Where no such facility exists, the button copies the phrase to the clipboard as sensitive content (iOS UIPasteboard with localOnly and an expiration; Android ClipDescription.EXTRA_IS_SENSITIVE) with automatic clearing after 60 s where the platform allows it, and tells the user to paste it into their password manager. Only on a positive confirmation from the platform: Android Credential Manager's createCredential succeeds, or iOS SecAddSharedWebCredential completes without an error after the user's consent. Where the platform can't confirm (web PasswordCredential, whose promise resolves whether or not the user saved, and the clipboard fallback), the client shows one inline line under the button, "Saved it?" with "Yes" and "Not yet" (copy in 20), and counts it as saved only on "Yes". This line is part of M4, not a new prompt.
Print or save as PDF The client renders a page locally containing the account's canonical address, the 8 numbered words, the date, the home server's canonical domain, and one sentence of instructions, and hands it to the operating system's print dialog (which offers "Save as PDF"). The page MUST NOT contain a QR code or barcode of the phrase. The client MUST NOT upload the page or the phrase anywhere. Only when the platform reports that the print or PDF job completed rather than being cancelled. Where it can't tell (for example the web's afterprint event, which fires either way), the same "Saved it?" line decides.
Show words Shows the 8 numbered words with a "Copy" action (sensitive clipboard, as above) and a button "I've written them down". When the user taps "I've written them down".
Later Closes the step. No. W8 applies (§4.7).

Rules:

  • There is no quiz and no re-entry check (D-052).
  • While the words are on screen the client MUST prevent screenshots and screen recording where the platform allows it (Android FLAG_SECURE; hiding the content in the iOS app-switcher snapshot and while the screen is captured; on desktop and web nothing is required); on every platform the words MUST be kept out of the client's own screen share as 17 §4.6 item 7 specifies; and the client MUST NOT put the phrase in notifications, logs, crash reports or analytics.
  • A secure-server sign-up (§3.1 item 3) allows "Later" too.

Rationale: saving a credential under the account address puts the recovery key exactly where non-technical users already keep "the password for that app", and makes restoring a one-tap autofill (§4.3). A printed QR code would be copied by any camera that sees the page, while 8 printed words are typed once in years.

4.5 Viewing the recovery key again

Any enrolled device can show the current recovery key, because every enrolled device holds E (§2). The entry is in settings ("Show recovery key"). Before showing it, the client SHOULD require the operating system's user verification where one exists (Face ID, Touch ID or device passcode on Apple platforms; BiometricPrompt with device credential on Android; Windows Hello on Windows). Web clients and platforms without such a facility show it after one confirming tap. The screen is the "Show words" screen of §4.4, including its "I've written them down" button, which marks the key saved.

An unenrolled device can't show the recovery key; the option is absent.

4.6 Making a new recovery key

An enrolled device MAY replace the recovery phrase ("Make a new recovery key" in settings). It MUST replace it after a lost or stolen device is revoked (§10.8). The procedure:

  1. Generate a new E', a new phraseId' and a new salt S'; derive BK' (§5.3). Persist all of them, marked pending with the reason (replaced, or lost_or_stolen for §10.8), before step 3.
  2. GET {home}/v1/me/backup?part=meta and GET {home}/v1/me/vault/keys. The device MUST hold the vault key of the current vgen (§10.6) and MUST hold the phrase whose phraseId equals the active KeyBackup's (if not, it first syncs the recovery record, §8.9.4). Build and encrypt a new backup payload with E', phraseId' and the current vault key, and the object's vgen set to the current generation.
  3. PUT {home}/v1/me/backup with prevVer set to the active version (§5.6.2). On backup.version_conflict, GET …?part=meta again:
    • if the active phraseId is still the one this device started from (only the vault generation moved on), rebuild from step 2 and retry;
    • otherwise another device made a new recovery key first. This device MUST NOT overwrite it: it discards E', phraseId', S' and BK', syncs the recovery record, adopts the phrase whose phraseId is now active, and shows that one in step 5.
  4. Write the recovery record (§8.6.5) with E', phraseId', the reason, a new createdAt and savedAt: null, retrying in the background until it succeeds (a restart resumes here from the pending mark). Other enrolled devices learn the new phrase from this record. Then replace the old E, phraseId and BK in the local key store.
  5. Show the save step (§4.4), unless the procedure ran in the background on a device the user isn't using (§10.8); W8 then reminds the user (§4.7).

From step 3 on, the old phrase opens nothing: the home server keeps only the current KeyBackup (§5.9). Making a new recovery key doesn't change the identity key, vault keys or any device, and nobody else sees anything.

Rationale: the phraseId ties each KeyBackup to the phrase that opens it, so two devices that change the phrase at once, or a phrase change racing a vault rotation, can never leave the active KeyBackup encrypted under one phrase while every device shows another.

4.7 W8: the recovery key hasn't been saved

W8 (00 §4.12.1) is a settings badge plus a gentle, non-blocking banner. Rules:

  • Condition. The account is secure, the device is enrolled, and the recovery record's savedAt is null. The settings badge is shown whenever the condition holds.
  • Banner frequency. The banner is shown at most once per 7 days per account, across all of the account's devices. A device MAY show the banner only if at least 7 days have passed since the recovery record's lastNudgedAt (or, if that is null, since the record's createdAt). Exception: when the record's reason is lost_or_stolen and lastNudgedAt is null, the banner MAY be shown at once, because the key the user saved earlier no longer works (§10.8). When a device shows the banner it writes the current time to lastNudgedAt (§8.9.4). A device that can't reach the vault shows no banner.
  • Placement. Never during a call, never over a gate card, never on the first screen after sign-in. Tapping it opens the save step (§4.4). Dismissing it does nothing else.
  • Stopping. As soon as any device sets savedAt, the badge and banner disappear on every device at their next vault sync.
  • Restarting. Making a new recovery key (§4.6) or a reset (§11) writes a new recovery record with savedAt: null, which starts the cycle again.
  • Unenrolled devices and bots never show W8.

Rationale: a weekly, account-wide limit keeps W8 from becoming nagging on a user with four devices, and storing the state in the vault means that saving once on the phone stops the reminder on the laptop.

5. KeyBackup

The KeyBackup is the encrypted blob on the home server that lets a device with only the recovery phrase and a home session become enrolled (D-006, F5). The home server stores it and can never open it.

5.1 The KeyBackup object

The KeyBackup is a JSON object. The home server stores the members a client sends and adds the server-assigned ones.

Member Type Required Set by Meaning and constraints
v integer Yes Client Format version, 1. A server MUST refuse any other value with backup.invalid; a client that reads an unknown version MUST treat the backup as unusable and offer pairing or "Start fresh".
addr string Yes Client The account's canonical address. MUST equal the account's address.
igen integer Yes Client The identity generation whose keys the backup holds.
ikf string Yes Client RFC 7638 thumbprint (base64url, 43 characters) of the identity public key in the backup.
vgen integer Yes Client The newest vault generation whose key the payload holds (§5.2), 1 to 4,294,967,295. Lets every device see, without opening the backup, whether it is current (§5.6.4).
phraseId string Yes Client base64url of the 16-byte phrase ID of the phrase that opens this backup (§1.3).
kdf object Yes Client An Argon2idParams object (04 §12.2): alg, v, m, t, p, salt.
nonce string Yes Client base64url of the 12-byte AES-GCM nonce.
ct string Yes Client base64url of the AES-256-GCM ciphertext with its 16-byte tag (§5.4). Decoded length at most maxBackupBytes (§16).
ver integer Response only Server Version number, starting at 1 and increased by 1 on every accepted write, across stagings and identity generations of the account. Never reused.
state string Response only Server active or staged. Clients treat an unknown value as unusable.
updatedAt string Response only Server RFC 3339 time of the write.
updatedBy string Response only Server did of the device whose session wrote it.

The kdf member is 04's Argon2idParams object, with the ranges and rules of 04 §12.1 and §12.2: a writer uses the producer values (v: 19, m: 65536, t: 3, p: 1, a 16-byte salt from the CSPRNG); a home server MUST refuse an upload whose parameters fall outside the "verifiers accept" column of 04 §12.1 with 400 crypto.kdf_params_rejected, or 400 crypto.unsupported_algorithm when alg isn't argon2id or v isn't 19 (04 §12.2); and a reader MUST refuse such parameters before running Argon2id (also crypto.kdf_params_rejected, recorded locally), treating the backup as unusable. 04's upper limits stop a malicious home server from serving a backup whose parameters exhaust the memory of the restoring device.

Salt reuse. 04 §12.1 item 3 requires a fresh salt whenever the phrase changes and allows the salt to be kept while the phrase is unchanged. A writer MUST use a fresh salt with every new phrase (§3.3 U2, §4.6, §11.2) and MAY keep the salt while the phrase is unchanged, so that a device can cache BK and rewrite the backup after a vault rotation without running Argon2id (§10.5.2). Rationale: the salt's job is to stop precomputation across accounts and phrases; reusing it for later uploads under the same phrase gives an attacker nothing they didn't get from the first upload, and saves a phone several seconds of memory-hard work in the background.

5.2 The backup payload

The plaintext is a UTF-8 JSON object (I-JSON):

Member Type Required Meaning
v integer Yes 1.
addr string Yes The canonical address.
igen integer Yes Identity generation.
ik string Yes base64url of the 32-byte Ed25519 private key seed of the identity key.
idc string Yes The IdentityCertificate JWS (07), exactly as registered.
vaultIdKey string Yes base64url of K_vid (32 bytes).
vaultKeys array Yes One or more { "vgen": integer, "key": base64url(32 bytes) }. MUST contain the generation named by the object's vgen, which MUST be the vault's current generation when the backup is written. SHOULD contain only it; older generations are reachable through VaultKeyLinks (§10.2).
phrase string Yes base64url of E (10 bytes).
phraseId string Yes base64url of the 16-byte phrase ID of E.
createdAt string Yes RFC 3339 time the payload was built.

Readers MUST ignore unknown members. The payload contains no DSK, box key, MLS state or session token: those belong to one device (§2).

5.3 Deriving the backup key

A    = Argon2id(password = E, salt = S, m = kdf.m, t = kdf.t, p = kdf.p,
                tag length = 32, version = 0x13, secret = empty, associated data = empty)
BK   = HKDF-Expand(A, "sv1 backup" || 0x00 || lv(addr), 32)
  • The Argon2id password is the 10 bytes of E, not the text of the words, so no text normalization can make two devices disagree (04 §12.1).
  • A is uniformly random and 32 bytes long, so it is used directly as the PRK (04 §8.1 rule 1, §8.4).
  • S is the kdf.salt. It is fresh for every new phrase and MAY stay the same while the phrase stays the same (§5.1), so a device MAY cache BK in its local key store and skip Argon2id when it rewrites the backup (§10.5).
  • addr binds the key to the account, so a backup can't be passed off as another account's.

5.4 Encryption

AAD = "sv1 backup" || 0x00 || u8(v) || lv(addr) || u32(igen) || ikf_raw || u32(vgen) || phraseId_raw
      || u8(kdf.v) || u32(kdf.m) || u32(kdf.t) || u32(kdf.p) || lv(salt)
ct  = AEAD-Seal(BK, nonce, UTF-8(payload JSON), AAD)

ikf_raw is the 32-byte SHA-256 thumbprint (the decoded ikf) and phraseId_raw the decoded 16-byte phraseId. v is the object's format version. Every member of the KeyBackup object that a client sets is therefore authenticated, apart from nonce and ct themselves, and kdf.alg, which has only one valid value. The key BK is used for at most a few hundred encryptions in the life of a phrase, far inside the bound of 04 §9.3.

A reader MUST, after decryption, check that the payload's addr, igen and phraseId and the thumbprint of the public key derived from ik equal the object's addr, igen, phraseId and ikf, and that the largest vgen in vaultKeys equals the object's vgen.

5.5 Endpoints

Method and path Who may call Purpose
GET {home}/v1/me/backup?part=meta Any home session of the account, or the bot's token The active KeyBackup without nonce and ct, plus the members below. Not counted against download limits.
GET {home}/v1/me/backup A session that passes §5.7 The full active KeyBackup. Counted.
PUT {home}/v1/me/backup Staging: any home session of the account, enrolled or not, or the bot's token (§5.6.1). Updating: an enrolled device of the current igen (§5.6.2). Stage or replace the KeyBackup.

There is no DELETE. The home server deletes KeyBackups only as §5.9 says.

5.5.1 GET responses

200 with the KeyBackup object (§5.1), or 404 backup.not_found when the account has no active KeyBackup. A staged KeyBackup is never returned. The response carries Cache-Control: no-store.

The ?part=meta response adds two members, so a client can plan a restore before asking the user for anything:

Member Type Meaning
downloadAllowed boolean Whether a full GET by this session would pass §5.7 now (ignoring the rate limits). When false, the session needs fresh authentication first (05 §9.2).
phraseChangePending boolean Whether a new recovery phrase is required before the KeyBackup may be rewritten under the current one (§10.8).
GET {home}/v1/me/backup

HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
  "v": 1,
  "addr": "alice@a.com",
  "igen": 1,
  "ikf": "qI__BOccgAhhH9wob_G7gFVHLKIkS4CutvoSx0bMCY8",
  "vgen": 1,
  "phraseId": "0NHS09TV1tfY2drb3N3e3w",
  "kdf": { "alg": "argon2id", "v": 19, "m": 65536, "t": 3, "p": 1, "salt": "AAECAwQFBgcICQoLDA0ODw" },
  "nonce": "oKGio6Slpqeoqaqr",
  "ct": "cRj9TcONRKfw4u7zXvONSYwYf8ToW7ZlrSTnU6HTAkpjvJ5jEcE-gJx-1Zq1t1n-dYI6bsw88zy6qcH5cJq10EffT5…",
  "ver": 3,
  "state": "active",
  "updatedAt": "2026-12-04T18:20:01.044Z",
  "updatedBy": "q2bS9xVg3m0yJpQe1vT0Aw"
}

(This is the test vector of §17.2, with ct shortened.)

5.6 Writing a KeyBackup

PUT {home}/v1/me/backup takes this body (a client writes it subject to the 02 §10.6 check of §3.2):

Member Type Required Meaning
v, addr, igen, ikf, vgen, phraseId, kdf, nonce, ct — Yes As §5.1.
stage boolean No, default false true to stage a backup for an identity that is about to be registered or reset.
prevVer integer Required when stage is false The ver of the active KeyBackup this write replaces.

The server validates the body (types, sizes, addr equal to the account's canonical address, ikf and phraseId well-formed) and answers backup.invalid or core.too_large on failure, and checks kdf as 04 §12.2 requires (crypto.kdf_params_rejected or crypto.unsupported_algorithm, §5.1). It then applies §5.6.1 or §5.6.2.

5.6.1 Staging

A staged write MUST have igen equal to the account's current igen + 1 (the upgrade of §3 and the reset of §11 both increase igen), and vgen equal to 1; otherwise backup.identity_mismatch. The server keeps at most one staged KeyBackup per device (the did of the writing session) and at most 3 per account: a staged write from the same device replaces that device's earlier one, and a write from a fourth device replaces the oldest. (Two devices that start the upgrade at the same moment therefore don't overwrite each other's staged backup; the first identity registration wins and the other staged backup is deleted.) At most 10 staged writes per account per rolling hour are accepted; more get 429 core.rate_limited. The response is 201 with the stored object (state: "staged"). A staged backup that hasn't been activated 24 h after its last write is deleted.

5.6.2 Updating

An update MUST come from a session whose device is listed active in the account's current IdentityState (otherwise security.device_not_enrolled), MUST have igen and ikf equal to the current identity's (otherwise backup.identity_mismatch), and MUST have prevVer equal to the active backup's ver (otherwise 409 backup.version_conflict with data.currentVer, data.phraseId and data.vgen of the active backup). The server also refuses, with 409 backup.stale_generation, a vgen lower than the active backup's vgen or higher than the vault's current generation, and, with 409 backup.phrase_change_required, a write whose phraseId equals the active backup's while phraseChangePending is set (§10.8). The server replaces the active KeyBackup atomically, clears phraseChangePending if the phraseId changed, answers 200 with the stored object, and sends backup.updated (§14.2) to the account's other enrolled devices.

Clients update the KeyBackup when, and only when:

  • the vault has a newer generation than the backup holds (§5.6.4, §10.5.2 step V6);
  • a new recovery phrase was made (§4.6);
  • a client upgrade changes the payload format (MAY).

A writer that isn't making a new phrase MUST write under the phrase whose phraseId is the active backup's. If it holds a different phrase, it first syncs the recovery record (§8.9.4); if no record with the active phraseId is available yet, it doesn't write and tries again at its next vault sync.

5.6.3 Activation with the identity (normative for the home server)

When the home server accepts an identity registration (PUT /v1/me/identity) or an identity reset (POST /v1/me/identity/reset) under 07, it MUST, in the same transaction:

  1. find the staged KeyBackup whose igen and ikf equal the new IdentityCertificate's igen and identity-key thumbprint;
  2. for an account with kind: "user", refuse the registration or reset with 409 backup.required if there is none;
  3. make it the active KeyBackup (state: "active", a new ver);
  4. delete any KeyBackup of an earlier igen and every other staged KeyBackup.

A downgrade to insecure (07, D-019) deletes the active and staged KeyBackups in the same transaction. 07 §11.4 step 7, §11.6 step 7 and §15.2 step 7 call these rules.

Rationale: staging and activating together means a secure user account never exists, even for a moment, without a recovery path, and a failed registration never leaves a backup that doesn't match the published identity.

5.6.4 Keeping the backup current

The KeyBackup must always hold the vault's current generation, or a device restored from it couldn't write to the vault. Every enrolled device checks this at start, after vault.key_rotated, after backup.updated and after syncing the recovery record: if the active KeyBackup's vgen (from ?part=meta or the last backup.updated) is lower than the vault's current vgen, and the device holds the current vault key and the phrase whose phraseId is the active backup's, and phraseChangePending isn't set, it rewrites the backup (§5.6.2). Several devices may try at once; prevVer lets exactly one win, and the others see an up-to-date backup on their retry. This rule also completes a rotation whose step V6 was interrupted (§10.5.2).

5.7 Download rules and rate limits

GET {home}/v1/me/backup (without part=meta) is allowed only for:

  1. a session of a device listed active in the account's current IdentityState; or
  2. a session of an unenrolled device that is fresh for 1 hour under 05 §9.1: fresh(session, 3600000), that is, the session's authAt (05) is at most 3,600 s old; or
  3. the bot's token, for a bot account (05 §15.5).

Otherwise the server answers 403 auth.reauth_required with data.maxAgeMs: 3600000 and data.providers, exactly as 05 §9.1 requires. The client runs 05 §9.2, which keeps the device and its did, and retries.

Rate limits, in addition to the core limits of 03:

Who Limit Answer when exceeded
Sessions of unenrolled devices of one account, together 10 downloads per rolling 24 h 429 core.rate_limited with retryAfterMs and data.policy: "backup.download" (03 §15.2)
Any one session 5 downloads per rolling hour Same
Enrolled-device sessions of one account, together 50 downloads per rolling 24 h Same
The bot token, for all processes of one bot together 50 downloads per rolling 24 h Same

The home server MUST record each full download (time, did, enrolled or not) in the account's device activity log (05 §12.11).

Proposed decision: downloading the KeyBackup from an unenrolled device requires fresh authentication within the last hour (listed in 05 §9.1's table). Rationale: a stolen refresh token alone can then never take the backup.

Rationale: the phrase is protected by Argon2id offline, so download limits can't stop a determined attacker who gets one copy. They exist to make bulk collection by a stolen refresh token impossible (rule 2 needs a fresh login at the OIDC provider) and to leave a trace. Enrolled devices hold every key in the backup already.

5.8 Restoring from the KeyBackup (client procedure)

A device chooses "Use recovery key" from the device-setup chooser (§12.3).

Step Action
R1 GET {home}/v1/me/backup?part=meta. On backup.not_found, the option is unavailable; the client offers pairing or "Start fresh" (§11). If downloadAllowed is false, run 05 §9.2 now, before the entry screen, so the user never types the words and is then sent away to sign in.
R2 The user enters the phrase (§4.3). The client decodes it and checks the checksum locally.
R3 GET {home}/v1/me/backup. Cache the result in memory until the screen closes. If auth.reauth_required arrives anyway (the hour ran out while the user typed), keep the decoded E in memory, run 05 §9.2 and retry.
R4 Check kdf against 04 §12.1 (§5.1).
R5 Derive BK (§5.3) and decrypt (§5.4). On AEAD failure: "That recovery key didn't work"; return to R2.
R6 Fetch the account's IdentityState (07) and check: the payload's addr is this account's canonical address; igen equals the IdentityState's igen; idc equals the IdentityState's idc byte for byte and verifies (07); the public key derived from ik equals the IdentityCertificate's ik; phrase equals the entered E and phraseId the object's; vaultKeys contains the object's vgen. On any failure the backup is unusable: the client says the recovery key belongs to an earlier setup and offers pairing or "Start fresh".
R7 Persist the IK, K_vid, vault keys, E, phraseId and (MAY) BK in the local key store, and continue with §7.

5.9 Retention and deletion (home server)

  • The home server keeps exactly one active KeyBackup per account and at most 3 staged ones (§5.6.1). When a KeyBackup is replaced, the previous one MUST be deleted from live storage at once, and SHOULD be purged from the server's own backups within 30 days (21).
  • On identity reset: §5.6.3 step 4. On downgrade: §5.6.3, last paragraph. On account deletion: deleted at once (05).
  • The home server MUST NOT log ct and MUST NOT give it to any party other than a session that passes §5.7.

Rationale: keeping old versions would let anyone who learns an old phrase read keys the user believes they replaced (§4.6, §10.8).

5.10 Bots

For a bot account the KeyBackup is OPTIONAL. A bot SDK that uses it obtains the phrase from operator configuration, never from a user interface, and uses the bot token for every call in this section; the bot row of §5.7 limits its downloads. The activation rule of §5.6.3 applies, except that a bot's identity registration doesn't require a staged backup. A bot whose keys are lost and that has no backup resets (07), and its DM contacts see a bot-worded W2.

6. Pairing

Pairing moves the identity key, the vault keys and the phrase entropy from an enrolled device to a new device of the same account, through the home server, which relays the messages but can't read them (D-006, D-053, HP-14). It uses CPace (CPACE-X25519-SHA512, profile in 04) so that a 6-digit code resists the relaying server.

6.1 Roles and directions

Every pairing session has exactly two devices of the same account:

  • the new device: an unenrolled device of the secure account (§12). It receives the keys;
  • the approver: an enrolled device. It sends the keys. Keys always flow from the approver to the new device.

Independently, one of them is the displayer (it shows a QR code and a 6-digit code) and the other is the entering device (it scans the QR code, or the user types the code into it). The displayer is fixed when the session is created:

Direction Displayer Entering device Typical use
A (default) New device Approver A new laptop shows a QR code; the user scans it with their phone, or types the 6 digits on a desktop that has no camera.
B Approver New device The user starts "Add a device" on their phone, or the new device has a camera and the old one doesn't.

Who creates the session:

Creator displayer Allowed Prompt to enrolled devices (pairing.requested)
New device new_device (direction A) Yes Yes
New device enrolled_device (direction B) Yes Yes; the approver displays after it accepts
Enrolled device enrolled_device (direction B) Yes No; the user is at that device
Enrolled device new_device No: pairing.role_mismatch —

6.2 The PairingSession object

Member Type Meaning
id string UUIDv7 pairingId, assigned by the server.
state string §6.8. One of waiting, joined, exchanging, confirmed, delivered, completed, failed, expired, cancelled. A client treats an unknown value as a terminal failure.
displayer string new_device or enrolled_device.
createdBy string new_device or enrolled_device.
newDevice DeviceSummary or null The new device, once known.
approver DeviceSummary or null The approver, once known.
createdAt string RFC 3339.
expiresAt string createdAt + 10 min, or the finishing deadline once confirmed (§6.8).
endedAt string or null When a terminal state was reached.
endReason string or null completed, wrong_code, denied, cancelled, superseded, timeout, expired, identity_changed, device_revoked, protocol_error, registration_failed. A client treats an unknown value as protocol_error.

A DeviceSummary is built by the home server from the device record (05):

Member Type Meaning
did string Device ID.
plat string desktop, web, ios or android.
client string Client software and version, from the device record, at most 64 characters.
name string The device's display name (05), for example "Chrome · Windows", at most 64 characters.
provider string The OIDC provider ID the device record was created with (05 §12.2 provider).
authAt string RFC 3339 time of the device session's most recent pass through the provider leg (05 §12.2 authAt).

6.3 Pairing credentials

The displayer generates, for each session, both a fresh 16-byte random secret (for the QR code) and a fresh 6-digit code, and shows both at once (00 HP-14). Neither is ever sent to the home server. The displayer discards both when the session's single CPace attempt has finished, or when the session ends, whichever is first.

While a pairing QR code or code is on screen, the displayer MUST apply the screen-capture protections of §4.4 (for example Android FLAG_SECURE, hiding the content in app-switcher snapshots and while the screen is captured), and MUST keep that screen out of its own screen share as 17 §4.6 item 7 specifies.

6.3.1 The QR payload

The QR code encodes this ASCII string (QR alphanumeric mode, error-correction level M):

pair-qr     = "SVPAIR1:" 1*B32CHAR          ; RFC 4648 base32 of pair-bin, no padding
B32CHAR     = %x41-5A / %x32-37             ; A-Z, 2-7

pair-bin is:

Bytes Field Value
1 version 0x01
1 displayer 0x01 = new device displays (direction A); 0x02 = approver displays (direction B)
16 pairingId Binary UUID of the session
16 secret The QR secret
1 or 2 addrLen Length of addr in bytes, as the variable-length integer of lv (§1.4): one byte below 64, two bytes up to the longest canonical address (64 + 1 + 253 = 318 bytes, 01)
addrLen addr The account's canonical address, UTF-8

A scanner MUST accept lowercase base32 letters, MUST reject a version other than 0x01, unknown displayer values, a malformed length and trailing bytes, and MUST check that addr equals the account it is signed in to (or, if it isn't signed in yet, use addr to pre-fill the sign-in, §6.9.3). The QR code is only meaningful to the Sloppy Voice app's own scanner; it is not a URI and a generic camera app shows it as text.

Rationale: base32 keeps the whole string in QR alphanumeric mode, which gives a small, easily scanned code (about 110 characters, QR version 6, for a typical address). The address lets a new device that scanned before signing in pick the right server.

6.3.2 The 6-digit code

The displayer draws the code uniformly from 000000 to 999999: it draws a uniform 32-bit integer r, rejects and redraws if r ≥ 4,294,000,000, and takes r mod 1,000,000, written with leading zeros.

pair-code-shown = 3DIGIT SP 3DIGIT         ; e.g. "042 917"

Input is lenient: the entering device removes every character that isn't an ASCII digit (after NFKC, so full-width digits work) and requires exactly 6 digits.

6.3.3 The CPace password

The CPace password-related string (PRS) and prs_kind are defined by 04 §11.3: prs_kind = 1 (qr) with PRS = the 16-byte secret when the entering device scanned the QR code, and prs_kind = 2 (code) with PRS = the 6 ASCII digits (for example "042917") when the code was typed. 04 binds prs_kind into the channel identifier.

6.4 Endpoints

All pairing endpoints require a home session of a secure user account. A bot token gets 403 pairing.unsupported_client. An insecure account gets 409 pairing.account_not_secure.

Method and path Purpose
POST {home}/v1/me/pairing Create a session.
GET {home}/v1/me/pairing List open sessions this device may join or takes part in.
GET {home}/v1/me/pairing/{id} Read one session.
POST {home}/v1/me/pairing/{id}/join Take the missing role.
POST {home}/v1/me/pairing/{id}/messages Send one protocol message to the other device.
GET {home}/v1/me/pairing/{id}/messages?after={n} Fetch protocol messages addressed to this device with index above n (default 0).
POST {home}/v1/me/pairing/{id}/cancel Cancel or deny.

The server decides whether the calling device is enrolled from the account's current IdentityState (its did listed active).

6.4.1 Create

Request body:

Member Type Required Meaning
displayer string No, default new_device when the caller is unenrolled and enrolled_device when it is enrolled Which device will display the credentials.

Server processing, in order:

  1. Apply the role table of §6.1 (pairing.role_mismatch otherwise).
  2. Apply the limits of §6.10 (429 core.rate_limited, §6.10).
  3. Cancel any other open session created by the same device (endReason: "superseded").
  4. Create the session in state waiting, with the caller as newDevice or approver.
  5. If the caller is the new device, send pairing.requested (§14.1) to every enrolled device of the account, and create a notification record of kind pairing_request for those without an open WebSocket so that they are pushed (19).

Response 201 with the PairingSession.

POST {home}/v1/me/pairing
{ "displayer": "new_device" }

HTTP/1.1 201 Created
{
  "id": "01938f40-0000-7a00-8000-00000000a1b2",
  "state": "waiting",
  "displayer": "new_device",
  "createdBy": "new_device",
  "newDevice": {
    "did": "Lp0wS3aQx9bT6mVc1rK2eA",
    "plat": "web",
    "client": "sloppyvoice-web/1.2.0",
    "name": "Chrome · Windows",
    "provider": "google", "authAt": "2026-12-04T18:30:02.118Z"
  },
  "approver": null,
  "createdAt": "2026-12-04T18:30:05.410Z",
  "expiresAt": "2026-12-04T18:40:05.410Z",
  "endedAt": null,
  "endReason": null
}

6.4.2 List and read

GET {home}/v1/me/pairing returns { "items": [PairingSession, …] } (at most 3 items; no pagination) containing:

  • for an enrolled device: open sessions created by a new device that have no approver yet, and open sessions in which it is the approver;
  • for an unenrolled device: open sessions created by an enrolled device that have no new device yet, and open sessions in which it is the new device.

A client calls it when it starts and when its WebSocket reconnects, so that a prompt missed while offline is shown if the session is still open. GET {home}/v1/me/pairing/{id} returns one session to either participant, or to any device for which the list above would include it; otherwise 404 pairing.not_found.

6.4.3 Join

POST {home}/v1/me/pairing/{id}/join with an empty object body. The server checks, in order: the session exists and is visible to the caller (§6.4.2; otherwise pairing.not_found); it is past expiresAt (pairing.expired, even if the server hasn't yet moved it to expired); it is in state waiting (pairing.already_joined if the missing role is filled, pairing.ended if terminal); the caller can take the missing role (an approver must be enrolled; a new device must be unenrolled; otherwise pairing.role_mismatch). It then records the caller, moves to joined, and sends pairing.updated to both participants and to every device that received pairing.requested for this session (so their prompts disappear). Response 200 with the PairingSession.

6.4.4 Messages

POST {home}/v1/me/pairing/{id}/messages with body:

Member Type Required Meaning
type string Yes cpace_a, cpace_b, confirm_a, payload, ack or abort (§6.6).
body object Yes The type's body.

The server checks, in order: that the caller is a participant (otherwise 404 pairing.not_found, so a non-participant learns nothing about the session); that the session isn't terminal (pairing.ended); that the body is at most 64 KiB for payload and 2 KiB for every other type (core.too_large); and whether the message repeats the caller's most recent message, that is, has the same type and a byte-identical body. A repeat is answered with the original 202 { "n": n } and changes nothing: it is how a client retries after losing the response, which is common on mobile networks. Otherwise the server checks that the type is allowed from this sender in the current state (§6.8). A message that isn't allowed is refused with 409 pairing.out_of_order and ends the session as failed with endReason: "protocol_error". Otherwise it stores the message with the next index n (from 1), answers 202 { "n": n }, relays it to the other participant as pairing.message (§14.1), and applies the state transition.

A client retries a POST …/messages whose response it didn't receive with exactly the same body, and doesn't send its next message until the previous one has been answered with 202 (§6.6.2).

GET {home}/v1/me/pairing/{id}/messages?after={n} returns { "items": [ { "n", "type", "from", "body", "sentAt" }, … ] } for messages addressed to the caller, where from is the sender's did (string) and sentAt the time the server accepted the message. A caller that isn't a participant gets 404 pairing.not_found. It exists for clients whose WebSocket is down; clients poll it at most once per second.

6.4.5 Cancel

POST {home}/v1/me/pairing/{id}/cancel with body { "reason": "denied" | "cancelled" }. denied means the user answered "No, that's not me" to the prompt; any enrolled device that received pairing.requested may send it while the session is waiting. cancelled may be sent by a participant in any non-terminal state (§6.8). The session moves to cancelled with that endReason, and pairing.updated goes to both participants and to prompted devices. Response 200 with the PairingSession. Cancelling a terminal session answers 200 with the unchanged session. A caller that may do neither gets 404 pairing.not_found; denied outside waiting gets pairing.ended or pairing.already_joined.

6.5 What the server can and can't do

The home server relays every message and enforces the order and the limits. It never learns secret, code, the CPace session key or the payload. It can drop, delay or misroute messages (denial of service), and it can try to take part in CPace in place of a device, but each session gives it at most one guess (§6.8), which a client enforces independently (§6.9). §18.2 analyses this.

6.6 The message protocol

6.6.1 CPace roles and inputs

The CPace profile, its inputs, its message encodings and its key confirmation are 04 §11, which this document doesn't restate. The entering device is the CPace initiator and the displayer is the responder (04 §11.2). Each device takes the values 04 §11.3 names from the pairing session:

04 input Taken from
PRS, prs_kind §6.3.3: the credential the entering device was given; the displayer selects the one prs_kind names.
pairing_id (also sid) The session's id, as the 16-byte binary UUID.
address The account's canonical address.
did_initiator, did_responder The did of the entering device and of the displayer, as the session's newDevice and approver record them.

Each device MUST check that the did in the peer's CPaceAD equals the did the session names for the peer (04 §11.3), and abort otherwise. 04 §11.6 gives the output, the 64-byte ISK.

6.6.2 Messages

# type Sent by body members
1 cpace_a Entering device (initiator) cred: "qr" or "code" (04 §11.3 prs_kind 1 or 2); ya: base64url of 04's Ya (32 bytes); ad: base64url of 04's ADa (26 bytes)
2 cpace_b Displayer (responder) yb: base64url of Yb (32 bytes); ad: base64url of ADb (26 bytes); tb: base64url (32 bytes)
3 confirm_a Entering device (initiator) ta: base64url (32 bytes)
4 payload Approver nonce: base64url(12 bytes); ct: base64url(ciphertext) (§6.7)
5 ack New device status: "ok" or "failed"; reason: "verification_failed" or "registration_failed", only with failed; proof: { "nonce", "ct" } (§6.7.3)
— abort Either participant reason: "wrong_code", "verification_failed", "cancelled" or "internal". Carries no CPace data.

These members and their byte values are exactly those of 04 §11.4. A receiver treats an unknown cred or a wrong length as a CPace failure (04 §11.7) and posts abort with verification_failed.

The home server treats these members as opaque apart from the size limit of §6.4.4. A receiver treats an unknown reason as internal.

Processing (04 §11.4 steps 1 to 4 are the CPace part):

  1. The initiator runs 04 §11.4 step 1 with the prs_kind of the credential it was given, sets cred from it, and sends cpace_a.
  2. The responder runs 04 §11.4 step 2 and sends cpace_b. It has now used its only attempt.
  3. The initiator runs 04 §11.4 step 3. On a tag mismatch it sends no CPace message; it posts abort with wrong_code, so that both screens show at once that it didn't work instead of waiting for the 60 s timer. On success it sends confirm_a.
  4. The responder runs 04 §11.4 step 4. On a mismatch it posts abort with wrong_code.
  5. The approver sends payload once its own run is confirmed: when the approver is the initiator, only after confirm_a has been answered with 202, so that the server receives the two in order; when the approver is the responder, after verifying ta and, in direction B, after the step of §6.9.3.
  6. The new device decrypts and validates the payload (§6.7.2), registers its DeviceCertificate (§7 E1), and sends ack.

A device MUST NOT derive the payload key, send payload or act on a received one before its own run is confirmed (04 §11.5). Either device MAY send abort after cpace_a and before ack; before cpace_a, it cancels instead (§6.4.5). On any abort, both devices erase their CPace state (04 §11.7).

6.7 The pairing payload

6.7.1 Keys

K_payload = HKDF-Expand(ISK, "sv1 pair" || 0x00 || 0x01, 32)
K_ack     = HKDF-Expand(ISK, "sv1 pair" || 0x00 || 0x02, 32)
AAD(dir, fromDid, toDid) = "sv1 pair" || 0x00 || u8(dir) || pairingId || fromDid || toDid || lv(addr)

The ISK is used directly as the PRK (04 §8.1 rule 1, §8.4); it already binds pairingId, the account and both device IDs (04 §11.3). dir is 0x01 for the payload (from the approver to the new device) and 0x02 for the ack proof (from the new device to the approver). Each key encrypts once per session, far inside 04 §9.3's bound of 64.

6.7.2 Payload plaintext and checks

The plaintext is a UTF-8 JSON object with the members of the backup payload (§5.2: v, addr, igen, ik, idc, vaultIdKey, vaultKeys, phrase, phraseId, createdAt) plus:

Member Type Required Meaning
approverDid string Yes The approver's did.
newDid string Yes The new device's did.

vaultKeys MUST contain the current generation and MAY contain older ones. The approver encrypts with AEAD-Seal(K_payload, nonce, payload, AAD(0x01, approverDid, newDid)). The approver unwraps the IK only to build this payload and zeroizes it afterwards (§13.1 K-3).

The new device MUST check, and MUST send ack with status: "failed" and reason: "verification_failed" if any check fails:

  • AEAD decryption succeeds;
  • addr is its own account's canonical address; approverDid and newDid match the session;
  • igen equals the igen of a freshly fetched IdentityState of its account, and approverDid is listed active in it;
  • idc equals that IdentityState's idc byte for byte and verifies (07), and the public key derived from ik equals the certificate's ik;
  • vaultKeys is non-empty, phrase decodes to 10 bytes and phraseId to 16 bytes.

6.7.3 The ack proof

The new device encrypts { "v": 1, "status": "ok" | "failed", "did": newDid, "dkf": <thumbprint of its new DSK, or null> } with AEAD-Seal(K_ack, nonce, …, AAD(0x02, newDid, approverDid)) and sends it as proof. The approver shows "Your new device is ready" only after the proof decrypts and says ok. The cleartext status is only for the server's state machine.

6.8 Session state machine (home server)

State Event Action Next state
— Create (§6.4.1) Record the creator; prompt if the creator is the new device waiting
waiting Join (§6.4.3) Record the joiner; pairing.updated joined
waiting cancel with denied from a prompted enrolled device Delete bodies; pairing.updated cancelled (denied)
any non-terminal cancel with cancelled from a participant Delete bodies; pairing.updated cancelled (cancelled)
joined cpace_a from the entering device Relay exchanging
exchanging cpace_b from the displayer, after cpace_a Relay exchanging
exchanging confirm_a from the entering device, after cpace_b Relay; set confirmedAt; expiresAt = confirmedAt + 5 min confirmed
confirmed payload from the approver Relay delivered
delivered ack from the new device, status: "ok" Relay; delete stored message bodies completed (endReason: "completed")
delivered ack with status: "failed" Relay; delete bodies failed (endReason: "registration_failed" when reason is registration_failed, otherwise protocol_error)
exchanging, confirmed, delivered abort from a participant Relay; delete bodies failed (endReason = wrong_code for wrong_code, cancelled for cancelled, protocol_error otherwise)
any non-terminal A byte-identical repeat of the sender's most recent message (§6.4.4) Answer with the original n; nothing else unchanged
any non-terminal Any other message not allowed by this table Refuse with pairing.out_of_order; delete bodies failed (protocol_error)
waiting, joined, exchanging Now > createdAt + 10 min Delete bodies expired
exchanging No expected message within 60 s of the previous one Delete bodies failed (timeout)
confirmed, delivered Now > confirmedAt + 5 min Delete bodies failed (timeout)
any non-terminal The account's identity is reset or downgraded Delete bodies cancelled (identity_changed)
any non-terminal Either participant's device is revoked or signs out (05) Delete bodies cancelled (device_revoked)

Every transition sends pairing.updated to both participants. Each session allows exactly one cpace_a, one cpace_b and one confirm_a: this is the one attempt of D-053 (04 §11.7). A repeat of the same bytes isn't a second attempt. In confirmed there is no 60 s step timer, because the approver may wait for the user's confirmation (§6.9.3); the 5-minute finishing deadline applies instead. The server keeps a terminal session's metadata (not its message bodies) for 24 h and then deletes it.

6.9 Client procedures

Both devices MUST enforce one attempt themselves, whatever the server does: a displayer runs CPace at most once with a given secret and code and then discards them; an entering device runs CPace at most once per credential it was given. A new attempt always needs a new session and new credentials. A device takes part in pairing, as approver or as new device, only subject to the 02 §10.6 check of §3.2.

6.9.1 New device, direction A

  1. POST /v1/me/pairing with displayer: "new_device". Generate secret and code; show the QR code, the code, and "Approve from your other device" (M5). Offer, as secondary actions: "Use recovery key instead" (§5.8) and "Show the code on my other device instead" (cancel and recreate with displayer: "enrolled_device", §6.9.3).
  2. On pairing.updated with state joined, show "Continue on your other device" with the approver's name.
  3. On cpace_a: run 04 §11.4 step 2 as responder (checking ADa against the session, selecting PRS by prs_kind); send cpace_b; discard secret and code from the display.
  4. On confirm_a: run 04 §11.4 step 4; on failure send abort (wrong_code).
  5. On payload: decrypt and check (§6.7.2); persist the keys; run §7 E1; send ack; continue with §7.

6.9.2 Approver, direction A

  1. On pairing.requested, or a session found by GET /v1/me/pairing at start, show the prompt (M5): "Is this you signing in on {name}?" with the sign-in provider and time, and the buttons "Yes, approve" and "No". The prompt is shown on every enrolled device; it disappears when another device joins or the session ends. It replaces a W4d notice for the same new device (05 §12.12, D-084).
  2. "No": cancel with denied. The client then shows (copy in 20 §12.3), on the same screen and without any warning, one action, "Sign out that device", which revokes the new device's did through 05 (POST /v1/me/devices/{did}/revoke, with fresh authentication if 05 §9 asks for it), and a link to the account's linked sign-in providers (05 §10; the same place as 07 §18.1's "This wasn't me").
  3. "Yes, approve": join; open the scanner, with "Type the code instead".
  4. (An approver whose user opened the scanner without seeing the prompt, and scanned a direction-A QR code, first joins the session named by its pairingId.) After a scan, check that the QR payload's pairingId is this session, displayer is 0x01 and addr is this account; otherwise show "That code is for a different sign-in" and let the user scan again (nothing has been sent, so no attempt is used).
  5. Run CPace as initiator (§6.6.2 steps 1, 3), then send payload (step 5).
  6. On ack with a valid ok proof, show "Your new device is ready". The approving device records the approved did in its local own-identity state and doesn't show W4c for it (07 §18.3, §18.4).

6.9.3 Direction B

  • Started on the enrolled device ("Add a device" in settings): POST /v1/me/pairing with displayer: "enrolled_device". Show the QR code and code with the instruction "Enter this only on your own new device". On the new device, the user signs in (pre-filled from a scanned QR's addr if the user scanned first) and chooses "Scan or type a code from my other device".
  • Started on the new device ("Show the code on my other device instead"): the new device creates the session with displayer: "enrolled_device"; the approver's prompt (§6.9.2 step 1) leads, after "Yes, approve", to join and then to showing the QR code and code.
  • New device: after a scan, it joins the session named by pairingId (if it isn't already in it). After a typed code, it uses the session it created, or the one session returned by GET /v1/me/pairing; if there are several, it shows their approver names and lets the user pick. It then runs CPace as initiator, waits for payload, and continues as §6.9.1 step 5.
  • Approver: as soon as the session is joined, it replaces the instruction under the QR code with the joined device's DeviceSummary ("Connecting to Chrome · Windows, signed in with Google at 18:30") and a "Cancel" button, so the user can see which device is about to receive the keys. It runs CPace as responder (§6.6.2 steps 2, 4). After verifying ta, it SHOULD ask one tap, "Send to Chrome · Windows?" ("Send" or "Cancel"), and then sends payload, encrypted for the did that CPace bound (§6.7.1). The success screen names that device. The tap is part of M5, not a warning. It records the receiving did and doesn't show W4c for it, as in §6.9.2 step 6. While it shows its code, it holds W4d for new sign-ins and drops it for the device that joins (05 §12.12).

Rationale: in direction B, whoever joins first receives the identity key. Showing the joined device, and asking before sending, means a person who saw the code over a shared screen or was told it by the user still has to get past the user looking at their own screen.

6.10 Limits

Limit Value Error
Session creations per account 5 per rolling hour (D-053) 429 core.rate_limited, data.policy: "pairing.create", with retryAfterMs
Open (non-terminal) sessions per account 3 429 core.rate_limited, data.policy: "pairing.open"
Open sessions per creating device 1 (a new one supersedes the old) —
Credential lifetime 10 min from creation, and one CPace attempt —
Message size 64 KiB for payload, 2 KiB for other types core.too_large
Bots Not supported pairing.unsupported_client

6.11 User experience on failure

Every failure (wrong code, timeout, expiry, cancellation by the other side) shows on both devices the same plain result, "That didn't work", with one button, "Try again", which starts a new session. A denied session shows on the new device "Your other device said no". None of these are warnings (D-055). When core.rate_limited is returned with data.policy pairing.create or pairing.open, the client says when the user can try again, from retryAfterMs, and offers the recovery key instead.

6.12 Edge cases

Case Behaviour
The account has no enrolled device (all lost) pairing.requested reaches nobody. The device-setup chooser (§12.3) defaults to "Use recovery key" when the account's IdentityState lists no active device other than this one.
Two enrolled devices answer the prompt The first join wins; the second gets pairing.already_joined and closes its prompt.
The new device is already enrolled (for example it restored from the backup in parallel) Its join or create as new device gets pairing.role_mismatch; an open session it created is cancelled when it becomes enrolled.
An identity reset happens mid-session The server cancels the session (identity_changed). If a payload was already delivered, the new device's check against IdentityState (§6.7.2) fails and it discards the keys.
The approver's vault was rotated between confirmed and payload Harmless: the approver builds the payload when it sends it, with the vault keys it holds then. A new device that receives an older generation fetches newer ones by its grant or the backup path (§10.6).
The QR code is scanned by a device signed in to a different account The addr check fails before any message is sent; no attempt is used.
The WebSocket of either device is down It polls GET …/messages and GET …/{id}; the 60 s step timer still applies.

7. Completing enrolment

A device that has received the identity key by pairing (§6.9) or from the KeyBackup (§5.8) completes enrolment with these steps. The interrupted action (a G2 card) resumes after E1, because from then on the device is enrolled; the other steps run in the background.

Step Action
E1 Generate the device's DSK (non-extractable where possible, §13.1 K-5) and box key. Issue the DeviceCertificate for its own did, naming its DSK and its box key (dbk), under the received IK (07), and register it: POST {home}/v1/me/identity/devices (07). The home server publishes IdentityState with this device listed and sends identity.changed (07, 06). Then zeroize the unwrapped IK (§13.1 K-3).
E2 Upload the box key: PUT {home}/v1/me/vault/box-keys/{did} (§10.1).
E3 GET {home}/v1/me/vault/keys. Check the received vault key against its generation's kcv; if the received key is older than the current generation, obtain the current one (§10.6), which includes verifying that generation (§10.2.1). Derive older generations from the links as needed (§10.2).
E4 Sync the eager record types (recovery, settings, pin, sec_pin) from the change feed starting at 0 (§8.8). If the recovery record's phraseId differs from the received one, keep the phrase whose phraseId the active KeyBackup has (§8.9.4).
E5 Publish KeyPackages, including a last-resort KeyPackage (13).
E6 Join the account's secure groups by external commit (13): DMs from the DM index (12) and channels from the community list (09), each when first opened or in the background.
E7 Fetch key archive records lazily, per context (§8.10).
E8 From now on, append every history key it learns, and every shared message key it accepts, to the key archive (§9.3, §9.5, 14 §12).

If E1 fails with a conflict that shows the identity changed (07), the device discards everything it received and returns to the device-setup chooser. If E2 to E8 fail, the device retries in the background with backoff; it is enrolled regardless. The user's other signed-in devices, enrolled or not, show W4c, except the approving device (07 §18.3). Contacts and channel members see nothing (D-006).

Within one identity generation, a did is bound to one DSK: a device MUST NOT register a DeviceCertificate for its did with a different DSK in the same igen (07 answers identity.device_conflict). A device that lost its DSK in the current igen (for example its local key store was erased) MUST sign out (ending its device record, 05) and sign in again to get a new did before it enrols (§13.6). After an identity reset, a device keeps its did and certifies a new DSK under the new igen (§11.2, §11.4; 07 §3.2 item 3), and its new leaf replaces the old one as 07 §10.2 L4 allows.

8. The AccountVault

The AccountVault is per-account encrypted storage on the home server (D-054). Every record is encrypted on a device under a vault key; the home server stores ciphertext, a few cleartext labels needed for listing (§8.3) and version counters.

8.1 Model

  • A vault belongs to one account and one identity generation igen. An upgrade (§3) or reset (§11) creates a new, empty vault for the new igen. The previous generation's vault becomes retired (§8.12).
  • A vault has vault key generations vgen = 1, 2, … (§10). Each record says which generation encrypted it. New records always use the current generation.
  • A vault holds records, each identified by a 16-byte record ID rid (§8.5) and carrying a version ver (from 1, increased by 1 on each write or delete of that rid). Every write is a compare-and-set on ver, so the writer knows the version it creates (ifVer + 1, §8.7.3) and binds it into the ciphertext (§8.4).
  • Every write and delete gets the next value of the vault's change sequence vseq (from 1, gap-free per vault), which drives sync (§8.8).
  • Only devices listed active in the account's current IdentityState, and for a bot account the bot's token, may call /v1/me/vault… endpoints. Any other session gets 403 security.device_not_enrolled.

8.2 Keys and derivations

K_rec(g, rid)     = HKDF-Expand(K_vault(g), "sv1 vault" || 0x00 || 0x01 || rid, 32)           ; record key
K_link(g, l)      = HKDF-Expand(K_vault(g), "sv1 vault" || 0x00 || 0x02 || u32(l), 32)        ; link key (§10.2)
kcv(g)            = HKDF-Expand(K_vault(g), "sv1 vault" || 0x00 || 0x03, 32)[0..8]            ; key check value

l is the generation a link wraps: g − 1, except after the recovery of §10.5.3. kcv(g) is the first 8 bytes of a 32-byte output, which equals an 8-byte HKDF-Expand with the same info. kcv(g) is public (the server stores it, and the generation signature covers it, §10.2). It lets a device detect that it holds the wrong key for a generation before writing anything. A per-record key means no single AES-GCM key encrypts more than a few versions of one record, so random nonces stay far inside their bounds however large the vault grows.

8.3 The VaultRecord wire object

Member Type Set by Meaning and constraints
rid string Client base64url of the 16-byte record ID (22 characters).
type string Client Record type (§8.6). Grammar [a-z][a-z0-9_]{0,31}. The server treats it as an opaque label; clients ignore records of unknown types.
bucket string or null Client base64url of a 16-byte bucket tag (§8.5), or null. Only archive and shared_keys records carry one.
igen integer Client MUST equal the vault's igen.
vgen integer Client The generation whose key encrypted this version.
nonce string Client base64url of 12 bytes. Absent on tombstones.
ct string Client base64url of the AES-256-GCM ciphertext and tag. Decoded length at most maxVaultRecordBytes (§16). Absent on tombstones.
ver integer Server Version of this record.
vseq integer Server Change sequence of this version.
deleted boolean Server true for a tombstone.
updatedAt string Server RFC 3339.
updatedBy string Server did of the writing device.

8.4 Record encryption

AAD = "sv1 vault" || 0x00 || 0x01 || rid || lv(type) || u32(igen) || u32(vgen) || u32(ver) || lv(addr)
ct  = AEAD-Seal(K_rec(vgen, rid), nonce, UTF-8(plaintext JSON), AAD)

addr is the account's canonical address and ver the version this write creates (ifVer + 1, §8.7.3). A reader decrypts with the ver the server reports for the record, so a ciphertext served under any other version fails to decrypt. Every plaintext is a JSON object whose member t equals type. A reader MUST check that t equals the record's type, that the record's rid equals the ID it recomputes from the plaintext (§8.5), and, for a record with a bucket, that the bucket recomputes from the plaintext's host and ctx; a record that fails any check, or fails to decrypt, is ignored and reported as a diagnostic (§16.4), never shown to the user.

A reader MUST NOT replace a record it holds with a version whose ver is lower than the highest ver it has accepted for that rid.

Rationale: binding rid, type and ver into the AAD and checking that rid and bucket recompute from the content stops the home server from moving a valid record to another ID or bucket (for example presenting one contact's pin as another's) and from replaying an older version as if it were newer to a device that has seen the newer one. §18.5 states what remains.

8.5 Record IDs and buckets

VID(input) = HMAC-SHA256(K_vid, "sv1 vault id" || 0x00 || input)[0..16]
Record rid input bucket input
archive `lv("archive")
shared_keys `lv("shared_keys")
pin `lv("pin")
sec_pin `lv("sec_pin")
settings `lv("settings")
recovery lv("recovery") —

groupId is the MLS group_id string (00 §7.6), which includes the group generation; host is the hosting server's canonical domain, ctx the context reference, contactAddr the pin's addr (07 §16.1), and every address canonical. VID is an HMAC truncated to 16 bytes, as 04 §8.2 and §8.4 allow for sv1 vault id. Because the ID of an archive record depends only on (groupId, epoch), two devices that learn the same history key write the same record, and the writes merge (§8.9). K_vid never rotates within an identity generation, so IDs stay stable across vault generations.

The home server sees rid, type, bucket, sizes and timing, but can't tell which context, contact or setting a record is about.

8.6 Record types

type One per Plaintext Downloaded Semantics owned by
archive (group, epoch) §9.1 Lazily, per bucket 14 (keys), 08 (format)
shared_keys (context, HistoryShare, part) §9.5 Lazily, per bucket 14 (keys), 08 (format)
pin Contact address §8.6.2 Eagerly 07
sec_pin Secure channel, community or group DM seen §8.6.3 Eagerly 09 (D-056; the group DM kind's semantics are 12's)
settings Setting name §8.6.4 Eagerly The setting's owner
recovery Account (one record) §8.6.5 Eagerly 08

8.6.1 archive

The key archive record. Its format and rules are in §9.

8.6.2 pin

The identity pin and verification state of one contact (07, D-054). The plaintext is 07's pin record (07 §16.1: addr, inc, state, ik, igen, ver, kind, pendingIk and the rest) with one added member, t: "pin". 07 owns every member other than t, their meaning and their merge (§8.9.2). The record's rid is computed from 07's addr (§8.5). A record for a new account at the same address replaces the earlier one under the same rid (07 §16.3, D-086). A writer that rewrites a record MUST keep members it doesn't understand from the version it is updating.

8.6.3 sec_pin

The client's record that a channel, community or group DM was seen as secure (D-056, 12 §11.1), so that every device of the user can raise W9 on a later downgrade. The plaintext is 09's channel pin, community pin or group DM pin (09 §13.2), which already carries t: "sec_pin". 09 owns every member, its meaning, the treatment of an unknown kind, and the merge (§8.9.3). This document uses only host and ctx (null for a community pin) to compute the rid (§8.5).

8.6.4 settings

Member Type Meaning
t string "settings"
name string Setting name, [a-z][a-z0-9_]{0,63}.
value any JSON Defined by the setting's owner.
updatedAt string For merging.

Initial setting names: w1_seen (owner 20: array of community canonical domains for which W1 was already shown, so it is shown once per community across devices; merged by set union, 20 §3.1.4), mention_hints (owner 11: boolean, default true, the user's choice under D-063), typing_indicators (owner 11: boolean, default true, 11 §10.3), and client_prefs (opaque per-client preferences, owner: the client). Other documents MAY add names. A setting's owner MAY define its merge function (§8.9.4). A setting that the home server must enforce doesn't belong here, because the server can't read it.

8.6.5 recovery

One record per vault. It lets every enrolled device show the current recovery key (§4.5), even after another device made a new one (§4.6), and carries the W8 state (§4.7).

Member Type Meaning
t string "recovery"
phrase string base64url of the current E.
phraseId string base64url of its 16-byte phrase ID (§1.3).
reason string Why this phrase was made: new (an upgrade or reset), replaced (the user made a new recovery key, §4.6) or lost_or_stolen (§10.8). Unknown values are treated as replaced.
createdAt string When this phrase was made.
savedAt string or null When the user first completed a save option for this phrase.
saveMethod string or null password_manager, print or shown. Unknown values are kept and treated as saved.
lastNudgedAt string or null When a W8 banner was last shown for this phrase.

8.6.6 shared_keys

The message keys of one part of one HistoryShare that another member shared with the user (14 §7). Its format and rules are in §9.5.

8.7 Endpoints

Method and path Purpose
GET {home}/v1/me/vault Summary.
GET {home}/v1/me/vault/records List records.
GET {home}/v1/me/vault/records/{rid} Read one record.
PUT {home}/v1/me/vault/records Write up to 100 records.
DELETE {home}/v1/me/vault/records/{rid}?ifVer={n} Delete one record.
GET {home}/v1/me/vault/changes?since={vseq}&limit={n} Change feed.
GET, POST {home}/v1/me/vault/keys Generations, links, rotation (§10).
GET, PUT {home}/v1/me/vault/box-keys… Box keys (§10.1).
GET, POST {home}/v1/me/vault/grants Grants (§10.3).

Every endpoint operates on the vault of the current igen, except where igen is given as a query parameter for a retired vault (§8.12).

8.7.1 Summary

GET {home}/v1/me/vault returns:

{
  "igen": 1,
  "vgen": 2,
  "rotationPending": false,
  "vseq": 18422,
  "recordCount": 9311,
  "bytesUsed": 2311840,
  "quotaBytes": 268435456,
  "retired": [ { "igen": 0, "expiresAt": "2026-12-30T09:00:00.000Z" } ]
}

vgen is 0 and the vault is uninitialized until generation 1 has been created (§10.5.1). While uninitialized, every record and grant endpoint answers 409 vault.not_initialized.

8.7.2 Listing and reading

GET {home}/v1/me/vault/records takes the optional query parameters type, bucket, igen (a retired generation), cursor and limit (1 to 500, default 100), and returns the collection page of 00 §7.10: { "items": [VaultRecord…], "nextCursor": … }, ordered by rid. Tombstones aren't listed. GET …/records/{rid} returns one VaultRecord or 404 core.not_found (tombstones also give 404).

8.7.3 Writing

PUT {home}/v1/me/vault/records with body { "records": [ … ] }, 1 to 100 items, each:

Member Type Required Meaning
rid, type, bucket, igen, vgen, nonce, ct — Yes (bucket may be null) As §8.3.
ifVer integer Yes 0: create; no record or tombstone may exist for the rid. n > 0: replace; the current ver (of a record or of its tombstone) must be n. The stored version becomes ifVer + 1, which the writer has already bound into ct (§8.4).

A writer recreating a deleted record uses the tombstone's ver as ifVer; if it doesn't know it, its ifVer: 0 write fails with vault.version_conflict carrying data.currentVer and data.deleted: true, and it re-encrypts and retries. The server checks the whole request first (sizes, igen, the vault is initialized) and refuses it entirely on a request-level error. It then applies each record independently and atomically, and answers 200 with one result per item, in order:

{
  "results": [
    { "rid": "4vooBBFj0AiQfNuN3WVipw", "ok": true, "ver": 1, "vseq": 18423 },
    { "rid": "FB42kmZHqbgiFQclRh84sg", "ok": false,
      "error": { "type": "urn:sloppyv:error:vault.version_conflict", "code": "vault.version_conflict",
                 "title": "Record changed", "status": 409, "retryable": true, "userAction": "none",
                 "data": { "currentVer": 4 } } }
  ],
  "vseq": 18423
}

Per-record errors: vault.version_conflict (with data.currentVer), vault.stale_generation (the record's vgen isn't the current generation; with data.vgen), vault.rotation_required (§10.4), vault.record_too_large, vault.quota_exceeded. A vgen above the current generation is a request-level core.invalid_request.

8.7.4 Deleting

DELETE {home}/v1/me/vault/records/{rid}?ifVer={n} replaces the record with a tombstone (ver = n + 1, a new vseq, deleted: true, no ct) if its ver is n, and answers 200 with the tombstone; otherwise 409 vault.version_conflict or 404 core.not_found. The server keeps tombstones for 30 days, then removes them; after that the rid's versions start again at 1. Clients delete archive and shared_keys records only as §8.11 and 14 §12.6 allow, pin and sec_pin records only as their owners allow (07 §16, 09 §13.3 rule 4), and never the recovery record.

8.8 Sync

GET {home}/v1/me/vault/changes?since={vseq}&limit={n} (limit 1 to 500, default 200) returns, in vseq order, the current version of every record (including tombstones) whose vseq is above since, at most limit of them:

{ "items": [ { "rid": "4022j2siU87k0hpPay0xHQ", "type": "recovery", "bucket": null, "igen": 1, "vgen": 2,
               "nonce": "…", "ct": "…", "ver": 3, "vseq": 18420, "deleted": false,
               "updatedAt": "2026-12-04T18:41:00.002Z", "updatedBy": "q2bS9xVg3m0yJpQe1vT0Aw" } ],
  "vseq": 18420, "headVseq": 18422, "hasMore": false }
  • vseq is the cursor: the vseq of the last item returned, or since when there are no items. A client continues with since = vseq while hasMore is true, and stores vseq when it stops.
  • headVseq is the vault's newest vseq when the response was built (informative).
  • The optional type parameter (repeatable) names the types whose nonce and ct the client wants. Records of other types are still returned, as headers only (rid, type, bucket, igen, vgen, ver, vseq, deleted, updatedAt, updatedBy), so the cursor never skips a change and the client still learns which archive buckets became stale (§8.10). Devices normally call the feed with type set to the eager types.
  • If since is older than the oldest change the server can still report (tombstones expire after 30 days), the server answers 410 vault.changes_expired. The client then (1) reads the summary, GET …/vault, and remembers its vseq as V, (2) lists the types it keeps eagerly (§8.7.2) and replaces its local copy, marking every archive bucket stale, and (3) continues the feed from V. Reading V before listing means a write that lands during the listing is fetched again rather than lost.

Every enrolled device keeps the last vseq it processed. When a record is written or deleted, the home server sends vault.changed (§14.3) to the account's enrolled devices with an open WebSocket, other than the writer; it carries the new vseq and the changed rids, types and buckets. A device fetches the changes feed at once, applies the eager types, and records changed archive buckets as stale without fetching them (§8.10). A device that reconnects calls the changes feed from its stored vseq.

8.9 Conflict handling and merge rules

Writes are compare-and-set on ver. A device that gets vault.version_conflict fetches the current record, decrypts it, merges as below, and writes again with ifVer = the fetched ver, encrypting for the version ifVer + 1 (§8.4). If nothing changed after merging, it doesn't write. It retries at most 5 times with 0–500 ms of random jitter, then gives up until the next sync.

8.9.1 archive

The keys entries are merged one by one, applying 14 §12.5 to each entry:

  1. Entries with the same ekid are one entry: source is mls if either is, confirmed is true if either is, and learnedAt is the earlier.
  2. Entries with different ekids are all kept: a merge never removes one because another exists (14 §12.5). Two mls entries with different ekids are fork evidence, which 14 §6.6 resolves; the device reports the diagnostic.
  3. At most 4 entries. On overflow, entries whose source isn't mls (§9.1) are dropped first, unconfirmed before confirmed and, among those, the latest learnedAt first; an mls entry is never dropped. If the record already holds 4 mls entries, the device doesn't add its own and reports the diagnostic.

A device whose merge changes nothing skips the write.

8.9.2 pin

07 §16.6 defines the merge. There is no fallback rule in this document.

8.9.3 sec_pin

09 §13.2 ("Merging") defines the merge. A pin is never weakened by a merge.

8.9.4 settings and recovery

settings: a setting's owner MAY define its merge function in its own text (for example w1_seen: set union, 20 §3.1.4). For a setting whose owner defines none, the later updatedAt wins; on equal updatedAt, the version with the larger updatedBy did (byte order) wins.

recovery: the record whose phraseId equals the active KeyBackup's phraseId (GET …/backup?part=meta) wins entirely, because only that phrase opens the backup. If both or neither match, the later createdAt wins, and on equal createdAt the larger phraseId (byte order). When both versions carry the same phraseId, they are merged member by member: savedAt is the earliest non-null value, saveMethod comes with it, and lastNudgedAt is the latest non-null value. A device that holds a phrase different from the winning record's replaces its local E, phraseId and cached BK with the winner's (it re-derives BK when it next needs it).

8.9.5 shared_keys

The keys arrays are united by mid. Two entries with the same mid carry the same key, because each writer accepted it only after the key-commitment check of 14 §7.8; if they differ, the device keeps the entry whose key passes that check against the SealedMessage, and sends 14's diagnostic history_share with step item (14 §9.4). The other members are fixed when the record is first written. A device whose merge changes nothing skips the write.

8.10 Lazy per-context download

A device doesn't download the key archive at enrolment. Instead:

  1. When it needs a history key it doesn't hold (opening a secure context, scrolling back, decrypting a reported or quoted message), it computes the context's bucket and calls GET …/records?bucket={bucket}, which returns the context's archive and shared_keys records, following nextCursor until done, and caches the result as the bucket's state with the current vseq.
  2. Later vault.changed events that name the bucket mark it stale; the device refetches it the next time it needs it.
  3. A device MAY prefetch buckets in the background when it is on an unmetered network and charging, starting with the contexts most recently used.
  4. The archive is the only source of earlier keys for the user's own devices (14 §10.4): nothing hands keys to newcomers (D-007 as revised), and the archive needs no other member to be online.

8.11 Quota and size

The home server enforces maxVaultBytes per account (the sum, over current records and retired vaults, of each record's decoded ct length plus 256 bytes) and maxVaultRecordBytes per record (§16). When a write would exceed the quota it fails with vault.quota_exceeded. The client then, without telling the user:

  1. deletes archive and shared_keys records of contexts the account is no longer a member of, oldest first;
  2. if that isn't enough, stops writing new archive and shared_keys records and records a diagnostic. Until space returns, keys learned in that time reach the account's other and future devices only if those devices learn them themselves.

It never deletes pin, sec_pin, settings or recovery records to make room. Step 2 is the one case in which a device doesn't append a key that 14 §12.2 and §12.3 say it must; it applies only while the vault is full, and appends resume when space returns.

8.12 Retired vaults

When an identity reset (07) creates a new igen, the home server marks the previous vault, with its generations, links and records, as retired: read-only, listed in the summary's retired member with an expiresAt 30 days after the reset, and readable by enrolled devices of the new identity with the igen query parameter on GET …/records, GET …/records/{rid} and GET …/keys. After expiresAt the server deletes it, and requests for it answer 410 vault.retired_expired. A downgrade to insecure (D-019) and account deletion (05) delete every vault, current and retired, at once. §11.4 says who can use a retired vault.

Proposed decision: after a reset the previous identity generation's vault is kept read-only for 30 days, then deleted; a downgrade deletes it at once. Rationale: see below and OQ-08-3.

Rationale: after "Start fresh", the user sometimes finds the old phone the next day. The retired vault lets that phone, once paired to the new identity, carry the user's old pins and history keys over (§11.4). Nobody else can read it, because nobody else holds the old vault keys.

9. Key archive records

The key archive is the set of archive records in the AccountVault. It holds every history key any of the user's enrolled devices has learned, so a new device of the user can read everything the user could read, in every secure context (D-007, D-054, HP-4). It also holds, in shared_keys records, the message keys other members shared with the user (§9.5, 14 §7). 14 defines what a history key is and when a device must append one; this section defines the records.

9.1 Plaintext

Member Type Required Meaning and constraints
t string Yes "archive"
host string Yes Canonical domain of the context's hosting server.
ctx string Yes Context reference (ch:…, dm:… or gdm:…).
groupId string Yes The MLS group_id (00 §7.6).
gen integer Yes The group generation, the last field of groupId, 1 to 2,147,483,647 (13 §4.1). A reader checks that they agree.
epoch integer Yes The epoch number, 0 to 2^53 − 1.
keys array Yes 1 to 4 key entries (below), with distinct ekids. More than one entry exists only when devices learned different keys for the same epoch: a fork, which ekid exposes (14 §6.6).

A key entry:

Member Type Required Meaning and constraints
ekid string Yes base64url of the 8-byte ekid of the key (14).
key string Yes base64url of K_hist (32 bytes).
source string Yes mls: the key came from the writer's own MLS processing (14 §3.1). v1 writers write only mls. The value recovered is reserved: it named keys recovered through history links, which the revised D-007 removed. A reader treats recovered or any unknown value as a key that isn't from MLS, never as mls.
confirmed boolean Yes Whether the key has decrypted a verified SealedMessage (14 §3.7). Always true for mls.
learnedAt string Yes RFC 3339 time the key was first learned.

14 §12.1 says how each member is filled. source and confirmed are kept per key so that a merge keeps the stronger entry (§8.9.1) and a reader treats the key as 14 §12.4 says. The record's rid is computed from (groupId, epoch) and its bucket from (host, ctx) (§8.5). The record holds no MLS secrets, no message keys, no attachment keys and no plaintext: everything else a reader needs is derived from key (14). Message keys that others shared with the user are kept in shared_keys records (§9.5).

9.2 Example

{
  "t": "archive",
  "host": "b.com",
  "ctx": "ch:01938a11-2b3c-7d4e-8f90-112233445566",
  "groupId": "sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1",
  "gen": 1,
  "epoch": 42,
  "keys": [ { "ekid": "D5RG_xNqInY", "key": "4OHi4-Tl5ufo6err7O3u7_Dx8vP09fb3-Pn6-_z9_v8",
              "source": "mls", "confirmed": true, "learnedAt": "2026-12-04T18:22:31.512Z" } ]
}

9.3 Writing

  • Every enrolled device appends every history key it learns, under the rules of 14. Bots MAY.
  • A device batches appends: it writes within 60 s of learning a key, or as soon as 100 keys are pending, in one PUT …/records with ifVer: 0 for records it doesn't know to exist.
  • It keeps a local set of rids known to exist (from its own writes, the change feed and bucket downloads) and doesn't rewrite a record whose entry for the same ekid is already at least as strong (§8.9.1).
  • On vault.version_conflict it merges (§8.9.1). On vault.rotation_required it rotates (§10.5.2) or waits for another device to, and retries. On vault.quota_exceeded it follows §8.11.
  • Appends never wait on the user and never produce a prompt (00 §4.12.5).

9.4 Reading

To obtain K_hist(e) of group groupId when a SealedMessage names ekid = x (14):

  1. Look in the device's own key store.
  2. Otherwise compute rid(groupId, e); if the context's bucket isn't cached or is stale, download it (§8.10); look up the record.
  3. For each entry with ekid = x, recompute HKDF-Expand(key, "sv1 ekid", 8) (14) and use the entry only if it equals x.
  4. If no entry qualifies, the account holds no key for that epoch, and the item is unavailable unless a shared message key opens it (§9.5, 14 §6.3).

The device stores a key obtained from the archive locally, with key-store source archive (14 §3.7) and the entry's confirmed (14 §12.4), and doesn't write it back: it is already archived (14 §12.2).

9.5 Shared message keys (shared_keys records)

A device that accepts a HistoryShare addressed to its account (14 §7.8) writes the verified message keys as shared_keys records, so that the account's other and future devices can read the shared messages. Only the devices that had a leaf when the share was made received its key wrap (14 §7.5); these records carry the keys to the rest (D-007, D-054).

Member Type Required Meaning and constraints
t string Yes "shared_keys"
host string Yes Canonical domain of the context's hosting server.
ctx string Yes Context reference (ch:…, dm:… or gdm:…).
shareId string Yes The HistoryShare's shareId (14 §7.4).
part integer Yes 0 to 156: which 32 bundle items this record covers (below).
sharer string Yes Canonical address of the sharing account, for K7 (14 §7.9).
keys array Yes 1 to 32 entries {"mid": string, "k": string}: a message ID and the base64url of its 32-byte K_msg, each verified as 14 §7.8 requires. Distinct mids.
  • Part p covers the bundle's items at positions 32p to 32p + 31, in the bundle's order (14 §7.5). A device writes only the keys it verified; a part whose keys all failed isn't written.
  • The rid is computed from (host, ctx, shareId, part) and the bucket is the context's archive bucket (§8.5), so a lazy bucket download (§8.10) fetches both kinds.
  • Writing follows §9.3: batched within 60 s, ifVer: 0 for new records, the merge of §8.9.5 on conflict, and §8.11 on quota.
  • Reading: when a SealedMessage can't be opened with a history key, the device looks for its mid in the context's shared_keys records and uses the key as 14 §6.3 says; it still checks the signature and kc before showing anything.
  • A record of 32 keys stays under 4 KiB of ciphertext (§16.1) for any canonical host and address.

Example plaintext (the share of 14 §16.5):

{"t":"shared_keys","host":"b.com","ctx":"ch:01938a11-2b3c-7d4e-8f90-112233445566","shareId":"01938f50-1a2b-7c3d-8e4f-5a6b7c8d9e0f","part":0,"sharer":"bob@b.com","keys":[{"mid":"01938f30-1b2c-7d4e-8f90-a1b2c3d4e5f6","k":"RcGQTFFq87zin5lB4O8IqGTvrrJqOEDhVj516H4_HKQ"}]}

10. Vault key generations

A vault key generation changes after any of the account's devices is revoked, so that the revoked device can't read anything written to the vault afterwards (D-054). The old generations stay readable through links.

10.1 Box keys

Every enrolled device has a box key, an X25519 key pair generated by the device (§3.3 U2, §7 E1, §11.2 S2) and never exported. It is used only to receive keys sealed to this one device with HPKE (04 §9.8): new vault keys (§10.3) and the K_share of a HistoryShare (14 §7.5). Its public part is the dbk claim of the device's DeviceCertificate (07), so the identity key certifies it and other members of a secure context read it from the device's MLS leaf (13 §3.3). A device uploads its public box key, as a BoxKey object, right after it is enrolled (§3.3 U7, §7 E2):

PUT {home}/v1/me/vault/box-keys/{did} with the BoxKey object:

Member Type Meaning
did string The device's ID. MUST equal the path and the session's device.
igen integer Current identity generation.
pub string base64url of the 32-byte X25519 public key. Equal to the x member of devcert's dbk claim (07 §4.1).
devcert string The device's DeviceCertificate JWS (07).
sig string base64url of the labelled signature (00 §7.14, 04 §7) by the device's DSK with label vault-box-key over the BoxKeyTBS below.
createdAt string Set by the server.
struct {
    uint8  version;      // 1
    opaque addr<V>;      // the account's canonical address
    opaque did[16];      // the device ID, binary
    uint32 igen;
    opaque pub[32];      // the X25519 public key
} BoxKeyTBS;             // = u8(1) || lv(addr) || did || u32(igen) || pub

The server checks that devcert's did is the session's device and that the thumbprint of its dsk equals the dkf listed for that device in the current IdentityState, that pub equals the x member of devcert's dbk claim, verifies sig with that dsk, and stores the BoxKey (replacing any earlier one for this did). On failure: 400 vault.invalid_box_key. Response 200 with the stored object.

GET {home}/v1/me/vault/box-keys returns { "items": [BoxKey…] } for the devices listed active in the current IdentityState. When a device is revoked or signs out (05), or the identity is reset, the server deletes its box key and grants.

A device that verifies another device's box key (§10.5.2 V3, §10.7) MUST check: devcert verifies under the account's identity key (which the verifier holds) with igen equal to the current one; the device is listed active in a fresh IdentityState of its own account (07) with a dkf equal to the thumbprint of devcert's dsk; pub equals the x member of devcert's dbk claim; and sig verifies under that dsk. It skips a device whose box key fails.

Proposed decision: new vault generations reach the remaining devices through per-device X25519 box keys and HPKE grants, not through the KeyBackup. Rationale: it lets a new recovery phrase (§10.8) and a new vault generation be rolled out together without the remaining devices needing the new phrase first. 04 §2.1, §9.8 and §14.1 include HPKE and box keys in sv1-c1.

Rationale: the home server can't substitute its own box key, because the box key is named in a DeviceCertificate that the identity key signed (dbk) and is signed by that certificate's DSK, and only the account's devices hold the identity key. The reverse direction, a server that encrypts a key of its own choosing to a genuine box key, is stopped by the generation signature and the link check of §10.2.1.

10.2 Generations and VaultKeyLinks

GET {home}/v1/me/vault/keys (optional igen for a retired vault) returns:

{
  "igen": 1,
  "vgen": 2,
  "rotationPending": false,
  "pendingAt": null,
  "phraseChangePending": false,
  "orphaned": false,
  "generations": [
    { "vgen": 1, "kcv": "JF6U0dZvY4M", "link": null, "idStateVer": 3,
      "createdBy": "q2bS9xVg3m0yJpQe1vT0Aw", "devcert": "eyJhbGciOiJFZERTQSIs…", "sig": "Wq3n…",
      "createdAt": "2026-12-04T18:20:01.511Z" },
    { "vgen": 2, "kcv": "FWZ9e8W-fLE",
      "link": { "linkedVgen": 1, "nonce": "wMHCw8TFxsfIycrL",
                "ct": "D0VhgzVrRjsaX9Dcst-14yZaA_gPbRguS9RoPwM01KP3giH0gkgXEzoAgrro9aD1" },
      "idStateVer": 18, "createdBy": "q2bS9xVg3m0yJpQe1vT0Aw", "devcert": "eyJhbGciOiJFZERTQSIs…",
      "sig": "dl9DI8A70oM9vPt9LoNIe8F2cSgmjZTmhZ-Ni4bmHVMdytsuPskIodsYCMosJEfA49xiLtx2E6D-6mZOSb1yAg",
      "createdAt": "2026-12-11T08:02:44.120Z" }
  ]
}
Member Meaning
rotationPending, pendingAt Whether a delisted device makes a new generation necessary, and since when (§10.4).
phraseChangePending Whether a device was delisted as lost or stolen since the last phrase change (§10.8).
orphaned Set by the server when the current generation's creator isn't listed active and no active device holds a grant for it (§10.5.3).
generations[].kcv kcv(vgen) (§8.2).
generations[].link Null for generation 1; otherwise the VaultKeyLink: linkedVgen (the generation it wraps), nonce, ct.
generations[].idStateVer The ver of the IdentityState the creator used (§10.5.2 V3).
generations[].createdBy, devcert, sig The creating device's did, its DeviceCertificate, and its generation signature (below). Set by the client and stored unchanged.
generations[].createdAt Set by the server.

The VaultKeyLink of generation g > 1 encrypts the key of the generation it links to, l = linkedVgen (normally g − 1), under a key derived from the new one:

link(g).ct = AEAD-Seal(K_link(g, l), nonce, K_vault(l),
                       "sv1 vault" || 0x00 || 0x02 || lv(addr) || u32(igen) || u32(g) || u32(l))

A device holding K_vault(g) obtains every older generation by opening links downwards, checking each result against its kcv. It caches every generation it has derived.

The generation signature is a labelled signature (04 §7) by the creating device's DSK, with label vault-generation, over:

struct {
    uint8  version;          // 1
    opaque addr<V>;
    uint32 igen;
    uint32 vgen;
    uint32 linked_vgen;      // 0 for generation 1
    opaque kcv[8];
    opaque link_nonce<V>;    // empty for generation 1
    opaque link_ct<V>;       // empty for generation 1
    uint64 id_state_ver;
    opaque creator_did[16];
} VaultGenerationTBS;

vgen is 1 to 4,294,967,295 (encoded as uint32).

10.2.1 Verifying a generation

A device MUST verify a generation before it uses a vault key that it received by a VaultKeyGrant (§10.3, §10.6 step 1, §10.5.2 V5), and before it writes any record under it. A key received in a pairing payload or a KeyBackup comes from the account's own devices under a key the server can't know, and needs only the kcv check. The checks are:

  1. sig verifies under the dsk of devcert; devcert verifies under the account's identity key (07 §6.3), with the current igen and did equal to createdBy;
  2. createdBy is listed active, with a dkf equal to the thumbprint of devcert's dsk, in a fresh own IdentityState (07 §7.6) whose ver is at least idStateVer, and isn't a device that any own IdentityState this device has accepted listed in revoked;
  3. the received key gives the generation's kcv;
  4. for vgen > 1: the link opens with K_link(vgen, linkedVgen) derived from the received key, and the result equals the key this device holds (or derives through links) for linkedVgen.

A generation that fails any check is ignored and reported as a diagnostic (§16.4), and the device keeps waiting for a valid key (§10.6).

Rationale: HPKE base mode lets anyone who knows a device's public box key encrypt to it, the home server included. Without these checks a malicious home server could create a generation of its own, grant it to every device, and receive every record written afterwards, among them the recovery record, whose phrase opens the KeyBackup. The link check stops the server acting alone, because it doesn't know the previous vault key. The signature and the active-device check stop a revoked or stolen device helping it, since that device's DSK is no longer listed.

10.3 VaultKeyGrants

A VaultKeyGrant gives K_vault(g) to one device, encrypted with HPKE (RFC 9180) in base mode to the device's box key, with KEM DHKEM(X25519, HKDF-SHA256) (0x0020), KDF HKDF-SHA256 (0x0001) and AEAD AES-256-GCM (0x0002):

info       = "sv1 vault grant" || 0x00 || lv(addr) || did || u32(igen) || u32(vgen)
(enc, ct)  = HPKE-SealBase(pkR = box key of did, info, aad = empty, pt = K_vault(vgen))

did is the recipient's 16-byte device ID. Wire form: { "did", "igen", "vgen", "enc": base64url(32 bytes), "ct": base64url(48 bytes), "createdAt", "createdBy" } (the last two set by the server). A grant authenticates nothing by itself: the recipient opens it, then verifies the generation (§10.2.1) before using the key.

Method and path Meaning
GET {home}/v1/me/vault/grants The newest grant addressed to the session's device. 404 vault.grant_not_found if there is none for the current generation; the server then sends vault.grant_needed (§10.7).
POST {home}/v1/me/vault/grants Body { "igen", "vgen", "grants": [ { "did", "enc", "ct" } ] }. vgen MUST be the current generation (vault.stale_generation otherwise). The server stores each grant whose did is active and has a box key, replacing older grants for that did, and answers 200 { "accepted": [did…], "rejected": [ { "did", "reason" } ] } with reason one of not_active, no_box_key.

The server keeps only the newest grant per device; a device that missed several rotations needs only the newest key, and reaches the others through links.

10.4 When a new generation is needed

The home server MUST mark the vault rotationPending whenever a device of the account is delisted from IdentityState other than by an identity reset: a revocation (D-017, orchestrated by 05 §13, whose step 3 applies this marking in the revocation's transaction and whose step 6 sends the event), a sign-out of an enrolled device, or an automatic revocation of a shared-computer device (§13.4). In the same transaction it records pendingAt and the IdentityState ver that delisted the device, deletes that device's box key and grants, sets phraseChangePending if 05's revokedReason is lost_or_stolen (§10.8), and then sends vault.rotation_needed (§14.3), with the reason, to the account's enrolled devices.

While rotationPending is true, record writes fail per record with vault.rotation_required. Reads, grant fetches and the rotation itself are allowed.

Clients don't rely on the flag alone. The server's flag is a hint; a malicious home server could leave it unset. A device MUST also start a rotation (§10.5.2) when:

  • it has just revoked another enrolled device itself (05 §12.9), whatever the flag says; or
  • it accepts an own IdentityState (07 §18.4) in the current igen that no longer lists, as active, a device that an earlier accepted own IdentityState listed, and that state's ver is above the current generation's signed idStateVer.

The home server MUST accept a rotation whose prevVgen is the current generation whether or not rotationPending is set.

A new generation is not created for an upgrade, a new device, a new recovery phrase, or a reset (which starts a fresh vault).

10.5 Creating a generation

On every POST {home}/v1/me/vault/keys the server checks that createdBy is the session's device, that devcert's did is that device and the thumbprint of its dsk is the dkf listed for it in the current IdentityState, and that sig verifies under that dsk over the generation's fields; otherwise it answers 400 vault.invalid_generation. These checks keep honest servers from storing junk; devices still verify every generation themselves (§10.2.1).

10.5.1 Generation 1

POST {home}/v1/me/vault/keys with { "igen", "vgen": 1, "prevVgen": 0, "kcv": kcv(1), "link": null, "grants": [], "idStateVer", "createdBy", "devcert", "sig" }, where sig is the generation signature (§10.2) with linked_vgen 0 and empty link fields. If generation 1 already exists with the same kcv, the server answers 200 with the keys object (idempotent); with a different kcv, 409 vault.generation_conflict, and the device keeps its own key, writes nothing to the vault and reports a diagnostic (§16.4; an honest server never answers this to the device whose identity registration created the vault). Otherwise it creates it and answers 201.

10.5.2 Rotation (client procedure)

The device that revoked another device performs the rotation at once if it is enrolled. Otherwise any enrolled device performs it when it receives vault.rotation_needed, gets vault.rotation_required, sees rotationPending in the summary at start, or has its own evidence (§10.4).

Step Action
V1 GET …/vault/keys. If rotationPending is false and the device has no evidence of its own (§10.4), stop.
V2 Unless this device performed the revocation, wait a random 0–5 s and repeat V1.
V3 Fetch a fresh IdentityState of the account (07) and GET …/box-keys. Verify each other active device's box key (§10.1).
V4 Generate K_vault(g + 1). Compute kcv(g + 1), link(g + 1) (wrapping K_vault(g)), the generation signature and a grant for every device verified in V3. Persist K_vault(g + 1) with a backup_pending mark before sending anything.
V5 POST …/vault/keys with { "igen", "vgen": g + 1, "prevVgen": g, "kcv", "link", "grants", "idStateVer", "createdBy", "devcert", "sig" }, where idStateVer is the ver of the IdentityState used in V3. On 409 vault.generation_conflict (another device won), delete the persisted K_vault(g + 1) and receive the winner's key (§10.6), which includes verifying it (§10.2.1).
V6 If phraseChangePending is set, or this device revoked a device as lost or stolen, run §4.6 with reason lost_or_stolen instead (§10.8). Otherwise update the KeyBackup (§5.6.2) with vgen and vaultKeys set to g + 1, under the phrase whose phraseId the active backup has, using the cached BK or re-deriving it from E. On backup.version_conflict, re-read ?part=meta and apply §5.6.4: stop if the backup already holds g + 1; follow §5.6.2's last paragraph if the phrase changed. Clear backup_pending when the backup holds g + 1.
V7 Continue pending appends, now under vgen = g + 1.

A device that starts with a backup_pending mark completes V6 before anything else. Any other device that holds K_vault(g + 1) also completes it, through §5.6.4, if the rotating device can't.

On a successful V5 the server stores the generation, link and grants (dropping grants for devices no longer active), clears rotationPending only if no device was delisted by an IdentityState ver above idStateVer (otherwise it stays pending and another rotation follows), and sends vault.key_rotated (§14.3) to the account's enrolled devices.

10.5.3 Recovering from a lost generation

If the rotating device is lost after V5 and before any other device received the new key (for example it was the only enrolled device, so V4 made no grants), nobody holds the current generation and the KeyBackup still holds the one before. The home server reports this as orphaned: true (§10.2). Then any enrolled device that holds the newest key it can obtain, K_vault(l), and can't get the current one by grant or from the KeyBackup (§10.6) MAY create generation c + 1, where c is the current generation, by the steps of §10.5.2 with prevVgen: c and a link with linkedVgen: l that wraps K_vault(l). The server accepts it only while orphaned is set. Records written under the lost generation can't be read any more; their keys reappear in the archive as devices append them again. Clients report a diagnostic (§16.4) and show nothing.

10.6 Receiving a new generation

A device that sees a vgen above the newest it holds (from vault.key_rotated, the summary, GET …/keys, or a record) obtains the key in this order:

  1. GET …/vault/grants: open the grant with its box key, then verify the generation (§10.2.1).
  2. Otherwise, if the KeyBackup's vgen (?part=meta) is the current one, download it (§5.7 rule 1) and open it with the cached BK, or with BK re-derived from the E it holds; check kcv.
  3. Otherwise, wait for vault.grant_needed to be served (§10.7) and retry at every start and every vault.key_rotated. If the server reports orphaned, §10.5.3 applies.

Until it has the current key the device can still read older records and use MLS normally; it just can't write to the vault. After 7 days without the current key, settings offers "Set up encryption on this device again", without any warning. It first requests a grant again; if that still fails, it signs this device out and back in as a new device (a new did, 05) and opens the device-setup chooser (§12.3), because an enrolled device can't pair as a new device (§6.12).

10.7 Missing grants

When GET …/vault/grants returns vault.grant_not_found for a device that has a valid box key, the home server sends vault.grant_needed with that device's did to the account's other enrolled devices, at most once per 10 minutes per device. A device that receives it verifies the box key (§10.1) and posts a grant for the current generation (§10.3). Several devices may answer; the server keeps the newest grant.

10.8 What a revoked device can read

After a rotation, a revoked device still holds the vault keys up to generation g and can decrypt records written under them, which it could already read. It can't read records written under g + 1 or later: no grant was made for it, the links point backwards only, and it has no session to fetch anything with.

One path remains. The revoked device knows the phrase entropy E, and the KeyBackup holds K_vault(g + 1) under a key derived from E. Someone who holds the revoked device's keys and obtains the KeyBackup (which needs the user's OIDC login at the identity provider, §5.7, or the home server's stored data) can read the new generation. A new recovery phrase closes this path. Therefore:

When a device is revoked as lost or stolen (05 §12.3 revokedReason: "lost_or_stolen", chosen in 05 §12.10's removal confirmation), the rotation is followed by a new recovery key in the same flow (D-082, which revises D-054). Routine removals (an old laptop the user wiped) don't change the phrase. Rationale: this closes the only path by which a stolen device's keys plus a later account takeover could read new vault data, at the cost of one extra save in a moment when the user is already dealing with a loss.

The rules:

  1. Who. If the revoking device is enrolled, it rotates (§10.5.2) and then makes the new recovery key itself, showing the save step (M4) on its screen. If the revocation was made from an unenrolled device or by an admin, the home server sets phraseChangePending (§10.4) and the enrolled device that performs the rotation makes the new recovery key in the background, with the recovery record's reason set to lost_or_stolen; W8 then appears on the user's devices at once (§4.7), without the save step.
  2. Order. The rotation (V1 to V5) comes first, so the recovery record that carries the new phrase is written under the new generation, which the revoked device can't read. Step V6 is replaced by §4.6: the device never writes K_vault(g + 1) into a KeyBackup under the old phrase, so the backup holds a key the thief lacks only once it is under a phrase the thief lacks. While the phrase change is outstanding, the KeyBackup still holds K_vault(g), which the thief already had, and the home server refuses any rewrite under the old phrase (backup.phrase_change_required, §5.6.2).
  3. "Later" is safe. The new KeyBackup is written in §4.6 step 3, before the save step is shown, so a user who taps "Later" leaves nothing exposed; W8 covers the unsaved key.
  4. Failure. If the phrase change can't complete (offline, a crash), the pending mark resumes it at the next start (§4.6 step 1), and any other enrolled device that sees phraseChangePending makes it instead, after first performing the rotation if rotationPending is still set. The record-write fence of §10.4 means the new recovery record can only ever be written under the new generation.

11. Starting fresh, downgrading, and old devices

07 owns the reset and downgrade procedures on the server, and the W4a trigger. This section is the client side.

11.1 Entry points for "Start fresh" (M10)

  • The device-setup chooser (§12.3), as the last option, "I can't do either", shown below pairing and the recovery key.
  • Settings of an enrolled device, under advanced encryption settings ("Reset my encryption"). It is never offered as a fix for any other problem.

A reset takes effect at once, from any home session, with no waiting period (D-071).

11.2 Procedure

Step Action
S1 Show the M10 screen. Its content (copy in 20) states plainly: earlier encrypted messages, in direct messages and in channels, can't be read on this device; people you message directly will see a notice that your security key changed; your other signed-in devices will need to be set up again. Buttons: "Start fresh" and "Go back". This is the only confirmation. After "Start fresh", if the session isn't fresh for 600 s (07 §11.6, 05 §9.1, judged from authAt in GET /v1/me), run 05 §9.2 first, so that the sign-in comes before any key is made. The reset is subject to the 02 §10.6 check of §3.2.
S2 Read g0 from the account's IdentityState. Generate a new IK, a new DSK and box key for this device (the device keeps its did, §7), K_vault(1), K_vid, E, its phraseId and S. Persist them as pending_reset with g0 + 1.
S3 Build the IdentityCertificate (igen = g0 + 1) and the DeviceCertificate, naming the new DSK and box key (dbk) (07), and under them the device's first KeyPackages: a last-resort KeyPackage and up to 10 regular ones (13 §9.1). Keep their private keys with the pending_reset material.
S4 Derive BK, encrypt the backup payload, and stage it: PUT /v1/me/backup with "stage": true.
S5 If this device is in a call (it is in at most one, 15 §2.3 rule 4), leave it first: send POST …/call/leave (15 §3.4), stop all media and close the call screen with 20's ST.call_end.start_fresh (20 §11.8). The reset is the user's own action, so this is a leave, not a drop: auto-rejoin doesn't run, and no seat is left without keys after S6 (15 §12.4). Then send POST {home}/v1/me/identity/reset with mode: "new_key" and the KeyPackages of S3 (07 §11.6), so that DM participants' clients can re-add this device by Welcome as soon as they learn of the reset (12 §11.5). The home server, in one transaction, activates the staged KeyBackup and deletes the old one (§5.6.3), retires the old vault (§8.12), cancels open pairing sessions (§6.8), delists every old device, publishes the new IdentityState and fans out identity.changed (07, 06). If it answers 403 auth.reauth_required (the sign-in of S1 has aged), run 05 §9.2, keep all pending material, and retry S5; the staged backup stays valid for 24 h (§5.6.1).
S6 If this device was enrolled in generation g0, move what §11.4 allows into its retired store, then delete the old IK, old DSK, old box key and all MLS state (13). Set the local state to enrolled.
S7 Initialize the vault (§10.5.1), upload the box key, write the recovery record with phraseId, reason: "new" and savedAt: null.
S8 Show the save step (§4.4). In the background: steps E5–E8 of §7 (topping KeyPackages up to the target, 13 §9.3; joining groups; archive appends). Channels are joined by external commit. Existing secure DMs and group DMs can't be joined until a participant's client lists the new identity key (12 §11.5): the device subscribes to each and waits in 13's awaiting_readd state (13 §16), with the status line of 12 §11.7.

Failures and restarts follow §3.4 with pending_reset in place of pending_upgrade. Afterwards channel members see nothing; DM contacts see W2; the user's other old devices see W4a (07, F6).

11.3 Turning encryption off (downgrade)

A downgrade is a reset to insecure (D-019, 07). Before it sends the downgrade, the device that asks leaves any call it is in, as §11.2 S5 does, and closes the call screen with 20's ST.call_end.encryption_off. After the home server accepts it, every device of the account, on learning it (the response for the device that asked; identity.changed or IdentityState for the others), MUST delete the IK, its DSK and box key, all vault keys, K_vid, E, any cached BK, all MLS state, history keys, shared message keys and its notification key subset (§13.5), and MUST NOT keep a retired store. The home server deletes the KeyBackup (§5.6.3) and every vault (§8.12) in the same transaction. The account then holds no keys (D-021), and insecure contexts keep working on every device.

11.4 An old device that comes back after a reset

A device that sees its account's igen increase without having caused it shows W4a (07 §18.1). It then:

  1. MUST stop using the old IK and DSK at once (it signs nothing more, commits nothing and sends no SealedMessage), and discards its MLS group state (07 §18.1);
  2. keeps the history it has already decrypted, and the history keys it holds, for reading that local history (07 §18.1);

Items 3 and 5 don't apply while 02 §10.6's home-server condition holds (the home pin was re-created after a rejected change and the IdentityState doesn't name this device's identity key, 07 §18.1); the device keeps its old keys and doesn't offer "Approve this device" or the device-setup chooser (§3.2).

  1. SHOULD delete the old IK, DSK and box key once the user has acknowledged W4a (07 §18.1), and never uses them again;
  2. MAY keep, in a retired store in its local key store, for at most 30 days: the old vault keys and the old K_vid, so that it can import from the retired vault (below);
  3. is now an unenrolled device of the new identity. W4a's "Set up this device" action and the G2 cards (§12.3) lead it to the device-setup chooser; it shows no further banner.

If the device is enrolled again within those 30 days (by pairing, or with the new recovery key), it silently imports, after §7 E3:

  • every history key it holds locally from the old generation, as archive key entries in the new vault, keeping the source and confirmed it recorded for each key, and every shared message key it holds locally, as shared_keys records;
  • from the retired vault (igen query parameter, §8.12), every archive and shared_keys record it can decrypt with the old keys, keeping each archive entry's source and confirmed; every pin record for a contact that has no pin record in the new vault (07 §16.7); every sec_pin record, merged as 09 §13.2 says. It ignores retired settings and recovery records.

This import is the one case in which a device appends keys it read from an archive, which 14 §12.2 otherwise forbids: the retired vault is about to be deleted and isn't readable by the new identity's other devices. It then deletes the retired store. If 30 days pass first, it deletes the retired store without importing. The 30-day limit applies only to the import; the history keys a device keeps for reading its own local history follow 07 §18.1.

Rationale: a user who started fresh and then finds the old phone gets their history and their contacts' pins back, with no prompt and no extra concept. History keys of channels open earlier channel items again, because a reset doesn't end a channel membership; in DMs and group DMs the re-add starts a new membership, so the imported keys open only what the old device still stores (14 §10.9). Only the same account's own device can do this, because only it holds the old vault keys.

12. Unenrolled devices

An unenrolled device is a signed-in device of a secure account that holds no identity key (00 §2.3, D-058). It is a normal, useful device for insecure contexts.

12.1 What an unenrolled device can and can't do

Activity Allowed Notes
Everything in insecure channels, communities, DMs and group DMs, including calls Yes As an insecure account would, but under the secure account's identity. W1 and the open lock apply as for any device of a secure account (00 §4.12).
Joining a secure server's community Yes (SM-4) Every channel there shows G2.
Reading, posting, joining the MLS group of, or calling in any secure context No Servers refuse with security.device_not_enrolled; the client shows G2.
Accepting a secure DM request The request is shown from the home server's index with generic text; opening it shows G2. 12
Notifications from secure contexts Fallback text only ("New message from Alice in #Lobby") 19
Pairing as the new device; restoring from the recovery key; "Start fresh" Yes §6, §5.8, §11
Downloading the KeyBackup Only with fresh authentication within the last hour (§5.7, 05 §9.1)
The AccountVault, showing the recovery key, W8, verifying contacts, upgrading a channel or server, approving another device No security.device_not_enrolled for vault endpoints
Account settings, device list, sign-out (05) Yes

The home server enforces this by issuing HomeAssertions with enr: false (06) and by refusing the vault endpoints; hosting servers enforce SM-4 (00 §4.2).

12.2 How a device knows it is unenrolled

A device is unenrolled when its account is secure (sec: "secure" in IdentityState) and its own did isn't listed active in the account's current IdentityState, or it holds no IK for the current igen. A client re-evaluates this at start, on every identity.changed for its own account, and on every security.device_not_enrolled error.

12.3 The device-setup chooser and the G2 entry points

Every G2 card ("Set up encryption on this device") and the settings entry of the same name open the device-setup chooser:

Option Shown when Default (primary) when
"Use another device" (copy in 20 §12.2; pairing, direction A, §6.9.1) The account's IdentityState lists at least one active device other than this one Whenever shown
"Scan or type a code from my other device" (pairing, direction B, §6.9.3, with this device as the new device) The account's IdentityState lists at least one active device other than this one Never (secondary)
"Use recovery key" (§5.8) GET /v1/me/backup?part=meta found a KeyBackup No other active device is listed
"I can't do either" → "Start fresh" (§11) Always, as the last and least prominent option Never

When no other active device is listed, nobody could answer a pairing prompt, so the chooser shows only "Use recovery key" and, below it, "I can't do either".

G2 entry points (each resumes the interrupted action after §7 E1, 00 §4.12.2):

  • the G2 card inside any secure channel, secure DM or secure group DM;
  • a call join in a secure context;
  • each channel of a secure server's community;
  • opening a secure DM request;
  • settings, "Set up encryption on this device";
  • the "Approve this device" banner (copy in 20 §9.5, SETUP.banner), shown once per device per identity generation after the account turned encryption on from another device (§3.5). It is dismissable, never modal, and doesn't come back; the G2 cards remain wherever they apply.

13. Platform key storage

13.1 Requirements on every platform

The local key store holds a device's IK, DSK, box key, vault keys, K_vid, E, an optional cached BK, the retired store (§11.4), and the MLS state, history keys and shared message keys of 13 and 14. Requirements:

  • K-1 Wrapped at rest. Every secret in the local key store MUST be encrypted at rest with AES-256-GCM under a wrapping key held by the platform's key-protection facility (the table in §13.2), or be a non-extractable platform key itself. A secret MUST NOT be written to disk in the clear, including in temporary files, swap files the client controls, or databases. Every wrapped secret uses the associated data lv(label) || lv(addr) || did, where label names the secret's purpose (for example ik, dsk, box, vault:<vgen>, phrase, bk) and addr is the account's canonical address (04 §14.2 item 2).
  • K-2 This device only. The local key store and the wrapping key MUST be excluded from operating-system and cloud backups, device-to-device migration, roaming profiles and keychain sync. Restoring an app's data onto another machine MUST NOT carry keys there.
  • K-3 The identity key is unwrapped rarely. The IK MUST be unwrapped only for: issuing this device's DeviceCertificate (§7 E1, §11.2); building a pairing payload as approver (§6.7.2); building a KeyBackup payload (§3.3, §4.6, §10.5.2 V6); signing a DeviceRevocation (07); and any other IK signature 07 requires. It MUST be zeroized immediately afterwards.
  • K-4 Zeroization. Clients MUST overwrite buffers holding unwrapped secrets as soon as they are no longer needed, as far as the language allows, and SHOULD keep them in memory that isn't swapped (for example mlock where available).
  • K-5 Non-extractable DSK where possible. Where the platform can generate and use an Ed25519 key that can't be exported (for example a WebCrypto Ed25519 CryptoKey with extractable: false, or an Android Keystore Ed25519 key on platforms that support it), the DSK SHOULD be such a key. The box key MAY likewise be a non-extractable X25519 key. Otherwise they are wrapped like every other secret.
  • K-6 No leakage. Secrets, the phrase, BK, ISK and pairing credentials MUST NOT appear in logs, crash reports, analytics, diagnostics uploads (15), notifications, the clipboard (except as §4.4 allows) or URLs.
  • K-7 Background access. Mobile clients need some keys while the device is locked (to process MLS messages and decrypt notifications). Items needed in the background use the platform's "available after first unlock" class; nothing in this document requires keys to be usable before the first unlock after boot.
  • K-8 Integrity on load. A client distinguishes two cases. If the platform reports the wrapping key as temporarily unavailable (a locked GNOME Keyring or KWallet after an automatic login, a Secret Service that hasn't started yet, an Android Keystore or TPM error that the platform marks as transient), the device stays enrolled, works in insecure contexts meanwhile, and retries at every unlock, every app start and with backoff. Only when the store is positively lost (the wrapping key or the store is gone, or an AEAD integrity failure persists after a retry) or the store holds no IK, no DSK, or no vault key of the current igen, does the client treat it as key loss (§13.6). A device that lacks only the newest vault generation isn't in key loss; it follows §10.6.

13.2 Per platform

Platform Wrapping key Key store location Background class Backup exclusion
iOS, iPadOS A 256-bit AES key stored as a Keychain item with kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly and kSecAttrSynchronizable = false. It SHOULD itself be wrapped by a Secure Enclave P-256 key (ECIES, SecKeyCreateEncryptedData). The app's container (not the shared App Group container, except for the notification subset, §13.5), with NSFileProtectionCompleteUntilFirstUserAuthentication After first unlock ThisDeviceOnly Keychain class; key-store files marked isExcludedFromBackup
Android An AES-256-GCM key in the Android Keystore, StrongBox-backed when available (setIsStrongBoxBacked), otherwise TEE-backed; not requiring user authentication (setUserAuthenticationRequired(false)), so background processing works App-private storage (Context.getNoBackupFilesDir()) After first unlock (credential-encrypted storage) android:dataExtractionRules excluding the key store from cloud backup and device transfer; files under noBackupFilesDir
macOS A 256-bit AES key in the data-protection Keychain (kSecUseDataProtectionKeychain) with a ThisDeviceOnly accessibility class, SHOULD be wrapped by a Secure Enclave key where the Mac has one ~/Library/Application Support/<app>/, excluded from Time Machine (NSURLIsExcludedFromBackupKey) Not applicable As stated
Windows A key in the TPM through CNG's Microsoft Platform Crypto Provider where a TPM is available; otherwise DPAPI (CryptProtectData, user scope) %LOCALAPPDATA%\<app>\ (never %APPDATA%, which roams) Not applicable Local, non-roaming profile only
Linux A secret in the Secret Service API (libsecret: GNOME Keyring, KWallet), or the XDG Secret portal in a sandbox (Flatpak). If neither is available: a TPM 2.0-sealed key where available; otherwise a random key in a file with mode 0600 next to the key store, and the device reports keyProtection: "file" in diagnostics (15, §16.4). No warning is shown. $XDG_DATA_HOME/<app>/ with mode 0700 Not applicable Not applicable
Web §13.3 IndexedDB of the client's origin Not applicable Browser storage isn't backed up by the browser
Bots Operator-provided secret storage (a key-management service, an encrypted file or a secret injected at start) Operator's choice — Operator's choice

13.3 Web clients (D-065)

Web clients are a separate conformance class (00 §1.5) and MUST meet these rules in addition to §13.1.

  • Wrapping key. At first use the client generates an AES-GCM 256-bit wrapping key with WebCrypto, extractable: false, inside a dedicated Worker, and stores the CryptoKey object in IndexedDB (structured clone keeps it non-extractable). Every secret is stored in IndexedDB only as AEAD-Seal(wrappingKey, nonce, secret, lv(label) || lv(addr) || did) (K-1).
  • Use only in the Worker. All cryptography for secure mode (MLS, SealedMessage, SFrame key derivation, vault, backup, pairing) runs in that Worker. The page's main thread never receives an unwrapped secret, the phrase excepted while it is on screen (§4.4, §4.5).
  • DSK. Where the browser supports WebCrypto Ed25519, the DSK MUST be a non-extractable Ed25519 CryptoKey (K-5). Otherwise it is wrapped.
  • IK. Unwrapped in the Worker only for the operations of K-3, then the buffer is overwritten.
  • Persistent storage. After enrolment the client calls navigator.storage.persist(). If the browser refuses, the client continues; it doesn't ask again more than once per 30 days.
  • Eviction is device loss. If the browser evicts the origin's storage, the device has lost its keys (§13.6). Web clients MUST keep their session tokens in the same IndexedDB database as the key store, so that eviction removes both and the browser is simply signed out. A web device then signs in as a new device and pairs or restores again. Inactive web devices are evicted from MLS groups after 30 days (D-059, 13).
  • Origin trust. A web client is exactly as trustworthy as the origin that serves its code (HP-10). Strict CSP, Subresource Integrity on every script, and the other hardening rules of 20 are REQUIRED for a web client that serves secure accounts.

Rationale: a non-extractable wrapping key means that a copy of the IndexedDB files (for example from a disk image or a malicious extension that reads profile files) is useless without running code in the origin, and keeping the IK unwrapped only for moments limits what a short-lived script injection can take.

13.4 Shared-computer mode

A user MAY mark a browser as a shared computer on the sign-in screen (HP-10); it is never asked by default. In shared-computer mode:

  • every secret, and the session tokens, are held only in the memory of the dedicated Worker, never in IndexedDB or any other storage;
  • closing or reloading the tab ends the session: the device is signed out and must sign in, and pair or restore, again;
  • the home server revokes the device 12 h after its last activity (05), which triggers a vault rotation like any revocation (§10.4);
  • the client never offers "Save to password manager" or printing in this mode, and the save step isn't shown after pairing or restoring (it is only shown after an upgrade or reset).

13.5 The notification key subset

A mobile notification extension (iOS Notification Service Extension) or a web service worker decrypts secure notifications without loading MLS state (HP-9, 19). It may read only the notification key subset:

Member Content
v 1
addr, did The account and device.
contexts For each secure context for which notifications are enabled: host, ctx, and up to 4 entries { gen, epoch, ekid, khist, learnedAt }, where gen is the group generation (the last field of the MLS group_id, 00 §7.6): the current epoch, the two before it, and any other epoch used by a message in the last 24 h. An extension uses the entry whose (host, ctx, gen, epoch, ekid) equal the notification record's host and ctx and the SealedMessage's gen, epoch and ekid, as 19 §13.2 does; if none matches, it shows the fallback text.
senders For each context in contexts (by host and ctx): entries { addr, did, dsks }, where addr is the sender's canonical address and dsks is an array of base64url Ed25519 public DSKs that the main app accepted for (addr, did) from validated leaves or accepted credential records (14 §6.2, §6.7). Several keys per did are allowed, because a device keeps its did across a reset. Required whenever contexts is non-empty. Public data only.
updatedAt When the main app last wrote it.

Rules:

  • The subset MUST NOT contain the IK, any DSK private key, box key, vault key, K_vid, E, BK, MLS secrets other than exported history keys, shared message keys (14 §3.7), or session refresh tokens. (Which token the extension uses to fetch notification records is 19's and 05's concern.)
  • Size: at most 2,000 khist entries and 1 MiB. Entries other than a context's current epoch are dropped 7 days after their learnedAt; the current epoch's entry stays however old it is, so a quiet context still decrypts its next message.
  • The main app rewrites it after every epoch change in a context with notifications, and at least every 24 h.
  • iOS: the subset is a file in the shared App Group container, encrypted under its own wrapping key, a Keychain item in a shared access group with kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly. The extension has no access to the main wrapping key.
  • Android: FCM messages are handled in the app's own process; the push handler uses only the subset, stored under its own Keystore key alias.
  • Web: the service worker reads a subset stored in IndexedDB under its own non-extractable wrapping key. It MUST NOT unwrap anything else.
  • If the subset has no matching ekid, the extension shows the fallback text of 19 and never contacts any server other than the home server and the hosting server named by the notification record.

13.6 Key loss

A device has lost its keys when, under K-8, its local key store is positively lost, or holds no IK, no DSK or no vault key of the current identity generation (eviction, OS reinstall, a corrupted store, a restored device backup that excluded keys as K-2 requires). Temporary unavailability isn't key loss (K-8). Such a device:

  1. MUST NOT register a new DSK under its did in the current igen (§7);
  2. shows "Set up encryption on this device" (the device-setup chooser, §12.3), and never signs the user out without asking. When the user picks an option, the client first signs this device out (05), which ends its device record; the home server delists it, which triggers a vault rotation (§10.4) like any revocation;
  3. then signs in again as a new device (a new did) and pairs or restores.

There is no warning. Until the user acts, the device keeps working in insecure contexts.

A web device whose storage was evicted has also lost its session tokens (§13.3), so it can't sign itself out. Its old device record stays listed until 05's inactivity expiry for web devices (05 §12.5), and no rotation happens before then. The user's other devices show it in the device list with its last-seen time, where the user can remove it; no warning is shown.

14. Events

Every event in this section is sent by the home server on the event WebSocket (03) of the account's own devices, with ctx: "me". All are ephemeral: they carry no seq and are never replayed (00 §7.4). The state they announce can always be read over HTTP (§6.4.2, §8.7, §10.2), and clients re-read it on start and on reconnect. None of them is ever sent between servers. A client ignores unknown members in d.

14.1 pairing.*

Type Sent to d
pairing.requested Every enrolled device of the account, when a new device creates a session (§6.4.1) The PairingSession (§6.2).
pairing.updated Both participants, on every state change; and every device that received pairing.requested for the session, when it leaves waiting The PairingSession.
pairing.message The participant a protocol message is addressed to { "pairingId", "n", "type", "from", "body", "sentAt" }, where from is the sender's did (§6.4.4).
{
  "v": 1,
  "t": "pairing.requested",
  "id": "01938f40-0011-7c00-8000-0000000000c1",
  "ctx": "me",
  "ts": "2026-12-04T18:30:05.421Z",
  "d": {
    "id": "01938f40-0000-7a00-8000-00000000a1b2",
    "state": "waiting",
    "displayer": "new_device",
    "createdBy": "new_device",
    "newDevice": { "did": "Lp0wS3aQx9bT6mVc1rK2eA", "plat": "web", "client": "sloppyvoice-web/1.2.0",
                   "name": "Chrome · Windows", "provider": "google", "authAt": "2026-12-04T18:30:02.118Z" },
    "approver": null,
    "createdAt": "2026-12-04T18:30:05.410Z",
    "expiresAt": "2026-12-04T18:40:05.410Z",
    "endedAt": null,
    "endReason": null
  }
}
{
  "v": 1,
  "t": "pairing.message",
  "id": "01938f40-1a20-7c00-8000-0000000000c7",
  "ctx": "me",
  "ts": "2026-12-04T18:30:41.007Z",
  "d": {
    "pairingId": "01938f40-0000-7a00-8000-00000000a1b2",
    "n": 1,
    "type": "cpace_a",
    "from": "q2bS9xVg3m0yJpQe1vT0Aw",
    "body": { "cred": "code", "ya": "rgaQeP8rXRUgsKHH9umgpxZvuEdpJ4iV9okf6rIJx1w", "ad": "CHN2MSBpbml0Aatm0vcVYN5tMiaUHtb09AM" },
    "sentAt": "2026-12-04T18:30:41.001Z"
  }
}

14.2 backup.*

Type Sent to d
backup.updated The account's enrolled devices other than the writer, after an update (§5.6.2) { "igen", "ver", "vgen", "phraseId", "updatedAt", "updatedBy" }. Devices update the ver they would use as prevVer. A device whose own phraseId differs stops using its cached E and BK for writing until it has synced the recovery record (§8.9.4), and every device applies §5.6.4. They don't download the backup because of this event.

14.3 vault.*

Type Sent to d
vault.changed The account's enrolled devices other than the writer, after records are written or deleted { "igen", "vseq", "items": [ { "rid", "type", "bucket", "ver", "deleted" } ], "truncated": boolean }. At most 100 items; truncated: true means more changed and the device reads the change feed (§8.8).
vault.rotation_needed The account's enrolled devices, when a device is delisted (§10.4) { "igen", "vgen", "pendingAt", "did", "reason", "phraseChangePending" }, where vgen is the current (old) generation, did the delisted device and reason its 05 revokedReason (unknown values are treated as other).
vault.key_rotated The account's enrolled devices, after a new generation is created (§10.5.2) { "igen", "vgen", "createdBy" }.
vault.grant_needed The account's enrolled devices other than the one named, at most once per 10 min per device (§10.7) { "igen", "vgen", "did" }.

15. Error codes

These codes are registered in the pairing, backup and vault areas (00 §7.5). Each is returned as an RFC 9457 problem object (00 §7.9). This document also returns security.device_not_enrolled (00 §4.11), auth.reauth_required (05 §9.1, for §5.7), crypto.kdf_params_rejected and crypto.unsupported_algorithm (04 §12.2, for §5.6) and core codes (03). Rate limits use 429 core.rate_limited (03 §15.2) with the policies backup.download, pairing.create and pairing.open.

Code HTTP retryable userAction Meaning data
pairing.not_found 404 false none No such session visible to this device. —
pairing.expired 410 false retry The session passed its deadline. The client starts a new session. —
pairing.ended 409 false none The session is already terminal. state, endReason
pairing.already_joined 409 false none Another device took the missing role first. —
pairing.role_mismatch 409 false none The caller can't take this role (an enrolled device as new device, an unenrolled one as approver, or an enrolled creator asking for displayer: "new_device"). expected
pairing.out_of_order 409 false none A protocol message not allowed in this state; the session has failed. state
pairing.account_not_secure 409 false enable_encryption The account is insecure; there is nothing to pair. —
pairing.unsupported_client 403 false none Bots can't pair. —
backup.not_found 404 false none The account has no active KeyBackup. —
backup.invalid 400 false none A malformed or unsupported KeyBackup object. member
backup.identity_mismatch 409 false none addr, igen, ikf or a staged write's vgen don't match what the write requires. igen
backup.version_conflict 409 true none prevVer isn't the active version. The client re-reads the metadata and applies §4.6 step 3 or §5.6.4. currentVer, phraseId, vgen
backup.stale_generation 409 false none The write's vgen is older than the active backup's or newer than the vault's current generation (§5.6.2). vgen
backup.phrase_change_required 409 false none A new recovery phrase is required before the backup may be rewritten (§10.8). The client runs §4.6. —
backup.required 409 false none Returned by 07's identity registration or reset for a user account with no matching staged KeyBackup (§5.6.3, 07 §11.4 step 7). —
vault.not_initialized 409 true none The vault of the current identity generation has no generation 1 yet. The client initializes it (§10.5.1) or waits. —
vault.version_conflict 409 true none Compare-and-set on ver failed; merge and retry (§8.9). currentVer, deleted
vault.stale_generation 409 true none The record or grant uses an older vgen; fetch the current key (§10.6). vgen
vault.generation_conflict 409 true none prevVgen isn't current, generation 1 exists with another kcv, or a recovery generation was sent while the current one isn't orphaned (§10.5.3). vgen
vault.rotation_required 409 true none A rotation is pending; rotate (§10.5.2) or wait, then retry. pendingAt
vault.quota_exceeded 409 false none maxVaultBytes would be exceeded; prune (§8.11). quotaBytes, bytesUsed
vault.record_too_large 413 false none ct above maxVaultRecordBytes. limit
vault.invalid_box_key 400 false none The box key failed the checks of §10.1. —
vault.invalid_generation 400 false none A new generation's devcert or sig failed the server's checks: devcert's did isn't the session's device, its dsk thumbprint isn't the dkf listed for it, or sig doesn't verify (§10.5). —
vault.grant_not_found 404 true wait No grant for this device in the current generation (§10.7). vgen
vault.changes_expired 410 false none since is older than the retained change history; relist (§8.8). oldestVseq
vault.retired_expired 410 false none The retired vault requested has been deleted (§8.12). —

Clients never show these codes, or any text derived from them, as security warnings (D-055). userAction values drive only the one-tap fixes of 00 §7.9.

16. Limits, timers and registry additions

16.1 Limits advertised in ServerMetadata

Under the rules of 00 §7.12, the home server advertises in ServerMetadata limits (02):

Limit Meaning Default Floor
maxBackupBytes Decoded ct of a KeyBackup 65,536 (64 KiB) 16,384 (16 KiB)
maxVaultBytes Vault storage per account (§8.11) 268,435,456 (256 MiB) 33,554,432 (32 MiB)
maxVaultRecordBytes Decoded ct of one vault record 16,384 (16 KiB) 4,096 (4 KiB)

Clients MUST keep each KeyBackup ct within 16 KiB and each record within 4 KiB, so they work on every conforming server. (A v1 KeyBackup payload is under 1 KiB, §17.2; a typical archive record is under 400 bytes, and a shared_keys record of 32 keys under 4 KiB, §9.5.)

16.2 Timers and fixed limits

What Value Section
Pairing session deadline to reach confirmed 10 min from creation §6.8
Pairing step timeout (in exchanging) 60 s §6.8
Pairing finish deadline 5 min from confirmed §6.8
Pairing sessions created per account 5 per rolling hour §6.10
Open pairing sessions per account / per creating device 3 / 1 §6.10
Terminal pairing session metadata retained 24 h §6.8
Staged KeyBackup lifetime 24 h §5.6.1
Staged KeyBackups 1 per device, 3 per account; 10 staged writes per account per hour §5.6.1
Fresh authentication for unenrolled backup download (maxAgeMs) 3,600,000 ms (1 h) §5.7, 05 §9.1
Fresh authentication for turning on encryption (maxAgeMs) 86,400,000 ms (24 h); the client signs in again first when authAt is older than 82,800,000 ms (23 h) §3.2, 05 §9.1, 07 §11.4, D-085
KeyBackup downloads 10 per 24 h (unenrolled, per account); 5 per hour (per session); 50 per 24 h (enrolled, per account); 50 per 24 h (bot token) §5.7
Vault write batch 1 to 100 records §8.7.3
Vault listing and change-feed page size 1 to 500 §8.7.2, §8.8
Vault tombstone retention 30 days §8.7.4
Retired vault retention 30 days after the reset §8.12
Retired store on an old device 30 days §11.4
Archive append flush (archive and shared_keys) 60 s or 100 pending keys §9.3, §9.5
Keys per shared_keys record 1 to 32 §9.5
Rotation start jitter 0–5 s §10.5.2
vault.grant_needed throttle 10 min per device §10.7
Fallback to re-setup without the current vault key 7 days §10.6
Vault CAS retries 5, with 0–500 ms jitter §8.9
W8 banner At most once per 7 days per account §4.7
Sensitive clipboard auto-clear 60 s §4.4
Notification key subset 2,000 entries, 1 MiB, non-current entries ≤ 7 days, refreshed ≤ 24 h §13.5
Persistent-storage request (web) At most once per 30 days after a refusal §13.3
Argon2id m = 65,536 KiB, t = 3, p = 1 to write; accepted ranges as 04 §12.1 §5.1

16.3 Registry additions

For the registries owned by 04 (00 §7.15), this document uses or adds:

Registry Label Use Inputs
HKDF info sv1 backup (in 00, 04 §8.4) KeyBackup key, HKDF-Expand directly over the Argon2id output §5.3
HKDF info sv1 vault (in 00, 04 §8.4) Record key (0x01), link key (0x02), key check value (0x03, the first 8 bytes of a 32-byte output) §8.2
HMAC prefix sv1 vault id (in 00, 04 §8.4) Record IDs and buckets: HMAC truncated to 16 bytes §8.5
HKDF info sv1 pair (in 00, 04 §8.4) Pairing payload key (0x01), ack key (0x02), HKDF-Expand directly over the CPace ISK §6.7.1
HPKE info sv1 vault grant (in 04 §8.5) VaultKeyGrant §10.3
Labelled signature vault-box-key (in 04 §7.3) Box key binding (BoxKeyTBS), signed by the DSK §10.1
Labelled signature vault-generation (in 04 §7.3) A vault key generation (VaultGenerationTBS), signed by the creating device's DSK §10.2
AEAD AAD prefixes sv1 backup, sv1 vault, sv1 pair Associated data §5.4, §8.4, §10.2, §6.7.1

04 §2.1, §8.5, §9.8 and §14.1 include HPKE base mode for VaultKeyGrants and the box key; 04 §7.3 registers vault-box-key and vault-generation.

16.4 Diagnostic reports

Diagnostics of this document go to the home server through POST /v1/diagnostics (15 §14.3), under the consent setting of 15 §14.2: kind vault_integrity, data { check: "decrypt" | "type" | "rid" | "bucket" | "generation" | "generation_conflict" | "orphaned", rid (optional), vgen (optional) }; kind key_storage, data { keyProtection: "hardware" | "platform" | "file" }. Neither contains key material.

17. Test vectors

All values are hexadecimal unless marked base64url (b64u). Strings are UTF-8. Long base64url values are wrapped at 100 characters; the line breaks are not part of the value. These vectors are normative: an implementation MUST reproduce every output from the given inputs. The machine-readable test-vector file format is defined by 04.

17.1 Recovery phrase encoding (§4.1)

E C = SHA-256(E)[0] Word indices Phrase
00000000000000000000 01 0, 0, 0, 0, 0, 0, 0, 1 abandon abandon abandon abandon abandon abandon abandon ability
0102030405060708090a c8 8, 128, 1544, 80, 771, 1056, 289, 712 absurd avoid scissors anxiety gather lottery category flip
ffffffffffffffffffff 00 2047, 2047, 2047, 2047, 2047, 2047, 2047, 1792 zoo zoo zoo zoo zoo zoo zoo theme
7f3a9c0e55d2b18e4a61 b1 1017, 1703, 28, 1373, 344, 1593, 332, 433 left stay adjust produce climb shrimp civil curtain

Forgiving input (§4.3), all for the last phrase above:

Input Result
1. Left 2. STAY 3. adjust 4. produ 5. climb 6. shrimps 7. civil 8. curtain Valid; E = 7f3a9c0e55d2b18e4a61
LEFT stay-adju prod climb shri civi curt (full-width first word, hyphen, 4-letter prefixes) Valid; E = 7f3a9c0e55d2b18e4a61
left stay adjust produce climb shrimp civil cushion All words resolve; checksum fails
left stay adjust produce climb shrimp civil Incomplete (7 words)
left stay adj produce climb shrimp civil curtain Incomplete (adj is unresolved: fewer than 4 letters and not a word)

17.2 KeyBackup derivation and encryption (§5.3, §5.4)

Inputs:

E (phrase entropy)   = 7f3a9c0e55d2b18e4a61   (phrase: left stay adjust produce climb shrimp civil curtain)
phraseId             = d0d1d2d3d4d5d6d7d8d9dadbdcdddedf   (b64u 0NHS09TV1tfY2drb3N3e3w)
S (kdf.salt)         = 000102030405060708090a0b0c0d0e0f   (b64u AAECAwQFBgcICQoLDA0ODw)
addr                 = alice@a.com
kdf                  = argon2id, v = 19, m = 65536, t = 3, p = 1, tag length 32
IK seed              = 808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f
IK public (JWK x)    = zRSzf5VulTGU_3-3Oz2B3MVh1hp1OAlLfD4aZD7l86o
ikf                  = qI__BOccgAhhH9wob_G7gFVHLKIkS4CutvoSx0bMCY8
K_vid                = 202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f
K_vault(1)           = 404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f
igen, vgen           = 1, 1
nonce                = a0a1a2a3a4a5a6a7a8a9aaab   (b64u oKGio6Slpqeoqaqr)

Outputs:

A   (Argon2id)       = 2bd233d88c147ebac2a77b383ef5189de1728271484f9c8ac086ae127a6995b6
BK                   = fab2925d0788d8718a12afc7e923beff99b890c5f6b175ddc10ce3825fadb7c9
AAD                  = 737631206261636b757000010b616c69636540612e636f6d00000001a88fff04e71c8008611fdc286ff1bb8055472ca2244b80aeb6fa12c746cc098f00000001d0d1d2d3d4d5d6d7d8d9dadbdcdddedf1300010000000000030000000110000102030405060708090a0b0c0d0e0f

The IdentityCertificate in the payload is an illustration of 07's format, signed by the IK above (Ed25519 is deterministic, so it is reproducible); only its bytes matter to this vector:

eyJhbGciOiJFZERTQSIsInR5cCI6InN2LWlkY2VydCtqd3QiLCJraWQiOiJxSV9fQk9jY2dBaGhIOXdvYl9HN2dGVkhMS0lrUzRDdXR2b1N4MGJNQ1k4In0.eyJzdWIiOiJhbGljZUBhLmNvbSIsImlrIjp7Imt0eSI6Ik9LUCIsImNydiI6IkVkMjU1MTkiLCJ4IjoielJTemY1VnVsVEdVXzMtM096MkIzTVZoMWhwMU9BbExmRDRhWkQ3bDg2byJ9LCJpZ2VuIjoxLCJraW5kIjoidXNlciIsImlhdCI6MTc2NDg3MjQwMH0.yFihQgBYvPZ9h7D86CZKncKePSXXJ1Iz2zD9aFMz5qX1qnKONbmph4N2j8nCV9Y5h5FLB6iNi9j81YG22_-jAQ

Payload plaintext (736 bytes, exactly these bytes, no white space):

{"v":1,"addr":"alice@a.com","igen":1,"ik":"gIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp8","idc":"eyJhbGciOiJFZERTQSIsInR5cCI6InN2LWlkY2VydCtqd3QiLCJraWQiOiJxSV9fQk9jY2dBaGhIOXdvYl9HN2dGVkhMS0lrUzRDdXR2b1N4MGJNQ1k4In0.eyJzdWIiOiJhbGljZUBhLmNvbSIsImlrIjp7Imt0eSI6Ik9LUCIsImNydiI6IkVkMjU1MTkiLCJ4IjoielJTemY1VnVsVEdVXzMtM096MkIzTVZoMWhwMU9BbExmRDRhWkQ3bDg2byJ9LCJpZ2VuIjoxLCJraW5kIjoidXNlciIsImlhdCI6MTc2NDg3MjQwMH0.yFihQgBYvPZ9h7D86CZKncKePSXXJ1Iz2zD9aFMz5qX1qnKONbmph4N2j8nCV9Y5h5FLB6iNi9j81YG22_-jAQ","vaultIdKey":"ICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj8","vaultKeys":[{"vgen":1,"key":"QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xdXl8"}],"phrase":"fzqcDlXSsY5KYQ","phraseId":"0NHS09TV1tfY2drb3N3e3w","createdAt":"2026-12-04T18:20:00.000Z"}

ct (b64u, 752 bytes decoded, including the 16-byte tag):

cRj9TcONRKfw4u7zXvONSYwYf8ToW7ZlrSTnU6HTAkpjvJ5jEcE-gJx-1Zq1t1n-dYI6bsw88zy6qcH5cJq10EffT5-qRqVw5zZc
OG7Vnhtn7sQ3G4p_GvPbz3GyMbDJabhYDFbNfJzZiKzjSnlFQCbsSq3B0qJYvrj-BhqMOl7x4rxOMg2yWPa6v2djMGmUaaDesAMi
OrODb5zfhQOuKLHj_QEeqJ1WjTVA3SmtVWQOsPTZw6aimHOKoTXVfxv4d-WKNg_X2_E1mgGty9GMe0cAXRPzm_jAF1UynFlOtYgd
kk676wBlccibL_vpMj__q9Zv1mmP2i4dJzH3nJWjIy5ufEXHPefQGI5pYMv7faRK3J8E9iSRFZ87svv2Bzus8rrTGG2NgrjbHAMN
ym-dlMv7_bE-EDhVDDjcvkC80i8Y64PARVjf7U3Woe2etGghdqO_54IHi7QYbb2ylzCzjIwkmxtGuBhijXrBYwUKPTVW7ZEXX2tV
IOsvcFtWjFUz3Q9sGV93Gn7J_fiX_mfF4PrKA6MIU9uCdO0xqRgn6v_DEwElam7qUJU_5pEwuQZ2rlmx3ONXJh-nCX7ExXPEEBpm
y6_v2oR-arvqSMNBQp-4AVSHd_u3LUljbW-lIuTCgw_s96VOrm5185jsvrv2A_pun1MTput5MtZVdA9166OiUQLiD9i7B-wm3ZNn
4AUf5KxYTR8ae_jkEenF6OG5-ZoDIVcSDtwVLhmvMfvTmh6TqDc_kgM-ZyUjA4SxvZ2VjZEAmYGCPk1PE1RxWNLkVvslU-KlUJGl
74CA2wLRlKgmuabC1AXTjk0KxKlwBumy2zw3dhAMzzeH5eM3DABzfmoEzoqOwjNK8gCemvarD-i_vrS9DS660KzIO9fXL4gZSH2h
nHlbyoAyLiICPHUze5Qq1IU3h5DI39OaENxbkf51GGmcD_9tClGN_rkANE7zpAvJMHWuuJZR0qP3w412mtSh35_ljU3i5lJVe8QR
kEA

SHA-256(ct) = 9696c6194ec052741a1439c2726e0d6a7ba99b91bb3d851d2e9cd80752ae9e82

17.3 Vault IDs, keys and records (§8.2, §8.4, §8.5, §10.2)

Inputs: K_vid and K_vault(1) as in §17.2; K_vault(2) = 606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f; addr = alice@a.com; igen = 1.

Value Input Output (hex) Output (b64u)
archive rid groupId = sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1, epoch = 42 e2fa28041163d008907cdb8ddd6562a7 4vooBBFj0AiQfNuN3WVipw
archive bucket host = b.com, ctx = ch:01938a11-2b3c-7d4e-8f90-112233445566 af057d746bd9f0e9cf77b272671d2535 rwV9dGvZ8OnPd7JyZx0lNQ
shared_keys rid host = b.com, ctx = ch:01938a11-2b3c-7d4e-8f90-112233445566, shareId = 01938f50-1a2b-7c3d-8e4f-5a6b7c8d9e0f, part = 0 8280dc7a8ae64097784b33b5fd573855 goDceormQJd4SzO1_Vc4VQ
shared_keys rid as above, part = 1 bca963ae5c13f638a8a702c6a9185d31 vKljrlwT9jiopwLGqRhdMQ
pin rid contactAddr = bob@b.com 141e36926647a9b822150725461f38b2 FB42kmZHqbgiFQclRh84sg
sec_pin rid (channel) host = b.com, ctx = ch:01938a11-2b3c-7d4e-8f90-112233445566 bb36a9714e5cde1264b7561d7f89a87c uzapcU5c3hJkt1Ydf4mofA
sec_pin rid (community) host = b.com, ctx = empty a3ca6ac10ae3e48e8bb13677a5182a93 o8pqwQrj5I6LsTZ3pRgqkw
settings rid name = w1_seen 80b93504eb6c88037a119b625f5c7450 gLk1BOtsiAN6EZtiX1x0UA
recovery rid — e34db68f6b2253cee4d21a4f6b2d311d 4022j2siU87k0hpPay0xHQ

A shared_keys record's bucket is the archive bucket of the same context (row 2).

Derived keys:

K_rec(1, archive rid) = e650cb538a25167064895199e7010a5a799620d421dd4a2c94936e818b9a3a2b
kcv(1)                = 245e94d1d66f6383   (b64u JF6U0dZvY4M)
kcv(2)                = 15667d7bc5be7cb1   (b64u FWZ9e8W-fLE)
K_link(2, 1)          = 2941a4a85142e9a972208c8406a17efb5c9233a6175da4fa6635536db9d4dffb

Archive record encryption, with key = e0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff (so ekid = HKDF-Expand(key, "sv1 ekid", 8) = 0f9446ff136a2276, b64u D5RG_xNqInY), vgen = 1, ver = 1 (a create, ifVer: 0) and nonce b0b1b2b3b4b5b6b7b8b9babb (b64u sLGys7S1tre4ubq7):

plaintext = {"t":"archive","host":"b.com","ctx":"ch:01938a11-2b3c-7d4e-8f90-112233445566","groupId":"sv1:b.com:ch:01938a11-2b3c-7d4e-8f90-112233445566:1","gen":1,"epoch":42,"keys":[{"ekid":"D5RG_xNqInY","key":"4OHi4-Tl5ufo6err7O3u7_Dx8vP09fb3-Pn6-_z9_v8","source":"mls","confirmed":true,"learnedAt":"2026-12-04T18:22:31.512Z"}]}
AAD       = 737631207661756c740001e2fa28041163d008907cdb8ddd6562a707617263686976650000000100000001000000010b616c69636540612e636f6d
ct (b64u) =
e3_l51Jc2NbBmlOVDFj5cax8EujQ-GdIwsqahEGsOSyTfCkOblvCTI0eAFczJI-Lu8o9FJ9cLMU-Wn7_cxa-ZjpyLTjCc8qOYYxG
rtbWbxnqzMJz1ICiRtAvF8hBjT86g9Cg6W89I0abSZd4zMfF4CpVMZPN4JI3QKtS4ZAe4rS1n1GwbeGPFiDAQLScO5hD1_pRtzhy
AuUbyGF_46ifIhY_e9Pu87ydw3TKZh89nTR3xIzmQ_UJ3gfWlhJkt02jpmj8R1Z8Iyfs_xCRB1hccNnC3_15vCTEF2bULmceR-rI
CoEudJbN9tRv4s_Q7DT7QZvHywzgCckN4Qt_gLQbgMCVVhPI3FQ-TAF2Vfn9MJkHd3iTP-M6dCVOnSzKSm5khqNbklvk1S9GBPY2
lx2S5Hc28LSKs-Hd9XZX6-XtI76b9eBYITC-tESXDl0

VaultKeyLink of generation 2 (linkedVgen 1, wraps K_vault(1)), nonce c0c1c2c3c4c5c6c7c8c9cacb (b64u wMHCw8TFxsfIycrL):

AAD       = 737631207661756c7400020b616c69636540612e636f6d000000010000000200000001
ct (b64u) = D0VhgzVrRjsaX9Dcst-14yZaA_gPbRguS9RoPwM01KP3giH0gkgXEzoAgrro9aD1

17.4 Pairing (§6.3.1, §6.7.1)

Key derivation, with an illustrative ISK (the CPace vectors that produce real ISK values are 04's, V-11):

ISK        = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f
K_payload  = 7622cd862334e4375515ec70693c644de793a27f1ae14502882b7fbfe29a3f94
K_ack      = bf2eded0f9ee94d10938a465e60b37125a16b07230c8cca450beb21321e5e1f1

QR payload, direction A, with pairingId = 01938f40-0000-7a00-8000-00000000a1b2 (01938f4000007a00800000000000a1b2), secret = c0c1c2c3c4c5c6c7c8c9cacbcccdcecf and addr = saxonjones@sloppyvoice.com (26 bytes, so addrLen is the single byte 1a):

pair-bin = 010101938f4000007a00800000000000a1b2c0c1c2c3c4c5c6c7c8c9cacbcccdcecf1a7361786f6e6a6f6e657340736c6f707079766f6963652e636f6d
pair-qr  = SVPAIR1:AEAQDE4PIAAAA6QAQAAAAAAAACQ3FQGBYLB4JROGY7EMTSWLZTG45TY2ONQXQ33ONJXW4ZLTIBZWY33QOB4XM33JMNSS4Y3PNU

The string is 106 characters, all in the QR alphanumeric set.

A full CPace run, with the cpace_a, cpace_b and confirm_a bodies in the form this document carries and the resulting ISK, is 04 §16.3 V-11b (code) and V-11c (QR). With V-11b's ISK: K_payload = 963b73e6c5fc8cb4846e4f503cebefe639629a82fe5b400b23c47e9a35c6802d, K_ack = 9801c8ac1e00d3b4155a4386a042d261f407aa4593c3be1e20c1efb061a96d00. With V-11c's ISK: K_payload = 5c65afb4ea897c7111edb3f16be99ad46940768bb36e173d0150a1b3cff94195, K_ack = 8f915cb25eb08a4828835bc32a2beed6980387f3ae920d5b7337d36b0b03f2f6.

17.5 Box keys, generation signatures and grants (§10.1, §10.2, §10.3)

Inputs: addr = alice@a.com, igen = 1, K_vault(2) and the generation-2 link as in §17.3.

device A did       = ab66d2f71560de6d3226941ed6f4f403   (q2bS9xVg3m0yJpQe1vT0Aw)
device A DSK seed  = 101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f
device A DSK (x)   = d3bocLkzVPKgskwj8qNsxOgOIjIYwbl5Jv3QGDlqK5s
device B did       = 2e9d304b7690c7d6d3ea655cd6b2b678   (Lp0wS3aQx9bT6mVc1rK2eA)
device B DSK seed  = 303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f
device B DSK (x)   = i7BOHBuD3d8xH1vN33xQ7ePAgC9H7HluKhMc9BKY2fM
device B box key   = 505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f   (X25519 private)
device B box pub   = 392d174a38b3b1beafaf1fe824870841c5fa531bc6eafdb6402c124664488c1c   (b64u OS0XSjizsb6vrx_oJIcIQcX6UxvG6v22QCwSRmRIjBw)

BoxKey of device B (§10.1), signed by device B's DSK with label vault-box-key:

BoxKeyTBS = 010b616c69636540612e636f6d2e9d304b7690c7d6d3ea655cd6b2b67800000001392d174a38b3b1beafaf1fe824870841c5fa531bc6eafdb6402c124664488c1c
sig (b64u) = QQoKgj82fJYOMiQ8g7UvspTw901SeS_xeYusuvd8KVIQQJTNVwWiga6XypTf_pJgaMBnvJBVInF8mijLzASQAg

Generation 2 signature by device A (§10.2), with idStateVer = 18 and the link of §17.3, label vault-generation:

VaultGenerationTBS = 010b616c69636540612e636f6d00000001000000020000000115667d7bc5be7cb10cc0c1c2c3c4c5c6c7c8c9cacb300f456183356b463b1a5fd0dcb2dfb5e3265a03f80f6d182e4bd4683f0334d4a3f78221f4824817133a0082bae8f5a0f50000000000000012ab66d2f71560de6d3226941ed6f4f403
sig (b64u)         = dl9DI8A70oM9vPt9LoNIe8F2cSgmjZTmhZ-Ni4bmHVMdytsuPskIodsYCMosJEfA49xiLtx2E6D-6mZOSb1yAg

VaultKeyGrant of K_vault(2) to device B (§10.3), with the HPKE ephemeral private key skE = 707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f:

info       = 737631207661756c74206772616e74000b616c69636540612e636f6d2e9d304b7690c7d6d3ea655cd6b2b6780000000100000002
enc (b64u) = I7e7jJGuAIcR-xKEZ4C83x4GX4Ib3-xJ9X58fc1MSCM
ct (b64u)  = yQAzLeM2KNeqkU6gFcTvSKiVv6vySPXcRqgW9iIiy7ro9wc3RC3Gq9vZbn74Gh93

The grant was also opened with an independent RFC 9180 implementation, which returned K_vault(2).

18. Security considerations

18.1 Guessing the recovery phrase

The KeyBackup is protected by 80 bits of entropy stretched with Argon2id at 64 MiB, 3 passes (D-052). Each guess costs about 192 MiB of memory traffic, so even a very large attacker (say 10^6 GPUs at 5,000 guesses per second each) would need on the order of 10^7 years to cover half of the 2^80 space. The 8-bit checksum is computed from E and adds no shortcut: an attacker enumerates E directly. There is no online oracle: the home server never verifies a phrase, and a failed restore reveals nothing to it.

The parties who can attempt offline guessing are those who can obtain the KeyBackup: the home server itself (an insider or a breach of its storage), and an attacker who controls the user's OIDC login and signs in fresh (§5.7). Download limits and the activity log make bulk collection visible but can't prevent a single copy being taken; Argon2id and the phrase length are the real defence.

A recovery key saved in a password manager is as safe as that password manager. A printed recovery key is as safe as the paper. Clients don't tell users otherwise.

18.2 A malicious home server during pairing

The home server relays every pairing message. It can't read the payload, because the payload key comes from CPace, which the server can't compute without the PRS. Its options are:

  • Guessing the code. It can stand in for the entering device and run CPace with one guess. Both clients and the server allow one CPace exchange per session, and the displayer discards its credentials after it. The displayer shows the QR code and the 6-digit code together (00 HP-14), and the initiator chooses prs_kind, so a server that plays the initiator always picks the code: its chance is 10^-6 per user-initiated session, whether the user meant to scan or to type. The 128-bit QR secret protects only against attackers who can't take the initiator's place. A failed guess shows "That didn't work" on the user's screens, like any mistyped code. The server can't create attempts on its own: the displayer only runs CPace for a session the user started on that screen, and the 5-per-hour limit (§6.10) bounds even a user who keeps retrying.
  • Faking the prompt. It can put any device name in pairing.requested. The prompt still leads nowhere unless the user then scans or types a credential shown on a real screen.
  • Denial of service. It can drop, delay or reorder messages, or refuse sessions. Users then fall back to the recovery key.
  • Substituting the identity. A malicious home server can publish an IdentityState with a key it generated (00 §10, item 1), but it can't make a device receive the real identity key that way, and the user's own devices see W4a.

Social engineering is the residual risk. An attacker who controls the user's OIDC login can create a session (direction A) and prompt the user's devices, but needs the user to approve and to type a code shown on the attacker's screen; in direction B the attacker needs to see the code shown on the user's own device and then join first. The prompt therefore names the device, the sign-in provider and the time; in direction B the approver shows which device joined and asks before sending (§6.9.3); pairing screens are kept out of screenshots and the user's own screen shares (§6.3); and 20's copy tells users to approve only a device in front of them and to enter a code only on their own new device. If the attacker succeeds anyway, W4c appears on the user's other signed-in devices (07 §18.3), and the user can revoke the device (D-017).

18.3 Device theft

A stolen device's keys are protected at rest by the platform (§13): hardware-backed wrapping keys on mobile and on most desktops, and the device lock. When the user revokes the device (D-017), its sessions end at once, it is delisted from IdentityState and removed from every MLS group (13), and the vault rotates to a generation the device can't read (§10). Because the device holds the phrase entropy, a new recovery key is made for lost or stolen devices (§10.8) so that the KeyBackup no longer opens with what the thief holds. This depends on the user answering "Was it lost or stolen?" with yes (05 §12.10); a device removed as removed keeps the old phrase valid, and a thief holding it plus the KeyBackup can read the new generation.

The thief also holds a copy of the identity key. Alone, it can't add a device: that needs a home session to get the device listed (dual control, D-033). Together with the user's OIDC login it can, and W4c then appears on the user's devices. Identity rollover after theft is deferred (D-072); a user who believes the identity key is in hostile hands can start fresh (§11), at the cost of W2 for DM contacts.

18.4 Web clients

A web client is exactly as trustworthy as its origin (HP-10, D-065). Script running in the origin, through a compromise of the server that serves the code or a cross-site scripting bug, can use the keys in the Worker and can wait for the next moment the identity key is unwrapped. The non-extractable wrapping key protects only against copying the stored data out of the browser. Strict CSP and Subresource Integrity (20) reduce the risk; they don't remove it. Shared-computer mode keeps keys off the disk entirely, at the cost of setting the device up again on every visit.

18.5 What the home server learns from the vault

The home server sees, for each account: the number, sizes and types of vault records (so roughly how many secure contexts and pinned contacts the user has), the number of buckets, when records are written (which correlates with epoch changes in the user's groups), when generations rotate, and when backups and pairings happen. It doesn't learn which contexts or contacts the records concern (§8.5), or anything inside them. From the record types it also learns that the account received HistoryShares (shared_keys records) and roughly how many message keys they held, but not in which context.

The home server can't forge or move records: each record is AEAD-protected with its rid, type, igen, vgen, ver and address bound in, and its rid and bucket must recompute from its content (§8.4). It can't present an old ciphertext as a newer version, because ver is in the AAD, and a client never accepts a lower ver than it has seen for a rid (§8.4) or a vault generation lower than one it has seen for the current igen. It can't make devices adopt a vault key of its own, because every generation received by grant is signed by an active device and linked to the previous key (§10.2.1).

What remains, and is accepted in v1:

  • Withholding and deletion. The home server can delete or withhold records and backups (denial of service). A device that has never seen a record can't tell that it is missing.
  • Old versions to new devices. A newly enrolled device has seen no versions, so the server can serve it an older but authentic version of a record (for example a pin from before the user verified the contact, or before 07's state machine blocked it), or leave a pin out. The device then pins the contact's current key on first contact as 07 §16.2 says. This needs the user's own home server to misbehave, and the effect is the same as for a user who never pinned that contact. Devices that already hold the newer version keep it.
  • Old KeyBackups. The server could serve an old KeyBackup only if it kept a copy against §5.9; one under a phrase the user replaced is the case §10.8 is about.

18.6 Recovery after a hostile reset

07 §15.2 step 7 and this document's §5.6.3 delete the old KeyBackup at a reset, and the old vault is retired for 30 days (§8.12). Someone whose account was reset by an attacker who controlled their OIDC login (D-071) can take the account back with a new reset, and recover their old pins and history keys only by pairing an old device that still holds the old vault keys (§11.4). The old recovery key alone opens nothing. OQ-08-6 asks whether the old KeyBackup should also be kept for 30 days.

18.7 Concentration of keys

The key archive deliberately gathers every history key the user has learned, and every message key others shared with the user, so that the user's own new devices can read everything the user could read (D-007, D-054). Anyone who holds a current vault key and obtains the vault's ciphertext can read all of that history; anyone who has the recovery phrase and the KeyBackup can obtain the vault key. This is the forward-secrecy cost of the user's own history (00 §10), confined to the user's own account: under the revised D-007 nothing hands these keys to newcomers. The recovery record (§8.6.5) gives the phrase entropy to every holder of the current vault key; those are enrolled devices, which already hold the identity key.

18.8 Other residual risks

  • Notification extensions hold recent history keys (§13.5). A compromise of the extension's process reads recent secure messages of the contexts with notifications, and nothing else.
  • Retired vaults (§8.12) keep the old generation's ciphertext for 30 days after a reset. Only the user's old devices hold keys for it.
  • Operating-system backups are excluded from key storage (K-2). A user who copies a whole disk image takes the wrapped key store with it, but not the hardware-held wrapping key.
  • Screen capture and shoulder surfing of the recovery key are reduced (§4.4) but can't be prevented on every platform.
  • A stolen session and the first upgrade. Turning on encryption needs a provider sign-in within 24 h (§3.2, D-085), so a stolen token of a session that signed in less than a day ago can still attach the thief's key to an insecure account; an older one can't. Contacts pin that key silently; the victim's devices show "Approve this device" with "This wasn't me" (§12.3). 22 records this as RR-10.

19. Open questions

ID Question Recommendation
OQ-08-2 A passkey (WebAuthn PRF) that unlocks the recovery phrase (D-075) is deferred until after v1. Keep it deferred. When added, store a second encryption of E under a PRF-derived key as a new member of the KeyBackup (readers ignore unknown members, §5.2), so v1 backups remain valid and the phrase stays the root of recovery.
OQ-08-3 Should the home server keep the previous identity generation's vault for 30 days after a reset (§8.12), so an old device found later can carry history and pins over, or delete it at once? Keep 30 days. The data is ciphertext that only the user's own old devices can open, and the benefit to someone who started fresh by mistake is large.
OQ-08-4 Downloading the KeyBackup from an unenrolled device needs fresh authentication within the last hour (§5.7, 05 §9.1). This sometimes adds one more sign-in to a restore. Keep it. It stops a stolen refresh token from taking the backup, at the cost of a familiar sign-in screen.
OQ-08-5 In shared-computer mode, reloading the tab signs the user out (§13.4). Accept for v1. Shared-computer mode is opt-in and meant for borrowed machines, where forgetting everything is the point.
OQ-08-6 After a reset, should the home server also keep the previous generation's KeyBackup read-only for 30 days, beside the retired vault, so that someone who started fresh and then found their old recovery key, or whose account was reset by an attacker (D-071), could import their old pins and history keys with the old key alone (§18.6)? 07 and this document currently delete it at the reset. Keep deleting it in v1. Keeping it would add a second restore path ("Use an earlier recovery key") and a screen to explain it, for a case that pairing an old device already covers; the risk of keeping it is small, because the old identity key it holds is dead.

20. References

20.1 Normative

  • RFC 2119, RFC 8174 — requirement key words
  • RFC 5234 — ABNF
  • RFC 8259 — JSON; RFC 7493 — I-JSON
  • RFC 3339 — timestamps; RFC 9562 — UUIDs (UUIDv7)
  • RFC 4648 — base64url and base32
  • RFC 9457 — problem details for HTTP APIs
  • RFC 2104 — HMAC; RFC 5869 — HKDF; FIPS 180-4 — SHA-256, SHA-512
  • NIST SP 800-38D — AES-GCM
  • RFC 9106 — Argon2
  • RFC 8032 — Ed25519; RFC 7748 — X25519
  • RFC 9180 — Hybrid Public Key Encryption (HPKE)
  • RFC 7515 — JWS; RFC 7517 — JWK; RFC 8037 — EdDSA in JOSE; RFC 7638 — JWK thumbprint
  • RFC 9420 — the Messaging Layer Security protocol
  • draft-irtf-cfrg-cpace — CPace (revision pinned in 04)
  • BIP-39 — the English word list (english.txt, SHA-256 2f5eed53a4727b4bf8880d8f3f199efc90e58503646d9ff8eff3a2ed3b24dbda); only the word list is used
  • Unicode Standard Annex #15 — normalization (NFKC)
  • ISO/IEC 18004 — QR code (alphanumeric mode)
  • W3C Web Cryptography API (including Ed25519 and X25519 support); W3C Indexed Database API; WHATWG Storage Standard (navigator.storage.persist()); W3C Credential Management Level 1 (PasswordCredential)
  • Sloppy Voice documents 00, 01, 02, 03, 04, 05, 06, 07, 09, 11, 12, 13, 14, 15, 17, 19, 20, 22

20.2 Informative

  • RFC 9750 — MLS architecture
  • RFC 9382 — SPAKE2 (the fallback named in 00 §7.15)
  • RFC 8252 — OAuth 2.0 for native apps
  • Apple Platform Security guide — Keychain data protection classes, Secure Enclave
  • Android developer documentation — Android Keystore system, StrongBox, Auto Backup and data extraction rules
  • Microsoft documentation — CNG Platform Crypto Provider (TPM), DPAPI
  • freedesktop.org Secret Service API; XDG Desktop Portal Secret interface
  • spec/DECISIONS.md — decision log