计算" D"用于C ++中的RSA密钥生成

时间:2016-02-23 03:39:38

标签: c++ rsa

目前我尝试计算" D"在RSA密钥生成步骤中。我用C ++写作,我能找到的唯一公式是d = e ^( - 1)mod [(p-1)x(q-1)]并把它放到C ++中给了我一些问题但是我得到的是以下错误?有没有更好的方法来实现反模数算法?

 int tis case E is 29 and 20 is phi 
 double  num = pow(29,-1)%(20);

ERROR:

error: invalid operands to binary expression
      ('double' and 'double')
       double  ju = pow(29,-1)%(20);

0 个答案:

没有答案