ECCPVerifyDSA
ECCPVerifyDSA
Verifies authenticity of the digital signature over a message digest (ECDSA).
Syntax
IppStatus ippsECCPVerifyDSA(const IppsBigNumState*
pMsgDigest
, const IppsBigNumState*
pSignX
, const IppsBigNumState*
pSignY
, IppECResult*
pResult
, IppsECCPState*
pECC
);
Include Files
ippcp.h
Parameters
- pMsgDigest
- Pointer to the message digestmsg.
- pSignX
- Pointer to the integerrof the digital signature.
- pSignY
- Pointer to the integersof the digital signature.
- pResult
- Pointer to the digital signature verification result.
- pECC
- Pointer to the context of the elliptic cryptosystem.
Description
The function verifies authenticity of the digital signature over a message digest
msg
. The signature consists of two large integers: r
and s
. The scheme used to verify the signature is an elliptic curve analogue of the DSA scheme and assumes that the following cryptosystem key be hitherto set:
- regPubKey
- Message sender's regular public key.
The
regPubKey
is set by the function ECCPSetKeyPair
. The result of the digital signature verification can take one of two possible values:
- ippECValid
- Digital signature is valid.
- ippECInvalidSignature
- Digital signature is not valid.
The call to the
ECCPVerifyDSA
function must be preceded by the call to the ECCPSignDSA
function which computes the digital signature over the message digest msg
and represents the signature with two numbers: r
and s
.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 the value ofpSignXorpSignYis less than 0.