I've been trying to figure out how to find the private key in the RSA equation with no luck. Given
p = 31
q = 23
e = 223
phi = (p-1)(q-1)
= 660
The equation (d*e mod phi = 1) results in;
e mod phi = 1/d
so
223 mod 660 = 1/d
223 = 1/d
1/223 = d
but in this example they get d = 367, which I can't get. What am I doing wrong?