3 ms·
This bit I didn't get: > The earliest key exchange protocols — like classical Diffie-Hellman — were unauthenticated, which made them vulnerable to man-in-the-m
by lordnacho 8y ago
This bit I didn't get:
> The earliest key exchange protocols — like classical Diffie-Hellman — were unauthenticated, which made them vulnerable to man-in-the-middle attacks.
From Wikipedia (https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exc...):
> The Diffie–Hellman key exchange method allows two parties that have no prior knowledge of each other to jointly establish a shared secret key over an insecure channel.
Maybe there's something I'm not understanding, but I thought the point of DH was you could exchange something even when other people are listening. You can see in the example in the article that it does't matter what Eve can see.
- deathanatos 8y agoThe other comments are all right, I just want to rephrase this is bit. Neither quotes are wrong, per se. This part: > Maybe there's something I'm not understanding, but I thought the point of DH was you could exchange something even when other people are listening DH does protect you against people listening. It doesn't help if they can actively change what you hear. Passive eavesdroppers are thwarted, but an active MitM attack is not, which is where authenticating the other end comes in. The common example of DH I've seen is that you can establish a secret key with someone in a crowded room, with everyone overhearing your conversation. In that example, our "authentication" is that we can visually see the other person and we recognize them (or at least, we want to communicate with that person).
- mike-cardwell 8y agoWithout auth, you know you're doing DH, you just don't know who you're doing it with. If somebody is passively observing/recording the traffic, they wont know what the negotiated shared secret was. However, if they actively insert themselves in the middle, they can negotiate a shared key with you, and another one with the final destination. Then they can decrypt messages from you with the shared secret they negotiated with you, re-encrypt with the shared secret they negotiated with the other party and forward them on.
- eminence32 8y agoAlice and Bob think they are talking directly to each other. Instead, they are both talking to Eve (the "man" in the middle). Alice and Eve do DH exchange and agree upon a secret. Eve and Bob do a DH exchange and also agree upon a secret. Now Eve knows both these secrets and can relay messages between Alice and Bob. Both think they are talking securely to each other, but they are actually talking to Eve instead
- drodgers 8y agoIf the exchange isn't authenticated, then Eve can read everything by modifying the traffic (not just observing it). Eve just needs to insert herself in between Alice and Bob, intercept and stop all direct messages between them, and then do her own DH handshake with each one: Bob starts handshake with Alice: Bob -> Alice Eve intercepts and finishes handshake, claiming to be Alice: Bob <-> Eve Alice Eve starts and completes handshake with Alice, claiming to be Bob: Bob <-> Eve <-> Alice And now, Bob and Alice think they're sending messages to each other, but actually they're sending messages to Eve, which she can read and then forward-on so that they don't notice the difference. Unless Bob and Alice can authenticate the person they exchange keys with, the whole exchange can be subverted. This and similar attacks is why cryptographers strongly believe now that authentication is inseparable from encryption and that the encryption should basically never be offered independently (which wasn't properly understood back in the 80s and early 90s, hence crappy protocols like PGP-email where authentication is a optional plugin).
- Zash 8y agoYou can exchange things and establish a shared secret with someone, but it doesn't tell you who that someone is. You need something else to be sure you really did establish a shared secret with Bob, and not Eve. This could take the for of the other end providing a certificate and signing something with their matching key.
- tialaramex 8y agoOther people have explained why this doesn't stop Eve on its own. It's maybe obstructive to walk though what happens in TLS 1.3 Alice sends somebody her random DH key share. She addressed it to Bob but has no guarantee it isn't intercepted. Somebody sends Alice their key share back - so now Alice and whoever this is has a shared key. All further traffic is encrypted. Whoever it is sends Bob's certificate. A cert is a public document so this proves nothing on its own, but... Then is the important step, they use Bob's private key to prove that they saw this whole conversation so far by signing a transcript of the whole thing including the key shares. Once she receives the signature Alice can conclude this is Bob.