Stillpost

Letters only the recipient can open. A postal system for messages: post-quantum end-to-end encryption, a relay that holds sealed envelopes and cannot read a word, no phone numbers, no accounts but a key.

What it is

Stillpost is a messaging system built like a postal service. You write a letter; your device seals it to the recipient's key; a relay holds the sealed envelope until they collect it. The relay stores ciphertext and routing fields — it never sees a plaintext word, a contact list, or a key.

There is no phone number and no password. An account is a key pair: a FIPS 203/204 post-quantum key hierarchy held on your devices. Your address is handle@stillpost.dev — portable, relay-scoped, and meaningless without your keys. Devices pair by scanning a code; the account root key never leaves the device that created it.

The wire protocol, SPT/1, is fully specified and cross-checked: the Rust core and the Go relay must agree on the same test vectors, regenerated and verified on every run of the conformance suite.

THE PATH OF A LETTER

How a letter travels

Sender device ML-DSA signature ML-KEM seal to one-time prekey Relay queues the sealed envelope, per device, 7-day TTL cannot open it Recipient device opens with its own prekey secret, verifies the whole sender chain SEND (op 4) FETCH (op 5) + ACK (op 6) The plaintext exists only inside the two devices. Everything between them is an opaque envelope.
One letter, sealed once per recipient device, carrying a single message ID everywhere — so every copy, direct or mirrored between your own devices, dedupes.

A sender looks the recipient up (LOOKUP, op 2) and receives their bundle: account root key, one manifest per device, and an unused one-time prekey for each. The envelope is sealed to one device's prekey and queued for exactly that device. One-time prekeys are reserved on handout and deleted on first use, so no two letters are sealed to the same secret.

THE ENVELOPE

Anatomy of an envelope

Everything on the wire is a CBOR envelope signed by the sender's device key and encrypted with CMS-style layers. The outer part is readable by the relay — it must be, to route and queue. The inner part is readable by nobody else.

Outer envelope — visible to the relay class (peer message · call signal) message_id (128-bit, one per letter) sender account + device recipient account + device · created_at · expires_at CMS layer — visible to the recipient only ML-KEM-1024 to the recipient's one-time prekey AES-256-GCM content encryption · AES-KW key wrap Inside the CMS: a peer message — conversation ID, content type, created_at, text or attachment manifest, reply reference, extension body.
The relay reads only the outer fields. Verification is end-to-end: the recipient checks the sender's root key, the device manifest that vouches for the sending device, and the envelope signature — before decrypting anything.
THE CRYPTO

What the seals are made of

No RSA, no X25519, no Ed25519 — the primitives are chosen so a quantum computer with enough capacity cannot retroactively open archived letters.

JobPrimitiveWhere
Letter confidentialityML-KEM-1024 (FIPS 203) one-time prekeysevery peer letter
Authenticity, manifestsML-DSA-87 (FIPS 204) device keysenvelopes, manifests, profiles
Content encryptionAES-256-GCM, keys wrapped with AES-KWCMS layer, attachment chunks
Key derivationHKDF-SHA-256call signal keys, sender chains
Call mediaSFrame (RFC 9605) over WebRTC DTLS-SRTPvoice and video
Human verificationsafety code over both root keyscontact verification

Attachments get a fresh 256-bit file key per file, sealed inside the letter's manifest; the bytes travel in 1 MiB AES-256-GCM chunks the relay stores blindly. Voice and video keys are negotiated inside CALL_SIGNAL envelopes and applied as SFrame transforms, so the media path never carries plaintext frames the relay could decrypt.

ACCOUNTS AND DEVICES

One account, many devices, one root

An account is created on one device: that device generates the account root key (ML-DSA-87) and it never leaves. Every other device is a leaf, vouched for by a root-signed device manifest — which is what lets the relay verify any single device without ever holding a secret.

Account root key (ML-DSA-87) created once · never leaves the first device Phone — device manifest signed by the root Laptop — device manifest signed by the root Tablet — device manifest signed by the root Pairing moves the account keys to a new device sealed to that device's own keys — ops 16–20 — never over the relay in the clear.
Devices pair with a short code or QR: the new device publishes a beacon, the approving device deposits the sealed account keys, and the root signs the new device's manifest. Revoking a device is one signed operation.

Devices of one account keep each other current over mirror letters: sent-mail state, read state, and — for a freshly paired device — a backfill of history. Mirrors ride the same sealed-letter path and carry no conversation ID of their own.

THE RELAY'S SIDE

What the relay actually does

Queue

Per-device queues with a 7-day retention, per-sender quotas, and immediate delivery to connected devices. A letter is deleted the moment its recipient acknowledges it.

Directory

Username → key bundle, with one-time prekeys reserved on handout. Profiles and avatars are published, signed, and served blind.

Wake-ups

Web push with no content: a ping says only that mail is waiting. The page syncs and fetches; the push service learns nothing else.

Calls

STUN and TURN for media path discovery. Signalling rides CALL_SIGNAL envelopes; media is peer-to-peer where possible, TURN-relayed where not, SFrame-encrypted either way.

ON THE WIRE

SPT/1 control operations

One authenticated POST /v1/control endpoint carries every operation; GET /v1/stream is the WebSocket wake-up channel. Operation codes 1–63 are the base profile; 64 and up are the extension registry (groups live there).

OpNamePurpose
1REGISTERcreate an account: root key, first device, initial prekeys
2LOOKUPresolve an address to a verified key bundle
3PREKEY_UPLOADpublish one-time prekeys for a device
4SENDsubmit sealed envelopes (peer letters, call signals)
5FETCHdrain this device's queue
6ACKacknowledge and delete fetched letters
7HANDLE_CHECKprobe whether a handle is taken
11SUBSCRIBEattach the wake-up stream (stream only)
12–13TRANSFER_PUT / GETstore and fetch encrypted attachment chunks
14ICE_SERVERSshort-lived STUN/TURN credentials
15PUSH_REGISTERregister a web-push subscription for this device
16–20PAIRING_* / DEVICE_ADDbeacon, deposit, respond; add or revoke a device
64+extensionsgroups and future registered extensions

Groups (extension 1) encrypt to sender chains: each sender rotates a sender key, state travels as extension content types 64 and 65, and membership changes are signed chain events — no group key ever sits in the relay.

THE CODE

Three repositories, one system

stillpost/protocol

The Rust core: CBOR, COSE, CMS, envelopes, prekeys, groups, calls, pairing. Library code with no network and no storage — the single implementation of everything that must not drift. Ships as WebAssembly for the browser.

Apache-2.0 · Rust · cargo test against the shared vectors

stillpost/relay

The Go server: per-device queues, directory, attachment transfer, web push, TURN. Holds ciphertext, routing fields, and public keys — and nothing else. Self-hostable with one binary and a volume.

AGPL-3.0 · Go · go test ./...

stillpost/client-web

The Svelte web client: vault, sync, calls, attachments, installable as a PWA. Keys and plaintext never leave the device except as ciphertext; the service worker holds no secrets.

Apache-2.0 · TypeScript · web.stillpost.dev

Self-host the relay

go build ./cmd/stillpost-server
./stillpost-server -addr :8443 -base-url=https://relay.example.com -data /var/lib/stillpost

The specification in the protocol repository is the contract: any implementation that passes the conformance vectors speaks SPT/1, and the licence terms keep it that way — Apache for clients and the core, AGPL for anyone running a modified relay as a service.