简体   繁体   中英

Finding private key in RSA

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?

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM