Every message is encrypted with its own key before it is stored, and only your password can unlock it. Here is exactly how it works, including the parts that aren't magic.
Arrives. Another mail server delivers to @privateparty.cc over TLS when it supports it. Cloudflare checks SPF, DKIM and DMARC.
Checked. Our Worker runs phishing checks in memory. Nothing is logged or sent elsewhere.
Sealed. A fresh random 256-bit key encrypts the message with AES-256-GCM. That key is sealed to your X25519 public key.
Stored. Only ciphertext is written: the body to R2, the sender and subject to D1.
Unlocked. Your password runs through scrypt to unwrap your private key, which unseals the message key.
Shown. The decrypted message opens in a sandboxed frame where scripts can't run and trackers can't load.
How a message travels: arriving mail is sealed to your key before it is stored, and only your password can unlock it again.
The key hierarchy
password + random 128-bit salt
│ scrypt · N=2¹⁵ · r=8 · p=3 · 32 MiB
▼
64 bytes ──┬─▶ first half → SHA-256 → login check (stored)
└─▶ second half → wrap key(never stored)
│ AES-256-GCM
▼
X25519 private key(stored only wrapped)
│ X25519 + HKDF-SHA256 · ephemeral key
▼
message key · random 256-bit, one per message
│ AES-256-GCM · bound to the message ID
▼
your mail
Spec sheet
Message encryption
AES-256-GCM, a new random key per message, 96-bit random IV. The message ID is bound in as associated data, so ciphertext can't be swapped between messages.
Key sealing
X25519 with an ephemeral key per message, HKDF-SHA256 to derive the sealing key.
Password
scrypt (N=2¹⁵, r=8, p=3) with a 128-bit random salt. One run gives a login check and a separate wrapping key.
Member to member
When every recipient is a member, the message is sealed straight to their keys and stored. It never leaves our server or crosses the internet as email.
Mail apps
Optional. IMAP and SMTP over TLS at mail.privateparty.cc, signed in with app passwords: random, about 98 bits, each revocable on its own. Your main password never goes into a mail app.
What's encrypted
Body, attachments, sender, recipients, subject and preview.
Sign-in
Rate limits per account and per network, optional 2-step codes (TOTP) that can't be replayed.
Sessions
__Host- cookies: HttpOnly, Secure, SameSite=Strict. Your unlocked key sits in an encrypted session record whose key is half in your cookie. Sessions end after 4 h idle or 7 days.
Invite codes
About 98 bits of randomness, stored only as HMAC-SHA256 hashes.
Crypto code
WebCrypto built into the platform, plus Node's scrypt. No hand-rolled ciphers.
Who can see what
You
The admin
Someone who steals the database
Push services (Apple, Google)
Your stored mail: text, attachments, sender, subject
●
○
○
○
Your password
●
○
○
○
Date, size, folder and read status of each message
●
in the database
yes
○
That you have an account, storage used, number sent today
●
●
yes
○
New-mail notifications
●
○
○
“new mail”, nothing else
Your IP address
●
keyed hash only
keyed hash only
○
Hardened browser
A strict Content Security Policy: no third-party scripts, fonts, trackers or inline code. Also HSTS (HTTPS only, for two years), no framing by other sites, and CSRF tokens on every change.
Mail that can't bite
Mail opens in a sandboxed frame with its own lockdown policy. Scripts never run, remote images and tracking pixels are blocked, and styles are cleaned.
Phishing radar
Every incoming message is checked on our own server: sender authentication, look-alike domains, links that lie about where they go, password forms and dangerous attachments. Likely phishing goes to Junk with its links switched off.
Locked-down admin
The admin signs in with a long password plus a mandatory authenticator code. Every admin action is logged. The panel manages accounts and invites, but it has no way to read mail.
Abuse brakes
Daily sending limits per member and service-wide. Per-sender limits on incoming mail. Blocked senders are refused before anything is stored.
Quiet notifications
Pushes are sent empty and the app shows “You have new mail”. VAPID keys are sealed at rest. Only Apple's, Google's, Mozilla's and Microsoft's push services are allowed.
What we don't claim
Security pages that promise everything are a red flag. Here are the real limits.
This isn't PGP or Signal-style end-to-end encryption. Encryption and decryption run on our server. While you're signed in, your unlocked key lives in an encrypted session record that only your browser's cookie can open. When you're signed out, nothing on our side can open your mail.
Mail from outside is readable while it arrives. Regular email from Gmail, Outlook and others travels like all email: over TLS between servers when they support it, and through Cloudflare's network. Our Worker sees each message in memory for a moment to check it and seal it.
Mail you send outside leaves sealed for you, not for them. Your copy in Sent is encrypted. The copy that reaches someone at another provider is ordinary email. Mail between members stays inside.
Some metadata stays readable so the inbox can sort and count: which mailbox a message belongs to, its date, size and folder, and whether it's read or starred.
Mail apps trade some protection for convenience. They're off until you make an app password. While an app is connected, our mail server uses that app password to unlock your mail and hands it to the app over TLS. The mail server runs on Fly.io and stores nothing. Revoke the app password and it stops.
There is no password reset. Your password is the key. Lose it and the mail can't be recovered, by anyone.
We run on Cloudflare. Their network delivers the mail and runs our code, so we rely on their platform being secure.