r/programming • u/dominatrix-octopus • Jan 16 '18
Cryptography: Diffie-Hellman key exchange explained intuitively using colors
https://youtu.be/YEBfamv-_do?t=2m18s
2.5k
Upvotes
r/programming • u/dominatrix-octopus • Jan 16 '18
View all comments
Show parent comment
3
u/Grenian Jan 17 '18 edited Jan 17 '18
It is used to solve the Key Exchange Problem. This problem describes the challenge of two communication partners to derive an secret symmetric key (also a key which is the same for both partied and secret) over a line which can be wiretapped.
So one can ask why you want to use a DH Key Exchange when you just can use asymmetric keys? Well basically symmetric encryption methods are faster than asymmetric ones.
What alternatives do exist? Thrusting third parties.
BUT keep in mind that a big problem exist. The Man-in-the-middle-attack. DH is not secure against it. That's btw the reason why you need to type 'yes' the first time you log into an SSH Server. Just to prove that this is the right server you wanna talk with. After that first session everything is encrypted based on the secrets of previous sessions. An alternative to approach to solve the Man-in-the-middle-attack is used by ZRTP.
But yeah basically you're right.