Developer Reference

Contents

ECCPVerifySM2

Verifies authenticity of a digital signature over a message digest using the SM2 scheme.

Syntax

IppStatus ippsECCPVerifySM2(const IppsBigNumState*
pMsgDigest
, const IppsECCPPointState*
pRegPublic
, const IppsBigNumState*
pSignR
, const IppsBigNumState*
pSignS
, IppECResult*
pResult
, IppsECCPState*
pECC
);
Include Files
ippcp.h
Parameters
pMsgDigest
Pointer to the message digest
msg
.
pRegPublic
Pointer to the message sender's regular private key
regPubKey
.
pSignR
Pointer to the integer
r
of the digital signature.
pSignS
Pointer to the integer
s
of 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, represented as integer big numbers
r
and
s
, over a message digest
msg
. The digital signature over the message digest
msg
must be computed using the SM2 scheme [SM2] by to the ECCPSignSM2 function.
The scheme requires the following cryptosystem key set up by the message sender:
regPubKey
Message sender's regular private key.
You can generate and set up the key in a call to the
ECCPGenKeyPair
function.
The result of the digital signature verification can take one of these values:
ippECValid
The digital signature is valid.
ippECInvalidSignature
The digital signature is not valid.
Before calling
ECCPVerifySM2
, set up the domain parameters of the elliptic curve in the
*pECC
context by calling one of the functions:
ECCPSet
or
ECCPSetStdSM2
.
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 one of the specified contexts is not valid.
ippStsMessageErr
Indicates an error condition if the value of
msg
pointed by
pMsgDigest
falls outside the range of [1,
n
-1] where
n
is the order of the elliptic curve base point
G
.
ippStsRangeErr
Indicates an error condition if the value of
pSignR
or
pSignS
is less than 0.

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