Definition of Fq2 math. More...
#include <stdint.h>
Functions | |
void | Fq2Cp (Fq2Elem *result, Fq2Elem const *in) |
Copy an element's value. More... | |
void | Fq2Set (Fq2Elem *result, uint32_t in) |
Set an element's value. More... | |
void | Fq2Clear (Fq2Elem *result) |
Clear an element's value. More... | |
void | Fq2Add (Fq2Elem *result, Fq2Elem const *left, Fq2Elem const *right) |
Add two elements of Fq2. More... | |
void | Fq2Exp (Fq2Elem *result, Fq2Elem const *base, VeryLargeInt const *exp) |
Exponentiate an element of Fq2 by a large integer. More... | |
void | Fq2Sub (Fq2Elem *result, Fq2Elem const *left, Fq2Elem const *right) |
Subtract two elements of Fq2. More... | |
void | Fq2Mul (Fq2Elem *result, Fq2Elem const *left, Fq2Elem const *right) |
Multiply two elements of Fq2. More... | |
void | Fq2Inv (Fq2Elem *result, Fq2Elem const *in) |
Invert an element of Fq2. More... | |
void | Fq2Neg (Fq2Elem *result, Fq2Elem const *in) |
Negate an element of Fq2. More... | |
void | Fq2Conj (Fq2Elem *result, Fq2Elem const *in) |
Calculate the conjugate of an element of Fq2. More... | |
void | Fq2Square (Fq2Elem *result, Fq2Elem const *in) |
Square an element of Fq2. More... | |
void | Fq2MulScalar (Fq2Elem *result, Fq2Elem const *left, FqElem const *right) |
Multiply an element of Fq2 by and element of Fq. More... | |
void | Fq2CondSet (Fq2Elem *result, Fq2Elem const *true_val, Fq2Elem const *false_val, int truth_val) |
Conditionally Set an element's value to one of two values. More... | |
int | Fq2Eq (Fq2Elem const *left, Fq2Elem const *right) |
Test if two elements in Fq2 are equal. More... | |
void | Fq2MulXi (Fq2Elem *result, Fq2Elem const *in) |
Multiply an element of Fq2 by xi. More... | |
int | Fq2IsZero (Fq2Elem const *value) |
Test if an element is zero. More... | |
Definition of Fq2 math.
Add two elements of Fq2.
[out] | result | of adding left and right. |
[in] | left | The first operand to be added. |
[in] | right | The second operand to be added. |
void Fq2Clear | ( | Fq2Elem * | result | ) |
Clear an element's value.
[out] | result | element to clear. |
void Fq2CondSet | ( | Fq2Elem * | result, |
Fq2Elem const * | true_val, | ||
Fq2Elem const * | false_val, | ||
int | truth_val | ||
) |
Conditionally Set an element's value to one of two values.
[out] | result | target. |
[in] | true_val | value to set if condition is true. |
[in] | false_val | value to set if condition is false. |
[in] | truth_val | value of condition. |
Calculate the conjugate of an element of Fq2.
[out] | result | the conjugate of the element. |
[in] | in | the element. |
Copy an element's value.
[out] | result | copy target. |
[in] | in | copy source. |
Test if two elements in Fq2 are equal.
[in] | left | The first operand to be tested. |
[in] | right | The second operand to be tested. |
void Fq2Exp | ( | Fq2Elem * | result, |
Fq2Elem const * | base, | ||
VeryLargeInt const * | exp | ||
) |
Exponentiate an element of Fq2 by a large integer.
[out] | result | target. |
[in] | base | the base. |
[in] | exp | the exponent. |
Invert an element of Fq2.
[out] | result | the inverse of the element. |
[in] | in | the element to invert. |
int Fq2IsZero | ( | Fq2Elem const * | value | ) |
Test if an element is zero.
[in] | value | the element to test. |
Multiply two elements of Fq2.
[out] | result | of multiplying left and right. |
[in] | left | The first operand to be multiplied. |
[in] | right | The second operand to be multiplied. |
Multiply an element of Fq2 by and element of Fq.
[out] | result | of multiplying left and right. |
[in] | left | The first operand to be multiplied. |
[in] | right | The second operand to be multiplied. |
Multiply an element of Fq2 by xi.
This function was formerly called as Fq2Const.
[out] | result | of multiplying in by xi. |
[in] | in | The first operand to be multiplied. |
Negate an element of Fq2.
[out] | result | the negative of the element. |
[in] | in | the element to negate. |
void Fq2Set | ( | Fq2Elem * | result, |
uint32_t | in | ||
) |
Set an element's value.
[out] | result | target. |
[in] | in | value to set. |
Square an element of Fq2.
[out] | result | the square of the element. |
[in] | in | the element to square. |