The Message Window Independent explainer

02 · Privacy & Security

Why Apps Ask You to Compare a Code

That ritual with the emoji or numbers has a precise purpose — and a precise limit.

Why Apps Ask You to Compare a Code
Key verification, and the attack it is actually for.

In this piece

  1. 01The threat it is actually solving
  2. 02What the verification ritual actually does
  3. 03What it does not solve
  4. 04When it is worth doing

01The threat it is actually solving

When you start a conversation on an end-to-end encrypted service, your app and your contact's app exchange cryptographic keys — long strings of data that let each side lock and unlock messages that only the other can read. The encryption itself is automatic. You do not touch the keys. But there is a question the encryption alone cannot answer: whose key did you actually receive?

Normally, that exchange goes through a server run by the messaging service. The server is supposed to pass your contact's key to you faithfully. But suppose someone intercepts the exchange and substitutes their own key — presenting it as your contact's. Your app encrypts to that key. The interceptor reads the message, re-encrypts it onward, and neither of you notices anything wrong. This is a man-in-the-middle attack, and it is the specific threat that key verification is designed to catch.

lit fibre optic ends against black, abstract

It is worth being precise about who this attacker has to be. Pulling off this substitution requires control over the path between you and the server, or control over the server itself. A passive eavesdropper on a café Wi-Fi network cannot do it. The realistic candidates are the service provider, a government compelling the provider, or someone who has compromised the infrastructure between you. For ordinary conversations between ordinary people, this threat is distant. For journalists, activists, lawyers and others with powerful adversaries, it is the threat worth preparing for.

02What the verification ritual actually does

Most encrypted apps have a way to check keys out-of-band — through a channel the potential interceptor does not control. Signal calls the result a Safety Number: a string derived from both users' public keys, displayed identically on both screens. WhatsApp shows something similar. Some apps render the string as a grid of emoji or a QR code to make comparison easier on the eye.

The ritual is simple. You and your contact compare your respective displays — by reading them aloud on a phone call you trust, by meeting in person, or by scanning each other's QR codes face to face. If the strings match, you have confirmed that both apps are working from the same keys. No interceptor slipped a substitute in. If they do not match — a rare and alarming event in practice — something is genuinely wrong.

Once you have confirmed the match, most apps let you mark the contact as "verified." The app can then alert you if the keys ever change unexpectedly, which is exactly what it would need to do if a new interception attempt began. Key changes have innocent explanations too: your contact reinstalled the app, switched phones, or added a new device. But an alert is the right response regardless, because only your contact can tell you which explanation applies.

03What it does not solve

Verification closes one specific gap; it leaves others open. It tells you the keys match. It does not tell you whether the device holding the right key is in safe hands, whether the person holding the phone is who you think they are, or what happens to the message after it arrives and is decrypted. A verified conversation can still be screenshotted, forwarded, or read over someone's shoulder. The protection that end-to-end encryption genuinely offers has real value — and real limits — that sit separately from this ritual.

Verification also assumes the out-of-band channel is trustworthy. If you read the numbers aloud on a call that is itself compromised, you have not gained much. The comparison needs to happen through a channel an attacker does not also control.

04When it is worth doing

For most everyday conversations, skipping verification is a reasonable choice. The attack it guards against requires resources and access that few adversaries possess. But if you are communicating about something genuinely sensitive — a legal matter, a source, a medical situation — taking two minutes to compare codes gives you a concrete guarantee that automatic encryption alone cannot. The ritual feels bureaucratic. What it actually does is close a gap that otherwise exists on faith.

--- An independent explainer on instant messaging. Not affiliated with, endorsed by, or connected to Trillian, Cerulean Studios, or any messaging service.

A passive eavesdropper on a café Wi-Fi network cannot do it.