1
$\begingroup$

I am using the values as follows:

$(p, q, n, \phi(n), e, d) = (1033, 5039, 5205287, 5199216, 65537, 3784241)$

Yes, I have made sure $e$ and $\phi(n)$ are coprime.

For example, if I were to encrypt the value $13130$, I would get $4664915$ and then I decrypted $4664915$ and got $13130$.

The problem is when then I encrypted the number $1310731326$ and got $3386045$, when I went to decrypt $3386045$, I got $18660$ which is nowhere near $1310731326$.

I've been trying all day and still can't find the solution. Can someone help me please!?!?!

$\endgroup$
1
  • $\begingroup$ and furthermore, please make sure to read why textbook RSA is insecure $\endgroup$
    – Z.T.
    Jun 11, 2019 at 19:07

1 Answer 1

4
$\begingroup$

Your message has to be smaller than n to be correctly encrypted / decrypted with RSA.

$\endgroup$
1
  • $\begingroup$ i see now. so the larger n the larger the value for m can be $\endgroup$ May 3, 2019 at 22:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.