Security
Security of Cortex sharing
In plain words: what you share is encrypted on your Mac and opened only on your recipients' devices. The server stores what it cannot read, and everything below is published so that anyone can check it.
Files shared from Cortex are encrypted on the sender's Mac and decrypted on the reader's device. The server stores only what it cannot read: encrypted files, and their keys sealed to each reader's own key. This page publishes how: what is protected and what is not, what the server sees, the cryptography, and the byte formats, so that anyone can check them. Contents: how this page is checked · threat model · what the server sees · the key log · signed PDFs · cryptography · formats · on your Mac · audit and reports. For the same things in plain words, see How Cortex keeps your work safe in the help center.
How this page is checked
In a browser, the code that decrypts is this page, which the server sends. A server that changed it could read what the page opens. So the page is released like software: each release is its repository's files as committed, with no build step, every file's SHA-256 is listed in a manifest, and the manifest is signed with a release key kept away from the server.
- The manifests and their signatures are published at
/releases/<n>/manifest.jsonand/releases/<n>/manifest.sig, and the release key's public half at/releases/release-key.pub(Ed25519, base64). - Every script and style the page loads carries its hash (Subresource Integrity), under a Content Security Policy that allows no other code and no other server than the API.
- Each file is shown by a renderer on a host of its own,
files.cortex.axelar.io, in a sandboxed frame of no origin whose policy allows no connection at all: a flaw in a viewer reaches the one file it was handed, never your keys. - Anyone can compare the page served with a signed release, file by file, against its manifest. Cortex does it on its own: once connected, and every 12 hours, it fetches the page served and the signed manifest of the release it names, and checks every file of it. If a file differs, the manifest is not signed with the release key, or the release is older than one that Mac saw served, Cortex says so and advises against opening shares in a browser.
- Before it opens a share, the page checks the sender's key against the key log and refuses the share, with the reason, if that fails. Having no memory between visits, it compares nothing with what it saw before and monitors nothing for you, and it does not yet require the witnesses' co-signatures that Cortex requires.
A browser cannot refuse an altered page on the day it is served. To read shares the stronger way, use Cortex, which runs no code from the server. The browser versus the app says when it matters.
Threat model
| Against | Protected |
|---|---|
| A breach of the server, its disk or its backups | Yes: only ciphertext and the metadata below are there. |
| Ciphertext recorded today, opened by a quantum computer later | Yes: every key exchange is hybrid post-quantum, X-Wing (ML-KEM-768 with X25519). |
| A curious operator reading what is stored | Yes. |
| A malicious operator handing out a false public key | Yes, after the fact and without anyone's attention: every key is in a public, append-only key log co-signed by independent witnesses, which Cortex checks before it encrypts and watches for its own Cortex ID. Where certainty is wanted now, people catch it: approving a new Mac always compares a six-digit code on both screens; a contact's changed key is shown as changed; any contact's fingerprint can be compared by another way. |
| Someone resetting a Cortex ID key with a mailed code — a malicious operator, or whoever holds one mailbox | Not by itself: a reset waits, announced to every address and device of the Cortex ID, any of which cancels it; every sender is told the key changed. |
| A malicious operator serving altered page code to a browser | Detected, not prevented: the page is a signed release anyone can check against what is served. Cortex, whose code does not come from the server, stays the stronger way to read. |
| Someone who controls your Mac, or a revoked share already read | No. The keys and the unlocked files are on your Mac; revoking stops the server serving a share and keeps your next version from them, but cannot take back what was read or saved. |
What the server sees
It sees who shares with whom, a share's kind (sent to addresses, or public by link; content or a mini package), how many files, their sizes, the number of versions, the times, the addresses and devices of a Cortex ID, and the public keys with their history. It sees who talks to whose mini, and when, and a listed mini's card, its alias and title. For a PDF signed in Cortex it sees who signed, with which key, when, and the file's hash, size and page count.
It never sees file names, folder structure, file types (not even whether an entry is a file or a Cortex object), content, a share's title or message, a mini copy's definition and knowledge, the words of a conversation with a mini, a signed PDF's title, pages and hand-drawn signature, a public link's secret (it travels after #, which a browser never sends), or any private key. Logs hold no code, cookie, key, envelope, secret or content; a full test run is checked for it. In plain words: End-to-end encryption.
The key log
If the server handed out a key that belongs to someone else, a share could be sealed to the wrong person. So every public key the server hands out for a Cortex ID, and every device's signing key, is first appended to a public log that can only be added to, in the open formats of Certificate Transparency and Go's checksum database (C2SP). It also holds each signing key, each signature made on a PDF and each one revoked. The log holds hashes and times, no address, name or document in clear, and an entry is never removed: a deleted Cortex ID leaves its hashed entries behind.
- Checked before use. Before Cortex encrypts a share's key to a recipient, opens what a sender sealed, approves a new Mac, opens a mini's channel or uses a signing key, it checks that the key is in the log, that the log's latest head is signed by the log key and co-signed by at least two independent witnesses (Geomys, Markovian Protocol, Mullvad and IPng follow it today), that the head is less than 24 hours old, and that it extends the last head Cortex saw. A failed check stops the share, approval or channel, and Cortex offers a fingerprint comparison.
- Watched. On every connection and every hour while connected, each Cortex reads what was added to the log and looks for its own Cortex ID: a key none of its Macs made, or a device that is not theirs, raises an alert on every Mac with the choice to reset the key.
- Compared. The head each Cortex last checked travels inside what it already sends end to end, a share's description and the first message of a mini's channel. Two heads that cannot belong to one log are the proof of a split view, the server showing different logs to different people, and Cortex refuses and shows both.
- In the browser the page checks a key's proof, the head's signature and any co-signature present, by the same rules, but requires no witness yet.
The log does not prevent a false key: it makes one leave evidence. A key added a moment ago waits for the next co-signed head, seconds to a minute or two. The head and tiles are open at /log/checkpoint and under /log/. In plain words: The key log.
Signed PDFs
A PDF signed in Cortex is checked by anyone with a phone, and the server never sees the document. The signing key is made in the signing Mac's Secure Enclave and never leaves it; each signature asks for Touch ID or the Mac's password. Cortex Server vouches for the key with a certificate under the Cortex signing CA, for the name and verified address the signer chose; its public root and the revocation list are at /pki/. The signature is a record of who signed, when, with which key, and the file's hash, size and page count, which the signer's Mac signs and a trusted timestamp authority timestamps (it receives only a hash, from the Mac, never through the server). The record, the key and any revocation go into the key log, so nobody, the server included, can backdate, alter or quietly drop it.
- The check page. The QR code on the signed paper opens
/v/<ID>, a page of the current signed release. It checks the record's signature, the log's proofs, the certificate chain, the timestamp and any revocation, and says Valid, Revoked with the reason, or Not valid with what failed. It also tells whether a PDF you choose is the signed file, hashing it in your browser without uploading it. - What only the paper opens. The title, the page codes, the hand-drawn signature and whatever the signer chose to disclose (nothing more, page previews, or the whole document) are encrypted on the Mac under a key that is only in the QR code's address, after the
#. The server stores them without being able to read them. - Revoked, not erased. A signature made before a Mac is removed or a key is reset stays valid, since the log and the timestamp prove when it was made; the signer can revoke a signature, with a reason, or remove its previews.
The embedded PDF signature is readable by Acrobat and Preview; a reader that does not know the Cortex root shows an unknown identity. In plain words: Signing, in short.
Cryptography
| Use | Primitive |
|---|---|
| A Cortex ID's key pair | X-Wing, hybrid post-quantum (ML-KEM-768 + X25519): a 32-byte private seed, a 1216-byte public key. |
| A share's key, sealed to a reader's Cortex ID | HPKE (RFC 9180), base mode, X-Wing KEM · HKDF-SHA256 · AES-256-GCM. |
| A share's key under a public link's secret | HKDF-SHA256, then AES-256-GCM. |
| Files | AES-256-GCM in chunks of 1 MiB, each bound to its file, its place and whether it is the last, so a file cannot be cut, reordered or swapped. |
| The Cortex ID's private key at rest | Wrapped per passkey with a key derived (HKDF-SHA256) from the passkey's WebAuthn PRF output, AES-256-GCM. |
| A new Mac's copy of the key | HPKE with X-Wing to the new Mac's one-time key, after the six-digit code matched on both screens. |
| A device's requests | Signed with Ed25519, a nonce and a timestamp; replays refused. |
| A fingerprint | SHA-256 of the two public keys, as 60 digits in 12 groups of 5, the same on both sides. |
| A page release | SHA-256 of each file, the manifest signed with Ed25519 off the server. |
| The key log | A Merkle tree over SHA-256 as RFC 6962 has it, its heads signed as C2SP notes by the server's Ed25519 log key and co-signed by the witnesses. |
| A conversation with a shared mini | Noise, pattern pqKK (the KK pattern with X-Wing encapsulations in place of Diffie-Hellman, the two Cortex ID keys as static keys), AES-256-GCM, SHA-256: each side proves it holds its key, and the session keys are thrown away with the conversation, so a key stolen later does not open one recorded before. The server relays the frames and reads neither. |
| A signature on a PDF | ECDSA P-256 over SHA-256, the key in the Mac's Secure Enclave, X.509 certificates under the Cortex signing CA; what the check page shows is sealed with HKDF-SHA256 from the 16-byte check key carried in the QR code, AES-256-GCM. |
None of the content cryptography runs on the server: Cortex does it with Apple's CryptoKit, this page with WebCrypto and a vendored HPKE library. Signatures stay Ed25519: a signature is forged at the moment it is checked, so it is not exposed to recording now and breaking later.
Formats
The byte layouts Cortex and this page agree on. ‖ is concatenation; UUIDs are their 16 bytes; integers are big-endian.
| What | Layout |
|---|---|
| A chunk | 0x01 ‖ AES-256-GCM of up to 1 MiB ‖ 16-byte tag, under the generation's key; nonce: the file's 8-byte random prefix ‖ the chunk's index (4 bytes); associated data: "cortex-chunk-v1" ‖ file UUID ‖ index (4 bytes) ‖ 0x01 for the last chunk, 0x00 otherwise. Its name is the SHA-256 of the stored bytes. |
| A description | 0x01 ‖ random 12-byte nonce ‖ AES-256-GCM of a JSON document — title, message, and each file's path, size, type, prefix, chunks and generation — under the generation's key; associated data "cortex-description-v1" ‖ share UUID ‖ version (4 bytes). A reader refuses one whose files are not the version's. |
| A share key to a Cortex ID | HPKE, X-Wing (KEM 0x647A) · HKDF-SHA256 · AES-256-GCM: 0x02 ‖ enc (1120 bytes) ‖ the sealed 32-byte key; info "cortex-share-key-v2" ‖ share UUID ‖ generation (4 bytes). |
| A share key under a link secret | The secret: 32 random bytes, base64url after #. Wrapping key: HKDF-SHA256(secret, salt = share UUID, info "cortex-link-v1"). 0x01 ‖ 12-byte nonce ‖ AES-256-GCM of the key, associated data the generation (4 bytes). |
| A link secret, kept for its sender | HPKE with X-Wing to the sender's own key, info "cortex-link-secret-v1" ‖ share UUID. |
| The private key per passkey | PRF input SHA-256("cortex.axelar.io/cortex-id-key/v1"); wrapping key HKDF-SHA256(PRF output, random 32-byte salt, info "cortex-id-key-v1"); AES-256-GCM of the 32-byte seed under a random 12-byte nonce. |
| The key to an approved Mac | HPKE with X-Wing to its one-time key, info "cortex-device-approval-v2" ‖ the new device's UUID. |
| A key challenge | HPKE with X-Wing to the Cortex ID's current key, info "cortex-key-challenge-v1" ‖ the challenge's UUID, sealing 32 random bytes: opening it proves holding the key, before adding a passkey's copy or deleting the Cortex ID. |
| A rotation's challenge | The same, info "cortex-rotation-challenge-v1" ‖ the rotation's UUID: a new key replaces the old only from a device that holds the old. |
| The approval code | SHA-256(Cortex ID public key ‖ the new device's signing key ‖ its one-time key), as an integer, modulo 106, six digits. |
| A fingerprint | SHA-256 of the two Cortex ID public keys in ascending byte order, as an integer, modulo 1060, 60 digits in groups of 5. |
| A request's signature | Ed25519 over six lines: method, host, the path and query as sent, timestamp, nonce, SHA-256 of the body. |
On your Mac
The sections above are about sharing. The rest of Cortex stays on your Mac: it has no cloud of its own and no telemetry, and never writes its own state into a context folder. What leaves is what you choose: what your agents send to their model providers, a Cortex Agent chat, a share, a signed PDF. See What stays on your Mac. Your keys stay with you: Cortex never holds an agent's sign-in, API keys and the Cortex ID key live in the macOS Keychain, and a signing key in the Secure Enclave (Your keys and sign-ins).
Each session starts in its context's folder and is kept to it, by layers that differ by agent: deny rules Cortex writes for each launch for Claude Code's file tools, Codex's own sandbox, and Cortex's own checks plus a macOS sandbox, always, for the Cortex Agent. An optional macOS sandbox around everything an agent runs is off until you turn it on. SSH keys, ~/.aws and ~/.gnupg are denied, and an agent starts with a trimmed environment. This is built against mistakes and instructions hidden in what an agent reads, not against a hostile person on your Mac: the network is never limited, terminal tabs are not confined, and a command outside the OS sandbox is not bound by Claude's rules. See How sessions are kept to their context and Turn on the OS sandbox.
Audit and reports
No independent audit has been made yet. One is planned before sign-up opens beyond invited people, and its report will be published here.
To report a vulnerability: cortex@axelar.io (see security.txt).