![](/images/new-backgrounds/1225625/225625333x1.webp)
AI_PKCS_OAEPRecode
Purpose:
This AI allows you to perform raw or hardware-based encoding or decoding using the PKCS #1 v2.0 OAEP padding scheme. The OAEP padding scheme prevents a theoretical attack on interactive key-establishment protocols that use PKCS #1 v1.5. The parameters of this algorithm include the hash function, mask generator function, and P source function that are explained below. Encrypting with the AI_PKCS_OAEP_RSAPublic algorithm is equivalent to first encoding the data with AI_PKCS_OAEPRecode using the B_Encode routines and then encrypting with AI_RSAPublic using the B_Encrypt routines. See AI_PKCS_OAEPRecodeBER for the same algorithm type with BER encoding.
Type of information this allows you to use:
OAEP message padding as defined in PKCS #1 v2.0. When encoding, this algorithm encodes the data according to the definition of EME-OAEP-Encode as specified in PKCS #1 v2.0. When decoding, this algorithm decodes the data according to the definition of EME-OAEP-Decode. This permits the use of raw or hardware-based RSA encryption with the PKCS #1 v2.0 flavor of Optimal Asymmetric Encryption Padding.
Format of info supplied to B_SetAlgorithmInfo:
Either:
NULL_PTR.
The following parameters are employed when NULL_PTR is specified:
PKCS OAEP RSA PARAMETER | DEFAULT VALUE | DEFAULT PARAMETERS |
hashFunc | “sha1” | empty ITEM |
maskGenFunc | “mgf1” | empty ITEM |
maskGenFuncUnderlyingAlg | “sha1” | empty ITEM |
pSourceFunc | “specifiedParameters” | empty ITEM |
| | |
or:
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 | 157 |