Cortex

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.

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

AgainstProtected
A breach of the server, its disk or its backupsYes: only ciphertext and the metadata below are there.
Ciphertext recorded today, opened by a quantum computer laterYes: every key exchange is hybrid post-quantum, X-Wing (ML-KEM-768 with X25519).
A curious operator reading what is storedYes.
A malicious operator handing out a false public keyYes, 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 mailboxNot 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 browserDetected, 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 readNo. 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.

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 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

UsePrimitive
A Cortex ID's key pairX-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 IDHPKE (RFC 9180), base mode, X-Wing KEM · HKDF-SHA256 · AES-256-GCM.
A share's key under a public link's secretHKDF-SHA256, then AES-256-GCM.
FilesAES-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 restWrapped 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 keyHPKE with X-Wing to the new Mac's one-time key, after the six-digit code matched on both screens.
A device's requestsSigned with Ed25519, a nonce and a timestamp; replays refused.
A fingerprintSHA-256 of the two public keys, as 60 digits in 12 groups of 5, the same on both sides.
A page releaseSHA-256 of each file, the manifest signed with Ed25519 off the server.
The key logA 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 miniNoise, 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 PDFECDSA 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.

WhatLayout
A chunk0x01 ‖ 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 description0x01 ‖ 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 IDHPKE, 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 secretThe 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 senderHPKE with X-Wing to the sender's own key, info "cortex-link-secret-v1" ‖ share UUID.
The private key per passkeyPRF 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 MacHPKE with X-Wing to its one-time key, info "cortex-device-approval-v2" ‖ the new device's UUID.
A key challengeHPKE 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 challengeThe 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 codeSHA-256(Cortex ID public key ‖ the new device's signing key ‖ its one-time key), as an integer, modulo 106, six digits.
A fingerprintSHA-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 signatureEd25519 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).