000018448 - How to use decrypt with 1024-bit modulus  1024-bit private exponent and F4 public exponent but without CRT information

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

Article Content

Article Number000018448
Applies ToRSA BSAFE Crypto-C
IssueHow to use decrypt with 1024-bit modulus, 1024-bit private exponent and F4 public exponent but without CRT information
ResolutionThe only "workaround" available is to use the private key masquerading as a public key.  

Basically, set a key object using KI_RSAPublic with the same modulus and set the private exponent to be the public exponent.  Then, for example, to decrypt, use that "public" key with the B_Decrypt* functions.  

This may take some experimentation - there is added complication if you are trying to decrypt data with OAEP.  There is a workaround that will let you do a raw RSA decryption easily enough and the standard PKCS #1 v1.5 padding is easy to strip - but you may not be able to do this for OAEP.

In reality the CRT (Chinese Remainder Theorem) information is crucial performance-wise for private key operations and the real solution is for you to get the private key information from the source in a more appropriate format.  If the private key is supplied as BER-encoded keys (KI_PKCS_RSAPrivateBER) to you then your procedure should be straight-forward.
Legacy Article IDa1344

Attachments

    Outcomes