Is WhatsApp Safe?
7 Minutes
Learn how WhatsApp encryption works and whether it is safe in this introduction to cryptography for students. A Tamil technology lesson.
- Encrypting and decrypting secret messages using a number key
- Using public and private keys in WhatsApp to lock messages
- How end-to-end encryption prevents hackers from tampering chats
What this lesson teachesRead the lesson as text
WhatsApp secures chats using end-to-end encryption, a cryptographic process where messages are converted into secret codes so that only the sender and the recipient can read them.
Encryption and decryption
Cryptography is the practice of protecting communication by turning plain text into secret code. Transforming readable text into scrambled data is known as encryption, while converting the scrambled code back into the original message is known as decryption. In a basic cipher, letters of the alphabet are mapped to numbers using a shared rule called a key. While simple keys can be stolen if shared openly, WhatsApp uses complex sixty-digit prime numbers to create its security keys.
Public and private key pairs
When WhatsApp is installed on a smartphone, the application automatically generates two distinct digital keys:
- A public key is placed on the WhatsApp server and is available in the public domain.
- A private key is stored exclusively on the user's phone and remains hidden from everyone.
- To send a chat, the sender uses the recipient's public key from the server to lock the message.
- The locked message travels across the network and can only be unlocked by the recipient's private key.
The flaw in single-key encryption
An attacker monitoring the public domain cannot unlock a message encrypted with a public key because they lack the recipient's private key. However, single-key encryption still leaves a vulnerability. A hacker could intercept the traffic, delete the original message, write a completely different message, and lock it using the recipient's freely available public key. The recipient would receive a fake message believing it came safely from their friend.
How end-to-end encryption stops tampering
To stop tampering, WhatsApp combines keys in a system called shared-key or end-to-end encryption:
- The sender locks the message using their own private key as well as the recipient's public key.
- This double-lock ensures the message is both confidential and verified as coming from the true sender.
- A hacker cannot alter or replace the text because they do not possess the sender's private key.
- Both users can verify their secure connection through matching sixty-digit numbers and QR codes.
More lessons
- Why Tonic Bottles Are Brown in Color?
- Why Wheels Appear to Spin in Reverse Direction?
- Why Do Dogs Urinate on Car Tyres
- Why Insects Are Attracted to Light?
- Why Do We Sneeze?
- Why Cool Drinks Have Bumps?
- Why Do Earphones Pin Have These Rings?
- Why Do CCTV Cameras Have LEDs?