1
$\begingroup$

This question already has an answer here:

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$

marked as duplicate by Maarten Bodewes encryption May 4 at 11:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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

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

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

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