efq2.h File Reference

Definition of EFq2 math. More...

Functions

int EFq2IsInf (EccPointJacobiFq2 const *in)
 Test if a point is infinity. More...
 
void EFq2FromAffine (EccPointJacobiFq2 *result, EccPointFq2 const *in)
 Convert a point from Affine to Jacobi representation. More...
 
int EFq2ToAffine (EccPointFq2 *result, EccPointJacobiFq2 const *in)
 Convert a point from Jacobi to Affine representation. More...
 
void EFq2Dbl (EccPointJacobiFq2 *result, EccPointJacobiFq2 const *in)
 Double a point in EFq2. More...
 
void EFq2Add (EccPointJacobiFq2 *result, EccPointJacobiFq2 const *left, EccPointJacobiFq2 const *right)
 Add two points in EFq2. More...
 
void EFq2Neg (EccPointJacobiFq2 *result, EccPointJacobiFq2 const *in)
 Negate a point on EFq2. More...
 
void EFq2MulSSCM (EccPointJacobiFq2 *result, EccPointJacobiFq2 const *left, FpElem const *right)
 Multiply two points in EFq. More...
 
int EFq2Eq (EccPointJacobiFq2 const *left, EccPointJacobiFq2 const *right)
 Test if two points on EFq2 are equal. More...
 
int EFq2OnCurve (EccPointFq2 const *in)
 Test if a point is in EFq2. More...
 

Detailed Description

Definition of EFq2 math.

Function Documentation

◆ EFq2Add()

void EFq2Add ( EccPointJacobiFq2 result,
EccPointJacobiFq2 const *  left,
EccPointJacobiFq2 const *  right 
)

Add two points in EFq2.

Parameters
[out]resultof adding left and right.
[in]leftThe first operand to be added.
[in]rightThe second operand to be added.

◆ EFq2Dbl()

void EFq2Dbl ( EccPointJacobiFq2 result,
EccPointJacobiFq2 const *  in 
)

Double a point in EFq2.

Parameters
[out]resulttarget.
[in]inthe value to double.

◆ EFq2Eq()

int EFq2Eq ( EccPointJacobiFq2 const *  left,
EccPointJacobiFq2 const *  right 
)

Test if two points on EFq2 are equal.

Parameters
[in]leftThe first operand to be tested.
[in]rightThe second operand to be tested.
Returns
A value different from zero (i.e., true) if indeed the values are equal. Zero (i.e., false) otherwise.

◆ EFq2FromAffine()

void EFq2FromAffine ( EccPointJacobiFq2 result,
EccPointFq2 const *  in 
)

Convert a point from Affine to Jacobi representation.

Parameters
[out]resulttarget.
[in]invalue to set.

◆ EFq2IsInf()

int EFq2IsInf ( EccPointJacobiFq2 const *  in)

Test if a point is infinity.

Parameters
[in]inthe point to test.
Returns
A value different from zero (i.e., true) indeed the value is infinity. Zero (i.e., false) otherwise.

◆ EFq2MulSSCM()

void EFq2MulSSCM ( EccPointJacobiFq2 result,
EccPointJacobiFq2 const *  left,
FpElem const *  right 
)

Multiply two points in EFq.

This function is mitigated against software side-channel attacks.

Parameters
[out]resultof multiplying left and right.
[in]leftThe first operand to be multiplied.
[in]rightThe second operand to be multiplied.

◆ EFq2Neg()

void EFq2Neg ( EccPointJacobiFq2 result,
EccPointJacobiFq2 const *  in 
)

Negate a point on EFq2.

Parameters
[out]resultthe negative of the element.
[in]inthe element to negate.

◆ EFq2OnCurve()

int EFq2OnCurve ( EccPointFq2 const *  in)

Test if a point is in EFq2.

Parameters
[in]inthe point to test.
Returns
A value different from zero (i.e., true) indeed the point is on the curve. Zero (i.e., false) otherwise.

◆ EFq2ToAffine()

int EFq2ToAffine ( EccPointFq2 result,
EccPointJacobiFq2 const *  in 
)

Convert a point from Jacobi to Affine representation.

Parameters
[out]resulttarget.
[in]invalue to set.
Returns
1 on success, 0 on failure