**RSA** (**Rivest–Shamir–Adleman**) is a public-key cryptosystem that is widely used for secure data transmission. It is also one of the oldest. The acronym **RSA** comes from the surnames of Ron Rivest, Adi Shamir, and Leonard Adleman, who publicly described the algorithm in 1977.

The principle of RSA is based upon the fact that if it is easy to multiply two prime numbers but it is very difficult to factor the product and get them back.

The algorithm is as follows :

- Take two very large prime number A and B of equal lengths and obtain their product (N).Therefore,

N=AXB

- Subtract 1 from A as well as B and take the product T.Therefore ,

T=(A-1)(B-1)

- Choose the product public key E which is a randomly chosen number such that it has no common factors with T.

- Obtain the private Key (D) as under :

D=E^{-1} Mod(T)

- The rule for encryption of a block of plaintext M into ciphertext(C) is as under:

C= M^{E} Mod(N)

- The received message C at the receiver is decrypted to obatin the plaintext back by using the following rule ,

M =C^{0} Mod(N)