RSASSASign

Carries out the RSA-SSA signature generation scheme.

Syntax

IppStatus ippsRSASSASign(const Ipp8u* pHMsg, int hashLen, const Ipp8u* pSalt, int saltLen, Ipp8u* pSign, IppsRSAState* pCtx, IppHash hushFunc, IppMGF mgfFunc);

Parameters

pHMsg

Pointer to the octet message hash to be signed.

hashLen

Length of the message hash *pHMsg 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.

pCtx

Pointer to the properly initialized IppsRSAState context.

hashFunc

Hash function, which meets the General Definition of a Hash Function.

mgfFunc

MGF, which meets the definition provided in section User's Implementation of a Mask Generation Function.

Description

This function is declared in the ippcp.h file. The function generates the message signature according to the RSASSA-PSS scheme defined in [PKCS 1.2.1]. Intel IPP implementation of the scheme assumes that its first step, that is, computing the hash digest of the original message, is executed prior to the function call and the resulting message hash *pHMsg is passed to the function. The use of a message hash instead of the original message reduces the length of the function input message, limited by the upper bound of the integer data type ((232 - 1) * 8 bit), and thus enables applying the entire RSA-SSA scheme to input messages of greater lengths. To compute the original message hash to be passed to the function, you should use the same hash function as the one specified by the hashFunc parameter and applied in the subsequent steps of the scheme.

The functions specified by the hashFunc and mgfFunc parameters must be based on the same hash algorithm.

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 context parameter does not match the operation.

ippStsInvalidCryptoKeyErr

Indicates an error condition if the RSA context has not been properly set up for the operation.

ippStsLengthErr

Indicates an error condition if the input length parameters do not meet any of the following conditions:

hashLen > 0,

saltLen 0,

N > hashLen + saltLen + 2, where N is the length of the RSA modulus in octets.


Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.