# Unable to determine plaintext from ciphertext

Given the letter-number cipher: a=00, b=01, c=02, etc., encrypt the word 'hi' and decrypt its ciphertext using RSA. The public key is (5,35) and the private key is (29,35).

I know that 'hi' is represented numerically as 0708, and encrypting it using (0708^5)mod35 gives 8 as the answer. My instructor then said that I have to pad the result with 3 leading zeroes to get a four digit value (0008) which represents the ciphertext 'ai'.

I find it hard to decrypt it, as (0008^29)mod35 gives 8 as the answer, and I don't see how I can manipulate this result to get a value that gives me the original plaintext.

Can you please point out where I went wrong or what I'm failing to understand?

• The modulus is shorter than the plaintext (35<708), it'd be a miracle if it's lossless! – DannyNiu Apr 5 at 3:21
• Yeah, I think you need to encrypt / decrypt each letter separately. – Maarten Bodewes Apr 5 at 3:32
• @DannyNiu thanks for the tips! – bones Apr 7 at 9:14