A deeper look at Whatsapp End-to-end Encryption

Hi all,

a few days ago Whatsapp announced that end-to-end encryption is finally available on iOS and Android (only if you have the latest version of Whatsapp installed). That’s great news! It’s worth pointing out it’s been a while that users have been asking for this feature, and other applications have been providing it with a remarkable success since a while (e.g. Telegram).

WhatsApp

End-to-end Encryption

This news comes with a perfect timing! Indeed, recently FBI and other national security agencies have shown their interest in trying to break encryption for “good” reasons, such as fighting against terrorism and crime. However, this puts giant tech companies such as Apple in a very difficult position: allowing a third party (even though it’s trustworthy) to exploit a backdoor on their systems introduces a few issues, as Apple explained in this letter. I have the feeling that this story will last long enough.

As security guys, we at SecludIT always do our best to promote the need for confidentiality. In particular, we think that personal messaging applications have become so popular that we can’t afford to allow anybody to look at our communications (even though we have nothing to hide!). Therefore, providers have to properly secure our messages against any malicious or “curious” entity, including themselves.

End-to-end encryption is the only way of achieving this: by using it, messages are encrypted on the client before being uploaded to the server. Also, messages are encrypted using a secret key, stored on the client, which should never (never!) be shared with the server or anybody else. If so happens, the server gains the ability of decrypting our messages, hence reading them.

e2e-encryption

A deeper look

Without going into the technical details (if that’s what you’re looking for, please read Whatsapp’s security whitepaper), let’s try to better understand how Whatsapp is delivering end-to-end encryption to all of us.

First of all, they decided to partner with Open Whispher Systems, a knowledgeable team of security experts strongly committed to making personal messagging secure (they are also the developers of the Signal app) and publishing all their work as open-source code.
This means that, even though unfortunately Whatsapp’s source code is secret, with some good faith we can suppose that the protocol that is being used on Whatsapp clients is Signal, which is open-source and reliable. The fact that a protocol is open-source is crucial: indeed, it implies that thousands of smart minds have struggled to find a weakness without finding any. One more great news!

The protocol seems to be robust and is technically sound. Each message is encrypted with a different key, which provides a great level of confidentiality. Initially, I was a bit worried by the fact of having a visual secret code accessible at any time on the device. To me, it sounded like the secret key could be stolen by anyone with physical access to the device! Fortunately, I was wrong. After reading the security whitepaper I leaned that the nice QR code that is visible on the app is just a SHA-512 hash, so it doesn’t say much about user’s secret keys.

whatsapp security qr code

Still RC4!

Please keep in mind that the deployment of this feature is an ongoing process. End-to-end encryption will be eventually available on any device running Whatsapp, but for now it isn’t! Security researchers found out that in some cases RC4 (which is known to be broken) is used instead of the Signal protocol.

Conclusion

This being said, in my opinion there are a few items which should make us worried.

First, without having access to the source code, it is hard to believe that Whatsapp has no way to retrieve users’ secret keys or disable end-to-end encryption at any time. Since we have no way to verify that, we have to TRUST them, which is what users don’t want to do.

Second, Whatsapp (like many other applications) is based on a client-server architecture, which requires clients (users) to involve the server in any communication. This means that the server has access to a variety of potentially sensitive information, and without knowing whether or not users’ secret keys can leave the device, we can’t be 100% sure that our privacy is guaranteed. If users’ secret keys never leave the device for any reason, end-to-end encryption doesn’t make sense anymore.

Third, someone pointed out that recent topics about which he talked on Whatsapp were showing up on Quora. Of course, this may be nothing more than a joke, but I wouldn’t be surprised if personal messaging apps were thinking of making money by selling this kind of information to other companies. With actual and transparent end-to-end encryption, such an option wouldn’t be possible.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s