RSA Security 5 manual AIRSAStrongKeyGen, Pointer to an Arsakeygenparams structure

Models: 5

1 376
Download 376 pages 51.16 Kb
Page 228
Image 228

AI_RSAStrongKeyGen

AI_RSAStrongKeyGen

Purpose:

This AI allows you to specify the parameters for generating an RSA public/private key pair as defined in PKCS #1. The moduli generated are in conformance with the strength criteria of X9.31. If you do not want this level of conformance, you may use a faster AI_RSAKeyGen to generate RSA key pairs.

Type of information this allows you to use:

the parameters for generating an RSA public/private key pair as defined in PKCS #1, where the modulus size and public exponent are specified. The moduli generated are in conformance with the strength criteria of X9.31.

Format of info supplied to B_SetAlgorithmInfo:

pointer to an A_RSA_KEY_GEN_PARAMS structure:

typedef struct

{

 

unsigned int

modulusBits;

/* size of modulus in bits */

ITEM

publicExponent;

/* fixed public exponent */

}A_RSA_KEY_GEN_PARAMS;

The publicExponent 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 the integer before it is copied to the algorithm object. modulusBits must be at least 512 and must be a multiple of 16.

Format of info returned by B_GetAlgorithmInfo:

pointer to an A_RSA_KEY_GEN_PARAMS structure (see above). All leading zeros have been stripped from the publicExponent integer.

Crypto-C procedures to use with algorithm object:

B_GenerateInit and B_GenerateKeypair. B_GenerateKeypair sets the publicKey key object with the KI_RSAPublic information and the privateKey key object with the KI_PKCS_RSAPrivate information. You must pass an initialized random algorithm to B_GenerateKeypair.

2 1 8

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 228
Image 228
RSA Security 5 manual AIRSAStrongKeyGen, Pointer to an Arsakeygenparams structure