I want to present the basics of how RSA works to an audience of beginners in cryptography. The problem is that I am lightyears from being an expert.
After reading about how RSA works in wikipedia, this is the "toy" demonstration I created:
- We shall assume that Bob has a secret natural number that he wants to tell Alice.
- We shall assume that they will be speaking to each other, and there are lots of people around (including cryptographers!) that can hear them.
This is how the talk will proceed:
- Bob says out loud: "Hey Alice, I want to tell you a secret natural number!"
- Alice replies out loud: "Ok, wait a second, let me create the encryption keys."
- Now Alice secretly chooses two distinct prime numbers, $p$ and $q$, and calculates two things: $n = pq$ and $\lambda = \text{lcm}(p-1, q-1)$.
- Then Alice secretly chooses any number $e$ which satisfies $e < n$ and $\text{gcd}(e,λ) = 1$
- Then Alice says out loud the values of $n$ and $e$.
- Alice says out loud: "Very well, the public key is $(n=391, e=75)$!"
- Bob replies out loud: "Understood, give me a second!"
- Then bob takes his secret number $m$ and calculates $c = m^e \text{ mod } n$ and says it out loud
- Bob says out loud: "Okay, after encrypting my secret number I got 240"
- Alice replies: "Great! I've got your secret number!"
- She did it by first calculating $d = e^{-1} \text{ mod } \lambda$ and then calculating $m = c^d \text{ mod } n$.
Then I will choose two people in the audience and let them do it, with everyone else listening, and claim that this is basically what happens with RSA encryption. The rest of the audience will not be able to find out the message efficiently, even though they heard absolutely everything.
The above is what I plan on presenting.
QUESTION: I don't want to be a Dave. I think I'm not a Dave because I am following RSA. Are there any big problems with the above? Does it present the idea of RSA correctly? What gotchas should I mention, if any?
Bonus points for anyone who figures out Bob's secret number above. Of course I know it can be done by brute force because I chose ridiculously small prime numbers...
λ
symbol... I think you need to rethink your goals or redefine your audience. $\endgroup$λ
is nothing much to my audience. They know calculus. And more. I meant they don't know cryptography. $\endgroup$