0
12kviews
Using the RSA algorithm, encrypt the following:

1. p=3, q=11, e=7, M=12

2. p=7, q=11, e=17, M=25

3. Find the corresponding ds for (1) and (2) and decrypt the ciphertexts.

1 Answer
0
900views

$1. p=3, q=11, e=7, M=12$

i. To generate key pair, given two large primes $P = 3 and Q = 11$.

ii. Calculate modulus $N = P x Q = 3 x 11 = 33 and (P — l) x (Q — 1) = 20$.

iii. Given $E = 7$ which is not a factor of $Φ(N)$

iv. Select Decryption Key D:

$(D x E) mod (P-1) x (Q-1) =1$

$D= \frac{(1+K Φ(N))}{E} For K = 1, 2, 3, ….$

$D= \frac{(1+1(20))}{7}$

$D= \frac{21}{7}$

$D = 3$

v. For encryption: $C = ME mod N$

plaintext $M = 12$,

$C = 127 mod 33$

$C = 12$

vi. Send ciphertext $C = 12$ to the receiver.

vii. For decryption: $M = CD mod N$

$M = 123 mod 33$

$M = 12$ which is original text.

$2. p=7, q=11, e=17, M=25$

i. To generate key pair, given two large primes $P = 7 and Q = 11$.

ii. Calculate modulus $N = P x Q = 7 x 11 = 77$

$Φ(N) = (P — l) x (Q — 1) = 60$.

iii. Given $E = 17$ which is not a factor of $Φ(N)$

iv. Select Decryption Key D:

$(D x E) mod (P-1) x (Q-1) =1$

$D= \frac{(1+K Φ(N))}{E} For K = 1, 2, 3, ….$

$D= \frac{1+1(60)}{17} = \frac{61}{17} = 3.94 for K = 1$ Not acceptable

$D= \frac{1+2(60)}{17} = \frac{121}{17} = 7.11 for K = 2$ Not acceptable

$D= \frac{1+15(60)}{17} = \frac{901}{17} for K = 15$

$D= 53$

v. For encryption: $C = M^E mod N$

plaintext $M = 25$,

$C = 25^{17} mod 77$

$C = 9$

vi. Send ciphertext $C = 9$ to the receiver.

vii. For decryption: $M = C^D mod N$

$M = 9^{53} mod 77$

$M = 25$ which is original text.

Please log in to add an answer.