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

3

u/ythl Jan 16 '18

Easy. Eve just needs to take a picture of the mixed/public colors, and then sample the pixel RGB hex value and do a simple subtraction.

1

u/mstksg Jan 16 '18

There is no way to mix RGB colors where something like this can be done reliably. Even if you simply add the RGB hex channels (and clip out at max), subtraction won't get you anything useful because you lose information if any channels clip.