KI_RSAPublic
KI_RSAPublic
Purpose:
This KI allows you to specify an RSA public key with the modulus and public key exponent. See KI_RSAPublicBER for the same key info type with BER encoding.
Type of information this allows you to use:
an RSA public key where the modulus and exponent integers are specified.
Format of info supplied to B_SetKeyInfo:
pointer to an A_RSA_KEY structure:
typedef struct { |
|
ITEM modulus; | /* modulus */ |
ITEM exponent; | /* exponent */ |
} A_RSA_KEY; |
|
|
|
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_RSAPublic, KI_RSAPublicBER, KI_PKCS_RSAPrivate, or KI_PKCS_RSAPrivateBER.
C h a p t e r 3 K e y I n f o Ty p e s | 285 |