(i) Find Bezout’s Identity for 53 and 61.
Using RSA, you send Alice the modulus m = 3233 (= 53 · 61) and
the encrypting exponent e = 7. Alice has a two-letter message that she turns into a number ≤ 2626 and encrypts and sends you. You receive c = 1067. You have already determined that the decrypting exponent is d = 1783.
(ii) Find cd (mod 53) and cd (mod 61).
(iii) Then use Bezout’s identity from (i) to find Alice’s plaintext message.
(i)
Bezout’s Identity is the gcd of two co-prime integers. Bezout’s Identity for 53 and 61 can be calculated as follows:
Bezout’s Identity = gcd(a, b) [a=53, b=61]
= gcd(53, 61)
=1
Gcd(a, b) = ax + by
= 53x + 61y
= 1
According to Bezout’s Identity the multiplicative inverse of e modulo (n) can be calculated as follows:
d= e modulo (n) [(n) = (p-1)*(q-1) = (a-1)*(b-1) = (53-1)*(61-1) = 3120]
= 7 modulo 3120.
= 1783
Thus, d = 1783.
(ii)
Cd(mod 53)
= 10671783mod 53
= 4
Cd(mod 61)
= 10671783mod 61
= 17
(iii)
The Bezout’s identity in part(i) shows that the multiplicative inverse of 7 modulo 3120 is 1783. It can be verified by calculating 7 × 1783 mod 3120 = 1. Thus, d = 1783, c = 1067 and N = 3233.
Alice plaintext message can be calculated as follows:
P = Cdmod N
P = Cdmod m [N=p*q=m]
P = 10671783 mod 3233=322
P = 322
(i) Find Bezout’s Identity for 53 and 61. Using RSA, you send Alice the modulus m...
2. Alice is a student in CSE20. Having learned about the RSA cryptosystem in class, she decides to set-up her own public key as follows. She chooses the primes p=563 and q = 383, so that the modulus is N = 21 5629. She also chooses the encryption key e-49. She posts the num- bers N = 215629 and e-49 to her website. Bob, who is in love with Alice, desires to send her messages every hour. To do so,...
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...