Decrypting a small Message using RSA with a Private Key If I have a private key of (43, 341). What would be the steps I need to take to decrypt a small message using RSA? I have looked online and everything seems very confusing. Any tips or advice would be helpful.

I have gotten this far:


p=31  q=11
p*q=341
O(n)=(31-1)(11-1)=300
e=7
(43*e)%300=1  e=7
public key (e,n) (7,341)
Private Key (d,n)(43,341)
encryption of m=2   c=2^7%341=128
decryption of c=128 m=128^3%341=2


What would be the next step to decrypt a message?
In step 9, you decrypted the ciphertext, 128, to the original message, 2. That's it. You're done with the toy example of naive RSA encryption/decryption.

Using RSA in real life, you would apply padding, such as OAEP (also known as PKCS#1v2), to your message before raising it to the e power modulo n.

If the plaintext you're trying to encrypt is quite short, say less than half as long as the RSA modulus, you might agree with the recipient to apply RSA directly to the message.

Normally the plaintext isn't that short. What you do is encrypt and MAC the plaintext with a symmetric cipher and MAC algorithm that you agree on with the recipient, using a randomly selected key for the symmetric cipher and a randomly selected key for the MAC. Then you use RSA with a 'message' consisting of the key to the symmetric cipher and the MAC key. You send your recipient all of (A) the RSA ciphertext, (B) the ciphertext from the symmetric cipher, and (C) the MAC. The recipient decrypts the RSA ciphertext (A), unpads it and obtains the keys for the symmetric cipher and the MAC. With those in hand, verifies the MAC (C) of the ciphertext (B) and finally decrypts the symmetric ciphertext (B) to obtain the plaintext.