Visible to Intel only — GUID: GUID-522231EA-35D7-4F01-9DD4-56630F0DEC6A
Visible to Intel only — GUID: GUID-522231EA-35D7-4F01-9DD4-56630F0DEC6A
ECCPGenKeyPair
Generates a private key and computes public keys of the elliptic cryptosystem over GF(p).
Syntax
IppStatus ippsECCPGenKeyPair(IppsBigNumState* pPrivate, IppsECCPPointState* pPublic, IppsECCPState* pECC, IppBitSupplier rndFunc, void* pRndParam);
Include Files
ippcp.h
Parameters
pPrivate |
Pointer to the private key privKey. |
pPublic |
Pointer to the public key pubKey. |
pECC |
Pointer to the context of the elliptic cryptosystem. |
rndFunc |
Specified Random Generator. |
pRndParam |
Pointer to the Random Generator context. |
Description
The function generates a private key privKey and computes a public key pubKey of the elliptic cryptosystem over a finite field GF(p). The generation process employs the user specified rndFunc Random Generator.
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 memory size of the parameter privKey pointed by pPrivate must be less than that of the base point which can also be defined by the function ECCPGetOrderBitSize.
The context of the point pubKey as an elliptic curve point must be created by using the functions ECCPPointGetSize and ECCPPointInit.
The elliptic curve domain parameters must be hitherto defined by one of the functions: ECCPSet or ECCPSetStd.
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 contexts pointed by pPrivate, pPublic, or pECC is not valid. |
ippStsSizeErr |
Indicates an error condition if the memory size of the parameter privKey pointed by pPrivate is less than that of the order of the elliptic curve base point. |