Man-in-the-middle attack (source code)

= Man-in-the-middle attack

A <man-in-the-middle attack> places an adversary between communicating parties so the adversary can relay, replace or originate messages while each party believes it is interacting directly with the other. Unauthenticated key exchange illustrates the risk: an attacker can establish one shared key with each endpoint, then decrypt and re-encrypt forwarded traffic. Strong <encryption> on both links does not authenticate the intended peer. Authenticated transcripts, validated public-key bindings and session-specific checks address different parts of this threat. The defining feature is control of the communication path and peer substitution, not merely passive observation.