Perform encryption and decryption using the RSA algorithm, as below for the following:
p=3; q=11, e=7; M=5
p=5; q=11, e=3; M=9
p=7; q=11, e=17; M=8
Key Generation by Alice:
Select p, q; p and q both prime, p
q.
Calculate n = p
q.
Calculate
(n) = (p – 1)(q – 1).
Select integer e; gcd (
(n), e) = 1; 1 < e <
(n).
Calculate d; d
e – 1(mod
(n)).
Public key; PU = {e, n}.
Private key: PR = {d, n}.
Encryption by Bob with Alice’s Public Key
Plaintext: M < n
Ciphertext: C = Memodn
Decryption by Alice with Alice’s Public Key
Ciphertext: C
Plaintext: M = Cdmodn