RSA Security 5 manual KIRSAPrivate, Pointer to an Arsakey structure

Models: 5

1 376
Download 376 pages 51.16 Kb
Page 292
Image 292

KI_RSAPrivate

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:

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_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

2 8 2

R S A B S A F E C r y p t o - C L i b r a r y R e f e r e n c e M a n u a l

Page 292
Image 292
RSA Security 5 manual KIRSAPrivate, Pointer to an Arsakey structure