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,
- Subtract 1 from A as well as B and take the product T.Therefore ,
- 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 :
- The rule for encryption of a block of plaintext M into ciphertext(C) is as under:
C= ME Mod(N)
- The received message C at the receiver is decrypted to obatin the plaintext back by using the following rule ,
M =C0 Mod(N)