ECCPValidateKeyPair
ECCPValidateKeyPair
Validates private and public keys of the elliptic cryptosystem over GF(p).
Syntax
IppStatus ippsECCPValidateKeyPair(const IppsBigNumState*
pPrivate
, const IppsECCPPointState*
pPublic
, IppECResult*
pResult
, IppsECCPState*
pECC
);
Include Files
ippcp.h
Parameters
- pPrivate
- Pointer to the private keyprivKey.
- pPublic
- Pointer to the public keypubKey.
- pResult
- Pointer to the validation result.
- pECC
- Pointer to the context of the elliptic cryptosystem.
Description
The function validates the private key
privKey
and public key pubKey
of the elliptic cryptosystem over a finite field GF(p
) and allocates the result of the validation in accordance with the pointer pResult
.The private key
privKey
is a number that lies in the range of [1, n
-1] where n
is the order of the elliptic curve base point. The public key pubKey
is an elliptic curve point such that pubKey = privKey
·
G
, where G
is the base point of the elliptic curve. The elliptic curve domain parameters must be hitherto defined by one of the functions:
ECCPSet
or ECCPSetStd
.The result of the cryptosystem keys validation for correctness can take one of the following values:
- ippECValid
- Keys are valid.
- ippECInvalidKeyPair
- Keys are not valid becauseprivKey·G≠pubKey
- ippECInvalidPrivateKey
- KeyprivKeyfalls outside the range of [1,n-1].
- ippECPointIsAtInfinite
- KeypubKeyis the point at infinity.
- ippECInvalidPublicKey
- KeypubKeyis not valid becausen·pubKey≠O, whereOis the point at infinity.
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 bypPrivate,pPublic, orpECCis not valid.