Course contentsShow
← Security
Lesson 2942 of 3,05255. Secure CommunicationsFree lesson

Signal Protocol Fundamentals

Core components of the Signal Protocol: X3DH key agreement, Double Ratchet algorithm, and message encryption.

Signal Protocol Fundamentals

What you'll learn: How the Signal Protocol combines three core mechanisms—X3DH, Double Ratchet, and symmetric encryption—to provide forward secrecy, break-in recovery, and end-to-end encrypted messaging.

The Three Core Components

The Signal Protocol isn't a single algorithm—it's an elegant orchestration of three specialized systems working together.

X3DH (Extended Triple Diffie-Hellman)

X3DH handles the initial key agreement when two parties start communicating, even if one is offline. Think of it as a secure handshake that happens before conversation begins. Each user publishes long-term and ephemeral public keys to a server. When Alice wants to message Bob (who's offline), she combines her keys with Bob's published keys through multiple Diffie-Hellman operations—hence "triple"—producing a shared secret that only Alice and Bob can derive.

Double Ratchet Algorithm

Once the initial keys are established, the Double Ratchet takes over for the conversation itself. It continuously evolves encryption keys with every message exchange using two interlocking mechanisms:

  • Symmetric ratchet: Advances keys forward using hash functions after each message
  • DH ratchet: Performs new Diffie-Hellman exchanges periodically to inject fresh entropy

This creates both forward secrecy (past messages stay safe if keys are later compromised) and break-in recovery (future messages become safe again after compromise).

Message Encryption

Finally, the keys from the Double Ratchet feed into authenticated encryption (typically AES-CBC with HMAC or AEAD constructions) to actually encrypt message content. Each message gets its own unique key, discarded after use.

Why All Three?

X3DH solves "cold start" key agreement. Double Ratchet provides continuous key evolution. Symmetric encryption protects the actual data. Together, they create a system where compromising today's keys doesn't compromise yesterday's or tomorrow's messages.

Key Takeaway: The Signal Protocol combines X3DH for asynchronous key agreement, the Double Ratchet for continuous key evolution and self-healing security, and authenticated encryption for message confidentiality—creating robust end-to-end encryption with forward secrecy and break-in recovery.