123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- #ifndef EPID_MEMBER_TINY_MATH_FQ12_H_
- #define EPID_MEMBER_TINY_MATH_FQ12_H_
- #include <stdint.h>
- typedef struct Fq12Elem Fq12Elem;
- typedef struct VeryLargeInt VeryLargeInt;
- void Fq12Add(Fq12Elem* result, Fq12Elem const* left, Fq12Elem const* right);
- void Fq12Sub(Fq12Elem* result, Fq12Elem const* left, Fq12Elem const* right);
- void Fq12Square(Fq12Elem* result, Fq12Elem const* in);
- void Fq12Mul(Fq12Elem* result, Fq12Elem const* left, Fq12Elem const* right);
- void Fq12Inv(Fq12Elem* result, Fq12Elem const* in);
- void Fq12Neg(Fq12Elem* result, Fq12Elem const* in);
- void Fq12Set(Fq12Elem* result, uint32_t val);
- void Fq12Exp(Fq12Elem* result, Fq12Elem const* base, VeryLargeInt const* exp);
- void Fq12MultiExp(Fq12Elem* result, Fq12Elem const* base0,
- VeryLargeInt const* exp0, Fq12Elem const* base1,
- VeryLargeInt const* exp1, Fq12Elem const* base2,
- VeryLargeInt const* exp2, Fq12Elem const* base3,
- VeryLargeInt const* exp3);
- int Fq12Eq(Fq12Elem const* left, Fq12Elem const* right);
- void Fq12Conj(Fq12Elem* result, Fq12Elem const* in);
- void Fq12ExpCyc(Fq12Elem* result, Fq12Elem const* in, VeryLargeInt const* t);
- void Fq12SqCyc(Fq12Elem* result, Fq12Elem const* in);
- void Fq12MulSpecial(Fq12Elem* result, Fq12Elem const* left,
- Fq12Elem const* right);
- void Fq12Cp(Fq12Elem* result, Fq12Elem const* in);
- void Fq12Clear(Fq12Elem* result);
- #endif
|