🔄 Changing the Lock
MLS Key Rotation Explained
In 10 minutes: How MLS protects group chats with key rotation
Prerequisite: Epochs
🎯 The Simple Story
Remember post-compromise security?
After a breach, we need to change the locks
Key rotation is like Alice changing the lock on her front door after losing her house keys.
🧠 Mental Model
Hold this picture in your head:
Key Rotation (Changing the Lock):
Before breach:
House Key: K₀
Lock: Locked with K₀
Alice, Bob, Charlie have K₀
Eve doesn't have K₀
✅ Secure
Breach happens:
Eve steals Alice's phone
Eve finds K₀
❌ Compromise
Key rotation:
Alice generates new key: K₁
Alice updates lock: Replaced with K₁
Alice, Bob, now need K₁
Eve only has K₀ (useless)
✅ Secure again
📊 See How MLS Rotates Keys
🎭 How Key Rotation Works
Step-by-Step
1. Detect breach or member change
Alice notices:
- Phone hacked (breach)
- Or Charlie leaves group
- Or new member joins
→ Need key rotation
2. Generate new group key
Alice creates commit:
- Update proposal (internal)
- MLS generates new secrets on path
- New group secret: K₁
3. Distribute to members
Alice sends commit to:
- Bob
- Charlie
Everyone processes commit:
- Update ratchet tree
- Derive new group secret K₁
- Delete old key K₀
4. New messages encrypted with new key
Alice: Hello → encrypt with K₁
Bob: decrypt with K₁ → Hello
Charlie: decrypt with K₁ → Hello
Eve: decrypt with K₀ → ❌ (doesn't work)