RSA_Encrypt
RSA_Encrypt
Performs the RSA encryption operation.
Syntax
IppStatus ippsRSA_Encrypt(const IppsBigNumState*
pPtxt
, IppsBigNumState*
pCtxt
, const IppsRSAPublicKeyState*
pKey
, Ipp8u*
pScratchBuffer
);
Include Files
ippcp.h
Parameters
- pPtxt
- Pointer to theIppsBigNumStatecontext of the plaintext.
- pCtxt
- Pointer to theIppsBigNumStatecontext of the ciphertext.
- pKey
- Pointer to theIppsRSAPublicKeyStatecontext.
- pScratchBuffer
- Pointer to the temporary buffer of size not less than returned by theRSA_GetBufferSizePublicKeyfunction.
Description
The function performs the RSA encryption operation, that is, the RSA operation on a public key.
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.
- ippStsOutOfRangeErr
- Indicates an error condition if the big number specified bypPtxtis not positive or greater than the RSA modulus.
- ippStsSizeErr
- Indicates an error condition if the big number specified bypCtxtis not sufficient to hold the result.