Question

In: Computer Science

How does RSA cipher encryption algorithm's logic work? and what are the advantages and disadvantages?

How does RSA cipher encryption algorithm's logic work? and what are the advantages and disadvantages?

Solutions

Expert Solution

RSA(Rivest Shamir Adleman) algorithm is a type of asymmetric cryptographic algorithm, which means that two different keys are used for encryption and decryption. The key which is made available to the public is called Public key and this key is used to encrypt the data, and the key which is only available to the receiver is called Private Key and is used to decrypt the data. Whole process goes as:

1. Receiver generates the public & private key pair.

2. Public key is sent freely to the sender.

3. Sender encrypts the message with the public key of receiver and sends the encrypted data.

4. Receiver receives the encrypted data and decrypts the data using the private key already generated (in step 1) to obtain the original message.

This algorithm is based on the fact that large integers are difficult to factorize.

The algorithm goes as follows (for message m=5):

For Public Key:

  • Select two prime numbers. Let P = 3 and Q = 11.
  • First part of the Public key: n = P*Q = 3*11 = 33.
  • Let small integer exponent say e which is not a factor of n and 1 < e < Φ(n) {Φ(n) = (P-1)(Q-1) as discussed below} Let it to be 7.Since 1 < 7 < 20
  • Our encrypted data is calculated as c = me mod n = 57 mod 33 = 14
  • Thus, c = 14

For Private Key:

  • We need to calculate Φ(n) : Such that Φ(n) = (P-1)(Q-1) so, Φ(n) = (2)*(10) = 20
  • Now calculate Private Key, d : d = (k*Φ(n) + 1) / e for some integer k For k = 1,
  • We have d = (1*20 + 1)/7 => value of d is 3.
  • Decrypted data goes as  m = cd mod n = 143 mod 33 = 5
  • Thus m = 5 (which is our original message).

Advantages of RSA

  1. Since encryption process is asymmetric hence only receiver can decrypt the data using only his private key.
  2. This algorithm is based on prime factors and becomes hard to crack for large numbers, since large numbers can have large number of factors which increases uncertainty in guessing the correct key.
  3. Since key is made public, hence the need for secure transmission of keys gets eliminated.

Disadvantages of RSA

  1. Algorithm becomes cumbersome and demanding w.r.t. resources since a lot of mathematical calculations are involved.
  2. It takes time for encryption and decryption processes to take place directly because of its complexity in real life situations where there are keys of 1024/2048 bits in length.
  3. There is always a need to verify the source of origin of public key by some already verified authority.

Related Solutions

what is wash sale trades, how does it effect taxes, what are the advantages and disadvantages,...
what is wash sale trades, how does it effect taxes, what are the advantages and disadvantages, and how to avoid it?
What are the advantages and disadvantages of foreign investing? How does an ADR help overcome the...
What are the advantages and disadvantages of foreign investing? How does an ADR help overcome the disadvantages?
What are the advantages and disadvantages of brick-and-mortar stores? What are the advantages and disadvantages of...
What are the advantages and disadvantages of brick-and-mortar stores? What are the advantages and disadvantages of online stores? Which are there more of and how will this trend continue? Please answer in complete sentences with an overall total of 150 words or more.
What are the advantages and disadvantages of decentralization? Would you prefer to work in a centralized...
What are the advantages and disadvantages of decentralization? Would you prefer to work in a centralized or decentralized organization and why? What are opportunity costs and what are the economic benefits? Can you think of various industries that these types of costs and benefits could be applied?
In the caeser cipher encryption and decryption program below, what do the two lines if(ch >...
In the caeser cipher encryption and decryption program below, what do the two lines if(ch > 'z'){ ch = ch - 'z' + 'a' - 1; } if(ch < 'a'){ ch = ch + 'z' - 'a' + 1; } mean??? I understand that it has something to do with ASCII characters and makes sure that if the encryption/decryption character is more than "z", then it would loop back to "a" instead of outputting a charcter like "{" . I...
What is reinsurance? How does it work? What are the advantages of Berkshire Hathaway’s reinsurance business?...
What is reinsurance? How does it work? What are the advantages of Berkshire Hathaway’s reinsurance business? (using the 2017 Annual letter)
What are advantages and disadvantages of Preferred Stock? Do they outweigh the advantages and disadvantages of...
What are advantages and disadvantages of Preferred Stock? Do they outweigh the advantages and disadvantages of Common Stock?
What are the advantages and disadvantages of globalization? The advantages and disadvantages of globalization can change...
What are the advantages and disadvantages of globalization? The advantages and disadvantages of globalization can change depending on whether or not they are being evaluated from a social or economic perspective. From an economic standpoint, globalization has provided ample opportunity for a number of American businesses to grow exponentially. Globalization has also had a large impact on how businesses are structured by altering supply chains which has arguably led to greater efficiency as well as lowering the cost of manufacturing...
What are the advantages and disadvantages of working in an autocratic, democratic, and laissez-faire work environment?
What are the advantages and disadvantages of working in an autocratic, democratic, and laissez-faire work environment?
What does Tim Harford claim are the advantages of life withoutmarkets? What are the disadvantages?...
What does Tim Harford claim are the advantages of life without markets? What are the disadvantages? Does the idea of life without markets relate to the concept of market failure?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT