Google News
logo
Cyber Security - Interview Questions
What is RSA Algorithm in Cryptography?
RSA is an asymmetric cryptographic algorithm. RSA Algorithm that works on a block cipher concept that converts plain text into ciphertext and vice versa at the receiver side. If the public key of User A is used for encryption, we have to use the private key of the same user for decryption.
 
Step 1 : Select two prime numbers p and q where p not equal to q.
 
Step 2 : Calculate n= p*q and z=(p-1)*(q-1)
 
Step 3 : Choose number e: Such that e is less than n, which has no common factor (other than one) with z.
 
Step 4 : Find number d: such that (ed-1) is exactly divisible by 2.
 
Step 5 : Keys are generated using n, d, and e
 
Step 6 : Encryption
 
c=m pow(e) mod n
 
(where m is plain text and c is ciphertext)
 
Step 7 : Decryption
 
m= c pow(d) mod n
 
Step 8 : Public key is shared and the private key is hidden.
 
Note : (e, n) is the public key used for encryption. (d, n) is the private key used for decryption
 
The RSA algorithm has the drawback of being quite inefficient in cases in which large volumes of data must be authenticated by the same virtual machine. A foreign entity must substantiate the dependability of authentication tokens. Data is routed through middlemen, who may corrupt with the cryptosystem.
Advertisement