Discrete math 1
1) In RSA algorithm, suppose the public key n = 55 (11*5) and e = 17. Please find a private key d which ed = 1 (mod 40) (40 = (11-1)(5-1))
2) From the previous problem, suppose we have a message "one" (Letter A to Z are coded as 00 to 25), what will be the ciphered message?
3)Rewrite the classic Binary Search method as a Recursive Function (just the pseudocode.)
4)Deduce that, if A ⊆ B, B ⊆ C and C ⊆ A, then A = B = C.
Discrete math 1 1) In RSA algorithm, suppose the public key n = 55 (11*5) and...
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
Encrypt the plain text message NUM THY IS QUE OF MATH using RSA algorithm with key (n, k)= (1643, 223). What is the recovery exponent for the crypto system? Assume that digit equivalence of the alphabets that A = 01, B = 02, ..., Y=25, Z = 26, space = 00
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...
DISCRETE MATH If the public key e = 11, and p = 3, q = 5. What is the private key d?
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...
Using RSA Implementation: 1. Alice's RSA public key is given by (e, n) = (59, 1189). = (a) Determine Alice's private key (d, n). (b) Bob sends his first message Mi 67 to Alice, encrypting it with RSA using Alice's public key. He obtains a cypher text Cị that gets forwarded to Alice. What is Cį? (c) Bob sends his second message M2 to Alice, encrypting it with RSA using Alice's public key. Eve, who was eavesdropping on the commu-...
If a public key has the value (e, n)-(13,77) (a) what is the totient of n, or (n)? (b) Based on the answer from part (a), what is the value of the private key d? (Hint: Remember that d * e-1 mod (n), and that d < ф(n)) You may use an exhaustive search or the Modified Euclidean Algorithm for this. Show all steps performed. For both (c) and (d), use the Modular Power Algorithm, showing all steps along the...
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...
Using RSA algorithm, if p=3 and q=11, k=3, then the public key is equal to (You may use the formulas below): Select two large prime numbers P, 9 Compute n = pxq v = (p-1) (q-1) • Select small odd integer k relatively prime to v gcd(k, v) = 1 Compute d such that (d k)%v = (k d)%v = 1 Public key is (k, n) Private key is (d, n) . . . Select one: a. (3,11) b. (33,3)...
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...