An RSAcryptosystem has public key n = 18721 and e = 25. Messages are encrypted crypted one letter at a time, converting letters to numbers by A = 2, B = 3 c _ 27. Oscar intercepts the message "365, 18242, 4845, 18242, 17173, 16;134:"" from Alice to Bob.

(la) Decrypt the message by factorizing n.

(lb) Decrypt the message assuming that you cannot factorize n.

can any body teach me too step by step how to decrypt message and also what is p&q

Your questions can be answered by reading the wikipedia page on RSA.

# 1a

When you factor **n**, you find integers **p** and **q** such that **n = p * q**. You calculate **Y = (p - 1)(q - 1)**. Then you can find the private key exponent **d**, which is calculated as **d = 1/e mod Y**.

To decrypt one of the values **c** in the intercepted message, you simply calculate **m = c^d mod n**, where **m** is the decrypted message. This works because **(m^e)^d mod n** is equal to 1.

I'll leave the actual calculations to you. If you get stuck, the wiki page has some good examples.

# 1b

If you cannot factorize **n**, then you can't decrypt the message. If it were possible to decrypt the message using only the public key **(n,e)**, then why would anyone use RSA?