Suppose you wish to encrypt the message, M = 42 using RSA encryption. Given a public key where p = 23 and q = 11 and the relative prime = 7. Find n, and show all necessary steps to encrypt your message (42).

RSA algorithm

M = 42

P = 23

q = 11 e = 7

n p × q f = (P-1)(q-1)

Encryption

Cypher text c = m ^{e mod n}

C = (42) ^{7 }mod n

= (42) ^{7 }mod 253

= 230,593,333,248

Mod 253

C = 121

So the message 42 is encrypted as 14

ONE SOLUTION