Protocols
This page walks through every protocol in which veyq creates, moves, or replaces key material: account birth and
login, device linking, inviting a member, sharing, rotation and revocation, recovery, and the key chain with which
an account is secured. Each section names its
participants, gives the steps in prose and as one sequence diagram, and then states what the server learns, what it
cannot do, and what remains open. Byte formats are not restated here. They live in the conformance-pinned suite
packages/crypto/src/v1.ts and its vectors
contracts/crypto/vectors/v1.json.
Conventions
Section titled “Conventions”| Symbol | Meaning |
|---|---|
| Master Key | The account’s 32-byte root. It is wrapped once per unlock method and opens the identity private key. |
| Identity key | A hybrid post-quantum encryption key and an Ed25519 signing key. Others seal scope keys to the public half; its owner signs every grant it issues. See Cryptography. |
| Secret Key | 256 random bits, held by the user in the Emergency Kit. The server never stores it. |
K_SC / epoch key |
A scope’s content key, one at a time: a rotation replaces it with a fresh key at the next epoch, and a grant carries the current one. |
K_node |
A random per-Memory content key, wrapped independently, which makes it the unit a share hands out. |
K_share |
A random per-link key. It travels in the URL fragment. |
| Seal | Authenticated encryption that binds its purpose and the object it is stored as (ADR 0072), so the server cannot serve one object’s ciphertext as another’s. |
The full hierarchy is on Key hierarchy.
1. Account birth and login
Section titled “1. Account birth and login”Purpose. Create an account whose keys the server never holds, and later authenticate to the server without sending it the password. Authentication and unlock are two separate layers on purpose. Login yields a session. Opening content needs the Master Key, which only the unlock step produces.
Participants. The account holder, their client, and the server.
Steps.
-
Birth (on the device). The client generates the identity keypair, a random Master Key, and a random Secret Key. It seals the identity private key under the Master Key. It then writes two wraps of the Master Key:
- the
PASSWORDwrap, under a key derived with Argon2id from the Secret Key and the password. This is two-secret key derivation (2SKD), and it is the mandatory floor; - the
RECOVERYwrap, under a key derived with Argon2id from the Secret Key alone. The server withholds it (section 6).
From the password and a deterministic auth salt (derived from an instance salt and the email address), the client derives an Ed25519 auth keypair, separate from the unlock derivation. From the Secret Key alone it derives an Ed25519 Secret-Key proof key. The Secret Key is shown as the Emergency Kit, and the user must confirm they saved it before the account is created.
- the
-
Registration. The client sends the email, the identity public key, the wrapped identity private key, the two Master Key wraps, the auth public key, the proof public key and the suite id. The password, the Secret Key and the Master Key never leave the device. The same birth runs at first-run setup (the Server Owner) and when an account is born by joining a tenant through an invite (
accountBirth.ts). -
Login (challenge-response). The client re-derives the auth keypair, asks for a challenge, and gets a single-use, time-bounded nonce. The server issues one whether or not the account exists. The client signs the nonce and sends back the email, the nonce and the signature. The server consumes that one challenge, checks the signature against the stored auth public key, and issues a session. A failure is generic.
-
Unlock. With a session, the client fetches its
PASSWORDwrap and its key-derivation parameters. It refuses any derivation profile other than the one it writes itself (ADR 0017 rule 5). It then derives the key from password and Secret Key, opens the Master Key and through it the identity private key, and discards the derived key. A wrong password or Secret Key fails on the device, and the server is not involved. -
Personal scope. After the first unlock, the client creates its personal scope by itself: a random scope key, sealed to its own identity public key and signed with its own identity key. The server stores only the scope row and that signed ciphertext.
sequenceDiagram actor U as Account holder participant C as Client participant S as Server U->>C: email, password C->>C: generate identity keypair, Master Key, Secret Key C->>C: PASSWORD wrap (Argon2id over Secret Key and password)<br>RECOVERY wrap (Argon2id over Secret Key)<br>auth keypair from password, proof key from Secret Key C->>U: Emergency Kit (Secret Key), must be confirmed C->>S: register: email, identity public key, wrapped identity private key,<br>both wraps, auth public key, proof public key Note over C,S: login C->>S: request challenge (email) S-->>C: single-use nonce (issued for unknown accounts too) C->>S: email, nonce, signature with auth private key S-->>C: session, or a generic failure Note over C,S: unlock C->>S: fetch PASSWORD wrap S-->>C: wrap and derivation parameters (ciphertext) C->>C: derive key from Secret Key and password<br>open Master Key, then identity private key
What the server learns. The email address in plaintext (it is the login identifier and the source of the auth salt), the identity public key, the auth and proof public keys, ciphertext wraps, the suite id, and when sessions are created and refreshed. It never receives the password, the Secret Key, the Master Key or any derived key.
What it cannot do.
- Turn a database copy into a login or into content. The stored auth public key is not a credential. Forging a
login means brute-forcing the password through Argon2id, and that buys a session and operational metadata, never
content (ADR 0003).
A cracked password alone opens no wrap, because the
PASSWORDwrap also needs the Secret Key. - Replay a login. What crosses the wire is a signature over a fresh nonce, consumed once.
- Tell an existing account from a missing one through login. The salt is deterministic, a nonce is always issued, and failures are generic.
- Make every unlock derive almost forever by serving a costly derivation profile. A client derives only with the profile it writes (ADR 0017 rule 5).
- Plant a personal scope key. A personal-scope grant opens only if it is self-signed under the vault’s own key, and the signed scope kind stops a group’s grant posing as the personal one (ADR 0028 Decision 6).
Residual. An active operator can install an identity of its own on an account, because it writes the key directory itself. Through the API, a session or a password is no longer enough to replace an identity or mint a cold credential: those requests need a signature of the Secret-Key proof key (ADR 0060 Decision 2). That check runs on the server, so it binds every caller except the operator. A contact who pinned the account’s key-chain head sees an identity the operator installed as Can’t confirm this key, because no step it can sign leads there (section 7); one who never pinned the account trusts it on first use until Key Transparency exists. A weak password stays crackable at Argon2id cost. The auth keypair is Ed25519; a post-quantum signature is planned but not built. See Known limitations and the Roadmap.
2. Linking a device
Section titled “2. Linking a device”Purpose. Let a second device sign in and unlock without typing the password or the Secret Key. An unlocked device seals the Master Key and a fresh session to the new device over a channel the server only relays (ADR 0059). This is the one mechanism in veyq that turns an auth-layer fact into an unlock-layer one, so its ceremony is the whole defence.
Participants. The account holder, a trusted device (signed in and unlocked), a new device, and the server as relay.
Two directions, one mechanism. In Add a new device, the trusted device shows a code and the new device scans it. The binding step is to compare a short number on both screens, which works because both screens are in front of the user. In Sign in with a QR code, the new device shows the code and the trusted device scans it. Here the attacker could have authored the code, so comparing would prove nothing. Instead the trusted device shows a short code that the user types into the new device, and the trusted device seals only after the new device proves it knows that code. There is exactly one attempt. The rule: comparing a code means nothing unless you already know the other screen is yours; where you don’t, the code must travel in the direction the attacker does not control. The diagram shows the first direction.
Steps (add a new device).
- The trusted device draws a 32-byte secret and derives from it, with two HKDF labels, a routing handle and a channel key. It opens the channel under the handle. The server only ever receives the handle.
- The secret is shown as a QR code. The code never names a server, and no client follows an address out of a scan: each side talks only to the instance it already has open.
- The new device scans the code, derives the same handle and channel key, generates a single-use ephemeral transport keypair, and posts its public key with a MAC under the channel key.
- The trusted device refuses an answer whose MAC does not verify. Both devices then show a short check number derived from the answering key, and the user confirms they match, names the device, and confirms with a slide gesture whose text says that signing the device out later will not take the key back.
- The trusted device mints a new session family for its own account and seals the Master Key, that family’s refresh token, the label and its own trust-state marks to the transport public key. It posts this envelope with a MAC under the channel key.
- The new device fetches the envelope (unauthenticated on purpose, since only the ephemeral private key opens it),
verifies the MAC and opens it. It first adopts the refresh token into a session of its own, which spends the
handed-over value. Only then does it unlock, write its device-register entry, and enrol a
DEVICE_KEYwrap. It never enrols a password-bound wrap, because it has never seen the password.
sequenceDiagram actor U as Account holder participant T as Trusted device participant S as Server (relay) participant N as New device T->>T: secret = 32 random bytes<br>derive handle and channel key T->>S: open pairing channel (handle only) T-->>N: QR code carries the secret (camera, never the server) N->>N: derive handle and channel key<br>generate ephemeral transport keypair N->>S: answer: transport public key and MAC under channel key S-->>T: relay answer T->>T: verify MAC, else abandon Note over T,N: both screens show the same check number U->>T: numbers match, name device, slide to confirm T->>S: envelope sealed to transport key<br>(Master Key, refresh token, label, trust marks) and MAC S-->>N: relay envelope N->>N: verify MAC, open with ephemeral private key N->>S: adopt refresh token into its own session N->>S: unlock, write register entry, enrol DEVICE_KEY wrap
What the server learns. That this account opened a pairing and minted one more session family, which then appears in the account’s session list. It relays a handle, a public key with its MAC, and one ciphertext envelope. It never sees the secret, the channel key, the Master Key, the label, the check number or the pairing code, and it learns no account identifier from the new device’s side. Pairings are short-lived and single-use, and only one is open per account at a time.
What it cannot do. Link a device of its own while the user links theirs. The QR code carries a secret the relay never receives, and both relayed values carry a MAC under the channel key derived from it: the trusted device seals only to an answer whose MAC verifies, and the new device opens only an envelope whose MAC verifies (ADR 0059 §11). Without that MAC the relay could grind the compared number or the transcribed code offline and get the Master Key sealed to itself, or hand the new device a Master Key of its own making. The codes stop someone who is not the relay (a photographed or phished QR code); the channel key stops the relay.
Residual. An attacker who both reads the QR code and runs the relay holds the channel key and can grind the codes again. A grant is irreversible: revoking the linked device’s session takes its server access, not the Master Key it holds (ADR 0058). The remedy that works going forward is rotation (section 5), and it needs the Secret Key, which a linked device never received. See Known limitations.
3. Inviting a member, TOFU and safety numbers
Section titled “3. Inviting a member, TOFU and safety numbers”Purpose. Give a new person a shared scope’s key without the server ever holding it, without making them wait for another member’s device, and without letting the server swap a key unnoticed (ADR 0111 decisions 1–5, ADR 0129, ADR 0020, ADR 0028). An invite is a placeholder member: it holds a key the owner signed and a grant wrapped to that key, and the invitee replaces it with its own identity.
Participants. The inviting owner, the invitee, any member of the scope (every member holds its key), and the server.
Steps (a member invite into a tenant).
- The invite key. From an unlocked vault, the owner’s client draws a 32-byte seed and derives from it an
invite key, shaped like an identity (an X-Wing encryption key and an Ed25519 signing key). The owner signs the
invite-keystatement — the tenant id, the invite id, SHA-256 of the invite key’s public bundle and the expiry — with its identity key, and seals a grant of the tenant’s current epoch key to the invite key, signed like any grant, with the invite id as its recipient. - The link and the code. The client draws a code (10 Crockford base32 characters, 50 bits), or takes a
password the owner types (at least 10 characters). From it and a fresh 16-byte salt it derives a key with Argon2id
at the production profile, and seals under that key — purpose
invite-link, bound to the tenant and the invite — the seed, the owner’s key-chain head (section 7) and the owner’s account id (invite-linkversion 2). The link ishttps://<domain>/tenant/accept#<token>.<sealed>:tokenis the server’s single-use invite secret,sealedthe mode, the KDF parameters and the seal. The owner’s screen shows the code once, and the owner passes it on outside veyq. The seal is mandatory: a mailed invite’s link passes through the server’s mail, so an unsealed link would hand the invite to the operator. An invite as a link, the owner’s other way, is minted by a separate operation: the client posts the invite without an address or the sealed part, always under a generated code, the server answers the token to that client alone and sends nothing, and the client writeshttps://<origin>/tenant/accept#<token>.<sealed>.<code>for the owner to hand over in a channel of their choosing. The server never receives that link’s sealed part or code; the seal guards nothing against whoever holds the link, which is a bearer credential, and is kept so there is one link format and one opening path. - What the server keeps. The invite public key, the owner’s signature, the owner’s identity key as it signed,
the grant and the expiry, on the invite row, and the same grant a second time as the invite’s anchor. Before it mints (or re-sends), it verifies the owner’s signature over
the invite key under the identity key it stores for the caller (
400 invalid_requestotherwise), so a session without the owner’s unlocked vault, such as one from a phished password, mints no invite. It checks that the grant is of the tenant’s current epoch under the tenant’s lock (409 stale_epoch), that the grant names the invite key (409 recipient_key_not_current), and that the signed expiry matches its own invite lifetime within a minute, in whole seconds. It mails a mailed invite’s link with the sealed part appended and keeps no copy of that part; the invite secret is stored only as a hash. Mail is a precondition of both ways. Accepting, revoking, re-sending or expiring the invite clears its key, signature, grant and anchor in the same statement; re-sending is a new invite with a new key, link and code. - Every rotation carries every open invite. The client that rotates the tenant reads the open invites (keys,
signatures, signers; never an address). It re-grants the new epoch to each one whose owner signature verifies
under the signer’s key and whose signer key it anchors (section 7: the key at the owner’s served key-chain head,
reached from the head it pinned), and declares any other one pending. The server refuses a rotation that leaves an
open invite out (
409 rotation_incomplete). The anchor moves to the new epoch only when the invite’s own signer commits the rotation under the invite’s signer key; any other rotation leaves the owner’s grant as the anchor. An owner who secures their account re-signs their open invites with the new key in the same publish (section 7), so the invites keep working. A pending invite still redeems: its newcomer joins one epoch behind and is brought current by grant delivery (step 9). - The invitee checks before it trusts. On the link’s page the invitee types the code, unless the link carries it. The server’s preview serves the invite with the owner’s whole key chain, the anchor and the tenant’s succession statements above the anchor’s epoch. The client opens the seal (a wrong code does not open it) and requires: the invite key derived from the seed to equal the served one, and the account in the seal to be the served owner; the owner’s chain to pass through the head in the seal and end at the served owner key, so a key the owner’s securing installed is reached through the step the old Secret Key signed, and a retired key is never accepted; the owner’s signatures over the invite key and over the anchor to verify under that key; and the grant it is handed to be the anchor, or — when a later rotation carried the invite — to be reached from it: the client derives the anchor epoch’s succession public key from the anchor’s key and verifies each served statement up to the granted key. A carried grant names the rotator as its granter, whom the newcomer need not anchor: the statements from the owner’s anchor vouch for it, and the server holds no anchor key to sign one. An existing account also judges the owner against its pin with that chain. Any mismatch stops the accept with This invitation can’t be checked, before anything is sent.
- The invitee grants itself. It registers (its identity is born on its device, section 1) or signs in with
password and Secret Key. A mailed invite names the account’s address; a link invite names none, so its newcomer
types an address, which no mail has proven yet and so starts unconfirmed, or signs in with any account of the
instance, and an account already a member is refused (
409 already_member). Its client opens the invite grant with the invite key, seals that epoch key to its own identity (a self-grant naming the digest of that identity), and signs aninvite-acceptproof with the invite key over the invite, its account and its identity’s digest, and names the digest of the owner key its join record carries. The server verifies the proof under the stored invite key (403 invite_proof_invalid) and that the named owner key is still the invite’s (409 invite_changed— the owner secured their account meanwhile; the client re-reads the preview, checks again without asking for the code, and accepts once more), writes the membership with the self-grant, records the owner who rooted the join, and consumes the invite. The newcomer holds the tenant key from this moment; no other member has to be online. - The join record. In the same request the client writes a join record into its tenant profile: its
identity public key, its Secret-Key proof public key and the owner-signed invite it came through, signed over the
join-recordstatement by the invite key and by the new identity, and sealed as the fieldmember-join-record, bound to the tenant and the member, under a fresh value key of its own, which the tenant key the invite grant carried wraps (each later rotation re-wraps that key under the new one and never rewrites the record). The chain owner → invite → newcomer is one neither the operator nor a holder of the tenant key can forge while the owner is not compromised. Every member’s client reads it as the anchor of the newcomer’s key in this tenant (section 7). When the owner later secures their account, they endorse the record with their new key (statementjoin-endorsementover the opened record, never its envelope); a record signed by a key the owner has since retired counts only with that endorsement. The tenant’s first owner, its trust root, has none. - Adding a member to a group. The person already has an identity, so no invite key is needed: the group owner’s client runs the anchor gate (section 7) on the key and key-chain head the server serves for that username and seals the group’s current epoch to it as it adds them; a key it cannot anchor is not added. With consent on, the proposal holds that grant, and the server hands it out only once the target accepts; a decline, or the owner withdrawing the proposal, queues a rotation of the group, since the key was already wrapped to them.
- Grant delivery, for a member who fell behind. A member a rotation left out, or the newcomer of a pending
invite, holds a grant below the current epoch. Any online key-holder reads that member’s identity key and key-chain head and
runs the anchor gate (section 7): a first-seen person is pinned at the served head and used; a key the chain
reaches from the pinned head is used and the pin moves forward; anything else is an anomaly, not wrapped to, and
the worker declines the job back to the server (
identity_unanchored). No human accepts a key; a decline is cleared when that member secures their account, so the worker tries the new key. Otherwise it seals the current epoch key to the member, names that key’s digest (the server refuses a key that is not the member’s current one,409 recipient_key_not_current), and signs the grant. The signature covers the scope id, the scope kind, the epoch, the recipient’s user id, a digest of the recipient’s identity key and a digest of the grant ciphertext. - Opening. A member’s client judges the granter’s key the grant carries (the key that signed it, as the
server stored it) against the granter’s key chain from the head it pinned — for a group of the active tenant, from
the step the granter’s join record names (section 7): a key outside that chain is refused
(
granter_key_unanchored), and a retired key of it is accepted only for an epoch at or below this device’s epoch floor for the scope (granter_key_retiredotherwise), because an honest granter signs every newer epoch with its new key. It verifies the signature, and only then opens the grant. - Verification (optional, built). Each member’s profile shows their own safety number, a digest of their
identity public key shown as 6×5 digits, their chain code, 10 digits of their key chain’s head (section 7),
shown only once the chain the server serves ends at the identity in their vault, and a QR code of both
(
veyqid:2). Another member scans that code or compares the digits aloud, against the key and head their client anchors in the tenant. On a match the verifier’s identity signs the statementverification— the tenant, both user ids, the subject’s head and the verifier’s own head — sealed as the fieldmember-verificationunder the tenant key, bound to tenant, verifier, subject and epoch, and writes it into the verifier’s own row (putMyVerification; the server keys the row by the caller). Every member reads the tenant’s rows (listVerifications) and counts one only while it names the subject’s current head and verifies under the verifier’s current key at the verifier’s current head: verified by … holds for everyone in that tenant, and only there. When a verified contact secures their account their head moves, so verified drops by itself; it comes back only through a new compare. A head that differs between the two sides — a withheld step — is a mismatch.
The pin store lives on the client, is synced across the user’s devices, and is sealed under the Master Key: one entry per pin holding the contact’s identity fingerprint (the digest the safety number is) and the head of their key chain (section 7), at an opaque id only the account computes, and a head that carries a digest of every entry (ADR 0104). Each device also keeps a local high-water mark of the highest revision of that head it has opened, and refuses an older, missing or unopenable store, and an entry set the head’s digest does not describe (ADR 0028 Decision 7). That way, rolling back the store cannot turn an anomaly into a silent first use.
sequenceDiagram actor O as Owner participant S as Server participant I as Invitee client O->>O: seed to invite key, sign invite-key statement,<br>grant current epoch to the invite key O->>O: seal seed and owner key-chain head<br>under Argon2id(code, salt) O->>S: invite (email, invite key, signature, grant, sealed part) S->>S: signed by the caller's key? epoch current?<br>grant names the invite key? expiry matches the lifetime?<br>keep the grant as the anchor S-->>I: link #token.sealed by mail (no copy of the sealed part kept) O-->>I: out of band: the code Note over O,I: as a link, the owner hands over token, sealed part and code in one link, and nothing is mailed I->>S: preview (token) S-->>I: invite key, owner's key chain and signature,<br>anchor, grant, succession statements I->>I: open seal with the code, derived key = served key,<br>chain passes the sealed head, signatures verify,<br>statements lead from the anchor to the grant I->>I: open grant, self-grant to own identity,<br>join record signed by invite key and identity I->>S: accept: self-grant, invite-accept proof,<br>owner key digest, sealed join record S->>S: verify proof under stored invite key, owner key still the invite's,<br>membership with grant, record who rooted it,<br>clear invite key, grant and anchor I-->>O: out of band: compare safety numbers (QR or digits)
What the server learns. Invite metadata (a mailed invite’s recipient address, role, send time, expiry), the invite public key, the owner’s signature and identity key, the invite’s grant and anchor ciphertext, identity public keys, each membership’s granted epoch, the sealed join records, who rooted each join and the owner’s endorsement of it, each account’s key chain (section 7), and when a worker declines a delivery. It holds a mailed link’s sealed part while it mails it, and never a link invite’s. Of a verification it sees the address — which member verified which, in which tenant — and when it was written, never its content. It never sees the code, a scope key or a pin.
What it cannot do.
- Open an invite it mailed without the code. It holds the whole link, so it can guess offline — against 50 bits, with one Argon2id derivation per guess. A password the owner chooses instead is only as strong as that password.
- Swap the invite key or the owner in a mailed link. The invitee derives the invite key from the seed and walks the owner’s chain from the head inside the seal, so a key or an owner the server substitutes fails the check.
- Hand a newcomer a tenant key of its choosing, even after a rotation carried the invite: succession statements must lead to the key from the owner’s anchor, whose key the server does not hold.
- Plant a scope key of its own choosing in a personal-scope grant, or under a granter the recipient has already pinned (Decision 6).
- Swap a key after first contact. A client that pinned a contact’s head accepts a new key only through a step signed by the old identity and the old Secret-Key proof key (section 7). Anything else shows as Can’t confirm this key, and nobody wraps to it.
- Swap a member’s key in a tenant, even at first contact, or invent an ordinary member: a key the chain does not reach from the member’s join record, and a non-owner without one, are anomalies (section 7).
- Forge or move a verification. Each is signed by its verifier and bound to its tenant, verifier and subject; the server can only withhold one.
- Wipe or roll back the pin store on a device that has held one (Decision 7).
Residual.
- TOFU’s first-use gap. If the operator substitutes a key before anyone pinned the real one, nothing looks wrong until the two people compare safety numbers. Inside a tenant that is left for owners, whom no join record anchors; it also covers a shared grant signed by a granter identity the operator fabricated where the pin alone decides (the tenant scope’s own grant, a group’s outside the active tenant), and a device with no trust-state mark yet. A newcomer who registers through an invite has no pin store before its account exists, so it pins the inviting owner only on a later contact; the head in the link anchors the owner until then.
- A member the operator presents as an owner. Roles are the server’s word, so a membership it writes as an owner is a root, trusted on first use, and roots keys of its choosing (ADR 0111 § What stays open). Before it mints an invite, the server checks that the invite key carries the caller’s own owner signature, so a stolen owner password without the unlocked vault cannot invite an account of the attacker’s.
- Who verified whom. The server sees the address of every verification row.
- An invite as a link is a bearer credential. Whoever reads it in the channel the owner chose can join first.
The real invitee is then told the link was already used (
410 invite_redeemed): detection, not prevention. A taker who names themselves like the invitee is caught only so, or by comparing safety numbers. - A revoked or expired invite keeps what it was granted. The tenant does not rotate on removal (ADR 0025), so a link and its code still open the tenant keys it was granted — useful only with a dump taken before the tenant next rotates. A revoked group proposal rotates the group.
- A later epoch planted for a newcomer by someone who held the anchor’s. When a rotation by someone other than the owner carried an invite, a party who held the anchor epoch — a member, a former member, or a thief of a member’s device — could, with the operator, serve the newcomer a later epoch of its own, succeeding it under a statement that party signs. The owner’s own rotation moves the anchor past it.
- The owner’s securing withheld from a new account. A newcomer who pinned nothing cannot tell a chain served
only up to the head in the link from the owner’s whole chain, so a thief of the owner’s retired key could, with the
operator, pass the invite’s check under that key. The newcomer’s join record then names the retired key without an
endorsement, so every co-member reads it as an anomaly, and an honest server refuses the accept
(
409 invite_changed). - Who counts as an owner is the server’s word. Roles are not signed; a member the server presents as an owner could, with the operator’s help, root an invite of its own choosing.
- A worker’s decline is per key-holder, not a global veto. A key-holder who never pinned the contact pins them on first use, at the head the server serves.
- Strict mode (verified-before-share as a hard gate) is not built, and its shape is still open. Key Transparency is not built.
See Known limitations and the Roadmap.
4. Sharing
Section titled “4. Sharing”Purpose. Hand one node (a Memory, a chapter or a folder) to people outside the scope, including anonymous visitors with no account, without exposing the rest of the scope and without the server holding the link’s key (ADR 0029).
Participants. A curator (a member who can open the node), the server, the object store, and a guest who holds the link.
Steps (public viewer link).
- The curator’s client draws a random
K_shareand a random 256-bit share id. It wraps the node’sK_nodeunderK_shareand seals the node’s name under a field key derived fromK_share. - It also writes a recovery copy of
K_share, sealed under a fresh value keyK_vand bound to the scope’s current epoch, withK_vwrapped under the scope key (ADR 0036 point 4, ADR 0115). This lets any member of the scope reveal, edit or re-copy the link later. It is deliberately not sealed underK_node, because a viewer link carriesK_node. - It writes a write verifier: the SHA-256 of a write token derived with HKDF from
K_shareand bound to the share id (ADR 0076). - It posts the record. The link is
/s/{shareId}#k=…, withK_sharein the URL fragment, which browsers do not send to the server. - The guest’s client resolves the share without authentication and receives the record and the sealed subtree. It
unwraps
K_nodewith the fragment key and decrypts everything locally. For media it asks a share-scoped endpoint, which issues a presigned object-store URL only for a blob attached under the shared node. The client fetches the ciphertext directly from the store.
sequenceDiagram actor C as Curator participant S as Server participant O as Object store actor V as Guest C->>C: K_share and shareId random<br>wrap K_node under K_share, seal name under a field key from K_share C->>C: recovery copy: K_share sealed under a fresh K_v, K_v wrapped under the scope key (current epoch)<br>write verifier = SHA-256 of token derived from K_share C->>S: create share: id, node, role, wrap, sealed name,<br>recovery copy, write verifier C-->>V: link with K_share in the URL fragment (out of band) V->>S: resolve share (no auth, fragment never sent) S-->>V: record and sealed subtree V->>V: unwrap K_node with K_share, decrypt locally V->>S: request blob (allowed only under the shared node) S-->>V: presigned store URL V->>O: fetch ciphertext, decrypt locally opt link allows writes V->>S: name yourself: write token and sealed name S-->>V: contributor token, only if SHA-256(token) matches end
Variants.
- Contributor link (READ_WRITE)
(ADR 0030). The guest
can view and add media. Naming yourself presents the write token, which the server checks against the stored hash,
and returns a contributor token that gates every later upload. The guest seals uploads under
K_nodeand their display name under a field key derived from it, exactly as a member would. - Uploader link (WRITE_ONLY)
(ADR 0031 point 7). The
link carries no wrap of
K_node. It carries only the Memory’s drop public key (a hybrid post-quantum keypair whose private half is sealed underK_node), sealed underK_share. Each guest draws an identity key of its own, wraps it to the drop key, and seals its uploads under it and its name under a field key derived from it. Members open those uploads through the drop private key; the guest sees nothing but what it added in the current session. - Password-protected link
(ADR 0037). This is
an access gate, not cryptography. The guest’s client derives a token from the password with Argon2id and a
per-share salt. The server stores only the token’s SHA-256 and, without a valid token, serves nothing but the
challenge. Content stays under the unchanged
K_share. Wrong attempts are rate-limited per share. A copy of the password, sealed underK_share, lets members reveal it.
What the server learns. The raw share id (it is the primary key, and members rebuild links from it), the node
id, the role, enabled and expiry state, whether a password is required, the creation time, opaque wraps and sealed
fields, hashes of the write, contributor and password tokens, and, for a guest, which share and which blobs are
requested. A public share’s guest is also served the scope id. It never receives K_share, K_node or a name in
clear.
What it cannot do.
- Read anything outside the shared subtree through a link. Every node key is random and wrapped independently, so a link reveals neither the scope key nor the key of anything beside or above its root.
- Read an uploader link’s Memory, with the link and a database dump. The link carries only the drop public key, so it plus a dump reads what its own guests uploaded and nothing else.
- Read another share’s password, label or note, or rebuild its link, with a viewer or contributor link of the same Memory and a dump. Each share’s recovery copy is sealed under a value key the scope key wraps, and no link carries the scope key.
Residual.
- The no-install guest page is operator-served web code, so against an active operator it is passive-safe only.
- The password and the write token are layer-1 controls. They stop a leaked link or a database copy against an honest server, not the operator, who can skip the check.
- Closing a link (switching it off, its end date passing, deleting or re-issuing it) stops new access at once on an
honest server and re-keys the subtree below a viewable link (section 5), so with a dump the old link reads what
existed at the close and nothing added after; what a guest already downloaded stays downloaded. A scope-key
rotation does not close a link: its re-key re-wraps the node’s new key under every open link’s unchanged
K_share. - Every member can rebuild every link of a Memory, so a member removed from a space may hold those links until they
are closed or re-issued (a new id and a new
K_share; ADR 0075). - A viewer or contributor link plus a dump reads the names guests gave.
- A reported link carries its key, so the operator can decrypt a reported public share. That is the intended trust-and-safety path, though no report intake is built yet.
- A cryptographic password gate is a possible later upgrade, not built.
See Known limitations and the Roadmap.
5. Rotation and revocation
Section titled “5. Rotation and revocation”Purpose. Cut a party off. veyq does this in two layers (ADR 0026, ADR 0024, ADR 0115):
- Layer 1, access invalidation. The server stops honouring a membership, a share or a session. It takes effect at once and needs no keys, but it is a defence only under an honest operator.
- Layer 2, key replacement and re-key. A key-holder’s client replaces the scope key with a fresh one at the next epoch, grants it only to the parties who remain, re-wraps every scope-level value’s own key under it in the same commit — never rewriting a value — then re-keys every node of the scope, so content sealed afterwards is out of the removed party’s reach and an old key opens nothing in a dump taken after the rotation. Nothing in the store is re-encrypted. No key is sealed under another: the old key vouches for the new one by a signed succession statement, which opens nothing.
When layer 2 runs is a per-scope policy (ADR 0025). A group rotates on every removal, and its owner can run an explicit “re-key this space” with nobody removed, for a member’s lost device. The tenant removes by layer 1 alone, and an owner can run the same explicit re-key for the compromise case: on its own, or opted into a removal, where the removal lands first and the rotation’s member set, read after it, drops the removed member by the owner’s own choice. It is the same rotation and re-key as below, and so is securing an account. A personal scope never rotates on removal (it has one member). A removal switches off the removed member’s own links; any other link minted before it can no longer be re-activated, only re-issued, and until then it keeps working for whoever holds it; the remover may tick also turn off every link of the space in the same act. Each switch-off is a close, which re-keys the subtree below the link (below; ADR 0075).
Participants (group removal). The removing owner, the server, the remaining members, and the removed member.
Steps.
- The owner’s client reads the member list before the removal and the current epoch
E(n). - It mints a fresh
E(n+1)and signs the succession statement — the scope,n+1andE(n+1)’s succession public key — with the succession key derived fromE(n). It opens every value key wrapped underE(n)— a group’s name and icon, each recovery copy, each member’s name, picture and join record, each verification, each item-mark set — wraps the same key underE(n+1)and stages it, and re-seals each scope-root node’s entry, the one exemption; each staged wrap names the wrap it replaces, and each root entry the placement revision it read, so the commit refuses a row written since. A wrap it cannot open becomes one nobody opens, so the value reads as unreadable, never as another. The stage carries no value: the server refuses one that writes a value (422 rekey_writes_value), so a rotator, owner or member, can junk a value and never forge one. - For every member it read, except the one being removed, it runs the anchor gate (section 7) and seals and
signs a grant of
E(n+1); a pending consent proposal is re-granted like a member. A member whose key it cannot anchor is declared pending instead, and the server refuses a rotation that leaves anyone out silently (409 rotation_incomplete). In a tenant it also re-grants or declares every open invite (section 3). - It sends the removal, the succession statement and the grants in one request. In one transaction the server
deletes the membership, commits epoch
n+1, swaps every staged wrap and root entry in and marks every node of the scope due — only if it is exactly the current epoch plus one (stale_epochotherwise, and the client rebuilds with a fresh key), no wrap or root entry lacks its staged replacement (409 rekey_parts_missing) and none changed since it was read (409 rekey_parts_stale, staged again). A scope-level write statingnafter the commit is409 stale_epoch. - The removed member is refused at once (layer 1). The remaining members open the new grant only if the succession statements lead from the key their device held to it. Each device raises its per-scope epoch floor, keeps the new key’s succession public key as the one a later grant must be reached from, and never seals under a lower epoch again, whatever epoch the server reports. A member the rotation declared pending reads nothing of the scope until grant delivery re-grants them.
- The remover’s client re-keys every live and trashed node of the scope, top-down, one atomic commit per node
(ADR 0109): a fresh node key, its epoch raised by one and its
scopeEpochset ton+1, the node’s own entry under its parent’s new key (underE(n+1)at the root), each child’s entry, the node’s meta, its media’s meta and EXIF and everyK_blobwrap re-sealed under the new key,K_blobitself kept. A node with a drop key gets a new keypair, and its guests’ identity keys are re-sealed to it. Each open link rooted on the node gets the new key wrapped under its unchangedK_share, opened from its recovery copy; a closed link gets nothing. A large node’s fields go up in staged parts first, and the commit swaps them in one transaction. - Until a node is committed, a write sealed under its key is refused
409 node_rekey_pending: a member’s client re-keys that node and its lagging ancestors itself and retries at once, a guest’s client waits and retries. A write stating a node key from before is409 stale_epochand re-reads. A member’s device also seals nothing under a node key from before the highest epoch it holds. An interrupted re-key reads re-keying on every member’s scope row and is resumed by the next member’s worker: any member holding the current epoch may re-key a node, a Memory’s drop key included, except where members place nothing — a drop box, a guest’s identity folder and what lies below one — which only an owner re-keys (403 not_scope_owner, ADR 0111 decision 11). A queued rotation completes only once no node lags (409 rekey_incomplete).
sequenceDiagram actor R as Removing owner participant S as Server participant M as Remaining member participant D as Removed member R->>S: read members, keys, current epoch E(n) S-->>R: member list (read before the removal) R->>R: mint E(n+1), sign succession statement<br>with the key derived from E(n) R->>R: for each member except D: anchor gate, seal and sign grant R->>S: stage every value key re-wrapped and every root entry re-sealed under E(n+1) R->>S: one request: remove D, succession statement, grants, epoch n+1 S->>S: one transaction: delete D membership, commit epoch n+1,<br>swap staged wraps in, mark every node due<br>only if current + 1 and every wrap staged and unchanged D->>S: any request on the scope S-->>D: refused (layer 1) M->>S: fetch grant S-->>M: grant of E(n+1) R->>S: per node, top-down: fresh key, re-sealed fields,<br>re-wrapped K_blob and links, one commit each M->>M: verify succession and signature, open, raise epoch floor M->>S: new content sealed under the node's new key
Closing a link re-keys the subtree below it
(ADR 0114, en.sharing.public-link § Lifecycle).
A link is open while it is enabled, not deleted and its end date has not passed. Closing a viewable (READ or
READ_WRITE) link — a revoke, a delete, a re-issue, a bulk switch-off of a space’s links or of a removed member’s, or
its end date passing — marks every live and trashed node below its root due, in the same transaction as the close.
An end date closes through a server sweep, every minute by default, which needs no key. The closing device then
re-keys the subtree in the background as in step 6, and any member’s worker finishes it (owner-only nodes by an
owner); until a node is re-keyed, writes into it wait. A re-key wraps nothing under a closed link, and a key staged
under a link that closed since does not land (409 rekey_parts_stale). So with a dump a closed link reads what
existed at the close and nothing added after. A pause — the root trashed, the role’s capability or a link requirement
switched off, a moderation block, a suspended scope — re-keys nothing, nor does a password, role or note change, nor
the close of an uploader (WRITE_ONLY) link, whose K_share opens only the drop public key and its guests’ own
keys. Reopening a closed link is the curator’s act: it carries the root’s current key under the link’s K_share,
and hands that link everything added while it was closed.
Revoke never takes key material (ADR 0058). Revoking a session family removes server access and leaves wraps and the revoked device’s local keys untouched. A separate, explicitly named action deletes that device’s saved wrap, which brings back the Secret-Key requirement for it at its next sign-in. Neither action takes back a key a device already holds.
Securing an account after a compromise replaces the account’s identity, Master Key and Secret Key and then rotates every scope it is in, from its own devices: section 7.
What the server learns. That a membership was deleted and an epoch committed, per epoch a succession public key and signature, rewritten ciphertext in rows it already held, per node a due flag and its own epoch beside the scope epoch its key was minted at, per link the epoch it was minted at and whether the sweep closed it, that a link closed and which nodes lie below it, the granted-epoch markers, and the rotation jobs a removal queues and their status. It never sees an epoch key or a node key, and no store object is read or written by a re-key.
What it cannot do.
- Get a removed group member re-granted by the removal’s own rotation. The removal and its rotation are one request, and the remover’s client wraps only to the members it read, minus the one it removes, however the server lists them afterwards (ADR 0024 Decision 4).
- Make a member seal new content under an epoch the removed member holds, once that member’s device has held the newer epoch (Decision 6), nor under a node key from before it (ADR 0109 point 6).
- Make an old key open what it stores after the rotation. Every scope-level value key is re-wrapped and every root entry re-sealed in the commit, and every node re-keyed, so a key obtained later — a removed member’s, a lost device’s — opens only a dump from before it; a later-turned operator, a backup taken after the rotation and a new operator gain nothing from it.
- Undo the past. Nothing here retracts content already read. Rotation is forward secrecy, not repair.
Residual.
- A withheld rotation (a fork). A member who never learns of the newer epoch keeps writing under the old one.
- Queued rotations know only the server’s member list, so they hold against an honest operator only. The example is a tenant removal that cuts a co-shared group.
- The tenant default is layer 1 only. A removed member who kept keys and ciphertext and colludes with a malicious operator keeps that narrow reach until an explicit re-key.
- What existed at the rotation stays readable to whoever held its keys, in a dump from before it; and a
K_blobthey extracted still opens that blob’s bytes in a later dump too, since a re-key re-wraps keys and re-encrypts no content — as does a scope-level value’sK_v, until its author writes that value again. - A rotator can junk a value. It can stage a stand-in for a wrap it could open, which makes that value unreadable, and a junked recovery copy closes its link, key lost — an insider’s denial of service, visible as a missing value or a closed link.
- Pending and behind members read nothing of the scope until re-granted.
- Open links from before keep opening the new key until closed or re-issued, since every former member can
rebuild their
K_share; a drop box’s guest from before keeps their identity key, re-sealed to the new drop key, until then too. - A closed link’s reach. A write landing between an end date and the sweep’s run is under the old key. A former
holder of a viewable link opened the
K_upof an uploader link’s guests through the old drop private key, and reads their later uploads until the uploader link is re-issued. A removed tenant member keeps the tenant key until an explicit re-key, so closing their links cuts only the links’ other holders. An active operator can roll a member’s view of the subtree back to before the re-key, so that member’s device seals under the old key again: the epoch floor watches the scope’s epoch, which a close does not move. See Known limitations.
6. Recovery
Section titled “6. Recovery”Purpose. Make sure a forgotten password does not mean lost memories, without escrow. The property that stops the operator reading data also stops it rescuing data (ADR 0054, uc.account.recover-access). Everything hangs off the Master Key, so recovering it by any route restores every scope. There are three independent paths:
- Another enrolled device still holds the keys. Linking a device (section 2) is this path.
- Emergency Kit plus password on a fresh device: the ordinary unlock of section 1.
- Emergency Kit plus a mailed one-time token, for a forgotten password with no device. The diagram shows this path.
There is no separate recovery code. The Secret Key is the recovery factor.
Participants (path 3). The account holder, their client, the server, and the holder’s mailbox.
Steps.
- The holder enters their email under “Forgot password”. The server gives the same answer, in content and timing, whether or not the address is known. Only if the address belongs to a member of the tenant the request arrived on does it mint a one-time token, store only its SHA-256 hash with a short expiry, and mail the raw token in the link’s URL fragment, through that tenant’s own mail relay. Without working mail there is no recovery and no copy-link fallback.
- The client presents the token to release the
RECOVERYwrap. This is the only path that ever serves it. - The holder supplies the Secret Key. The client derives the recovery key with Argon2id from the Secret Key alone, opens the Master Key, and derives the Secret-Key proof key. A wrong Secret Key fails on the device.
- The holder chooses a new password. The client derives a new auth keypair and a new
PASSWORDwrap over the same Master Key, and signs both with the proof key. - The server checks the signature against the registered proof public key. In one transaction it then replaces
the
PASSWORDwrap and the auth public key, deletes every wrap exceptPASSWORDandRECOVERY, revokes every session, and spends the token. No content is re-encrypted, and the Emergency Kit stays valid.
sequenceDiagram actor U as Account holder participant C as Client participant S as Server participant MB as Mailbox U->>C: forgot password, email C->>S: request recovery (email) S-->>C: same answer whether the address is known or not S->>MB: if a member of this tenant: link with one-time token in the fragment<br>(server keeps only the hash) U->>C: open link (token stays in the fragment) C->>S: release RECOVERY wrap (token) S-->>C: RECOVERY wrap, wrapped identity private key (ciphertext) U->>C: Secret Key from the Emergency Kit C->>C: derive recovery key, open Master Key<br>derive Secret-Key proof key U->>C: new password C->>C: new auth keypair, new PASSWORD wrap over the same Master Key<br>sign both with the proof key C->>S: token, signature, new wrap, new auth public key S->>S: verify signature, then in one transaction: replace wrap and auth key,<br>delete other wraps, revoke sessions, spend token
What the server learns. That a recovery mail was sent (recipient and send time), and the new ciphertext wrap and auth public key. A completed reset is also recorded as the address being confirmed. It never learns the Secret Key, the old or new password, or the Master Key.
What it cannot do.
- Open the
RECOVERYwrap. It holds only ciphertext, released to a party who must already hold the key that opens it. Recovery gives the server no new power and is not escrow. - Let either factor alone succeed. A mailbox takeover yields a wrap that cannot be opened. A stolen Emergency Kit yields no token. Releasing the wrap is gated on the mailed token and never on a session, so a live session plus the Secret Key cannot bypass the password.
Residual.
- Losing every path (no enrolled device, no Emergency Kit, no password) means the content is gone. This is accepted and stated.
- An account in no tenant (the Server Owner after first-run setup) has no mail path until it joins one.
- The proof-key check is a server check, so it binds every caller except the operator (section 1, residual).
- A new Emergency Kit comes only from securing the account (section 7), which needs the current one: a lost kit cannot be replaced, and a reset keeps the Secret Key, so the kit it was opened with stays valid.
See Known limitations and the Roadmap.
7. The key chain and securing an account
Section titled “7. The key chain and securing an account”Purpose. Replace an account’s identity, Master Key and Secret Key when someone else may hold one of them, without losing access to any space and without any other member having to accept the new key; and make that new key one that only the holder of the password and the current Secret Key can introduce (ADR 0060, ADR 0111 decisions 6–10, uc.account.rotate-keys).
The key chain. Each account has one, the same in every tenant, stored beside its identity:
- Step 0 (statement
key-chain-genesis) is written at account birth: the user id, the birth identity public bundle and the birth Secret-Key proof public key, unsigned. - Each later step (statement
key-chain-step) names the user id, its index, the hash of the step before it, SHA-256 of the old identity bundle and of the old proof public key, and the new identity bundle and new proof public key in full. It is signed twice over the same bytes: by the old identity’s signing key and by the old Secret-Key proof key. A stolen signed-in device holds the identity but never the Secret Key, so it cannot sign a step, with or without the operator’s help. - The head is
SHA-256("veyq/v1/key-chain/head" ‖ statement)of the newest step (of step 0 for an account that never rotated). Byte formats: thekey_chainvectors. - Who reads it. The server serves the whole chain and its head to the person, to users who share a tenant with
them, between two accepted moderators of the instance (a moderator hands the moderation key to another, and
the two may share no tenant), the Server Owner’s to an accepted moderator (the last holder of the moderation key
hands it to the Server Owner when erasing their account), and — the inviting owner’s — to the holder of an open invite’s token, in the invite’s
preview (section 3); anyone else gets the
404an unknown user gets. Every read that serves another user’s key to a check — a member list, a group candidate, a delivery target, an open or served invite, a moderation delivery — serves that user’s head beside it.
The anchor gate. A client pins, per contact, the head it has seen, in the pin entry beside the fingerprint (section 3). For a served key and head it answers:
- first use — no pin yet: the chain is read, must end at the served head and the served key, and the head is pinned (trust on first use);
- match — the served head is the pinned head and the served key the key at it;
- advanced — the chain from the pinned head to the served head verifies step by step (both signatures, each predecessor hash, the keys at the pinned head equal to the pinned fingerprint) and ends at the served key: the pin moves to the new head, and verified drops, since every verification names the old head;
- anomaly — anything else, a served head older than the pinned one included.
In a tenant the join record decides first. A wrap there, and a group grant from the active tenant, ask the person’s standing: their join record (section 3, step 7) must open under the tenant key, verify owner → invite → newcomer, and name as signer an owner the server lists whose key in it this client anchors in the tenant in turn (a key that owner has since retired only with their endorsement of the record by their current key, step 4). The chain is then walked from the step that installs the identity and proof key the record names — whatever the server serves before it counts for nothing — and only a key at or after that step counts; the pin is the counter. A pinned head not on that chain is replaced when the chain is at least as long as the pinned one was (the pin was a key the operator substituted at a first contact; the profile says so) and an anomaly when it is shorter. An owner the server lists with no join record is a root, judged by the pin alone; any other member without a valid join record is an anomaly with no chain read. Who is an owner is the server’s word.
A client wraps only on the first three, and accepts a grant only from a granter key of the chain it pinned (a retired one only at or below its epoch floor, section 3). There is no human override: a legitimate rotation is always signed, so an anomaly is shown as Can’t confirm this key and never accepted by hand. Why the head, not the identity: with only the identity pinned, an operator could serve an invented prefix whose last step names the pinned identity with a proof key of its choosing, and a thief holding the old identity could then sign a step every member accepts.
Participants. The account holder, their client (any of their devices afterwards), the server, and the other members of each scope.
Steps.
- Cold gate. The holder types the password and the current Secret Key. The client re-derives the floor key and
requires it to open the stored
PASSWORDwrap to the Master Key it already holds. It reads its own key chain and requires it to end at the vault’s identity and at the proof key of the Secret Key just typed. - The new Emergency Kit first. The client mints a new Secret Key and shows it as a new Emergency Kit. Nothing is sent until the kit is downloaded and the holder confirms it is saved, so the key the publish installs is always one somebody saved.
- Mint. A new Master Key and identity; the
PASSWORDwrap under the new Secret Key and the password (a new one if chosen, offered pre-selected) and theRECOVERYwrap under the new Secret Key, both with fresh salts; the new proof key; the auth key of the password the account keeps; and the chain step, signed by the old identity and the old proof key. - Stage the self-grants. The client reads the plan: every scope the account holds a grant on, in every tenant,
with its current epoch and the account’s own grant row. It opens each grant with the old identity and seals that
current epoch key to the new identity, signed by it and naming its digest. A grant this device cannot open
(its signature or the epoch floor refuses it) is declared unreadable, never dropped. It opens a stage declaring the
new identity and uploads the self-grants in chunks of at most 256; the server verifies each under the identity the
stage declares and refuses the chunk otherwise (
422 self_grant_invalid). Nothing staged is applied. A stage expires an hour after it opened by default and is purged. The grants are staged rather than sent with the publish because nothing caps an account’s memberships (any co-member can add it to groups), so one request cannot carry them all. The same stage takes what the account rooted: every open member invite it signed, whoseinvite-keyand anchor signatures the new identity signs again when both current ones verify under the outgoing key (declared otherwise), and every join record it rooted, which the new identity endorses (join-endorsementover the sealed record as stored) when the record verifies, names the account and names its outgoing key or carries an endorsement by it (declared otherwise). The server verifies each under the stage’s identity (422 invite_resign_invalid,422 join_endorsement_invalid). A holder of the instance moderation key also stages every live epoch it holds: the key opened with the old identity, checked against the published bundle and sealed to the new one (declared when it does not open or the bundle disowns it). - Publish, one transaction. The request carries the new identity and its wrapped private key, both wraps, the
re-sealed pin store and device register, the step’s two signatures, the stage’s id and the digest of the staged
grants, the unreadable scopes, the new auth key with the old auth key’s signature over it, the new proof public key,
and two signatures over one statement — by the current proof key (the gate) and by the new one (proof that it is
held). The statement binds the current and the new identity, the wraps, the step, both auth keys, the new proof key
and the stage. Under the account’s lock the server checks the stage and its digest, the step under the stored
identity and proof key with the stored head as its predecessor, both proof signatures and the auth signature. Then,
locking each scope in ascending order, it requires every membership that carries a grant to be staged at its
current epoch or declared unreadable, every open invite the account signed to be staged at its current anchor
epoch, every join record it rooted to be staged against the record stored now, and, under the current moderation
epoch’s lock, every live moderation epoch it holds to be staged (
409 rotation_plan_changedotherwise — an accept or a delivery between stage and publish included; the client re-stages only what moved and retries). It writes the account, appends the step, applies each staged self-grant with a waiting row, writes the re-signed invites under the new key (a declared one ends), the endorsements and the re-sealed moderation grants in place of those sealed to the old identity, deletes the stage and every wrap but the two cold ones, voids every open change of the sign-in address, clears the grant-delivery declines aimed at the account, and revokes every other session. A refused publish writes nothing. - Next epochs, from any device. Every device of the account, one signed in with the new kit included, first finishes: for each scope still waiting it opens its self-grant with the new identity and commits the next epoch, granting every member its client anchors and declaring the others pending. The server takes that commit from a member who is not an owner only while the waiting row names the scope’s current epoch, and never with a removal. If someone else committed first, that commit could not grant the old identity, so the row is met.
- Nodes. Any member re-keys the scope’s nodes (section 5). A scope reads secured once no node lags.
- Everyone else. Their clients see a new head, walk the chain from the head they pinned (advanced), and go on granting to the account and accepting its grants with no review.
- The account’s verifications. Before the publish the client collected, in every tenant it can open, its own verifications that verify under the outgoing identity at its head; after it, it signs each again with the new identity and the new head over the old row. A verification counts only under its verifier’s current key, so a statement a thief signs with the retired key counts nowhere. Best-effort: one not re-signed stops counting.
A publish failure the server did not answer with a declared refusal is an unknown outcome: the client re-reads the served wrapped identity. If it opens under the new Master Key, the publish committed and the client goes on; under the old one, nothing was written; otherwise the vault is locked and the holder is asked to unlock with the new kit. A retry with the new Secret Key finishes what was left and never mints a second set of keys.
sequenceDiagram actor U as Account holder participant C as Client participant S as Server participant M as Other member U->>C: password, current Secret Key C->>C: floor opens to the vault's Master Key<br>own key chain ends at the vault's identity C->>U: new Emergency Kit (new Secret Key), must be saved C->>C: mint Master Key, identity, wraps, proof key<br>step signed by old identity and old proof key C->>S: read plan (every scope, every tenant) C->>C: open each grant with the old identity<br>self-grant of the current epoch to the new identity C->>S: open stage, upload self-grants (256 a chunk) C->>S: stage re-signed open invites, endorsed join records S->>S: verify each under the stage's identity C->>S: publish: step signatures, stage id and digest,<br>proof by old and new proof key S->>S: one transaction: checks, every membership, invite and record staged,<br>append step, apply self-grants, re-signed invites, endorsements, revoke sessions C->>S: per scope: next epoch, grants to anchored members,<br>the rest declared pending M->>S: read key chain (head moved) M->>M: walk from pinned head: advanced, pin moves
What the server learns. That the account rotated, and when; the new identity public key and proof public key; the key chain (public keys and signatures); the self-grants as ciphertext, for scopes it already knew the account was in; the new identity’s signatures over the open invites and join records the account rooted, which it already held; which scopes the device declared unreadable; and the next epochs as they are committed. It never sees a Secret Key, the Master Key, an epoch key, or whom anybody trusts.
What it cannot do.
- Introduce a key the members accept without the Secret Key. A step needs the old proof key’s signature, which only the Secret Key derives, and every client verifies the chain itself; the server’s own check of the step is an honest server’s.
- Strand a scope through the rotation. From the publish on, every scope the account holds a grant on holds a grant of its current epoch to the new identity; a lost answer, a closed tab, a failed epoch or a scope in another tenant leaves it waiting, never lost.
- Apply a stage without the proof. A stage is inert until a publish proved by the current Secret Key names it and its digest.
- Roll a contact back. A head older than the pinned one is an anomaly.
Residual.
- First use. A contact this account never pinned is trusted at the head the server serves where no join record anchors them: a tenant’s owner, and every contact outside a shared tenant except a newcomer’s inviting owner, whom the head sealed in the invite link anchors (section 3).
- Withholding. A client that never saw a newer step cannot tell it was withheld, unless two people compare chain codes.
- The race for the account. Whoever holds the password and the current Secret Key and secures the account first owns it. That is no new power: the same holder can already move the sign-in address and change the password.
- A password holder without the Secret Key who signs in after the publish could commit an epoch of their own on a scope they own: that denies access, it discloses nothing new. Choosing a new password while securing closes it.
- The owner’s securing withheld from a new account passes that newcomer’s invite check under the retired key, and its join record then reads as an anomaly to every co-member (section 3).
- The server-side checks bind every caller except the operator; against an active operator the client’s checks hold only on a client it does not serve (the caution at the top).
- Without the Emergency Kit the account cannot be secured. Containment (revoke sessions, remove saved keys) is all that remains.
See Known limitations.