I know that RSA normally is made to make it with big integers, but i trying to make the algorithm myself (with the help of wikipedia) and I´m making it with small numbers to track the problems easily.
The problem is that sometimes the decryption of the encrypted message is wrong!
Exactly when I choose p=11
and q=5
, the rest goes like this:
n=55
euler(n)=40 = (p-1)(q-1)
e=13
d=37
the encrypted message (using message=65) is:
c=10
and using the chinese reminder theorem (wikipedia´s advise):
Dp=7
Dq=1
Qinv=9
m1=10
m2=0
h=2
and the decrypted message is:
message=10 !!!!!
It´s a problem of the chosen prime numbers? I think that the rest I made it fine, I also check it with rsa calculator.
I know also that to choose d and e there are more options, but the chosen ones they would be fine too. Maybe there is some other condition that is not on wikipedia?