A SERVICE OF

logo

KI_RSAPrivate
282 RSA BSAFE Crypto-C Library Reference Manual
KI_RSAPrivate
Purpose:
This KI allows you to specify an RSA private key with the modulus and private key
exponent. Unlike
KI_PKCS_RSAPrivate, it does not contain the Chinese Remainder
Theorem information and it is not used with any algorithms. It provides a way to
store or transport a private key.
Type of information this allows you to use:
an RSA private key where the modulus and private exponent integers are specified,
but the Chinese Remainder Theorem information is not.
Format of info supplied to B_SetKeyInfo:
pointer to an A_RSA_KEY structure:
Each
ITEM supplies an integer in canonical format, where the ITEM’s
data
points to an
unsigned byte array, most significant byte first, and the
ITEM’s
len
gives its length. All
leading zeros are stripped from each integer before it is copied to the key object.
Format of info returned by B_GetKeyInfo:
pointer to an A_RSA_KEY structure (see above). All leading zeros have been stripped
from each integer in the structure.
Can get this info type if key object already has:
KI_RSAPrivate, KI_PKCS_RSAPrivate or KI_PKCS_RSAPrivateBER.
Note:
You can use KI_RSAPrivate to set a key object with your private modulus and private
exponent. This can be used for storing your key information or when you need to
typedef struct {
ITEM modulus; /* modulus */
ITEM exponent; /* exponent */
} A_RSA_KEY;