ECCPSet
ECCPSet
Sets up elliptic curve domain parameters over GF(p).
Syntax
IppStatus ippsECCPSet(const IppsBigNumState*
pPrime
, const IppsBigNumState*
pA
, const IppsBigNumState*
pB
, const IppsBigNumState*
pGX
, const IppsBigNumState*
pGY
, const IppsBigNumState*
pOrder
, int
cofactor
, IppsECCPState*
pECC
);
Include Files
ippcp.h
Parameters
- pPrime
- Pointer to the characteristicpof the prime finite field GF(p).
- pA
- Pointer to the coefficientAof the equation defining the elliptic curve.
- pB
- Pointer to the coefficientBof the equation defining the elliptic curve.
- pGX
- Pointer to thex-coordinate of the elliptic curve base point.
- pGY
- Pointer to they-coordinate of the elliptic curve base point.
- pOrder
- Pointer to the order of the elliptic curve base point.
- cofactor
- Cofactor.
- pECC
- Pointer to the context of the cryptosystem.
Description
The function sets up the elliptic curve domain parameters over a prime finite field GF(
p
). These are as follows:- pPrimesets up the characteristicpof a finite field GF(p) wherepis a prime number.
- pA,pBset up the coefficientsAandBof the equation defining the elliptic curve:y2=x3+A·x+B(modp).
- pGX,pGYare pointers to the affine coordinates of the elliptic curve base pointG.
- pOrderis a pointer to the ordernof the elliptic curve base pointGsuch thatn·G = O, whereOis the point at infinity andnis a prime number.
- cofactorsets up the ratiohof a general number of points #E on the elliptic curve (including the point at infinity) to the ordernof the base point:h= #E/n.
The domain parameters are set in the cryptosystem context which must be already created by the
ECCPGetSize
and ECCPInit
functions.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 bypPrime,pA,pB,pGX,pGY,pOrder, andpECCis not valid.
- ippStsRangeErr
- Indicates an error condition if of one of the parameters pointed bypPrime,pA,pB,pGX,pGY, andpOrdercannot embed thefeBitSizebits length or the value ofcofactoris less than 1.