0

I'm using test vectors presented at the end of this page (SigGen15_186-3.txt RSA PKCS#1 Ver 1.5): https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/digital-signatures#rsavs

The three key parameters given are n, e and d. My question is, how should I import these parameters as RSAParameters into RSA implementation? Is there any shortcut, or do I have to go about this manually and write the code calculating the other RSA parameter fields myself?

karolyzz
  • 480
  • 4
  • 28
  • See the table here: https://blogs.msdn.microsoft.com/shawnfa/2005/11/17/all-about-rsaparameters/ – Alex K. Aug 07 '18 at 16:07
  • @AlexK. thanks for the link, but not exactly what I was asking. I was asking if there's a way to import the key from the three parameters other than calculating the remaining ones in the table ourselves. To import the key into RSA, afaik, you have to input the other remaining parameter fields as well. – karolyzz Aug 07 '18 at 16:31
  • Well, what happened when you tried it? I assume it didn't work, so you're going to have to calculate the missing fields. – President James K. Polk Aug 07 '18 at 21:28

1 Answers1

0

There's no way to do that other than calculating all the parameters manually. These two were the answers:

How to create private RSA key using modulus, D, exponent in C#?

Calculate primes p and q from private exponent (d), public exponent (e) and the modulus (n)

karolyzz
  • 480
  • 4
  • 28