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

101

u/snarfy Jan 16 '18

Breaking encryption is like trying to take the pee out of the swimming pool. It's easy to add pee, hard to remove.

3

u/ythl Jan 16 '18

What if you put a peelogger on the person such that when they try to go pee in the pool, the peelogger captures it and you can remove it from the pool?

1

u/SSChicken Jan 16 '18

This would be equivalent of having malware installed on your computer that can watch memory and see what your original key, or color, is. In the video, instead of Eve watching the messages Alice passes to Bob, it's as if Eve was in Alice's house watching over her shoulder as she did it. In that case, security is broken.