RSA Security 5 manual AIX931Random, Seed

Models: 5

1 376
Download 376 pages 51.16 Kb
Page 251
Image 251

AI_X931Random

AI_X931Random

Purpose:

This AI allows you to generate random numbers for RSA key generation in conformance with X9.31. This AI can be used to supply multiple independent streams of randomness. It is included in Crypto-C mainly to satisfy the requirements of independent generation of large and private prime factors, as specified by X9.31.

This AI is intended for use with AI_RSAStrongKeyGen only. The SHA1 based pseudo- random number generator, G(sha1), which is defined in the X9.31 standard and in the FIPS182-1 DSA standard, is available as AI_X962Random_V0. If you are not using X9.31 rDSA signatures but require the G(sha1) hash function, you should use AI_X962Random_V0 and not AI_X931Random.

Type of information this allows you to use:

A SHA1 based pseudo-random number generator as defined in Appendix A of the X9.31 standard.

Format of info supplied to B_SetAlgorithmInfo:

NULL_PTR, if there is only one stream and no additional seeding is desired, or

a pointer to an A_X931_RANDOM_PARAMS structure:

typedef struct

 

 

{

 

 

unsigned int numberOfStreams;

/* number of independent streams */

ITEM

seed;

/* additional seeding */

 

/* to be equally divided among the streams */

} A_X931_RANDOM_PARAMS;

 

 

 

 

When AI_X931Random is used with AI_RSAStrongKeyGen, the numberOfStreams field must always be equal to 6.

Format of info returned by B_GetAlgorithmInfo:

returns a NULL_PTR if set with NULL_PTR; returns a pointer to an

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

241

Page 251
Image 251
RSA Security 5 manual AIX931Random, Seed