RSADecrypt_PKCSv15
RSADecrypt_PKCSv15
Performs RSA-OAEP decryption using the RSA-OAEP scheme as defined in the v1.5 version of the PKCS#1 standard (deprecated).
Syntax
IppStatus ippsRSADecrypt_PKCSv15 (const Ipp8u*
pSrc
, Ipp8u*
pDst
, int*
pDstLen
, const IppsRSAPrivateKeyState*
pKey
, Ipp8u*
pBuffer
);
Include Files
ippcp.h
Parameters
- pSrc
- Pointer to the input octet message to be decrypted.
- pDst
- Pointer to the output message.
- pDstLen
- Pointer to the length (in bytes) of the decrypted message.
- pKey
- Pointer to the properly initializedIppsRSAPrivateKeyStatecontext.
- pBuffer
- Pointer to a temporary buffer of size not less than returned by theRSA_GetBufferSizePrivateKeyfunction.
Description
This algorithm is considered weak due to known attacks on it. The functionality remains in the library, but the implementation will no longer be optimized and no security patches will be applied. A more secure alternative is available: RSA-OAEP.
The function performs decryption using the RSA-OAEP scheme according to the v1.5 version of the PKCS#1 standard, defined in [PKCS 1.2.1]. The
*pDstLen
parameter returns the length of the decrypted message. If an empty message is encrypted by the
RSAEncrypt_PKCSv15
function, RSADecrypt_PKCSv15
returns and empty string, that is, *pDstLen
==0.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 RSA context parameter does not match the operation.
- ippStsIncompleteContextErr
- Indicates an error condition if the private key is not set up.While you can set up the type 1 private key in a call toRSA_SetPrivateKeyType1, you can set up the type 2 private key in a call to eitherRSA_SetPrivateKeyType2orRSA_GenerateKeys.
- ippStsSizeErr
- Indicates an error condition if any input/output length parameters are inconsistent with one another.