Man in the Middle Attack

Why
This attack is important because it could potentially disrupt key distribution channels and allow an attacker to masquerade as a person and get secret information

What
The man in the middle attack is an attack where an attacker places itself between two parties and receives information and sends information to parties pretending to be the other.

Diffie-Hellman
The man in the middle attack can be performed on the Diffie-Hellman protocol as follows
 * 1) Alice sends Bob $$g^a$$ and Malice intercepts
 * 2) Malice sends Bob $$g^m$$, where $$m$$ is picked by Malice
 * 3) Bob receives $$g^m$$ thinking it came from Alice and sends Malice $$g^b$$
 * 4) Malice receives $$g^b$$ and sends Alice $$g^m$$
 * 5) Malice ends up with two keys $$k_1 = g^{am}$$ and $$k_2 = g^{bm}$$ and can talk to Alice and Bob pretending to be the other