Consider the following 3-person encryption scheme based on RSA.L (can be trusted in this case) generates two large primes p and q,calculates both n and φ(n). L also chooses k1, k2 and k3 such thatGCD(ki,n) = 1 and k1k2k3 ≡ 1 mod φ(n). Keys are securelydistributed to three others as follows:
G:
J: < n, k2, k3 >
Z: < n, k3, k1 >
Answer the following questions.
(a) G has a message M1 for J. Give the encryption function for Gas well as the decryption function for J, so that the message won’tbe seen by anyone else.(Detailed steps)
(b) J has a message M2 for both G and Z. Give the encryptionfunction for J, as well as decryption functions for both G and Z,so that the message won’t be seen by any other person.(Detailedsteps)