How does WhatsApp keep your messages secret?
Follow one message from User 1 to User 2 through the WhatsApp server, one step at a time. Drag the 3D scene to rotate it.
Private keyPublic keyShared secretNew keyReadable messageLocked message
Who knows what?
| Item | User 1 | WhatsApp server | User 2 |
|---|
✓ knows it · — does not know it yet · ✗ never knows it, by design · ? answer hidden (class quiz). In quiz mode you can also tap any row to pick the question.
The tools behind each step
| Step | Tool | Purpose |
|---|---|---|
| Make key pairs | Curve25519 | Public and private keys |
| Shared secret | X3DH (Diffie-Hellman) | Same secret on both phones, never sent |
| Message keys | HKDF + Double Ratchet | A fresh key for every message |
| Lock the message | AES-256 | Scramble the content |
| Check it was not altered | HMAC-SHA256 | Detect tampering |