Developer Reference

Contents

RSASign_PKCS1v15

Carries out the RSA-SSA signature generation
scheme of
PKCS#1 v1.5
.

Syntax

IppStatus ippsRSASign_PKCS1v15
(
const Ipp8u*
pMsg
, int
msgLen
, Ipp8u*
pSign
, const IppsRSAPrivateKeyState*
pPrivateKey
, const IppsRSAPublicKeyState*
pPublicKeyOpt
, IppHashAlgId
hashAlg
,
Ipp8u*
pBuffer)
;
IppStatus ippsRSASign_PKCS1v15_rmf
(
const Ipp8u*
pMsg
, int
msgLen
, Ipp8u*
pSign
, const IppsRSAPrivateKeyState*
pPrivateKey
, const IppsRSAPublicKeyState*
pPublicKeyOpt
, const IppsHashMethod*
pMethod
,
Ipp8u*
pBuffer)
;
Include Files
ippcp.h
Parameters
pMsg
Pointer to the message to be signed.
msgLen
Length of the message
*pMsg
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 used. 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 computes the message digest specified by the
hashAlg
or
pMethod
parameter and generates the signature according to the RSASSA-PKCS1-v1_5 scheme defined in [PKCS 1.2.1].
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.
The length of the signature being generated equals the length of the RSA modulus, supplied with the
IppsRSAPrivateKeyState
context. Make sure that
pSign
points to a buffer of a sufficient length.
This function has a
reduced memory footprint
version. To learn more, see Reduced Memory Footprint Functions.
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 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.
While you can set up the public key or type 1 private key in a call to
RSA_SetPublicKey
or
RSA_SetPrivateKeyType1
, respectively, you can set up the type 2 private key in a call to either
RSA_SetPrivateKeyType2
or
RSA_GenerateKeys
.
ippStsLengthErr
Indicates an error condition if any input/output length parameters are inconsistent with one another.
ippStsSizeErr
Indicates an error condition if the length of the RSA modulus is too small (see details in [PKCS 1.2.1].
ippStsNotSupportedModeErr
Indicates an error condition if the
hashAlg
parameter does not match any value of
IppHashAlgId
listed in table Supported Hash Algorithms.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804