next up previous
Next: Up: Previous:

Example of RSA Encryption

1.
p = 41, q = 59
2.
n = pq = 2419
3.
$\phi$(n) = (p-1)(q-1) = 40*58 = 2320
Find e such that gcd(e, 2320) = 1 and e is small and odd
e = 3 works
4.
d = e-1 mod $\phi$(n)
= 3-1 mod 2320
d = 1547
d*e mod $\phi$(n) = 1547*3 mod 2320 = 1
5.
P = (e, n) = (3, 2419)
6.
S = (d, n) = (1547, 2419)
P(M) = M3 (mod 2419)
S(M) = M1547 (mod 2419)
Note: Only 2419 different messages are possible.


next up previous
Next: Up: Previous: