I am totally stumped. I was computing the cipher of the number 54 in RSA with the following values:
p=5; q=29; n=145 d=9; e=137
So the number 54 encrypted would be:
54^137 mod 145
or equivalently in python:
import math
math.pow(54,137)%145
My calculator gives me 24, my python statement gives me 54.0. Python is clearly wrong but I have no idea why or how. Try it on your installations of Python. My version is 2.5.1 but I also tried on 2.6.5 with the same incorrect result.
>>> pow(54,137,145)
24
math.pow
is floating point. You don't want that. Floating-point values have less than 17 digits of useful precision. The 54**137 has 237 digits.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With