"Messages are secured with end-to-end encryption": the phrase appears in many messaging apps. It means something precise and important, but it does not mean your conversations are safe from every risk. Let us look at what this technology guarantees, how it works and where its protection stops.
Encryption in transit versus end-to-end encryption
The fundamental difference is between two models.
- Encryption in transit: the message is encrypted between your phone and the server, and between the server and the recipient. But on the server it is decrypted and can be read by whoever runs it, whoever compromises it or whoever obtains lawful access.
- End-to-end encryption: the message is encrypted on your device and can only be decrypted on the recipient's device. The server carries data it cannot read.
With end-to-end encryption the service provider does not hold the keys. Even if it wanted to, it could not hand over the content of the messages.
Note that not every app uses it by default. Telegram, for example, applies end-to-end encryption only to "secret chats", while ordinary chats and groups are encrypted only between device and server.
The Signal protocol
The reference in this field is the Signal protocol, developed for the app of the same name and also adopted by WhatsApp and other services. It combines several mechanisms.
Keys published in advance
Each device generates a long-term identity key and a set of temporary keys, and uploads their public parts to the server. This lets you start an encrypted conversation with someone even if their phone is switched off at that moment: your device combines the published keys with its own and computes an initial shared secret.
The double ratchet
The heart of the protocol is the Double Ratchet. With every message, the key in use changes:
- one mechanism derives a new key from the previous one, like a ratchet that only turns forward;
- a second mechanism, at each exchange of replies, injects fresh random material through a Diffie-Hellman key exchange.
This yields two important properties:
- forward secrecy: if an attacker steals the current keys, they cannot decrypt past messages, because the earlier keys have been deleted;
- post-compromise recovery: after a few exchanges, the fresh random material locks the attacker out of future messages again.
Safety numbers: the only defence against an impostor
End-to-end encryption protects you from the server, but only if you really are encrypting for your contact's device. In theory a malicious server could hand you a fake public key and insert itself into the conversation.
That is why apps offer a safety code or safety number: a sequence of digits or a QR code derived from both parties' keys. If you compare it in person or through a trusted channel and it matches, you know nobody has stepped in between. When the app warns you that a contact's safety number has changed, it usually means they changed phone or reinstalled the app; for sensitive conversations, verify again.
What end-to-end encryption does not protect
Metadata
The server generally knows who is talking to whom, when, how often and from which IP address. This metadata can reveal a great deal. Some apps try to minimise it, but the level of protection varies greatly from service to service.
Backups
If messages are saved to a cloud backup that is not end-to-end encrypted, the chat's protection is bypassed: the backup is accessible to the cloud provider. Several apps offer backups encrypted with a password or key chosen by the user: it is worth turning them on, or disabling cloud backups altogether.
The device
Encryption protects messages in transit, not on the phone. Anyone with access to the unlocked device, or who installs spyware on it, reads the messages just as you do. A strong lock code, regular updates and care over which apps you install are an integral part of chat security.
People
The recipient can take a screenshot, forward the message or show it to others. No cryptography solves a problem of trust in the other person.
Practical advice
- Choose apps that apply end-to-end encryption to every chat, not only on request.
- Verify safety numbers with your most important contacts.
- Check your backup settings and encrypt or disable backups.
- Use disappearing messages for conversations you have no need to keep.
- Protect your phone with a strong code and keep it updated.
In short
- End-to-end encryption prevents the server from reading messages, unlike encryption in transit alone.
- The Signal protocol changes key with every message and provides forward secrecy and post-compromise recovery.
- Safety numbers exist to rule out an impostor in the conversation.
- Metadata, unencrypted backups and compromised devices remain weak points.
- Chat security depends as much on users' habits as on cryptography.