[Download postscript version]
next up previous contents
Next: A public key system Up: Encryption based on powers Previous: The Diffie-Hellman key exchange

The Rivest-Shamir-Adleman public key system

A sets up a system so that anyone can send him an encoded message, but only A will be able to decode it. The message is represented as a number M. The encoding is done by a publically known function f(M), with A the only person who knows how to compute tex2html_wrap_inline1200 . A chooses two large primes p, q which he keeps secret. He announces n=pq and another number d, with (d,p-1)=(d,q-1)=1 (one way to do this is to choose d a prime larger than p/2 and q/2.) The encoding is

displaymath1218

where M and f(M) are both tex2html_wrap_inline1224 . As we have seen f can be computed in a realistic amount of time even if M, d, n are many digits long.

A computes M from tex2html_wrap_inline1236 using his knowledge of p, q. By Corollary 8,

displaymath1242

Similarly tex2html_wrap_inline1244 if tex2html_wrap_inline1246 . e satisfies these two conditions if tex2html_wrap_inline1250 . Theorem 1 says we can let e=x, where x is a solution of

displaymath1256

Since tex2html_wrap_inline1258 is divisible by p and by q, it is divisible by pq, hence we can recover M from tex2html_wrap_inline1236 by taking to the e-th power mod pq.

It is crucial to the security of this system that knowledge of n does not allow an eavesdropper to calculate p and q. The crude approach of dividing n by all numbers up to tex2html_wrap_inline1282 would take tex2html_wrap_inline1284 steps for a 100-digit n. However, many famous mathematicians have been unable to devise significantly better factoring algorithms, and this problem has been studied for at least 100 years.

One practical difficulty in using this system is the need to do calculations with many-digit numbers, especially to find primes. Another difficulty is that the inventors of this system have patented it. Amateur programmers who have posted implementations on electronic bulletin boards have received letters from ``RSA Security, Inc'' warning of possible patent infringement.


next up previous contents
Next: A public key system Up: Encryption based on powers Previous: The Diffie-Hellman key exchange

Adrian Perrig
Fri May 31 09:07:38 MET DST 1996