2
$\begingroup$

I'm trying to understand how man-in-the-middle attacks are prevented during key exchanges, and am confused by this Wikipedia statement:

Use of mutual authentication, in which both the server and the client validate the other's communication, covers both ends of a MITM attack, though the default behavior of most connections is to only authenticate the server.

Is that saying the client authenticates it is really receiving from the server, but the server doesn't care who is sending? Doesn't that mean the server might be talking to an eavesdropper who inserted himself in the middle and the eavesdropper can't decrypt server responses (which are simply forwarded to the client) but can pretend to be the client and see what the client is sending?

$\endgroup$
2
  • $\begingroup$ I think you are confusing the term of an active attacker as in the case if MiTM and a passive attacker. An eavesdropper is a passive attacker that can only listen. Did you mean the active attacker as in the MitM case? $\endgroup$ – kelalaka Aug 21 '20 at 15:02
  • $\begingroup$ Either. My impression was that by only authenticating the server the client could somehow be compromised. $\endgroup$ – Witness Protection ID 44583292 Aug 21 '20 at 16:17
2
$\begingroup$

but can pretend to be the client and see what the client is sending

No, the eavesdropper can't see what either side is sending except the ciphertext and size of the ciphertext.

To eavesdrop on any connection where the server is authenticated, the eavesdropper has to be able to convince the client that he is the server, which the eavesdropper cannot.

Doesn't that mean the server might be talking to an eavesdropper who inserted himself in the middle

Any internet middle box can do that.

and the eavesdropper can't decrypt server responses

True, and the eavesdropper can't decrypt client requests either since the eavesdropper doesn't have the session key.

but can pretend to be the client and see what the client is sending

Again, the eavesdropper doesn't have the session key, he can't do that.

$\endgroup$
6
  • $\begingroup$ I think the OP confusing the term of an active attacker as in the case if MiTM and a passive attacker. $\endgroup$ – kelalaka Aug 21 '20 at 15:01
  • $\begingroup$ Thanks for your answer. I'm still struggling to understand how authentication works. I've found lots of good key exchange examples, but only confusing powerpoint slides for how to add authentication. Can you recommend any good examples (algorithmic pseudo-code-like steps) for authenticated key exchange (but not password authenticated key exchange)? $\endgroup$ – Witness Protection ID 44583292 Aug 21 '20 at 16:18
  • $\begingroup$ @WitnessProtectionID44583292 I would if my national firewall would allow me more freedom. What I often do when I try to grasp a particular concept (such as authenticated key exchange) is to do a thought experiment, enumerate possible ways to do something, rule out the bad ways, and confirm my thought by reading the spec. $\endgroup$ – DannyNiu Aug 22 '20 at 13:01
  • $\begingroup$ @WitnessProtectionID44583292 Also, there's 1) key exchanges authenticated with a digital signature algorithm, 2) authenticated key exchange algorithms, and 3) password authentication over a secure protocol. $\endgroup$ – DannyNiu Aug 22 '20 at 13:03
  • 1
    $\begingroup$ I've found illustrated TLS 1.3 which is excellent. $\endgroup$ – Witness Protection ID 44583292 Aug 22 '20 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.