GFpECSignNR
GFpECSignNR
Computes the digital signature over a message digest (the Nyberg-Rueppel scheme).
Syntax
IppStatus ippsGFpECSignNR(const IppsBigNumState*
pMsgDigest
, const IppsBigNumState*
pRegPrivate
, const IppsBigNumState*
pEphPrivate
, IppsBigNumState*
pSignR
, IppsBigNumState*
pSignS
, IppsGFpECState*
pEC
, Ipp8u*
pScratchBuffer
);
Include Files
ippcp.h
Parameters
- pMsgDigest
- Pointer to the message digestmsgto be digitally signed, that is, to be ecrypted with a private key.
- pRegPrivate
- Pointer to the regular private key of the signer.
- pEphPrivate
- Pointer to the ephemeral private key of the signer.
- pSignR
- Pointer to the integerrof the digital signature.
- pSignS
- Pointer to the integersof the digital signature.
- pEC
- Pointer to the context of the elliptic curve.
- pScratchBuffer
- Pointer to the scratch buffer.
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 regular private key
regPrivKey
and the ephemeral private key ephPrivKey
can be generated by the functions GFpECPrivateKey and GFpECPublicKey with only the requirement that the key regPrivKey
be different from the key ephPrivKey
.The elliptic curve domain parameters must be hitherto defined by the functions: GFpECInitStd, GFpECInit, GFpECSet, or GFpECSetSubgroup.
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 any of the contexts pointed bypMsgDigest,pRegPrivate,pEphPrivate,pSignR,pSignS, orpECdoes not match the operation.
- ippStsMessageErr
- Indicates an error condition if the value ofmsgpointed to bypMsgDigestfalls outside the range of [1,n-1] wherenis the order of the elliptic curve base pointG.
- ippStsRangeErr
- Indicates an error condition if any of the parameters pointed to bypSignRorpSignShas a memory size that is less than the ordernof the elliptic curve base pointG.
- ippStsIvalidPrivateKey
- Indicates an error condition if any of the parameters pointed to bypRegPrivateorpEphPrivatehas a memory size that is less than the ordernof the elliptic curve base pointG.
- ippStsNotSupportedModeErr
- Indicates an error condition if the finite field GFp under the elliptic curve is not prime.
- ippStsErr
- Indicates an error condition if the ephemeral private key is bad.