000019070 - Can RSA BSAFE Crypto-C generate an RSA key pair with modulus sizes that are not a multiple of 8 bits  such as 1021  799  etc. (not traditional 768  512  1024 bits)?

Document created by RSA Customer Support Employee on Jun 14, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000019070
Applies ToRSA BSAFE Crypto-C
IssueCan RSA BSAFE Crypto-C generate an RSA key pair with modulus sizes that are not a multiple of 8 bits, such as 1021, 799, etc. (not traditional 768, 512, 1024 bits)?
How to determine modulus.len value when modulus value is output in an ITEM
ResolutionYes, you can generate RSA keys with modulus sizes that are not a multiple of 8.  While the modulus.len must be the number of bytes, you'll notice that for a 767-bit key, for example, the high bit of the modulus.data will not be set.  The B_IntegerBits API call can be used on the modulus.data and modulus.len to determine the exact modulus size in bits.
Legacy Article IDa5646

Attachments

    Outcomes