A SERVICE OF

logo

KI_PKCS_RSAPrivate
276 RSA BSAFE Crypto-C Library Reference Manual
KI_PKCS_RSAPrivate
Purpose:
This KI allows you to specify a private key of the RSA algorithm as defined in PKCS
#1. The information consists of the modulus, exponents, two primes, and the Chinese
Remainder Theorem (CRT) information. See
KI_PKCS_RSAPrivateBER for the same
key info type with BER encoding.
Type of information this allows you to use:
an RSA private key where all the integers are specified as in PKCS #1: modulus,
public and private exponents, and Chinese Remainder Theorem information. Note
that
KI_RSA_CRT can be used for a private key that has the modulus and Chinese
Remainder Theorem information but no public or private exponent.
Format of info supplied to B_SetKeyInfo:
pointer to an A_PKCS_RSA_PRIVATE_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_PKCS_RSA_PRIVATE_KEY structure (see above). All leading zeros have
been stripped from each integer in the structure.
typedef struct {
ITEM modulus; /* modulus */
ITEM publicExponent; /* exponent for public key */
ITEM privateExponent; /* exponent for private key */
ITEM prime[2]; /* prime factors */
ITEM primeExponent[2]; /* exponents for prime factors */
ITEM coefficient; /* CRT coefficient */
} A_PKCS_RSA_PR IVATE _KEY ;