RSAEncrypt_OAEP
RSAEncrypt_OAEP
Carries out the RSA-OAEP encryption scheme.
Syntax
IppStatus ippsRSAEncrypt_OAEP(const Ipp8u*
pSrc
, int
srcLen
, const Ipp8u*
pLabel
, int
labLen
, const Ipp8u*
pSeed
, Ipp8u*
pDst
, const IppsRSAPublicKeyState*
pKey
, IppHashAlgId
hashAlg
, Ipp8u*
pBuffer
);
IppStatus ippsRSAEncrypt_OAEP_rmf(const Ipp8u*
pSrc
, int
srcLen
, const Ipp8u*
pLabel
, int
labLen
, const Ipp8u*
pSeed
, Ipp8u*
pDst
, const IppsRSAPublicKeyState*
pKey
, const IppsHashMethod*
pMethod
, Ipp8u*
pBuffer
);
Include Files
ippcp.h
Parameters
- pSrc
- Pointer to the octet message to be encrypted.
- srcLen
- Length of the message to be encrypted.
- pLabel
- Pointer to the optional label to be associated with the message.
- labLen
- Length of the optional label.
- pSeed
- Pointer to the random octet string of lengthhashLen, wherehashLenis the length (in octets) of the hash function output.
- pDst
- Pointer to the output octet ciphertext string.
- pKey
- Pointer to the properly initializedIppsRSAPublicKeyStatecontext.
- hashAlg
- ID of the hash algorithm used. For details, see table Supported Hash Algorithms.
- pMethod
- Pointer to the hash method. For details, see HashMethod functions.
- pBuffer
- Pointer to a temporary buffer of size not less than returned by theRSA_GetBufferSizePublicKeyfunction.
Description
The function carries out the RSA-OAEP encryption scheme, defined in [PKCS 1.2.1]. The length of the encrypted message is equal to the size of the RSA modulus
n
.This function has a
reduced memory footprint
version. To learn more, see Reduced Memory Footprint Functions.Return Values
- ippStsNoErr
- Indicates no error. Any other value indicates an error or warning.
- ippStsNullPtrErr
- Indicates an error condition if any of the specified pointers isNULL.
- ippStsContextMatchErr
- Indicates an error condition if the context parameter does not match the operation.
- ippStsIncompleteContextErr
- Indicates an error condition if the public key is not set up.You can set up the public key in a call toRSA_SetPublicKey.
- ippStsLengthErr
- Indicates an error condition if the any input/output length parameters are inconsistent with one another.
- ippStsNotSupportedModeErr
- if thehashAlgparameter does not match any value ofIppHashAlgIdlisted in table Supported Hash Algorithms.