Decrypting RSA Data in .NET with Multiple Values

I am using the RSA Javascript implementation from this web page and I created my key pair. Thus, I have p, q, public exponents, public modulo, private exhibitor and private inversion.

How can I use .NET RSACryptoServiceProviderto decrypt cipher text with only these values? .NET documents list three other fields; DP, DQand InverseQwhich I am not sure how to provide.

+5
source share
2 answers

There are two views for the RSA private key (cf PKCS # 1 ).

(n, d), (p, q, dP, dQ, qInv). (n, e).

  • n -
  • p q -
  • d
  • e
  • dP - p (e · dP ≡ 1 (mod (p - 1)))
  • dQ - q CRT- (e · dQ ≡ 1 (mod (q - 1)))
  • qInv - CRT, p , q · qInv ≡ 1 (mod p)

"", , RSA. , , (.. N, p, q, e, d) RSAParameters .

+5

, , , ,

dp, dq qInv, , :

dp = d mod (p − 1)
dq = d mod (q − 1)
qInv = q^−1 mod p
+1

All Articles