You are on page 1of 1

Rivest Shamir and Adleman (RSA Algorithm)

This is a two-key cryptosystem based on factoring large integers


In this system a user chooses a pair of prime numbers so large that factoring the product is beyond all
computing capabilities. This is possible because testing for primes is easy whereas factoring the
product is very difficult.

How it is Done
The user takes two large primes, p and q, and computes their product n = pq. n is called the modulus.

The user then chooses a number, e, less than n and with no common factors (except 1) with (p-
1)(q-1)

Another number, d, is then found, subject to the condition that (ed-1) is divisible by (p-1)(q-1).

e is called the public exponent, d is called the private exponent.

The public key is therefore the pair n and e, the private key is the pair n and d. The factors of n, p and
q, can either be kept secret with the private key or destroyed.

Here are the stages in sending a message using this method:


1. The receiver, M, distributes his public key pair.
2. The sender, F, composes a plaintext message, m, and then uses Ms public key to encrypt the message
and form the ciphertext, c. c is the remainder left when m is raised to the power of e and divided by the
modulus n.
c = me mod n (where e and n are Ms public key pair).
3. F sends the ciphertext, c, to M.
4. The receiver, M, decrypts the ciphertext and retrieves the plaintext message, m. m is the remainder
obtained when c is raised to the power of d and divided by n.
m = cd mod n
5. As you can see, this process requires d, which only M knows. Another person, I, who intercepts the
message, can not decrypt it.

You might also like