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?

ItemUser 1WhatsApp serverUser 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

StepToolPurpose
Make key pairsCurve25519Public and private keys
Shared secretX3DH (Diffie-Hellman)Same secret on both phones, never sent
Message keysHKDF + Double RatchetA fresh key for every message
Lock the messageAES-256Scramble the content
Check it was not alteredHMAC-SHA256Detect tampering