GFpECSetSubgroup
GFpECSetSubgroup
Sets up the parameters defining an elliptic curve points subgroup.
Syntax
IppStatus ippsGFpECSetSubGroup(const IppsGFpElement*
pX
, const IppsGFpElement*
pY
, const IppsBigNumState*
pOrder
, const IppsBigNumState*
pCofactor
, IppsGFpECState*
pEC
);
Include Files
ippcp.h
Parameters
- pX,pY
- Pointers to theXandYcoordinates of the base point of the elliptic curve.
- pOrder
- Pointer to the big number context storing the order of the base point.
- pCofactor
- Pointer to the big number context storing the cofactor.
- pEC
- Pointer to the context of the elliptic curve.
Description
This function sets up an elliptic curve as the subgroup generated by the base point over the finite field.
Only the
pEC
parameter is required. You can omit the other parameters by setting their values to NULL
or zero.Return Values
- ippStsNoErr
- Indicates no error. Any other value indicates an error or warning.
- ippStsNullPtrErr
- Indicates an error condition ifpECisNULL.
- ippStsContextMatchErr
- Indicates an error condition in the following cases:
- IppsGFpECStatecontext parameter does not match the operation.
- Any of the pointers to elliptic curve parameters is not zero and the context parameter does not match the operation.
- ippStsBadArgErr
- Indicates an error condition if any of the specifiedIppsBigNumStatecontexts defines zero or a negative number.
- ippStsOutOfRangeErr
- Indicates an error if the base point coordinates (pX,pY) do not belong to the finite field over which the elliptic curve is initialized.
- ippStsRangeErr
- Indicates an error condition in the following cases:
- The size of the base point order exceeds the maximal size of the order for the given curve.
- The bit size of the cofactor exceeds the bit size of the element of the finite field over which the elliptic curve is initialized.