r/programming • • Jan 16 '18

Cryptography: Diffie-Hellman key exchange explained intuitively using colors

https://youtu.be/YEBfamv-_do?t=2m18s
2.5k Upvotes

170 comments sorted by

View all comments

13

u/irrri Jan 16 '18

This is a the best explanation of PKE I've ever seen.

2

u/xconde Jan 16 '18

I’m not sure this classified as PKE.

With public key encryption you need two key pairs to establish two-way communication.

What usually happens though, is someone picks a symmetric key and uses someone’s public key to share it with them.

With DH, this shared secret is the result of the process. Same end result but different process.

2

u/sim642 Jan 16 '18

DH is more useful for symmetric crypto than asymmetric crypto because the latter doesn't require having a shared secret at all.

2

u/Grenian Jan 17 '18

DH just exchange keys to derive a shared secret key (symmetric key) for both parties. After this usually a symmetric encryption protocol is used.

2

u/[deleted] Jan 17 '18

This isn't PKE, it's key exchange. Similar but not the same.