.. _rsasign_pss: RSASign_PSS =========== Carries out the RSASSA-PSS signature generation scheme. Syntax ------ IppStatus ippsRSASign_PSS(const Ipp8u\* pMsg, int msgLen, const Ipp8u\* pSalt, int saltLen, Ipp8u\* pSign, const IppsRSAPrivateKeyState\* pPrivateKey, const IppsRSAPublicKeyState\* pPublicKeyOpt, IppHashAlgId hashAlg, Ipp8u\* pBuffer); IppStatus ippsRSASign_PSS_rmf(const Ipp8u\* pMsg, int msgLen, const Ipp8u\* pSalt, int saltLen, Ipp8u\* pSign, const IppsRSAPrivateKeyState\* pPrivateKey, const IppsRSAPublicKeyState\* pPublicKeyOpt, const IppsHashMethod\* pMethod, Ipp8u\* pBuffer); Include Files ------------- ``ippcp.h`` Parameters ---------- .. list-table:: :header-rows: 0 * - pMsg - Pointer to the octet message to be signed. * - msgLen - Length of the input \*pMsg message in octets. * - pSalt - Pointer to the random octet salt string. * - saltLen - Length of the salt string in octets. * - pSign - Pointer to the output octet signature. * - pPrivateKey - Pointer to the properly initialized IppsRSAPrivateKeyState context. * - pPublicKeyOpt - Pointer to the properly initialized optional IppsRSAPublicKeyState context. * - hashAlg - Identifier of the hash algorithm. 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 each of the functions `RSA_GetBufferSizePrivateKey and RSA_GetBufferSizePublicKeyKey `__. Description ----------- The function generates the message signature according to the RSASSA-PSS scheme defined in [`PKCS 1.2.1 `__] using the hash algorithm defined by the hashAlg or pMethod parameter. If you are using an RSA private key type 2 to generate the signature, you can use the optional \*pPublicKeyOpt parameter to mitigate Fault Attack. If you are using an RSA private key type 1 or sure that Fault Attack is not applicable, pPublicKeyOpt can be NULL. Passing the NULL value to the pPublicKeyOpt parameter saves computation time. .. note:: This function has a *reduced memory footprint* version. To learn more, see `Reduced Memory Footprint Functions `__. Return Values ------------- .. list-table:: :header-rows: 0 * - 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 any of the context parameters does not match the operation. * - ippStsIncompleteContextErr - Indicates an error condition if the public or private key is not set up. * - ippStsLengthErr - Indicates an error condition if the value of saltLen is negative or any input/output length parameters are inconsistent with one another together (see [PKCS 1.2.1] for details). * - ippsStsNotSupportedModeErr - Indicates an error condition if the hashAlg parameter does not match any value of IppHashAlgId listed in table `Supported Hash Algorithms `__. .. rubric:: Related Information * :ref:`rsa_setpublickey-rsa_setprivatekeytype1-rsa_setprivatekeytype2` * :ref:`rsa_generatekeys` * :ref:`rsasign_pss`