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

Please perform encryption and decryption given the following values of an RSA public key cryptosystem; p=17,...
Please perform encryption and decryption given the following values of an RSA public key cryptosystem; p=17, q=31, e=7 and M=2
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 =...
Alice is sending message “HIDE” to Bob. Perform encryption and decryption using RSA algorithm, with the...
Alice is sending message “HIDE” to Bob. Perform encryption and decryption using RSA algorithm, with the following information: parameters p=11,q=5, e=7 Present all the information that you will need to encrypt and decrypt only the first letter from text
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,...
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.
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).
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...
import tkinter as tk import math window = tk.Tk() window.title("RSA Encryption/Decryption") window.geometry("500x500") #screen.configure(background="black") #functions def Modulus():...
import tkinter as tk import math window = tk.Tk() window.title("RSA Encryption/Decryption") window.geometry("500x500") #screen.configure(background="black") #functions def Modulus(): p = int(p_input1.get()) q = int(q_input1.get()) n = p*q    open_text = tk.Label(text="Keep your Messages Secure", fg = "white", bg = "blue") open_text.pack() Encryp_text = tk.Label(text="Encryption", fg="white", bg="red") Encryp_text.place(x=200, y=35) Decryp_text = tk.Label(text="Decryption", fg="white", bg="green") Decryp_text.place(x=200, y=270) p_input=tk.Label(text="Enter the value of P: ") p_input.place(x=10, y=58) p_input1=tk.Entry() p_input1.place(x = 130, y=58) q_input=tk.Label(text="Enter the value of q:") q_input.place(x=10, y=78) q_input1=tk.Entry() q_input1.place(x = 130, y=78) mod =...
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT