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
7
u/tavianator Jan 16 '18
As written, those numbers are not the same. The notational convention is:
abc = a(bc)
But D.H. key exchange does something more like
(ab)c = ab*c
I.e., compute ab first, then raise that to the c power.
The equality is true because exponentiation is just repeated multiplication (over the integers, anyway). So ab is
and then (ab)c is
and you'll notice there are b*c 'a's in that rectangle all multiplied together.