I'm trying to implement a simple version of RSA encryption for an assignment I have to do for school.
The thing is I must be doing something wrong. I chose the prime numbers 17 and 29 so n = 493 I chose 491 to be my encryption key and therefore 246 is the decryption key. But when I start trying to encrypt and decrypt a message (I have ASCII code and I encode character by character in their decimal value) I don't get the same message when decrypting.
For example when I try with the letter "L" L=76 So I do x=76^491 (mod 493) and the result is 359 But when I do x=359^246 (mod 493) I get 13 as a result, which is not the 76 I needed.
What is it I'm doing wrong here? Because I read a lot about RSA and it should be working but it's not so I must have done something wrong.
Thank you for your time and I'd really appreciate it if I got an answer soon. The assignment is due next Monday.