How end-to-end encryption works in SipherMail

When mail is encrypted automatically, how the keys and the OpenPGP format work, what the server stores, and what end-to-end encryption does not cover.

The SipherMail team4 min read

End-to-end encryption (E2EE) in SipherMail is automatic between users in Privacy mode and a choice everywhere else. This post explains the mechanism step by step, then lists what it does not protect.

The short version#

Your browser or app encrypts a message, with its attachments, before sending it. The server stores and forwards ciphertext. Only people holding a matching private key can decrypt it, and that key is itself locked with a passphrase that is not your login password.

This happens automatically when you are in Privacy mode and every recipient is a SipherMail user in Privacy mode with a key. In every other case the message goes out as ordinary email unless you choose to encrypt it yourself.

Step 1: you get a key pair#

When you set up encryption in Settings > Encryption, your device generates an OpenPGP key. It uses Curve25519: Ed25519 for signing and X25519 for encryption.

  • The public key is stored on the server so other SipherMail users can encrypt messages to you.
  • The private key is encrypted on your device before it is uploaded. It is protected with AES-256-GCM, using a key derived from your passphrase with PBKDF2 (SHA-256, 310,000 iterations).

So the server holds your private key, but only in encrypted form. Without your passphrase it is not usable.

Step 2: the message is encrypted and signed#

When you send an encrypted message, your device:

  1. Builds the whole message: text, attachments and inline images.
  2. Encrypts it with OpenPGP to every recipient’s public key, and to your own so you can open your Sent copy.
  3. Signs it with your key, so the recipient can tell it came from you and was not changed.
  4. Sends the result in the standard PGP/MIME form.

Because OpenPGP is an open standard, the same format works with other OpenPGP software. That is also why you can choose to encrypt to someone at another provider who has an OpenPGP key.

Step 3: what the server stores#

The server stores the encrypted message exactly as sent. It never receives your unlocked private key. That is why the body and attachments of an encrypted message cannot be read by the server.

To read a message, your device fetches your encrypted private key, unlocks it with your passphrase, and decrypts the message locally.

Passphrase versus login password#

These are two different secrets with different rules.

Login passwordEncryption passphrase
Used forSigning inUnlocking your private key
Can we reset itYes, with your recovery email or a recovery codeNo
If you lose itReset and carry onOnly your recovery phrase can unlock your encrypted mail

We never have your passphrase, so we cannot recover it. That is the price of the server being unable to read your encrypted mail. A recovery phrase is 12 words that can unlock your key on a new device. Create one in Settings > Encryption and write it down somewhere safe. Resetting your login password does not unlock encrypted mail. If you lose both the passphrase and the recovery phrase, that mail cannot be opened by anyone.

On the mobile apps, automatic setup keeps a random passphrase in the device keychain, so the recovery phrase is what lets you open your mail on a new phone.

When it applies#

Encryption is automatic when you and every recipient are SipherMail users in Privacy mode with keys. An account in AI mode is not end-to-end encrypted by default, so that the assistant can work on its mail. If you write to someone on another service, the message goes out as ordinary email unless you choose to encrypt to their OpenPGP key. You cannot combine E2EE with expiring or password-protected messages, which are a separate feature with their own protection.

What E2EE does not protect#

This is the part people skip, so we will be direct.

  • Ordinary mail. Everything you receive from other services, normal messages you send to them, and all mail of accounts in AI mode is readable by the mail server. E2EE only covers the encrypted messages described above.
  • The subject line. The subject is not encrypted. Do not put secrets in it.
  • Sender, recipients and timing. Mail needs addresses and delivery information to travel, so these are visible to the servers that handle the message. Headers are not encrypted.
  • A compromised device. If someone controls your unlocked browser or phone, they can read what you can read.
  • A weak passphrase. The private key is stored on our server in encrypted form. Its strength depends on your passphrase, so choose a long one.
  • The other person. The recipient can forward or copy what you send them.

Why this design#

OpenPGP is widely reviewed and works beyond SipherMail. Storing the encrypted private key on the server lets you open your mail from any device without moving key files around, at the cost of making the passphrase the thing that matters.

For the setup steps, see the end-to-end encryption guide.