# Possibility of Man-in-the-Middle on X3DH

I'm reading about the security of the Signal protocol (used in WhatsApp) and in particular, the X3DH part used to establish authentication, all papers seem to gloss over Man in the Middle attacks. Is it possible or not to MitM between users and the server? Seems easy on the server.

• After the user verified the other end or before? May 4 '20 at 18:55
• I'm surprised they don't address it directly. A DH MitM is a basic attack if you can't verify the other party somehow. Both X3DH and the Signal doc from WhatsApp seem to gloss over it. Also, some "proof" I found seems more interested in analyzing the "double ratchet" part (since I guess it sounds sexy to them) than analyzing boring old DH. I just want someone to say "A man in the middle attack is possible on the server or between a user and server, therefore, to ensure secure communications both parties MUST confirm their public keys out of band." Otherwise you have to trust the server. May 5 '20 at 19:02

Before or after an X3DH key agreement, the parties may compare their identity public keys $$IK_A$$ and $$IK_B$$ through some authenticated channel. For example, they may compare public key fingerprints manually, or by scanning a QR code. Methods for doing this are outside the scope of this document.