Closed bradencarlson closed 2 years ago
This only applies when this is being imported in the sage terminal from the python repository PiPy
Actually, after further inspection, this works just fine, I just defined stuff wrong. Oops.
the decryption is not working properly, I think it may have something to do with the size of the exponent.
This has been fixed, the problem was in the math.floor()
method call in the to_binary()
method. This has been changed to instead invoke the //
operator from python, which then gives the correct binary representation of the exponent, which then allows for a correct decryption.
Encryption algorithm not working properly