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 email, it's a protocol: anyone can implement it or run a mailbox.
This is an early skeleton. It shows the shape of the envelope and nothing more.
It hasn't been reviewed, it has no network layer yet, and it will change. Don't use it to protect anyone yet.
Design rules
- Nothing on the outside. An envelope carries no sender, no recipient and no account. A mailbox stores opaque blobs, and you find yours by trying to open them.
- Every envelope is one of four sizes. 2, 4, 16 or 64 KiB, so length says little about what's inside.
- 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.
- 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.
- One failure mode. Wrong recipient, tampering and garbage all look the same.
- No telemetry, ever. No analytics, no crash reporting, no phoning home.
Envelope, 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
The key comes from HKDF-SHA256 over both shared secrets, salted with the one-time key and the recipient's X25519 key. The header is authenticated as associated data.
The code
README.mdwhat's here and how to run itCargo.tomlthe crate and its dependenciesCargo.lockexact dependency versionssrc/lib.rsthe envelope: seal and opensrc/main.rsa command-line demo with a folder as the mailboxLICENSEMIT
Try it
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
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.