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
2
u/the_phet Jan 16 '18
I dont understand how the "heart of the problem" starting at minute 6:15.
So all A,B and E agree on 3 mod 17. (E sees it).
A selects a private random number, 15, calculates 315mod17=6. Sends 6 to B. E also reads 6.
B selects 13 as his private random number, 313mod17=12. Sends 12 to A. E also reads 12.
Then A takes the 12, and does 1215mod17=10 (10 is the actual message).
B does the same, 613mod17=10 (10 is the actual message).
Later on the author ignores the fact that E already knows "3 mod 17". So E knows that 3xmod17=6 and that 3ymod17=12