RSA Decryption, Finding the value of d without being allowed to do operations with fractions.

217 Views Asked by At

For a Computer science homework assignment, I have to decrypt a small message which is encrypted with RSA. We are given the public key (e,N) that are small numbers and allow the factors p and q to be found easily. We need to find d so that,

(message)^d modulo N = (decrypted message).

I know that,

d = e^(-1) mod ((p-1)*(q-1)),

However, One of the rules of our homework assignment is that we can only use add, subtract, multiply, integer-division and modulo with two whole numbers.

We've tried the extended euclidean algorithm but our results aren't matching and are partly outside of the rage of values in the ASCII Table we have been told to use. Any suggestions as to what to do or what to read to better understand the problem would be greatly appreciated.