1

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?

Noel Yap
  • 18,822
  • 21
  • 92
  • 144
user1005253
  • 404
  • 2
  • 7
  • 21

1 Answers1

4

Calculating d is not that simple. You can use the extended Euclidean algorithm to solve for d.

d=1/e mod phi

For RSA, how do i calculate the secret exponent?

Noel Yap
  • 18,822
  • 21
  • 92
  • 144
Ben
  • 539
  • 3
  • 7