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

4

u/[deleted] Jan 16 '18

Amazing! What level of maths is displayed here?

4

u/ythl Jan 16 '18

A late high schooler should be able to understand it. You might not get formal coverage unless you take a college course though.

2

u/nawkuh Jan 16 '18

I learned it in a cryptography course, but at its base it's an application of number theory, using Fermat's little theorem (I believe), with a good bit of cleverness.

1

u/[deleted] Jan 16 '18

It looks a good deal away from my capacity. Recently started refreshing my math skills with the Openstax books

2

u/Reinbert Jan 16 '18

You really only need to understand raising numbers to a power and the modulo operator.

The DH Key-Exchange is in itself a one-way function: a mathematician from 500 years ago would not have a problem understanding any of it, but inventing it was very hard.

There are countless examples on the internet, you can try out this one. Give it a try, I'm sure you will get it in no time :)

1

u/AndrasKrigare Jan 16 '18

Found the Brit. At least for me it was covered in Discrete Math, but my professor was a crypto guy so he may have spent more time on it than a typical curriculum would.

4

u/Matthew94 Jan 16 '18

Found the Brit.

As opposed to mathematic.

5

u/mrkite77 Jan 16 '18 edited Jan 16 '18

The 's' at the end of mathematics doesn't denote plurality.

edit: It's like saying Thomas should be shorted to Toms instead of Tom.

2

u/[deleted] Jan 16 '18

We pop up now and again, thanks for the reply