Why is RSAParameters Modulus not equal product of P and Q?

前端 未结 2 953
说谎
说谎 2020-12-16 02:29

The values of P and Q do not match value of the Modulus of the .Net RSAParameters. According to RSA algorithm and MSDN documentation it should be: P * Q = Modulus

I

2条回答
  •  既然无缘
    2020-12-16 02:58

    BigInteger parses arrays as signed little-endian values. RSAParameters uses unsigned big-endian.

    So i = new BigInteger(bytes.Reverse().Concat(new byte[]{0}).ToArray())) should work.

提交回复
热议问题