Skip to main content

🔍 Why We Need the Signal Protocol

The Problem with Regular Encryption

In 10 minutes: Understand why WhatsApp and Signal use the Signal Protocol
Prerequisite: Curiosity (no math yet!)


🎯 The Simple Story

Alice wants to send a secret message to Bob over the internet.

Problem: Eve is watching everything!

Alice: "Hey Bob, here's my secret password..."

[INTERNET - Eve is spying!]

Bob: "Thanks Alice, I got it!"

Without encryption: Eve reads everything!

With regular encryption: Eve sees encrypted message, can't read it.

BUT: Eve stores the encrypted message... waits 6 months... gets Bob's phone... uses Bob's private key... and reads Alice's message!

Signal Protocol solution: Even if Eve steals Bob's phone, Alice's message is already gone because the key was deleted after Bob read it!


🧠 Mental Model

Hold this picture in your head:

Traditional Encryption:
┌─────────────────────────────────────┐
│ Alice writes a letter │
│ Alice puts letter in envelope │
│ Alice seals envelope │
│ Alice sends to Bob │
│ Bob reads letter │
│ Bob KEEPS the envelope │ ← Problem!
│ Eve steals Bob's phone │
│ Eve uses Bob's key to open envelope │
│ Eve reads Alice's letter! │
└─────────────────────────────────────┘

Signal Protocol:
┌─────────────────────────────────────┐
│ Alice writes a letter │
│ Alice puts letter in envelope │
│ Alice seals envelope │
│ Alice sends to Bob │
│ Bob reads letter │
│ Bob BURNS the envelope immediately │ ← Solution!
│ Eve steals Bob's phone │
│ Eve... has nothing! (envelope gone) │
└─────────────────────────────────────┘

Think of it like:

🔥 Burn after reading (Message keys deleted immediately)

🗑️ One-time use (Keys never reused)

📍 Fresh start (Every message = new key)


📊 See It Happen

Let's watch the problem with traditional encryption:

Now let's see how Signal Protocol prevents this:


🎭 The Story: Alice's Mistake

Alice doesn't know about the Signal Protocol. She uses regular encryption to send Bob her password.

Day 1:

  • Alice: "Bob, my password is 12345" (encrypted)
  • Bob reads: "Got it! Password is 12345"
  • Bob thinks: "I'll save this key"

Day 180 (6 months later):

  • Eve steals Bob's phone
  • Eve finds Bob's private key
  • Eve uses key to open Alice's old message
  • Eve: "Haha! Alice's password is 12345!"

With Signal Protocol:

Day 1:

  • Alice: "Bob, my password is 12345" (encrypted with K1)
  • Bob reads: "Got it! Password is 12345"
  • Bob deletes K1 immediately (gone forever!)

Day 180 (6 months later):

  • Eve steals Bob's phone
  • Eve can't find K1 (was deleted!)
  • Eve: "Darn! Can't read Alice's message!"
  • Alice's password stays safe!

🎮 Try It Yourself

Question 1: Eve steals Bob's phone. Bob used traditional encryption. How many of Alice's past messages can Eve read?

Show Answer

All of them!

Why? Traditional encryption keeps the same key around. Every message from Alice to Bob uses the same key. When Eve gets Bob's phone, she has the key, so she can decrypt everything Alice ever sent to Bob!

Answer: All past messages (0 to day 180+)


Question 2: Eve steals Bob's phone. Bob used the Signal Protocol. How many of Alice's past messages can Eve read?

Show Answer

None!

Why? The Signal Protocol uses a NEW key for EVERY message. Better yet, Bob deletes each key immediately after using it. So when Eve steals Bob's phone:

  • K1? Deleted after message 1
  • K2? Deleted after message 2
  • K3? Deleted after message 3
  • ...

Eve has no keys at all! All keys were deleted!

Answer: Zero messages (none)


Question 3: What makes the Signal Protocol different from regular encryption?

Show Answer

Regular encryption:

  • Uses the SAME key for many messages
  • Stores the key for future use
  • If key stolen, past + future messages compromised

Signal Protocol:

  • Uses a NEW key for EVERY message
  • DELETES each key immediately after use
  • Even if phone stolen, past messages safe (keys gone)
  • Future messages still safe (new keys can't be forged)

Answer: New key per message + immediate deletion = forward secrecy


🔢 The Math (Simplified)

Traditional Encryption

Key Generation:  K (single key)
Encryption: Encrypt(message, K)
Decryption: Decrypt(ciphertext, K)
Storage: Store K forever!

Eve steals phone → Eve has K → Decrypts everything!

Signal Protocol

For each message i:
Encryption: Ki = new key (never reused)
Decryption: Decrypt(ciphertext, Ki)
Storage: DELETE Ki immediately!

Eve steals phone → Eve has no keys → Can't decrypt anything!

The difference: Ki is fresh every time, then deleted!


💡 Why We Care

Why Isn't Traditional Encryption Enough?

Scenario: Bob shares his banking password with Alice

Traditional encryption:

  • Day 1: Alice sends password (encrypted)
  • Day 180: Eve steals Bob's phone
  • Day 180: Eve reads Alice's message (has key!)
  • Day 180: Eve: "Thanks for the password!"
  • Bob's bank account is drained!

Signal Protocol:

  • Day 1: Alice sends password (encrypted with K1)
  • Day 1: Bob reads password, deletes K1
  • Day 180: Eve steals Bob's phone
  • Day 180: Eve looks for K1... doesn't exist
  • Day 180: Eve can't decrypt the message
  • Bob's bank account stays safe!

Why WhatsApp and Signal Use This

Because people lose phones, get hacked, and have malware!

Without the Signal Protocol:

  • Phone stolen → ALL past messages readable
  • Account hacked → ALL past messages readable
  • Malware infection → ALL past messages readable

With Signal Protocol:

  • Phone stolen → Past messages still encrypted (keys deleted!)
  • Account hacked → Past messages still encrypted
  • Malware infection → Past messages still encrypted

✅ Quick Check

Can you explain forward secrecy to a 5-year-old?

Try saying this out loud:

"Imagine you write a secret note, put it in a box, and send it to your friend. Your friend reads the note, then burns the box and throws away the key. Now, even if a bad person steals your friend's things, the note is already gone. The bad person can't read it because the box and key are burned away!"

Can you draw the flow?

Try this:

Alice → Encrypt → Send → Bob → Read → DELETE KEY → Eve steals phone → No key → Can't read!

vs.

Alice → Encrypt → Send → Bob → Read → KEEP KEY → Eve steals phone → Has key → Reads everything!


📋 Key Takeaways

Traditional encryption: Same key reused many times, stored forever
Signal Protocol: New key per message, deleted immediately
Forward secrecy: Compromise can't decrypt past messages
Why: Prevents key compromise from revealing past communications
Real impact: WhatsApp, Signal, Facebook Messenger use this
X3DH: Initial handshake to establish trust (we'll learn this next)
Double Ratchet: Creates and deletes keys per message (we'll learn this later)


🎉 What You'll Learn Next

Now that you understand the problem and solution!

Next: We'll learn the cryptography foundations that make the Signal Protocol work.

But before we get technical, let's understand why this matters:

🗝️ Continue: Locks and Keys

We'll start with the simplest part: How public keys work, and why they're like mailboxes!


Next up: Foundations - Understanding public/private keys, Diffie-Hellman, and more!