About This Architecture
Diffie-Hellman man-in-the-middle attack flow demonstrates how an attacker intercepts and manipulates the key exchange between Alice and Bob by computing separate shared secrets K1 and K2. Alice computes Y_A = alpha^X_A mod p and sends it to Bob, but Mallory intercepts this transmission and instead sends her own computed values Y_M1 and Y_M2 to each party. Both Alice and Bob unknowingly establish encrypted channels with Mallory rather than each other, allowing the attacker to decrypt, read, and re-encrypt all communications. This attack illustrates why Diffie-Hellman alone lacks authentication and why modern protocols use digital signatures or certificates to verify peer identity. Fork this diagram on Diagrams.so to customize it for your security training, threat modeling, or protocol documentation. The attack succeeds because neither party can verify that the public keys they receive actually belong to their intended peer.