Question

In: Computer Science

Given two prime numbers 17 and 19. Compute the encryption and the decryption keys using RSA...

Given two prime numbers 17 and 19. Compute the encryption and the decryption keys using RSA algorithm.

Solutions

Expert Solution

In RSA we have Two prime Number i.e. p and q

Steps to get Keys

1. Compute n=pq and  ϕ=(p−1)(q−1)

2.Choose an integer e, 1<e<ϕ such that gcd(e,ϕ)=1

3. Compute the secret exponent d, 1<d<ϕ, such that e*d ≡ 1 mod ϕ

Now We have Two keys in RSA

1. Encryption Key i.e. e that we find in Step 2

2. Decryption Key i,e. d that we find in Step 3

Process followed by RSA

Sender send set of ( n ,e ) which the  the Public key along with the encrypted data and when receiver gets the data then it used n and e to get the private key d and use that key to decrypt the message .

Now lets calculate keys using given prime number

p = 17 , q=19

n=pq = 17 * 19 = 323

ϕ=(p−1)(q−1) = 16 * 18 = 288

Now We get e as

gcd(e, 288 )=1

They are many possible so but we have to take any less than 288 .

So lets we have 215

Encryption Key = 215

Now Lets find the decryption key

e*d ≡ 1 mod ϕ

Now e = 151

215 * d mod 288 = 1

We have to find modular inverse to get d

Hence we get d = 71

Hence we get Two keys as 215 and 71

Note : Answer may be differ and we have many options to choose the encryption key i.e. e but for every e , d is fixed and unique,

So if u choose any other encryption key then follow the same process to get d by using modular inverse

Thank You

If u like the answer do Upvote it and have any doubt ask in comment


Related Solutions

import math print("RSA ENCRYPTION/DECRYPTION") print("*****************************************************") #Input Prime Numbers print("PLEASE ENTER THE 'p' AND 'q' VALUES BELOW:")...
import math print("RSA ENCRYPTION/DECRYPTION") print("*****************************************************") #Input Prime Numbers print("PLEASE ENTER THE 'p' AND 'q' VALUES BELOW:") p = int(input("Enter a prime number for p: ")) q = int(input("Enter a prime number for q: ")) print("*****************************************************") #Check if Input's are Prime '''THIS FUNCTION AND THE CODE IMMEDIATELY BELOW THE FUNCTION CHECKS WHETHER THE INPUTS ARE PRIME OR NOT.''' def prime_check(a): if(a==2): return True elif((a<2) or ((a%2)==0)): return False elif(a>2): for i in range(2,a): if not(a%i): return false return True check_p =...
8. (20 pts) a. RSA encryption. Let n = pq = (7)(17) = 119 and e...
8. (20 pts) a. RSA encryption. Let n = pq = (7)(17) = 119 and e = 5 define a (very modest) RSA public key encryption. Since 25 < 119 < 2525, we can only encode one letter (two digit representation) at a time. Use the function ? = ? mod ? to encode the word MATHY into a series of five numbers that are less than n. b. To decrypt an RSA encrypted message, we need to find d,...
Write a Java program for RSA encryption that has the following inputs and outputs: Given a...
Write a Java program for RSA encryption that has the following inputs and outputs: Given a message and an integer n = pq where p and q are odd primes and an integer e > 1 relatively prime to (p − 1)(q − 1), encrypt the message using the RSA cryptosystem with key (n, e).
given a hash finction H(), and an RSA encrypting algorithm. The public and private keys for...
given a hash finction H(), and an RSA encrypting algorithm. The public and private keys for Alice are PUa, and PRa, respectively. A. Describe how Alice can produce a digital siguature of a message "M. and how Bob can verify the sigature. B. Does the process described in part (a) above provide authentication? Give reason.
Leigh chooses the primes 17 and 13, and an encryption key which is relatively prime to...
Leigh chooses the primes 17 and 13, and an encryption key which is relatively prime to φ(17*13) = 192. He chooses 7. He posts his parameters (7, 221). Then he receives the encrypted message 72 from Bai. What is the plaintext version of this message
Consider the following. 16, 24, 19, 29, 17 Compute the population standard deviation of the numbers....
Consider the following. 16, 24, 19, 29, 17 Compute the population standard deviation of the numbers. (Round your answer to one decimal place.) _______________ (a) Add a nonzero constant c to each of your original numbers and compute the standard deviation of this new population. (Round your answer to one decimal place.) _______________ (b) Use the results from part (a) and inductive reasoning to state what happens to the standard deviation of a population when a nonzero constant c is...
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...
Using a technique called randomized encryption, convert textbook AES and RSA to a secured version with...
Using a technique called randomized encryption, convert textbook AES and RSA to a secured version with an initialization vector (IV). Assume we have a message (m) with 128 bits, show how to encrypt (m) with secured AES. Explain why IEEE 802.11 (i.e., WEP) is not secure due to the inappropriate usage of an IV.
The prompt is using Python:  Write a 3 rail transposition encryption algorithm, and a corresponding decryption algorithm....
The prompt is using Python:  Write a 3 rail transposition encryption algorithm, and a corresponding decryption algorithm. Implement these two algorithms in their own function. Now write a testing function that demonstrates your algorithms work for all interesting cases!
Given the prime factors p and​ q, the encryption exponent​ e, and the ciphertext​ C, apply...
Given the prime factors p and​ q, the encryption exponent​ e, and the ciphertext​ C, apply the RSA algorithm to find ​(a) the decryption exponent d and ​(b) the plaintext message M. p q e C 17 5 19 65 I have to get d and M
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT