Suppose we use p = 7 and q = 5 to generate keys for RSA.
a) What is n ? ___________________
b) What is φ(n) ? _______________________
c) One choice of e is 5. What are the other choices for e? _________________________________________________________________________________
d) Explain how you got your answer for part c.
e) For the choice of e = 5 what is d? _________________________ Show work.
f) Using the public key (n, e), what is the message 3 encrypted as? _____________________Show work as if not using a calculator.
g) Show that your result for part f
decrypts back to 3, using the private key (n, d). Show work as if
not using a calculator.
h) Suppose you know only the public key (n,e) and want to figure out the private key. Explain how you can do it in the case of our value for n. Why doesn't this work for very large values of n?
Here is a hint for doing calculations (mod n): Sometimes it's better to replace a big number by a negative number that it's congruent to (mod n). For example if the number is 48 and you are doing calculations (mod 50) then it's probably better to work with -2 since that's smaller in absolute value than 48 and it's congruent to 48 (mod 50)..
Discrete Structures problem Suppose we use p = 7 and q = 5 to generate keys for RSA. a) What is n ? b) What is on)? c) One choice of e is 5. What are the other choices for e? d) Explain how you got your answer for part c. e) For the choice of e = 5 what is d? Show work. f) Using the public key (n, e), what is the message 3 encrypted as? Show work...
p=3, q=7 Suppose that Bob wants to create an example of an RSA public-key cryptosystem by using the two primes p ??? and q ???. He chooses public encryption key e He was further supposed to compute the private decryption key d such that ed 1 mod A(pq)). However, he confuses A and and computes instead d' such that ed' =1 (mod P(pq)). (i) Prove that d' works as a decryption key, even though it is not necessarily the same...
Computing RSA by hand. Let p = 13, q = 23, e = 17 be your initial parameters. You may use a calculator for this problem, but you should show all intermediate results. Key generation: Compute N and Phi(N). Compute the private key k_p = d = e^-1 mod Phi(N) using the extended Euclidean algorithm. Show all intermediate results. Encryption: Encrypt the message m = 31 by applying the square and multiply algorithm (first, transform the exponent to binary representation)....
Discrete Mathematics - RSA Algorithm and Mod These are problems concerning the RSA algorithm and Modulo. A. In RSA, suppose bob chooses p = 3 and q = 43. Determine one correct value of the public exponent e, your choice should be the smallest positive integer that is greater than 1. Justify your answer. B. For the e's value you chose above, compute the corresponding secret exponent d. Show your work. C. Compute 540Mod13 D. Compute 5-1Mod11
Consider the RSA algorithm. Let the two prime numbers, p=11 and q=41. You need to derive appropriate public key (e,n) and private key (d,n). Can we pick e=5? If yes, what will be the corresponding (d,n)? Can we pick e=17? If yes, what will be the corresponding (d,n)? (Calculation Reference is given in appendix) Use e=17, how to encrypt the number 3? You do not need to provide the encrypted value.
Write a program in Python implement the RSA algorithm for cryptography. Set up: 1.Choose two large primes, p and q. (There are a number of sites on-line where you can find large primes.) 2.Compute n = p * q, and Φ = (p-1)(q-1). 3.Select an integer e, with 1 < e < Φ , gcd(e, Φ) = 1. 4.Compute the integer d, 1 < d < Φ such that ed ≡ 1 (mod Φ). The numbers e and d are...
Write code for RSA encryption package rsa; import java.util.ArrayList; import java.util.Random; import java.util.Scanner; public class RSA { private BigInteger phi; private BigInteger e; private BigInteger d; private BigInteger num; public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); System.out.println("Enter the message you would like to encode, using any ASCII characters: "); String input = keyboard.nextLine(); int[] ASCIIvalues = new int[input.length()]; for (int i = 0; i < input.length(); i++) { ASCIIvalues[i] = input.charAt(i); } String ASCIInumbers...
Suppose that Marie publishes the following public RSA values n = 33 and e = 7. What is the value of the private key?
Suppose that Paul wants to use the public RSA value n = 185 and the private key d = 55. What is the value of the public key?
4. Suppose Alec wishes to communicate with Diego, who is using RSA with a public key (e, n) and corresponding private key d. Alec takes his message m and sends c m mod n to Diego. Unfortunately, Eve is able to intercept Alec's message, modifying it to instead send d'c() mod n for some (secret) r that Eve chooses. (a) Diego receives Alec's tampered ciphertext d' and tries to decrypt it using his private key d. What is the resulting...