I have a RSA Encrypted file & I want to decrypt it with C# in .NET
I have the foll. parameters of (1024 bit enc) message(cipher text) to decrypt
- modulus
- public exponent
- private exponent
- prime p
- prime q
- prime exponent p
- prime exponent q
- CRT coefficient
The cipher text is in HEX format
I know the CRT method to decrypt the message but not clear on how to use it
m1 = (ciphertext ^ dP) Mod P
m2 = (ciphertext ^ dQ) Mod Q
h = (qInv * (m1 - m2)) Mod P
m = m2 + (h * Q)
I tried performing the decryption using foll namespace
System.Security.Cryptography
can someone help me with a sample code to achieve decryption, as this is my first time to deal with Decryption.
Is there any ready API available? in which I just need to pass the parameters & I will receive the desired output.