# What is RSA Algorithm in Network Security?

May 20, 2018

RSA Algorithm is christened after its joint inventors, Ron Rivset, Adi Shamir and Leonard Adleman who invented it during 1977. This algorithm is the first of its kind that can be used for public key encryption as well as digital signatures. The RSA cryptosystem is the most widely-used public key cryptography algorithm in the world. It can be used to encrypt a message without the need to exchange a secret key separately. The RSA algorithm can be used for both public key encryption and digital signatures. Its security is based on the difficulty of factoring large integers.

Party A can send an encrypted message to party B without any prior exchange of secret keys. A just uses B’s public key to encrypt the message and B decrypts it using the private key, which only he knows. RSA can also be used to sign a message, so A can sign a message using their private key and B can verify it using A’s public key.

RSA algorithm is asymmetric cryptography algorithm. Asymmetric actually means that it works on two different keys i.e. Public Key and Private Key. As the name describes that the Public Key is given to everyone and Private Key is kept private.

### An example of asymmetric cryptography:

• A client (for example browser) sends its public key to the server and requests for some data.
• The server encrypts the data using client’s public key and sends the encrypted data.
• Client receives this data and decrypts it.

Since this is asymmetric, nobody else except browser can decrypt the data even if a third party has public key of browser. RSA implemented two important ideas:

1. Public-key encryption. This idea omits the need for a “courier” to deliver keys to recipients over another secure channel before transmitting the originally-intended message. In RSA, encryption keys are public, while the decryption keys are not, so only the person with the correct decryption key can decipher an encrypted message. Everyone has their own encryption and decryption keys. The keys must be made in such a way that the decryption key may not be easily deduced from the public encryption key.

Digital signatures. The receiver may need to verify that a transmitted message actually originated from the sender (signature), and didn’t just come from there (authentication). This is done using the sender’s decryption key, and the signature can later be verified by anyone, using the corresponding public encryption key. Signatures therefore cannot be forged. Also, no signer can later deny having signed the message.

#### Figure: RSA Algorithm Depiction

The Concept: The idea of RSA is based on the fact that it is difficult to factorize a large integer. The public key consists of two numbers where one number is multiplication of two large prime numbers. And private key is also derived from the same two prime numbers. So if somebody can factorize the large number, the private key is compromised. Therefore encryption strength totally lies on the key size and if we double or triple the key size, the strength of encryption increases exponentially. RSA keys can be typically 1024 or 2048 bits long, but experts believe that 1024 bit keys could be broken in the near future. But till now it seems to be an infeasible task.

### References

[1] “RSA Algorithm in Cryptography”, available online at: https://www.geeksforgeeks.org/rsa-algorithm-cryptography/

[2] Milanov, Evgeny. “The RSA algorithm.” RSA Laboratories (2009).

[3] “What is a RSA Algorithm?” available online at: http://www.innovateus.net/science/what-rsa-algorithm

[4] mod n As, Exponentiation. “The RSA Algorithm.”

[5] RSA Algorithm With C#, available online at: https://www.c-sharpcorner.com/UploadFile/75a48f/rsa-algorithm-with-C-Sharp2/

$${}$$