Saturday, May 13, 2017

Public-Key encryption, explained as simply as possible.

Over on the wonderful crypto.stackexchange.com, you will find a bunch of mathematicians. When people ask for the most simple example of public-key exchange, you are ultimately sent to either: 1) an overview that does not show you much, nor give an example, or 2) a webpage written by mathematicians, for mathematicians. As I have seen this more than once, I decided that I should try to write the simplest example possible. In order to follow the example, you need to review The simplest example I could come up with is:


Me You


Prime, P = 29,α = 2


secretme = 5 αsecretme = 25 = 32
= x (mod P) = 3 (mod 29)
secretyou = 12 αsecretyou = 212 = 4096
= y (mod P) = 7 (mod 29)


ysecretme = Z (mod P) 75 = Z (mod 29)xsecretyou = Z (mod P) 312 = Z (mod 29)


Z = 16



I'm passing on "Alice and Bob" because I think that it's a terrible notation. In the example above, the prime P, and α are initially shared. The result is "Z", which is calculated between both parties.

No comments:

Post a Comment