Scrivio Interview library
LeadershipPrincipal7 min read · updated 13 November 2026

A messaging product stores messages in a form the server can read, which powers server-side search, spam detection and moderation. Privacy-minded customers and regulators now push for end-to-end encryption, where only the users' devices hold the keys.

As the senior technical leader, how do you decide whether and how to move the messaging product to end-to-end encryption, and which features, operations and risks change?

I would frame the decision with product, legal, security and support around what really changes: the server would hold only ciphertext, so server-side search, content-based spam filtering, server-made link previews and restoring history without keys stop working unless rebuilt on the device. Multi-device turns into key management, abuse handling moves to metadata, user reports and on-device classifiers, and backup needs a user-held secret or hardware-protected key storage. If we go ahead, we use a well-reviewed protocol and libraries in the double-ratchet family, commission an external audit, and roll out in stages starting with one-to-one chats, with measurable milestones.

Why this question is asked

End-to-end encryption is one of the largest changes a messaging product can make. It is not a library swap; it changes what the company can see, which features can exist, how abuse is handled and what happens when a user loses their phone. Interviewers ask senior leaders this question to see whether they can weigh user trust and regulation against real product and operational costs, and lead the change without inventing cryptography. In this answer, we will recap what end-to-end encryption means, then go through the features that break, how multi-device and backup change, how abuse handling changes, how to implement it safely, and how to frame and stage the decision.

1A Quick Recap of What Changes

Today messages are encrypted in transit, with TLS between device and server, and probably at rest on disk, but the server holds the keys and can read every message. That is what powers server-side search, spam detection and moderation.

With end-to-end encryption, each user's devices hold the private keys, and messages are encrypted on the sender's device for the recipients' devices. The server stores and forwards ciphertext it cannot read. It still sees metadata: who sent a message to whom, when, and how large it was, unless further work hides that too.

What the server can do before and after
CapabilityServer-readable todayEnd-to-end encrypted
Search across historyServer-side indexOnly on the device, over local history
Spam and abuse filteringScan contentMetadata, reports, on-device classifiers
Link previewsServer fetches the pageSender's device generates the preview
New device sees historyServer sends itOnly with key backup or transfer from old device
Lawful access to contentPossibleNot possible; metadata only

2Features That Break or Move to the Device

Server-side search stops working, because the server cannot index ciphertext. Search must move to the device, which only knows the history stored on that device. Content-based spam filtering stops, for the same reason. Link previews made by the server stop, and server-made previews would also leak the link; the sender's device can generate the preview and send it encrypted. Restoring history on a new device stops working unless the user has a key backup or transfers keys from an old device.

Each of these is a product decision: rebuild it on the device, accept its loss, or change it. The product team must see this list early, because it shapes the roadmap for a year or more.

3Multi-Device and Backup Become Key Management

With end-to-end encryption, every device has its own key pair. A message to Bob must be encrypted for each of Bob's devices, and for each of the sender's other devices so they can show it too. When Bob adds a new laptop, it gets a new key, and contacts must learn about it; showing users when a contact's keys change, and letting them verify safety numbers, protects against a server that inserts a fake device.

Groups need more care. Encrypting each message separately for every member's every device does not scale to large groups, so protocols use sender keys, where each member distributes a key to the group once, or a group key agreement such as the IETF Messaging Layer Security protocol. When someone leaves, keys must be rotated so the departed member cannot read new messages.

Backup is the hardest user-facing problem. If a user loses all devices, their history is gone unless it was backed up with a key the user controls. The options are a recovery key or passphrase the user must keep, or key backup protected by hardware security modules or secure enclaves that limit guessing of a short PIN. Each choice trades convenience against security, and support must be ready for users who lose access.

Step throughKeys in an end-to-end encrypted product
  1. Identity key per devicepublished to the key directory, verified by safety numbers
  2. Session keys per conversationdouble ratchet: new keys for every message
  3. Group keyssender keys or MLS, rotated on membership change
  4. Backup keyuser passphrase or hardware-protected key vault
  5. Serverstores ciphertext and public keys, sees metadata only

5 layers, from the top down. Step through them one at a time.

4How Abuse Handling Changes

Trust and safety teams lose the ability to scan content, so abuse handling has to rely on other signals. The first is metadata and behaviour: an account that messages thousands of strangers, a newly created account sending links, or a sudden burst of activity is suspicious whatever the messages say. The second is user reports that include the decrypted messages, sent by the reporting user's device, together with a cryptographic technique called message franking, which lets the platform verify that the reported messages were really sent and not invented. The third is on-device classifiers, which can warn a user about a likely scam before they open a link, without the server ever seeing the content.

