Design end-to-end encrypted messaging
PremiumSecurity systemMedium
- Signal protocol
- X3DH
- Double ratchet
Quick answer
This security system interview question asks you to design end-to-end encrypted messaging. Aim for a design that protects users and data without blocking legitimate use, then explain the threats, controls, detection and trade-offs. Interviewers want to see how you model threats and layer defences.
The problem
Design end-to-end encrypted messaging for a chat app with 100 million daily users, like the secure messengers built on the Signal protocol. Only the devices of the sender and recipients can read messages and photos. The hard parts are setting up keys with offline users, groups, several devices per person and key changes.
The server routes and stores ciphertext until delivery but should learn as little as possible. Users link a laptop and a tablet to their phone, chat in groups of up to 1,000 people, and switch phones without losing trust in their contacts.
What must the system do?
- Private chats: Messages are encrypted on the sender's device and only the recipient's devices can decrypt them, even if the recipient is offline when they are sent.
- Forward secrecy and healing: Stealing a device's current keys must not reveal earlier messages, and the session must become secure again after the attacker loses access.
How well must it do it?
- Server blindness: A full server compromise reveals no message content, attachments or private keys.
- Group cost: A sender uploads one ciphertext per group message, not one per member.
What scale should you design for?
Use these numbers in your estimates.
The scale numbers unlock with this questionUnlock
Key concepts
- Signal protocol
- X3DH
- Double ratchet
- Forward secrecy
- Sender keys
- Multi device
How you’ll practise
- Requirements and assets
- Threat model
- Identity and access
- Data protection
- Detection and response
- Wrap-up
Lala, personalized to you, gives a hint when you ask and reviews your design when you are ready.
What do interviewers look for?
In any security system design round.
- Starts with a clear threat model
- Layers defences instead of relying on one control
- Covers authentication, authorisation and secrets
- Plans detection, alerting and response
- Protects data in transit and at rest
- Balances security against usability and cost
Questions people ask about this interview question
- Which design type is this question?
- It is a security system question. You design end-to-end encrypted messaging and explain your choices the way you would in an interview.
- Is this question asked at entry level?
- It is marked Medium. Entry-level engineers can practise it, but it expects you to reason about requirements and trade-offs, not only list components.
- What should I cover first?
- Start with what must be protected, from whom and what a breach would cost. Agree on scope with the interviewer before you design anything.
- Can I practise it for free?
- It is a premium question. Sign up and unlock it once for 10 credits; it then stays unlocked. When you finish, Lala, your personalized AI mentor, can review your design for 30 credits.
Related questions
Updated · Written by the SevyDevy team