As we know, RSA algorithm is an asymmetric cryptography method because it uses two different keys for encryption and decryption. Public key is available to all and private key is for individual encryption.
It is an acronym for Ron Rivest, Adi Shamir and Len Adleman.
For instance, in an organization we want to achieve encryption where public key is available to all the employees. Private key is available to individual employee for communication.
We can use RSA algorithm here.
Working of RSA Algorithm
Firstly, let us know how this algorithm works. It uses two large prime numbers for computing euler’s quotient and modulus. Lastly, it will generate public and private keys. Public key will work for encryption and private key will work for decryption purpose.
It can encrypt a message without the need of exchanging secret key separately. The security of RSA algorithm is based on the difficulty of factoring large integers.
The reason why prime numbers are used is because when we break them, it can only be broken down into those two primes.
Example of RSA
Let’s take a look at one example of RSA.
- p and q are two prime numbers where p =7 and q= 19.
- Firstly we calculate modulus as n = p*q = 133.
- Secondly, find Euler’s quotient = (p-1)*(q-1) = 6*18 = 108.
- Let’s assume public key e as 5. Thus, d *e mod(n) is congruent to 1, which means d = 65.
- Hence, public key = {e, n} = {5, 133}.
- Private key = {d, n} = {65, 133}.
Possible Attacks on RSA
Given below is the list of some possible attacks on RSA.
- Plain text attack
- Chosen cipher attack
- Factorization attack
In plain text attack, attacker knows some block of plain text and tries to convert it into cipher text. We can prevent this attack by using padding bits for encryption.
Plain text attack can be further classified into three major attacks. One is short message attack. Second is cycling attack and last one is unconcealed message attack.
In chosen cipher attack, an attacker can try to find plain text from given cipher text using extended euclidean algorithm.
In factorization attack, attacker will impersonate the key owner and using stolen data, he can decrypt sensitive information.
One in every 172 RSA keys are at risk of compromise because of factoring attacks.
So it can be said that it is not completely secure.
Conclusion
In conclusion, we can say that though RSA is a complex algorithm, but there are some compromising factors in this algorithm.
We have seen in brief about RSA algorithm and its working.
We have seen some of the major possible attacks and example of RSA algorithm.