How WhatsApp Needs to Improve Its Encryption
Addendum (10 Jun 2015): WhatsApp cooperated with US intelligence agencies to decrypt user chats, according to Bloomberg.
I recently wrote a post touching upon secure messaging projects falling short from due diligence when it comes to their security guarantees. The most-discussed aspects of that post were my claims that WhatsApp guarantees zero end-to-end confidentiality of your messages. I stand by this. To answer questions I’ve received, I’m going to explain in detail why this is the case.
How is WhatsApp claiming that my chats are encrypted?
WhatsApp and company recently announced that they had implemented an excellent encryption protocol that includes a truly innovative messaging and key scheduling mechanism. According to WhatsApp and Whisper Systems (who worked on the encryption techniques), they actually did implement some pretty nice encryption, and it’s likely that this encryption is working in your WhatsApp client right now if you’re using it on an Android device.
So why isn’t WhatsApp’s encryption effective?
Even though encryption is coded into WhatsApp, it is possible for any WhatsApp employee, for your ISP or other agencies to circumvent and even completely disable its security, at any time, and without you knowing.
The details of why WhatsApp is vulnerable are painfully clear to anyone who’s seasoned in computer security. But the average WhatsApp user has no understanding of the attacks that can render even well-implemented encryption completely useless. Here’s my attempt to explain these simple and important ideas.
When you start an encrypted conversation with with a friend on WhatsApp, you need to communicate to them a special public key that is used to establish secure communications. Your friend’s WhatsApp client will rely on this public key to know who it’s encrypting the information to, so it has to be authentic.
Now, since you don’t have a direct connection to your buddy’s phone, this public key exchange, like regular WhatsApp messages, has to be sent through WhatsApp’s servers, who then deliver it to your friend’s phone.
What’s preventing WhatsApp from forwarding fake public keys to your buddy instead of your actual ones? You guessed it: nothing. In computer security, this is called a Man in the Middle attack.
Anyone who replaces your public key in transit obtains immediate decryption. Zero security, end of story. And nothing is stopping WhatsApp from replacing your public key on demand, to intercept “encrypted” communications at any time.
It gets worse. Due to its excellent multiplatform compatibility, WhatsApp’s servers need to manage connections between many different WhatsApp clients. Some clients are running on advanced phones (such as Android or Windows Phone) while others are running on old Symbian or BlackBerry phones, which can be overwhelmingly popular in India and other parts of Asia. Managing connections between highly capable phones that can handle encryption and phones that can’t is a process that requires the WhatsApp server to get involved.
Because of this, your phone needs to check with WhatsApp’s servers first before being allowed to begin a secure chat, and WhatsApp servers can reject this permission at any time, without you ever being notified. The problem here is that WhatsApp won’t even provide an indicator of whether a conversation is encrypted or not: the server could disable your encryption permit at any time, and you would still completely be under the impression that you’re having an encrypted conversation. This isn’t security. End-to-end security is not selective, it’s always enabled, and enabled by default.
Be constructive. How can WhatsApp fix its encryption?
Man in the middle attacks are not new, and most secure messaging apps have a mechanism to protect against them. They allow you to verify the integrity of encryption keys yourself: for example, by scanning a QR code generated by your friend’s phone. WhatsApp can implement this today; it’s been implemented by countless applications before it.
It’s also clearly possible to implement reliable indicators that inform users when their chats are encrypted and when they aren’t. Calling WhatsApp conversations “secure” in the media and then depending on WhatsApp’s servers not disabling your encryption at any time is misleading to the point of being dangerous.
It wouldn’t be accurate to build a motorbike with just a front wheel and call it a motorbike. You need both wheels. It’s similarly inaccurate to call WhatsApp’s encryption end-to-end secure as it stands today. Until WhatsApp offers means to resist against man in the middle attacks, and ways to verify the encryption status of conversations, it is simply, and undeniably, not secure.
Disclaimer
I’d like to point out that I am an avid, daily WhatsApp user and that I love its reliability, ease of use and multi-device availability. I just don’t use it under the pretense that I’m benefitting from any level of privacy. I mostly use it to send cat photos. Thanks WhatsApp for your bandwidth for my cat photos.
I’d like to disclose that I also work on other encryption software (which has had its fair share of flaws over the years). I’m stating this because the last time I published a critique of encryption software, an upstanding gentleman accused me of doing so only to “sling mud at competitors”. Writing to point out security flaws that affect real users isn’t slinging mud. It’s called peer review. It’s what you do when you’re a graduate student studying cryptography.
Finally, my description of man in the middle attacks is overly simplified, I’m aware. No mail, please.











