Final answer:
To perform encryption and decryption using the RSA algorithm, you need to find the values of p and q, calculate the modulus n, find the totient of n, select a value for e, find the multiplicative inverse of e modulo the totient, and perform the encryption and decryption operations.
Step-by-step explanation:
To perform encryption and decryption using the RSA algorithm, we need to find the values of p and q, calculate the modulus n, find the totient of n, select a value for e, find the multiplicative inverse of e modulo the totient, and perform the encryption and decryption operations.
For case (a) with p=3, q=11, and e=7, the modulus n is 33, the totient of n is 20, and the multiplicative inverse of e modulo totient is 3. To encrypt the message M=5, we use the formula C = M^e mod n, which gives us C = 5^7 mod 33 = 4. To decrypt the ciphertext C=4, we use the formula M = C^d mod n, where d is the multiplicative inverse, giving us M = 4^3 mod 33 = 5 (the original message).
For case (b) with p=53, q=47, and e=13, the modulus n is 2491, the totient of n is 2448, and the multiplicative inverse of e modulo totient is 253. To encrypt the message M=9, we use the formula C = M^e mod n, which gives us C = 9^13 mod 2491 = 3634. To decrypt the ciphertext C=3634, we use the formula M = C^d mod n, where d is the multiplicative inverse, giving us M = 3634^253 mod 2491 = 9 (the original message).