Security & encryption
Session contents are encrypted on your computers before they are uploaded. The server stores and relays ciphertext; it cannot read your conversations or code.
Four kinds of keys
- Device keys. Each computer creates its own when it signs in: an Ed25519 key that signs its requests, and an X25519 key for receiving project keys. The private halves stay on the computer (in the system keychain: macOS Keychain, Windows Credential Manager or the Linux Secret Service).
- Project key. A random 256-bit key, created on the computer that links a repository as a new project. Every computer working on the project needs it; the server never has it in readable form.
- Session key. Every session has its own random key, kept inside the session's metadata, which is itself encrypted with the project key.
- Personal key. One per person, held only by that person's own computers. It encrypts Claude's memory of each repository, which follows you between your computers but never reaches teammates, even those with the project key.
On each computer, Zäm keeps its device keys, project keys and personal key in the system keychain (macOS Keychain, Windows Credential Manager or the Linux Secret Service), never in plain files. Only where a computer has no keychain, such as a container, can you choose private files instead (ZAEM_KEYSTORE=file).
What gets encrypted
New transcript lines are batched into chunks, compressed and encrypted with the session key (XChaCha20-Poly1305). Each chunk is bound to its session, stream, line range and lock epoch, so it cannot be moved elsewhere unnoticed. Every line also extends a keyed BLAKE3 hash chain, which lets computers verify the history and detect two writers. Code checkpoints and session metadata (folder, settings) are encrypted the same way, and so are the files Claude keeps beside a session: long tool outputs and the backups /rewind restores.
What the server can see
| Can see | Cannot see |
|---|---|
| Accounts, devices and approvals; project names; session ids, times, sizes and line counts; who holds a session's lock; usage counts. | Prompts, answers, tool calls and output; file contents and paths; code checkpoints; session metadata; Claude's memory notes. |
How a teammate gets access
- Their computer links the repository and, lacking the key, sends a key request with its public X25519 key.
- Someone who has the key approves it (desktop app or
zaem access grant). Your own other devices are approved automatically. - The approving computer wraps the project key for that device (one-time X25519 key exchange, XChaCha20-Poly1305) and signs the wrapped key with its Ed25519 key. The server stores only the wrapped key.
- The teammate's computer checks the signature and unwraps the key. Now it can open session metadata, get each session's key and decrypt it.
Approving a request is the trust decision: you encrypt the key for the device the request names. Approve only requests you expect, from the person and device shown.
Revocation, rotation and deletion
- Revoking a device (or disabling a member) signs it out at once and makes a remaining computer rotate the project key, so new data uses a key the revoked device never had.
- Deleting a session destroys its session key first. Every copy of its data, backups included, becomes unreadable.
- Secrets: with
secrets = "redact"in.zaem.toml, detected secrets (API keys, tokens, private keys…) are replaced before encryption, so even computers holding the key never receive them.
Sign-in and devices
- People sign in with OpenID Connect (authorization code with PKCE; ID tokens are signature-checked).
- Every device request is signed with the device's key (DPoP); there are no long-lived refresh tokens.
- Admins can require approval for new computers, invite people with a role, or restrict joining to invited people.