I came to a problem when calculating some values for RSA encryption task.
So the data I have is this:
Now I have to calculate the original message($m$) and I have an issue because I can see what the solution for $m$ should be, but I get a different answer.
So far, I was able to figure out that $e=27$ and $d=3$.
Now I should calculate $m=(p-1)*(q-1)$ with the equation: $e*d \bmod m = 1$.
But the solution I have from this example says that $m=40 \rightarrow 4*10$ which gives us $p=5$ and $q=11$.
Now my question is why is $40$ correct and not $m=20 \rightarrow 2*10 \rightarrow p=3$ and $q=11$, which is what I got?