RSA Security 5 manual Pointer to an Apkcsoaepparams structure

Models: 5

1 376
Download 376 pages 51.16 Kb
Page 168
Image 168

AI_PKCS_OAEPRecode

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:

1 5 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 168
Image 168
RSA Security 5 manual Pointer to an Apkcsoaepparams structure