Distributed Systems And Algorithms·
Chapter 4 of 51
Double Ratchet Algorithm
Akhil Sharma
20 min
← → to navigate
Double Ratchet Algorithm
The algorithm that gives Signal, WhatsApp, and Matrix end-to-end encryption — where compromising one message key reveals nothing about past or future messages.
Key Takeaways
The Double Ratchet algorithm provides forward and backward secrecy for messaging — compromising one message key doesn't reveal past or future messages
Two ratchets operate together — a Diffie-Hellman ratchet generates new shared secrets, a symmetric ratchet derives per-message keys
Each message uses a unique encryption key — even if an attacker captures one key, only that single message is compromised
Signal, WhatsApp, and Matrix all use the Double Ratchet — it's the standard for end-to-end encrypted messaging