Blog Blog Posts Business Management Process Analysis

What is RSA Algorithm?

Let’s look at the topics we’ll be discussing in this blog:

Check out our youtube video on Cyber Security Full Course:

What is RSA Algorithm?

RSA Algorithm’s full form is Rivest Shamir Adleman. It was introduced in 1978 by Rivest, Shamir, Adleman as an asymmetric encryption algorithm. There are both public and private keys involved in this algorithm. RSA Algorithm in cryptography is based on the fact that you can find and multiply large numbers easily but finding the factor of their product is difficult.

Mathematical research estimates that if the key value is 100 digits, it would take attackers more than 70 years to find its value. The most difficult part of the algorithm probably is choosing and generating the public and private keys.

Check out this Cyber Security Tutorial!

RSA Encryption Algorithm

In the RSA Encryption Algorithm, a public key is used for encryption and a private key, different from the public key and only known to the recipient, is used for decryption. The public key would be the product of two large prime numbers. That product is made public. The decryption would require knowledge of the two prime factors of that number and there is no known method to find the prime factors of such numbers. This means that only the person who created the public key will be able to generate the private key as well.

Let’s look at the RSA Algorithm Steps:

  1. You can choose any two large prime numbers, say A and B.
  2. Next, you can find the product of A and B, say N.
    N = A*B
  3. You have to select a public key, say E, for encryption. You have to make sure this key isn’t a factor of (A-1) and (B-1).
  4. Now you can select the private key for decryption say, D. The private key should match this equation:
    (D*E) mod (A-1)*(B-1) = 1
  5. You can calculate the ciphertext from the plaintext using this equation:
    Ciphertext = Plaintext^E mod N
  6. Once the ciphertext is generated, it should be sent to the recipient.
  7. You can decrypt the plaintext from the ciphertext using this equation:
    Plaintext = Ciphertext^D mod N

Check out our PG Program in Cyber Security!

RSA Algorithm Example

For this example, let’s try and work the RSA Encryption Algorithm with random prime numbers, say 7 and 17. So,

A = 7, and B = 17
N = A*B
N = 7*17
N = 119
Now, we have to select a public key, say p, so that isn’t a factor of (A-1) and (B-1).
(7-1)*(17-1) = 6*16 = 96
Now, the factor of 96 is 2*2*2*2*2*3.
So, we can choose our public key, E as 5 since it isn’t a factor of 2 or 3.
Now, to select the private key, we have to make sure it matches this equation:
(D*E) mod (A-1)*(B-1) = 1
(D*5) mod (6)*(16) = 1
(D*5) mod 96 = 1
Now, we can choose D as 77 to satisfy the equation.
(77*5) mod 96 = 1
385 mod 96 = 1
1 = 1
It satisfies the equation so we can move on.
Now, we have to calculate the ciphertext.
Let’s take our plaintext to be 10.
Ciphertext = Plaintext^E mod N
Ciphertext = 10^5 mod 119
Ciphertext = 40
Once, we have the ciphertext we can send it to the recipient.
We can also check the value by decrypting it with the equation:
Plaintext = Ciphertext^D mod N
Plaintext = 40^77 mod 119
Plaintext = 10

That is the plaintext we chose.

Preparing for a job Interview? Check out our blog on Cyber Security Interview Questions!

Application of RSA Algorithm

Let’s look at some applications of the RSA Algorithm:

Want to become an expert in Cyber Security? Enroll in our Cyber Security course today!

Possible Attacks on RSA Algorithm

Possible Attacks on RSA Algorithm

Here’s a list of the possible attacks on the RSA Algorithm:

If you have any doubts? Drop it on our Cyber Security Community page!

Difference Between AES and RSA Algorithm

Let’s look at the differences between the AES and RES Algorithms:

Parameters RSA AES
Encryption Slower Faster
Decryption Slower Faster
Power Consumption Low High
Algorithm Symmetric Asymmetric
Security Least secured Well secured
Rounds 1 10/12/14
Hardware & Software Implementation Not efficient Faster
Ciphering & Deciphering Algorithm Different Same

Learn more about the RSA Algorithm in our Cyber Security and Ethical Hacking Course! Enroll today! 

Advantages of RSA Algorithm over other Algorithms

There are some advantages of the RSA Algorithm over other algorithms. Here are some of them:

Become a Cyber Security Expert

Conclusion

We have discussed the Rivest Shamir Adleman Algorithm in this blog. We have talked about how the algorithm works along with examples. We also know why the RSA Algorithm is more advantageous over other algorithms.

Are you tempted by the field of Cyber Security? Enroll in Cyber Security Master’s Program today!

The post What is RSA Algorithm? appeared first on Intellipaat Blog.

Blog: Intellipaat - Blog

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/what-is-rsa-algorithm/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×