Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
fp12_2over3over2.hpp
Go to the documentation of this file.
1
10#ifndef FP12_2OVER3OVER2_HPP_
11#define FP12_2OVER3OVER2_HPP_
12#include <vector>
13
17
18namespace libff {
19
20template<mp_size_t n, const bigint<n>& modulus>
21class Fp12_2over3over2_model;
22
23template<mp_size_t n, const bigint<n>& modulus>
24std::ostream& operator<<(std::ostream &, const Fp12_2over3over2_model<n, modulus> &);
25
26template<mp_size_t n, const bigint<n>& modulus>
27std::istream& operator>>(std::istream &, Fp12_2over3over2_model<n, modulus> &);
28
37template<mp_size_t n, const bigint<n>& modulus>
39public:
43
45 static Fp2_model<n, modulus> Frobenius_coeffs_c1[12]; // non_residue^((modulus^i-1)/6) for i=0,...,11
46
49 Fp12_2over3over2_model(const my_Fp6& c0, const my_Fp6& c1) : c0(c0), c1(c1) {};
50
51 void clear() { c0.clear(); c1.clear(); }
52 void print() const { printf("c0/c1:\n"); c0.print(); c1.print(); }
53
57
58 bool is_zero() const { return c0.is_zero() && c1.is_zero(); }
59 bool operator==(const Fp12_2over3over2_model &other) const;
60 bool operator!=(const Fp12_2over3over2_model &other) const;
61
66 Fp12_2over3over2_model squared() const; // default is squared_complex
73
74 Fp12_2over3over2_model mul_by_024(const my_Fp2 &ell_0, const my_Fp2 &ell_VW, const my_Fp2 &ell_VV) const;
75
76 static my_Fp6 mul_by_non_residue(const my_Fp6 &elt);
77
78 template<mp_size_t m>
80
81 static bigint<n> base_field_char() { return modulus; }
82 static size_t extension_degree() { return 12; }
83
84 friend std::ostream& operator<< <n, modulus>(std::ostream &out, const Fp12_2over3over2_model<n, modulus> &el);
85 friend std::istream& operator>> <n, modulus>(std::istream &in, Fp12_2over3over2_model<n, modulus> &el);
86};
87
88template<mp_size_t n, const bigint<n>& modulus>
89std::ostream& operator<<(std::ostream& out, const std::vector<Fp12_2over3over2_model<n, modulus> > &v);
90
91template<mp_size_t n, const bigint<n>& modulus>
92std::istream& operator>>(std::istream& in, std::vector<Fp12_2over3over2_model<n, modulus> > &v);
93
94template<mp_size_t n, const bigint<n>& modulus>
96
97template<mp_size_t n, const bigint<n>& modulus>
99
100template<mp_size_t n, const bigint<n>& modulus>
102
103template<mp_size_t n, const bigint<n>& modulus, mp_size_t m>
105
106template<mp_size_t n, const bigint<n>& modulus, mp_size_t m, const bigint<m>& exp_modulus>
108
109template<mp_size_t n, const bigint<n>& modulus>
111
112template<mp_size_t n, const bigint<n>& modulus>
114
115} // libff
116#include <libff/algebra/fields/fp12_2over3over2.tcc>
117#endif // FP12_2OVER3OVER2_HPP_
static Fp12_2over3over2_model< n, modulus > random_element()
static Fp2_model< n, modulus > Frobenius_coeffs_c1[12]
static Fp2_model< n, modulus > non_residue
bool operator==(const Fp12_2over3over2_model &other) const
Fp12_2over3over2_model squared_complex() const
bool operator!=(const Fp12_2over3over2_model &other) const
Fp12_2over3over2_model squared_karatsuba() const
static my_Fp6 mul_by_non_residue(const my_Fp6 &elt)
Fp12_2over3over2_model(const my_Fp6 &c0, const my_Fp6 &c1)
static bigint< n > base_field_char()
Fp12_2over3over2_model Frobenius_map(unsigned long power) const
friend std::ostream & operator(std::ostream &out, const Fp12_2over3over2_model< n, modulus > &el)
Fp12_2over3over2_model cyclotomic_exp(const bigint< m > &exponent) const
Fp12_2over3over2_model unitary_inverse() const
Fp12_2over3over2_model operator-() const
Fp6_3over2_model< n, modulus > my_Fp6
Fp12_2over3over2_model inverse() const
Fp12_2over3over2_model squared() const
Fp12_2over3over2_model cyclotomic_squared() const
Fp12_2over3over2_model mul_by_024(const my_Fp2 &ell_0, const my_Fp2 &ell_VW, const my_Fp2 &ell_VV) const
static Fp12_2over3over2_model< n, modulus > zero()
Fp12_2over3over2_model operator+(const Fp12_2over3over2_model &other) const
Fp2_model< n, modulus > my_Fp2
static Fp12_2over3over2_model< n, modulus > one()
Fp12_2over3over2_model operator*(const Fp12_2over3over2_model &other) const
Fp12_2over3over2_model operator-(const Fp12_2over3over2_model &other) const
bn128_GT operator^(const bn128_GT &rhs, const bigint< m > &lhs)
Definition bn128_gt.hpp:44
std::istream & operator>>(std::istream &in, alt_bn128_G1 &g)
std::ostream & operator<<(std::ostream &out, const alt_bn128_G1 &g)
alt_bn128_G1 operator*(const bigint< m > &lhs, const alt_bn128_G1 &rhs)
FieldT power(const FieldT &base, const bigint< m > &exponent)