Trust and safety and legal must accept that the platform can no longer read content, and plan their processes around it. This is often the hardest internal conversation, and it must happen before engineering starts.

5Building It Safely and in Stages

We must not invent cryptography. We use a well-reviewed protocol in the double-ratchet family, the Signal protocol being the best known, implemented with mature, audited libraries, and MLS where its group properties fit. We commission an external security audit before launch, publish a description of the design, and keep a bug bounty.

We roll out in stages. One-to-one chats first, because they are simplest and the most sensitive for many users. Then small groups, then multi-device with backup, then large groups. Each stage has milestones: share of messages end-to-end encrypted, failure rates for decryption, support tickets for lost history, and the effect on spam rates.

Step throughStaged move to end-to-end encryption
  1. Decision with product, legal, security, supportagree lost features and milestones
  2. One-to-one chats, opt-in then defaultaudited protocol and libraries
  3. Decryption failures and support load acceptable?
    YesMove to small groupsNoFix and hold
  4. Multi-device and key backuprecovery key or hardware-protected vault
  5. Large groupssender keys or MLS, key rotation on leave

5 steps in order. Play them, or step through them one at a time.

6Framing the Decision

The decision belongs to the company, not to engineering alone. I would bring product, legal, security and support together with a clear picture: on one side, user trust, competitive pressure from encrypted competitors, lower exposure to data breaches, since the company no longer holds readable content, and alignment with privacy regulation; on the other, lost features, harder abuse handling, higher support cost for lost keys, and possible tension with regulators who want lawful access.

If we decide to go ahead, the plan states which features will be rebuilt on the device and when, how abuse will be handled, and how we will measure success. If we decide not to, we should say why, and consider partial steps such as encrypted backups.

7Follow-up questions

How do lawful access requests work after the change?

The company can still respond to valid legal requests, but only with what it holds: account information, metadata such as who communicated with whom and when, and anything stored unencrypted. It cannot produce message content, because it does not have the keys. The legal team must update its process and transparency report, and be ready for regulators in some countries who may push for access mechanisms; the security position is that any such mechanism would weaken the protection for all users.

Can we keep server-side spam filtering by scanning on the client?

Client-side scanning of content for known abuse material has been proposed, but it is controversial: it puts a scanner on every device that could be extended to other content, and it weakens the promise users were given. Most end-to-end encrypted products limit on-device checks to warnings shown to the user and rely on metadata and reports for enforcement.

Does end-to-end encryption hide metadata?

Not by default. The server still knows who talks to whom and when, which is valuable to attackers and to abuse teams. Techniques such as sealed sender reduce what the server learns, but metadata protection is a separate project with its own costs.

8Conclusion

In this answer, we saw that moving to end-to-end encryption means the server stores only ciphertext, so search, content-based spam filtering, server-made previews and key-less history restore must move to the device or disappear. Multi-device, groups and backup become key management, abuse handling moves to metadata, verified user reports and on-device classifiers, and the protocol must be a well-reviewed one in the double-ratchet family, audited externally and rolled out in stages starting with one-to-one chats. The decision itself belongs to product, legal, security and support together, with measurable milestones.

What to say in the interviewAbout 80 seconds aloud

Open with

I would treat this as a company decision, not an engineering project. With end-to-end encryption the server stores only ciphertext, so server-side search, content-based spam filtering, server-made link previews and restoring history on a new device without keys all stop working unless we rebuild them on the device.

Then, if they want more

Multi-device turns into key management: each device has its own keys, groups need sender keys or MLS, membership changes rotate keys, and backup needs either a user-held recovery key or a hardware-protected key vault, which brings support cost when people lose access.

Abuse handling moves to metadata, user reports that include the decrypted messages, verified with message franking, and on-device warnings, and trust and safety and legal have to accept that we can no longer read content.

If we go ahead, we use a well-reviewed protocol in the double-ratchet family with mature libraries, never our own cryptography, get an external audit, and roll out in stages, one-to-one chats first, then groups, multi-device and backup.

I would frame it with product, legal, security and support: user trust and regulatory exposure against lost features and support cost, with clear milestones like encrypted share, decryption failures and spam rates.

About this answer

Last updated
13 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "As the senior technical leader, how do you decide whether and how to move the messaging...": https://scrivio-interview-library.netlify.app/architecture/system-design-problems/3614257969/