# Sojourn An open protocol for messaging that leaves nothing behind: no accounts, no phone numbers, no central switchboard, and no record of who talks to whom. Like SMTP, anyone can implement it or run a mailbox. **This is a skeleton.** It shows the shape of the envelope and nothing more. It has not been reviewed, it has no network layer, and it will change without notice. Don't use it to protect anyone yet. ## What's here - `src/lib.rs`: the envelope. Seal a message to someone's public key; open the ones meant for you. - `src/main.rs`: a command-line demo where a plain folder stands in for a mailbox. ``` cargo build --release ./target/release/sojourn keygen alice ./target/release/sojourn keygen bob ./target/release/sojourn send alice.secret bob.pub ./box "meet at the harbor" ./target/release/sojourn fetch bob.secret ./box ``` ## Design rules 1. **Nothing on the outside.** An envelope carries no sender, no recipient and no account. A mailbox stores opaque blobs; you find yours by trying to open them. 2. **Every envelope is one of four sizes** (2, 4, 16 or 64 KiB), so length says little. 3. **Hybrid key agreement.** X25519 and ML-KEM-768 (FIPS 203) are combined, so breaking one of them isn't enough, including with a future quantum computer. 4. **Signed inside the seal.** The sender's Ed25519 signature covers the recipient's keys and the envelope's one-time key, so a message can't be re-sealed to someone else. 5. **One failure mode.** Wrong recipient, tampering and garbage all look the same. 6. **No telemetry, ever.** No analytics, no crash reporting, no phoning home. ## Envelope format (version 0) ``` version (1) | ephemeral X25519 key (32) | ML-KEM-768 ciphertext (1088) | nonce (24) | XChaCha20-Poly1305 ciphertext of: sender Ed25519 key (32) | signature (64) | message length (4) | message | zero padding ``` Key: HKDF-SHA256 over the X25519 and ML-KEM shared secrets, salted with the one-time key and the recipient's X25519 key. The header is authenticated as associated data. ## Still to build - Transport over Tor, with bridges on by default so using Tor isn't itself visible. - Mailboxes as onion services that hold sealed envelopes until a phone collects them. - Ratcheting, so a key stolen later can't open old messages. - Contact verification, disappearing messages, panic wipe. - iOS and Android apps with no cloud backups and keys wiped on lock. - Reproducible builds signed by more than one person. ## License MIT. Copyright (c) 2026 The Sojourn contributors.