RSA Security 5 manual Amrsaencrypt

Models: 5

1 376
Download 376 pages 51.16 Kb
Page 160
Image 160

AI_PKCS_OAEP_RSAPublic

hashFuncParams.len = 0; hashFuncParams.data = NULL_PTR maskGenFuncParams.len = 0; maskGenFuncParams.data = NULL_PTR maskGenFuncUnderlyingAlgParams.len = 0; maskGenFuncUnderlyingAlgParams.data = NULL_PTR

Failure to properly initialize these parameters may cause errors when they are implemented in future versions of Crypto-C. In this case, the default parameters for pSourceParams should be set by the caller as follows:

pSourceParams.len = 0; pSourceParams.data = NULL_PTR;

Format of info supplied to B_GetAlgorithmInfo:

NULL_PTR.

Crypto-C procedures to use with algorithm object:

B_EncryptInit, B_EncryptUpdate, and B_EncryptFinal.

B_EncryptFinal requires a valid random number generator as a B_ALGORITHM_OBJ in its randomAlgorithm argument. PKCS #1 v2.0 does not specify the random number generation method. It is recommended that AI_X962Random_V0 or AI_SHA1Random be initialized with enough seed bytes to produce 160 bits of entropy.

You may pass (B_ALGORITHM_OBJ)NULL_PTR for the randomAlgorithm argument in B_EncryptUpdate.

Algorithm methods to include in application's algorithm chooser:

AM_RSA_ENCRYPT.

AM_SHA is required for the default pSource digest function and also for the default MGF underlying digest method.

Key info types for keyObject in B_EncryptInit or B_DecryptInit:

KI_RSAPublic or KI_RSAPublicBER.

1 5 0

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 160
Image 160
RSA Security 5 manual Amrsaencrypt