Your message takes a complex route of systems when you send it through a modern messaging app. It goes from your device to a cellular or Wi-Fi network, then to your carrier's infrastructure, next to the messaging provider's servers, through another network and ends up at the recipient's device.
At each point in that chain, someone or something could theoretically intercept and read your message. End-to-end encryption is the mechanism that makes that interception useless - your message arrives at the other end as an incomprehensible string of characters to anyone without the specific key to decrypt it.
Though the concept is simple enough to state, its implications are deep and divisive. With end-to-end encryption, attackers cannot read your messages and the same goes for the company running the service, your government if it gets a lawful warrant from that company and any third party that obtains a subpoena of server logs.
At the same time, this is both its strongest privacy protection and the source of intense political debate. American, British, European Union and Australian law enforcement agencies have time after time said that encryption without backdoors gets in the way of legitimate investigations.
The cryptographic community says that backdoors cannot be limited to authorized parties because they are by definition vulnerabilities.
End-to-end encryption's technical workings show that the backdoor debate is not about finding a technical fix for a policy question. It is instead a basic mathematical fact.
Cryptographic basics get covered here as well as the Signal Protocol behind most major encrypted messaging today. The article also goes over the meaningful differences between Signal, WhatsApp, Telegram and iMessage and the metadata problem encryption alone fails to protect that gets too often overlooked.
"Encryption is the most important privacy-preserving technology we have, and it is under serious threat - not from technical failure, but from political pressure to weaken it."
Bruce Schneier, security technologist and author
Key Definitions
End-to-end encryption (E2EE): A communication method in which only the communicating parties can read the messages. The encryption happens on the sender's device, and decryption happens only on the recipient's device.
Public key cryptography: An asymmetric cryptographic system using a pair of mathematically related keys: a public key (shared openly) and a private key (kept secret). A message encrypted with someone's public key can only be decrypted with their corresponding private key.
Forward secrecy: The property that compromising current or future encryption keys does not compromise past messages. Achieved by generating fresh encryption keys for each session or message.
Metadata: Information about communications - who communicated with whom, when, for how long, from where - rather than the content of the communication itself. Often collected even when message content is encrypted.
The Signal Protocol: An open-source cryptographic protocol developed by Moxie Marlinspike and Trevor Perrin that provides end-to-end encryption with forward secrecy. Used as the basis for Signal, WhatsApp, and other messaging platforms.
Double Ratchet Algorithm. Inside the Signal Protocol is the core mechanism that gives each individual message a new encryption key and makes sure that one key being compromised does not expose any others.
X3DH (Extended Triple Diffie-Hellman): The key agreement protocol used by Signal to establish a shared encryption key between two parties before any messages are exchanged, even when one party is offline.
Messaging Apps Encryption Comparison
| App | Encryption Protocol | E2EE by Default | Open Source Client | Open Source Server | Metadata Collected |
|---|---|---|---|---|---|
| Signal | Signal Protocol | Yes (all messages) | Yes | Yes | Phone number + last connection date only |
| Signal Protocol | Yes (all messages) | No | No | Extensive - contacts, frequency, device, location | |
| Telegram | MTProto (proprietary) | No (opt-in Secret Chats only) | Partial | No | Moderate - message metadata available to Telegram |
| iMessage | Apple proprietary | Yes (Apple to Apple) | No | No | Moderate - iCloud backup caveat |
How End-to-End Encryption Works
Symmetric vs. Asymmetric Encryption
The simplest form of encryption uses a single key that both locks (encrypts) and unlocks (decrypts) a message. This symmetric encryption is fast and efficient but creates a fundamental problem: how do two parties who have never met securely agree on a shared key over an insecure channel?
If you send the key over the same channel as the message, anyone intercepting the channel gets both.
Asymmetric encryption deals with this by using a mathematically paired key system. Every party creates a key pair comprising a public key that can be shared with anyone and a private key that is kept secret and never sent. Only Alice's private key can decrypt a message that has been encrypted with Alice's public key.
When Bob wants to send Alice a message, he encrypts it with her public key. Even if an attacker intercepts the encrypted message, and even if they have Alice's public key, they cannot decrypt it without her private key, which Alice has never shared with anyone.
This enables secure key exchange over insecure channels using a technique called Diffie-Hellman key exchange, independently published in 1976 by Whitfield Diffie and Martin Hellman.[2]
The mathematical elegance of Diffie-Hellman is that two parties can derive a shared secret through exchanges of public information, without ever transmitting the shared secret itself.
The eavesdropper can see the public exchange but without solving the discrete logarithm problem that is computationally out of reach with today's technology, the secret cannot be derived.
In concrete terms, Alice and Bob each choose a secret number, swap the public values calculated from those numbers over an open line and then independently arrive at the exact same shared secret.
The attacker cannot work out the shared secret from the public values alone by watching the exchange. That is because the mathematical relationship needs the private numbers that neither party shared.
The Signal Protocol
The Signal Protocol, developed by Moxie Marlinspike (founder of Signal) and Trevor Perrin at Open Whisper Systems in 2013, builds on these foundations to create a system with properties beyond simple encryption.
The protocol's most important innovation is the Double Ratchet Algorithm, which advances the encryption key continuously during a conversation.[1] Rather than using a single session key for an entire conversation, the Double Ratchet generates a new key for every message sent.
This means that if an attacker somehow obtained the key for message 47, they could decrypt only message 47 - not messages 1 through 46 (forward secrecy) and not messages 48 onward (break-in recovery, also called future secrecy).
For initial key exchange (establishing a shared secret before any messages have been exchanged), the protocol uses the X3DH (Extended Triple Diffie-Hellman) mechanism.
Two parties can use X3DH to set up a shared key even if one party is offline. This is done through preloaded "one-time prekeys" that get put on the server ahead of time. The server keeps only public key material and never gets to see the shared secret that is derived.
From the moment it was developed, the full technical specification of the Signal Protocol has been public and cryptographers around the world have analyzed it extensively.
Cohn-Gordon et al. did a formal security analysis that was first published in 2016/2017 and appeared in Journal of Cryptology in 2020. It found no major vulnerabilities in how the protocol was designed and that is a remarkable credit to its cryptographic engineering.[3]
What "End-to-End" Actually Means
Precisely what the term "end to end" means is that encryption takes place at one endpoint (your device) and decryption at the other (your recipient's device). Encrypted ciphertext that their servers in the middle cannot read is all that the messaging provider's servers in between see. What follows is distinct from:
- Encryption in transit only (also called TLS/HTTPS): the message is encrypted between your device and the server, but the server holds it in readable form. The service provider can read your messages.
- Encryption at rest: messages are stored encrypted on servers, but the service holds the encryption keys and can decrypt them for legal or operational purposes.
Architecturally excluded from reading your messages, true E2EE means the service provider cannot get access. They do not promise not to read them and they are technologically unable to.
Major Messaging Apps
Signal
Signal is the application built by the Signal Foundation (formerly Open Whisper Systems), a nonprofit organization. It uses the Signal Protocol for all messages and calls. Its source code is fully open source for both the application and the server, meaning the security claims can be independently verified.
Signal collects the absolute minimum possible metadata: just a phone number (required to use the service) and the date a user last connected. It does not collect who you message, when, or for how long.
Signal's privacy model is designed for high-stakes use. Journalists, activists, lawyers, medical professionals and whistleblowers routinely use it for sensitive communications. The Electronic Frontier Foundation rates it the highest of any mainstream messaging application for privacy.[7]
Signal is limited practically by network effects as it needs your contacts to also use Signal. Its everyday communication utility suffers compared to WhatsApp or iMessage because of that and this is why Signal's large user base is still much smaller than WhatsApp's.
WhatsApp implemented the Signal Protocol in 2016, making it the largest encrypted messaging service in the world by user count - over 2 billion active users.[11]
The encryption of message content on WhatsApp is genuine: WhatsApp cannot read your messages, and this has been confirmed through legal proceedings where WhatsApp could not produce message content in response to subpoenas.
Yet WhatsApp is owned by Meta (formerly Facebook) and its privacy policy collects large amounts of metadata. The policy covers who you communicate with and how often, location data if enabled, device identifiers, your contacts list, usage patterns and details of the groups you are in.
Even without a single word of message content, in places where WhatsApp does hand over data to law enforcement, this metadata can reveal a great deal about what is happening.
WhatsApp is also closed-source, which means the encryption implementation cannot be independently audited. The Signal Protocol is open and verified; WhatsApp's application of it cannot be externally confirmed to match the published specification.
Telegram
Telegram is frequently mischaracterized as an end-to-end encrypted messaging app. In reality, regular Telegram chats are not end-to-end encrypted by default.
Standard Telegram messages are encrypted in transit between your device and Telegram's servers - meaning Telegram can read your messages, and has done so to enforce its terms of service and respond to law enforcement in certain jurisdictions.
End-to-end encryption works only in "Secret Chats". To turn that on takes going through a separate UI option and group chats give no E2EE option at all.
Telegram relies on its own proprietary MTProto encryption protocol, rather than the Signal Protocol. Cryptographers have given sustained criticism to MTProto across several versions though the protocol has got better. Without open-source server code available, there is no way to independently verify how the protocol is implemented.
Real end-to-end encryption is not something that anyone seeking it will find in Telegram's default chats. Even though Telegram has built up a large following by being fast and feature rich, its default encryption settings are far weaker than what comes standard in Signal or WhatsApp.
iMessage
End-to-end encryption runs between Apple devices via Apple's iMessage using its own cryptographic protocol. The service does not turn to the Signal Protocol but it does put in comparable cryptographic primitives. Privacy features mean something for Apple-to-Apple communication through iMessage.
The significant caveat is iCloud backup: if iCloud backup is enabled (the default for most users), a copy of your messages is stored in a form that Apple can access under legal process. Apple has received and complied with legal orders for iMessage data stored in iCloud.
In late 2022, Apple introduced iCloud Advanced Data Protection, which extends E2EE to iCloud backups - but users must opt in, and it is not widely adopted. When iMessages leave Apple devices (sent to Android, for instance), they fall back to unencrypted SMS.
The Metadata Problem
What Metadata Reveals
Encryption protects the contents of communication. It does not protect information about that communication.
Messaging services, even strongly encrypted ones, typically log: who communicated with whom (contact graphs), the timing and frequency of communication, message lengths, the groups users belong to, IP addresses (revealing geographic location), and device identifiers.
In 2014, Jonathan Mayer and Patrick Mutchler at Stanford demonstrated through the MetaPhone study that phone metadata, without content, could reveal that a person had spoken with a neurologist, a cancer support group, and a hospice service in sequence (strongly suggesting a terminal diagnosis).[5]
Or calls to Alcoholics Anonymous, a drug treatment clinic, and a pharmacy. The research illustrated what communications scholars had long argued: metadata about who you talk to, when, and in what pattern is often more revealing than what you say.[6]
Michael Hayden, former NSA and CIA director, made a public statement in 2014 that gets much citation. In it he said, "We kill people based on metadata." Targeting decisions in counterterrorism operations were what he was referring to but the statement captures how actionable contact graph information can be even without message content.
Signal's Metadata Minimization
As a privacy goal and not just a technical property, Signal has designed its service to collect less metadata.
The 2021 legal case in which Signal was served a subpoena by a US grand jury is instructive: Signal was able to produce only two data points - the Unix timestamp of when a user account was created and the date of the account's last connection to Signal.[9]
There is no message content, no contact graph and no location data. Giving more data was not just prohibited by the system design. It was made impossible.
Building systems in such a way that sensitive data is never collected instead of promising to protect what is collected is the core principle behind privacy-by-design frameworks and it is the highest standard in private communication systems.
This is important to distinguish. A service promising not to share your data can still be forced, hacked or acquired. When a service is built so that it cannot make the data available, it gives a guarantee nothing in policy or promise can equal.
The Government Backdoor Debate
The Law Enforcement Argument
Law enforcement agencies, led in the United States by the FBI and Department of Justice, have argued for years that end-to-end encryption without exceptional access (a "backdoor" for lawful surveillance) prevents investigation of serious crimes including terrorism, child exploitation, and organized crime.
The position is known as the "Going Dark" problem. It argues that encryption is eroding what law enforcement has historically had: the ability to intercept communications under proper legal authority.
During the 2016 dispute between the FBI and Apple, that fight moved onto the front page. Following the San Bernardino attack, federal prosecutors asked a judge to order Apple to create a custom version of iOS that removed the passcode protections from the shooter's iPhone.
Tim Cook, Apple's CEO, said publicly that he refused. He argued that making such a tool even once and even for a single case would create a vulnerability that could not be guaranteed to stay with authorized people alone.[8] In the end, the FBI dropped its court order once it got access through a third-party vendor.
Why Backdoors Cannot Be Made Safe
Cryptographers have addressed the "backdoor for good actors only" request repeatedly.
The 2015 paper "Keys Under Doormats", authored by Harold Abelson, Ross Anderson, Steven Bellovin, and other leading security researchers, explains the technical impossibility in detail: any mechanism that allows a third party (government) to access encrypted data is a vulnerability - a mathematical key that either exists or does not.[4]
A key held by a government agency can be stolen, leaked, or compelled to be provided to other governments.
There is no cryptographic mechanism that distinguishes a "legitimate" request from an "illegitimate" one - the math does not know.
Digital security and privacy risks from mandatory exceptional access mechanisms were found in the paper to be greater than any potential benefit to law enforcement. That position has been backed by the overwhelming majority of working cryptographers.
More recent proposals share the same mathematical reality. Client-side scanning (scanning messages before encryption), key escrow systems as well as "lawful intercept" architectures all bring in the same basic weakness but from a different angle.
Either a third party can access communications, in which case the system is exploitable - or they cannot, in which case the backdoor does not exist.
Quantum Computing and Future Cryptographic Risk
Current E2EE systems rely on mathematical problems that classical computers cannot practically solve - discrete logarithm for Diffie-Hellman, integer factorization for RSA. Quantum computers, using Shor's algorithm, could in principle break these in polynomial time once sufficiently powerful quantum computers exist.
The National Institute of Standards and Technology (NIST) finalized its first set of post-quantum cryptography standards in 2024, selecting algorithms resistant to quantum attack.[10] Signal has already begun integrating post-quantum key agreement (specifically CRYSTALS-Kyber, now called ML-KEM) into its protocol.
Presently quantum computers do not pose a threat (current quantum computers cannot break what is deployed). The area is actively being developed though and communications requiring long-term confidentiality must guard against "harvest now, decrypt later" attacks where encrypted traffic gets stored for future decryption.
Practical Takeaways
What most ordinary users need to worry about gets covered by WhatsApp's strong message-content encryption for daily private chats.
When privacy matters a great deal in journalism, legal work, politics and medicine, Signal is the app people use and knowing why metadata matters is just as important as the encryption.
Understanding the metadata problem means recognizing that encryption of content and metadata minimization are separate concerns. Even with excellent content encryption, patterns of communication can be revealing.
How Signal operates, what iCloud backup does to iMessage privacy and whether the service you use logs contact graphs are questions serious privacy practice calls for asking.
The government backdoor debate will continue, particularly as legislative attempts to mandate exceptional access recur. The technical reality does not change: weakening encryption for one party weakens it for all parties. Any backdoor is a vulnerability - and vulnerabilities do not stay in authorized hands.
Sources
- Marlinspike, M., & Perrin, T. (2016). The Double Ratchet Algorithm. Signal Messenger.
- Diffie, W., & Hellman, M. (1976). "New directions in cryptography." IEEE Transactions on Information Theory, 22(6), 644-654.
- Cohn-Gordon, K., et al. (2020). "A formal security analysis of the Signal messaging protocol." Journal of Cryptology, 33(4), 1914-1983. View source
- Abelson, H., et al. (2015). Keys Under Doormats: Mandating Insecurity by Requiring Government Access to All Data and Communications. MIT CSAIL.
- Mayer, J., & Mutchler, P. (2014). MetaPhone: The NSA Three-Hop. Web Policy, Stanford University.
- Schneier, B. (2015). Data and Goliath: The Hidden Battles to Collect Your Data and Control Your World. W. W. Norton.
- Electronic Frontier Foundation. (2023). Secure Messaging Scorecard. EFF.
- Apple Inc. (2016). A Message to Our Customers., February 16.
- Signal Foundation. (2021). Grand Jury Subpoena for Signal User Data, Eastern District of Virginia. Signal Blog.
- NIST. (2024). Post-Quantum Cryptography Standards. National Institute of Standards and Technology.
- Marlinspike, M. (2016). "WhatsApp's Signal Protocol integration is now complete." Open Whisper Systems Blog, April 5.
Further Reading
- Hypponen, M. (2013). "Governments as malware authors." Proceedings of ACM CCS, Berlin.







