Encrypted Chat Explained: In Transit, At Rest and End-to-End
6 min read · By the Chatmf team
'Your messages are encrypted' is one of the most common claims in tech, and one of the least explained. In fact there are three quite different things it can mean. Knowing the difference lets you judge for yourself how much protection a service really offers.
Encryption in transit
Encryption in transit protects data while it travels between your device and the server. You see it as the padlock and 'https' in your browser, and, for live chat, as 'wss', the secure form of WebSockets. Without it, anyone on the same Wi-Fi network or along the route could read your messages as they pass. Every serious site uses it today, and it is the baseline rather than a bonus.
Encryption at rest
Encryption at rest protects data while it sits in storage. If the text of each message is encrypted before it is written to the database, then someone who obtains a copy of that database, from a leaked backup for example, sees scrambled data rather than readable conversations. Chatmf uses AES-256-GCM for this. The secret key is stored separately from the database, so the stored data alone cannot be read.
The limit of encryption at rest is that the service itself holds the key, because it needs to show you your messages. It defends against theft of stored data, not against the service operator.
End-to-end encryption
With end-to-end encryption only the two people in the conversation hold the keys. Not even the service can read the messages. This is the strongest model for private one-to-one messaging, and apps built around it, such as Signal, use it by design.
It also has trade-offs. Because the service cannot read messages, it cannot filter spam or abuse in the content, and group rooms with many members are much harder to build safely. Public chat rooms, where anyone can join and moderation matters, therefore normally rely on in-transit and at-rest encryption instead.
What encryption cannot do
No form of encryption protects you from the following.
- The person you are talking to copying or screenshotting your messages
- Telling a stranger something that identifies you
- A device that is infected with malware or left unlocked
- A weak or reused password on your account
Retention matters as much as encryption
The safest message is one that no longer exists. That is why automatic deletion is a privacy feature in its own right. Chatmf deletes messages and uploaded images 24 hours after they are sent, and guest accounts 24 hours after their last activity, so there is little for anyone to obtain even in the worst case.
Questions to ask any chat service
Before trusting a service with sensitive conversations, look for clear answers to these.
- Is traffic encrypted in transit, and is it stored encrypted?
- Who holds the keys?
- How long are messages and files kept, and can I delete them?
- Is there a published privacy policy that matches what the service actually does?