How to find d, given p, q, and e in RSA?

前端 未结 5 829
滥情空心
滥情空心 2021-02-07 07:05

I know I need to use the extended euclidean algorithm, but I\'m not sure exactly what calculations I need to do. I have huge numbers. Thanks

5条回答
  •  梦谈多话
    2021-02-07 07:24

    Simply use this formula,

    d = (1+K(phi))/e. (Very useful when e and phi are small numbers)

    Lets say, e = 3 and phi = 40 we assume K = 0, 1, 2... until your d value is not a decimal

    assume K = 0, then d = (1+0(40))/3 = 0. (if it is a decimal increase the K value, don't bother finding the exact value of the decimal)

    assume K = 2, then d = (1+2(40)/3) = 81/3 = 27

    d = 27.

    Assuming K will become exponentially easy with practice.

提交回复
热议问题