ID 768738
Date 12/16/2022
Public

## 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 characteristic p of the prime finite field GF(p). pA Pointer to the coefficient A of the equation defining the elliptic curve. pB Pointer to the coefficient B of the equation defining the elliptic curve. pGX Pointer to the x-coordinate of the elliptic curve base point. pGY Pointer to the y-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:

• pPrime sets up the characteristic p of a finite field GF(p) where p is a prime number.

• pA, pB set up the coefficients A and B of the equation defining the elliptic curve:

y2 = x3 + A· x + B (mod p).

• pGX, pGY are pointers to the affine coordinates of the elliptic curve base point G.

• pOrder is a pointer to the order n of the elliptic curve base point G such that n · G = O, where O is the point at infinity and n is a prime number.

• cofactor sets up the ratio h of a general number of points #E on the elliptic curve (including the point at infinity) to the order n of 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 is NULL. ippStsContextMatchErr Indicates an error condition if one of the contexts pointed by pPrime, pA, pB, pGX, pGY, pOrder, and pECC is not valid. ippStsRangeErr Indicates an error condition if of one of the parameters pointed by pPrime, pA, pB, pGX, pGY, and pOrder cannot embed the feBitSize bits length or the value of cofactor is less than 1.