fq6.h File Reference

Definition of Fq6 math. More...

#include <stdint.h>

Functions

void Fq6Add (Fq6Elem *result, Fq6Elem const *left, Fq6Elem const *right)
 Add two elements of Fq6. More...
 
void Fq6Sub (Fq6Elem *result, Fq6Elem const *left, Fq6Elem const *right)
 Subtract two elements of Fq6. More...
 
void Fq6Mul (Fq6Elem *result, Fq6Elem const *left, Fq6Elem const *right)
 Multiply two elements of Fq6. More...
 
void Fq6Inv (Fq6Elem *result, Fq6Elem const *in)
 Invert an element of Fq6. More...
 
void Fq6Neg (Fq6Elem *result, Fq6Elem const *in)
 Negate an element of Fq6. More...
 
void Fq6Clear (Fq6Elem *result)
 Clear an element's value. More...
 
void Fq6MulScalar (Fq6Elem *result, Fq6Elem const *in, Fq2Elem const *scalar)
 Multiply an element of Fq6 by and element of Fq2. More...
 
void Fq6MulV (Fq6Elem *result, Fq6Elem const *in)
 Multiply an element of Fq6 by V. More...
 
int Fq6Eq (Fq6Elem const *left, Fq6Elem const *right)
 Test if two elements in Fq6 are equal. More...
 
int Fq6IsZero (Fq6Elem const *in)
 Test if an element is zero. More...
 
void Fq6Square (Fq6Elem *result, Fq6Elem const *in)
 Square an element of Fq6. More...
 
void Fq6Cp (Fq6Elem *result, Fq6Elem const *in)
 Copy an element's value. More...
 
void Fq6CondSet (Fq6Elem *result, Fq6Elem const *true_val, Fq6Elem const *false_val, int truth_val)
 Conditionally Set an element's value to one of two values. More...
 
void Fq6Set (Fq6Elem *result, uint32_t in)
 Set an element's value. More...
 

Detailed Description

Definition of Fq6 math.

Function Documentation

◆ Fq6Add()

void Fq6Add ( Fq6Elem result,
Fq6Elem const *  left,
Fq6Elem const *  right 
)

Add two elements of Fq6.

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

◆ Fq6Clear()

void Fq6Clear ( Fq6Elem result)

Clear an element's value.

Parameters
[out]resultelement to clear.

◆ Fq6CondSet()

void Fq6CondSet ( Fq6Elem result,
Fq6Elem const *  true_val,
Fq6Elem const *  false_val,
int  truth_val 
)

Conditionally Set an element's value to one of two values.

Parameters
[out]resulttarget.
[in]true_valvalue to set if condition is true.
[in]false_valvalue to set if condition is false.
[in]truth_valvalue of condition.

◆ Fq6Cp()

void Fq6Cp ( Fq6Elem result,
Fq6Elem const *  in 
)

Copy an element's value.

Parameters
[out]resultcopy target.
[in]incopy source.

◆ Fq6Eq()

int Fq6Eq ( Fq6Elem const *  left,
Fq6Elem const *  right 
)

Test if two elements in Fq6 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.

◆ Fq6Inv()

void Fq6Inv ( Fq6Elem result,
Fq6Elem const *  in 
)

Invert an element of Fq6.

Parameters
[out]resultthe inverse of the element.
[in]inthe element to invert.

◆ Fq6IsZero()

int Fq6IsZero ( Fq6Elem const *  in)

Test if an element is zero.

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

◆ Fq6Mul()

void Fq6Mul ( Fq6Elem result,
Fq6Elem const *  left,
Fq6Elem const *  right 
)

Multiply two elements of Fq6.

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

◆ Fq6MulScalar()

void Fq6MulScalar ( Fq6Elem result,
Fq6Elem const *  in,
Fq2Elem const *  scalar 
)

Multiply an element of Fq6 by and element of Fq2.

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

◆ Fq6MulV()

void Fq6MulV ( Fq6Elem result,
Fq6Elem const *  in 
)

Multiply an element of Fq6 by V.

This function was formerly called as Fq2Const.

Parameters
[out]resultof multiplying in and V.
[in]inThe first operand to be multiplied.

◆ Fq6Neg()

void Fq6Neg ( Fq6Elem result,
Fq6Elem const *  in 
)

Negate an element of Fq6.

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

◆ Fq6Set()

void Fq6Set ( Fq6Elem result,
uint32_t  in 
)

Set an element's value.

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

◆ Fq6Square()

void Fq6Square ( Fq6Elem result,
Fq6Elem const *  in 
)

Square an element of Fq6.

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

◆ Fq6Sub()

void Fq6Sub ( Fq6Elem result,
Fq6Elem const *  left,
Fq6Elem const *  right 
)

Subtract two elements of Fq6.

Parameters
[out]resultof subtracting left from right.
[in]leftThe operand to be subtracted from.
[in]rightThe operand to subtract.