AI_DHParamGen

AI_DHParamGen

Purpose:

This AI allows you to generate Diffie-Hellman system parameters, which are the prime modulus, base, and private value length.

Type of information this allows you to use:

the parameters for generating Diffie-Hellman system parameters as defined in PKCS #3, where the size of the prime modulus and random exponent are specified. The optimized generating algorithm is proprietary, as defined by RSA Security Inc.

Format of info supplied to B_SetAlgorithmInfo:

pointer to an A_DH_PARAM_GEN_PARAMS structure:

typedef struct

{

 

 

 

unsigned int

primeBits;

/* size of prime modulus in

bits

*/

unsigned int

exponentBits;

/* size of random exponent in

bits

*/

}A_DH_PARAM_GEN_PARAMS;

The exponentBits must be less than primeBits.

Format of info returned by B_GetAlgorithmInfo:

pointer to an A_DH_PARAM_GEN_PARAMS structure (see above).

Crypto-C procedures to use with algorithm object:

B_GenerateInit and B_GenerateParameters. B_GenerateParameters sets the resultAlgorithmObject with the AI_DHKeyAgree information. You must pass an initialized random algorithm to B_GenerateParameters.

Algorithm methods to include in application’s algorithm chooser:

AM_DH_PARAM_GEN.

C h a p t e r 2 A l g o r i t h m I n f o Ty p e s

49

Page 59
Image 59
RSA Security 5 manual AIDHParamGen, Pointer to an Adhparamgenparams structure, ExponentBits must be less than primeBits