💬 End-to-End Encryption
How Signal, WhatsApp, and iMessage keep messages from everyone — including themselves⏱ ~2 min
With regular email, your email provider can read every message. It's like sending postcards — the postal service can read them. End-to-end encryption is like putting your postcard in a locked envelope where only you and the recipient have the key. Not the email server, not the app company, not law enforcement (without your key). Even if the provider is hacked or subpoenaed, they only have encrypted data.
The Signal Protocol
The Signal Protocol (designed by Moxie Marlinspike and Trevor Perrin, 2013) is the gold standard for secure messaging. It is used by Signal, WhatsApp (2B+ users), Google Messages (RCS), and Facebook Messenger. It provides E2EE with Forward Secrecy and Break-in Recovery — properties no previous messaging system had.
| Property | What It Means | How Signal Achieves It |
|---|---|---|
| E2EE | Server cannot read messages | Server only sees ciphertext; keys never leave devices |
| Forward Secrecy | Past messages safe if key is stolen today | Ephemeral ECDH keys ratcheted for every message |
| Break-in Recovery | Future messages safe even after compromise | Double Ratchet algorithm changes keys after every message |
| Deniability | Recipient cannot prove to a third party that you sent a message | Messages use ECDH-derived shared secrets, not asymmetric signatures |
The Double Ratchet Algorithm
The Double Ratchet combines two key-derivation ratchets that advance with each message:
- •Symmetric Ratchet (KDF Chain): each message derives the next encryption key from the previous one via HKDF. Knowing one key gives forward secrecy for previous messages but not the keys ahead.
- •Diffie-Hellman Ratchet: periodically, both parties perform a new ECDH exchange (using new ephemeral keys sent with messages). This provides break-in recovery — even if one set of keys is compromised, the next DH exchange restores security.
- •Together: every single message has a unique encryption key. Compromise one → the attacker gets that one message. Past messages are protected by forward secrecy. Future messages are protected by break-in recovery.
iMessage, WhatsApp — E2EE vs Backup Pitfalls
End-to-end encryption means…