WhatsApp’s new security – The step towards end-to-end encryption

Spread the love

Encryption continues to receive a lot of attention, thanks to developments in the case that began when the FBI demanded that Apple provide access to an iPhone via a court order. This sparked a debate around the role of businesses and governments centered on how far commercial companies can go to protect their customers’ data.

In the middle of this discussion, Facebook subsidiary WhatsApp announced on Tuesday that all conversations via the service now use end-to-end encryption. It had been clear for some time that such a development was underway within the company, but it is nevertheless an important step. Users were shown a message in their chats announcing the encryption. Although this generated many positive reactions, the message also raised a number of questions, the most important being: what does this change mean and how secure is WhatsApp actually?

End-to-end encryption

One of the terms that keeps coming up in the encryption discussion is ‘end-to-end’ encryption. This means that messages on the phone itself are encrypted. Telephones can therefore be regarded as endpoints in the sending process of a message; a message originates on one user’s phone and ends on another user’s phone, with the Internet as an intermediate step. In that model, different ways of encryption can be applied. For example, it is possible that a message leaves the sender’s telephone unencrypted and is sent to the recipient via a server. The message is encrypted on the server, which then forwards the message to the recipient. This is not secure, because a third party can intercept the message between the sender and the server as plain text.

End-to-end encryption solves this problem by having the encryption take place on the sender’s phone. The advantage of this is that the message is never sent over the internet in the form of plain text. After all, the message is encrypted during the entire sending process and only becomes readable when the recipient receives the message on his telephone. This means that an intermediate server or a listening third party has no insight into the content.

The Signal protocol

The way WhatsApp has implemented this form of encryption is known as public key encryption . Simply stated, this means that every WhatsApp user automatically generates a public key locally and also has a secret private key, which is also unknown to WhatsApp. Together, these two keys form a key pair and are mathematically related.

If two parties want to communicate with each other, an encrypted chat session is first established. To achieve this, the person who starts the chat retrieves the public key of the desired interlocutor from the WhatsApp server. Based on this, he generates a master secret, which ensures that only his interlocutor can decrypt the upcoming messages. This works because the public key and the private key of users are related. A message encrypted with a certain public key can therefore only be read with the corresponding private key. In the case of WhatsApp, that applies not only to messages, but also to attachments, group conversations and voice calls. Once an encrypted chat session has been established, it does not need to be done again unless WhatsApp is reinstalled or the user changes devices.

WhatsApp uses the proven 256-bit AES encryption algorithm to encrypt messages, which is known to be secure. This standard is also recommended for securing files that need to be protected against cracking attempts by quantum computers. Key generation uses the relatively young elliptic curve ‘curve25519’, which was developed by Daniel J. Bernstein. It works quickly and is frequently implemented in various applications.

The encryption shown above in WhatsApp takes place on the basis of the so-called Signal protocol. It was first known as the TextSecure protocol, which is then derived from OTR . One of the advantages of this protocol is that it implements forward secrecy . This means that a temporary key is always used to encrypt messages. If an attacker comes into possession of a key, this prevents him from viewing all past conversations. So even if an encrypted text is intercepted, it remains secret.

WhatsApp has taken an important step with the implementation of the Signal protocol. The protocol is known to be very secure and the fact that it is open source only contributes to this. Many companies, such as Apple with iMessage, make the mistake of developing their own crypto system, which is often flawed as a result.

Third Party Access

Due to the measures just mentioned, it is also not possible for WhatsApp to view the messages sent via its own servers. On the other hand, although the Signal protocol is open source , it cannot be verified whether WhatsApp has actually implemented the techniques described in its white paper in the service in that way. The source code for the rest of the software is not publicly available, and it’s always good to keep in mind that the company is owned by Facebook, which has a bad image when it comes to privacy.

The service has taken steps to increase users’ confidence in the encryption. For example, it is possible to verify the keys of other users with a qr security code, which can be used to determine whether the key of the conversation partner indeed corresponds to the key on the WhatsApp server. This allows the skeptical user to check whether there is no party between him and the interlocutor, who intercepts messages with a man-in-the-middle attack by providing parties with false keys. The option to receive a warning when a contact’s security code has been changed is unfortunately disabled by default, but can be enabled manually via the security settings.

If access by WhatsApp is impossible, this also applies in principle to other parties. In addition, the company cannot comply with a government request for information, for the same reason. There is then no hard refusal to provide access to the data, because it is simply impossible to access the unencrypted communication. In the Netherlands, providers of public telecommunications networks and services are obliged to ensure that they can be tapped. However, the legal definition of such providers is limited, so that a service such as WhatsApp falls outside this scope and does not have to comply with the obligation. In addition, tapping an isp does not reveal the content of WhatsApp messages either, due to the end-to-end encryption.

However, there are other data that WhatsApp may provide to third parties. These are so-called metadata, which show, for example, when a message was sent and between which parties. WhatsApp ‘s privacy policy shows that the company stores this data. For example, parties such as the NSA have indicated that they often benefit more from the metadata than from the content of a message. The context of this statement was that users of encryption, such as PGP, actually stand out more with the service through use. So the question is how the NSA looks at this now, since WhatsApp has more than a billion users .

It also deserves attention that WhatsApp regularly asks to back up conversations made to, for example, Google Drive or iCloud. It is unclear whether these backups are also encrypted. According to a security researcher, these backups are indeed not encrypted, which can pose a security risk.

And now?

Based on the caveats just mentioned, one could conclude that the system implemented by WhatsApp is less secure than it seems at first glance. However, that conclusion was drawn too hastily. WhatsApp has made many correct choices in the implementation. For example, the company chose to use a proven protocol and not to develop its own system, which would undoubtedly have revealed shortcomings at some point. There is also no question of a hasty implementation, but a long-term process in collaboration with a renowned name in the crypto world, Moxie Marlinspike. The fact that the source code of the protocol is publicly available and that users can verify using a QR code also speaks in favor of the company.

Most importantly, accessible encryption has become available to a huge group of people. Although the system is not perfect yet, it is a big step towards privacy by design , which can serve as an example for other developers and companies. However, WhatsApp’s closed source code remains a concern, forcing users to rely on trust rather than informed choice.

You might also like