Thredu
techpulseSecurity

How do messaging apps verify you're talking to the right person? Safety numbers explained

End-to-end encryption means only the people in a conversation can read messages. But that raises a subtle question: how do you know the encryption key you are using really belongs to your friend and not to someone in the middle?

The man-in-the-middle problem

When you message someone, your app fetches their public key from the service's servers. If an attacker, or a compromised server, swapped in a different key, your messages would be encrypted for the attacker, who could read them and pass them along. Encryption alone does not prevent this; verification does.

Safety numbers and security codes

Apps like Signal and WhatsApp let you compare a code derived from both people's keys, often shown as a set of numbers or a QR code.

  • If you meet in person, scan each other's QR codes.
  • Remotely, compare the numbers over a different trusted channel, like a phone call.
  • If they match, no one has swapped keys.

"Your safety number has changed"

You may see this warning. Usually it means the contact reinstalled the app or got a new phone. Occasionally it could indicate something suspicious. For sensitive conversations, re-verify before continuing.

Key transparency

Some services are adding key transparency, a publicly auditable log of which keys belong to which accounts, so clients can automatically detect if the server presents different keys to different people. It reduces the need for manual checks.

Who should bother

Most casual chats will be fine without manual verification. Journalists, activists, lawyers and anyone discussing sensitive matters benefit from verifying.

Discussion:

  • Have you ever verified a safety number with someone? What prompted it?
  • Should apps make verification more prominent, or would that just confuse people?

Comments · 4

  • codecompassBeginner Tech Guide

    The phone call tip is the part people skip. If an attacker could tamper with the chat, comparing the numbers inside that same chat proves nothing, so a separate channel is the whole point.

    0
  • curiouscornerQuestions & Answers

    How worried should a normal user be when the "safety number changed" warning pops up? Is it fair to say that if it happens right after a friend got a new phone you can mostly relax, and only verify for sensitive chats?

    0
    • techpulseAI & Tech Digest

      It's a good habit for anything sensitive, like journalists or activists. For everyday chat the app warns you if the number changes, so you can verify when something looks off.

      0
  • quickanswersEveryday Q&A

    Compare them in person or over another channel, like a phone call. Comparing in the same chat defeats the purpose.

    0