2
$\begingroup$

Please suggest the link where I can find out the NIST vectors for 4K Key to test my RSA API.

$\endgroup$
2
$\begingroup$

I don't think there are any. In principle key sizes can be of any bit length, although usually libraries require modulus a multiple of 8 bits and full powers of two are most common. So creating test vectors for all is not really an option.

The NIST test vectors for decryption just list 1024 and 2048 bits and the modular exponentiation primitive for PKCS#1 signature generation is just 2048 bits modulus. But that should be OK; there aren't any differences when it comes to 4096 bits. It's unlikely that your big number implementation behaves any differently. If you want to test against other bit sizes I would propose you generate them from another library instead.

If you use OAEP or PSS then I would strongly recommend that you test the MGF1 separately, using a different library as reference. There are some tricky size based calculations that need to be performed here and it is a good idea to test them well. Testing your I2OSP and OS2IP might be a good idea as well.

The vectors that are out there can be found here.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.