AI_PKCS_OAEP_RSAPrivate

a pointer to an A_PKCS_OAEP_PARAMS structure:

typedef struct {

 

unsigned char*

hashFunc;

ITEM

hashFuncParams;

unsigned char*

maskGenFunc;

ITEM

maskGenFuncParams;

unsigned char*

maskGenFuncUnderlyingAlg;

ITEM

maskGenFuncUnderlyingAlgParams;

unsigned char*

pSourceFunc;

ITEM

pSourceParams;

}A_PKCS_OAEP_PARAMS;

The parameters are as follows:

hashFunc determines the digest function. Currently, it may contain a NULL_PTR or a pointer to the null-terminated ASCII string, “sha1”. In both cases SHA1 will become the digest function.

maskGenFunc determines the mask generator function. Currently, it may contain a NULL_PTR or a pointer to the null-terminated ASCII string, “mgf1”. In both cases MGF1 will become the mask generator function.

maskGenFuncUnderlyingAlg may contain a NULL_PTR or a pointer to the null-terminated ASCII string, “sha1”. In both cases SHA1 will become the underlying algorithm.

pSourceFunc is the method for determining the PKCS #1 v2.0 OAEP parameter, P. pSourceFunc may contain a NULL_PTR or a pointer to the null-terminated ASCII string, “specifiedParameters”. In both cases “specifiedParameters” will become the pSource method.

If pSourceFunc is “specifiedParameters” and if pSourceParams.len is 0, then P is assumed to be empty. pSourceParams may also be initialized to the caller's data as in this example:

pSourceParams.len = sizeof(dataObject); pSourceParams.data = &dataObject;

hashFuncParams, maskGenFuncParams, and maskGenFuncUnderlyingAlgParams are available to provide for future growth. The caller should initialize these parameters as ITEM types as follows:

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

141

Page 151
Image 151
RSA Security 5 manual Pointer to an Apkcsoaepparams structure