ECCPSignNR
ECCPSignNR
Computes the digital signature over a message digest (the Nyberg-Rueppel scheme).
Syntax
IppStatus ippsECCPSignNR(const IppsBigNumState*
pMsgDigest
, const IppsBigNumState*
pPrivate
, IppsBigNumState*
pSignX
, IppsBigNumState*
pSignY
, IppsECCPState*
pECC
);
Include Files
ippcp.h
Parameters
- pMsgDigest
- Pointer to the message digestmsg.
- pPrivate
- Pointer to the private keyprivKey.
- pSignX
- Pointer to the integerrof the digital signature.
- pSignY
- Pointer to the integersof the digital signature.
- pECC
- Pointer to the context of the elliptic cryptosystem.
Description
The function computes two large numbers
r
and s
which form the digital signature over a message digest msg
.The scheme used to compute the digital signature is an elliptic curve analogue of the El-Gamal Digital Signature scheme with the message recovery (the Nyberg-Rueppel signature scheme). The scheme that the given function uses assumes that the following cryptosystem keys are hitherto set up by the message sender:
- regPrivKey
- Regular private key.
- ephPrivKey
- Ephemeral private key.
- ephPubKey
- Ephemeral public key.
For security reasons, each signature must be generated with the unique ephemeral private key. Because of this, the function clears (sets to zero) the input ephemeral key before return. To generate and set up the keys before sign generation, call the
ECCPGenKeyPair
and ECCPSetKeyPair
functions.The elliptic curve domain parameters must be hitherto defined by one of the functions:
ECCPSet
or ECCPSetStd
.For more information on digital signatures, please refer to the [ANSI] standard.
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 one of the contexts pointed bypMsgDigest,pSignX,pSignY, orECCis not valid.
- ippStsMessageErr
- Indicates an error condition if the value ofmsgpointed bypMsgDigestfalls outside the range of [1,n-1] wherenis the order of the elliptic curve base pointG.
- ippStsRangeErr
- Indicates an error condition if one of the parameters pointed bypSignXorpSignYhas memory size smaller than the ordernof the elliptic curve base pointG.
- ippStsEphemeralKeyErr
- Indicates an error condition if the values of the ephemeral keysephPrivKeyandephPubKeyare not valid (r= 0 is received as a result of the digital signature calculation).
- ippStsInvalidPrivateKey
- Indicates an error condition if the value of the private key does not belong to the [0,n-1] range, wherenis the order of the elliptic curve base pointG.