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 initialized IppsRSAPrivateKeyState context.

pBuffer

Pointer to a temporary buffer of size not less than returned by the RSA_GetBufferSizePrivateKey function.

Description

Note

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.

Note

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 is NULL.

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.

ippStsSizeErr

Indicates an error condition if any input/output length parameters are inconsistent with one another.

Note

While you can set up the type 1 private key in a call to RSA_SetPrivateKeyType1, you can set up the type 2 private key in a call to either RSA_SetPrivateKeyType2 or RSA_GenerateKeys.

Related Information