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

Show parent comment

3

u/Madrawn Jan 16 '18

Mathematically speaking there are infinitely many solutions, or? The amount of how many solutions there when trying break a encryption is limited by the size of the keys you're using.

1

u/TheOddScientist Jan 16 '18

The key size is the maximum size the prime can be meaning you have an upward boundary. Thus if I said the key was 2256 than I can guarantee you the prime is no larger than 256 bits. That said the upward limit of the prime is dependent on the key size.