Clearmatics Libff
0.1
C++ library for Finite Fields and Elliptic Curves
|
Go to the documentation of this file.
18 template<mp_
size_t n, const big
int<n> &modulus>
class Fp3_model;
20 template<mp_
size_t n, const big
int<n> &modulus>
23 template<mp_
size_t n, const big
int<n> &modulus>
32 template<mp_
size_t n, const big
int<n> &modulus>
class Fp3_model
79 printf(
"c0/c1/c2:\n");
113 friend std::ostream &operator<<<n, modulus>(
115 friend std::istream &
operator>>
119 template<mp_
size_t n, const big
int<n> &modulus>
121 std::ostream &out,
const std::vector<Fp3_model<n, modulus>> &v);
123 template<mp_
size_t n, const big
int<n> &modulus>
125 std::istream &in, std::vector<Fp3_model<n, modulus>> &v);
127 template<mp_
size_t n, const big
int<n> &modulus>
129 const Fp_model<n, modulus> &lhs,
const Fp3_model<n, modulus> &rhs);
131 template<mp_
size_t n, const big
int<n> &modulus>
136 template<mp_
size_t n, const big
int<n> &modulus>
139 template<mp_
size_t n, const big
int<n> &modulus>
142 template<mp_
size_t n, const big
int<n> &modulus>
145 template<mp_
size_t n, const big
int<n> &modulus>
148 template<mp_
size_t n, const big
int<n> &modulus>
151 template<mp_
size_t n, const big
int<n> &modulus>
154 template<mp_
size_t n, const big
int<n> &modulus>
static Fp3_model< n, modulus > nqr_to_t
nqr^t
Fp3_model Frobenius_map(unsigned long power) const
static my_Fp Frobenius_coeffs_c1[3]
non_residue^((modulus^i-1)/3) for i=0,1,2
bool operator!=(const Fp3_model &other) const
static bigint< n > base_field_char()
static bigint< 3 *n > euler
(modulus^3-1)/2
Fp_model< n, modulus > my_Fp
static size_t s
modulus^3 = 2^s * t + 1
static Fp3_model< n, modulus > one()
static bigint< 3 *n > t_minus_1_over_2
(t-1)/2
std::istream & operator>>(std::istream &in, alt_bn128_G1 &g)
Fp3_model operator^(const bigint< m > &other) const
static constexpr size_t extension_degree()
Fp3_model(const my_Fp &c0, const my_Fp &c1, const my_Fp &c2)
static size_t size_in_bits()
static my_Fp Frobenius_coeffs_c2[3]
non_residue^((2*modulus^i-2)/3) for i=0,1,2
static const size_t tower_extension_degree
bool operator==(const Fp3_model &other) const
static Fp3_model< n, modulus > nqr
a quadratic nonresidue in Fp3
std::ostream & operator<<(std::ostream &out, const alt_bn128_G1 &g)
Fp3_model inverse() const
Fp3_model sqrt() const
HAS TO BE A SQUARE (else does not terminate)
Fp3_model operator-() const
alt_bn128_G1 operator*(const bigint< m > &lhs, const alt_bn128_G1 &rhs)
static size_t size_in_bits()
FieldT power(const FieldT &base, const bigint< m > &exponent)
Fp3_model operator*(const Fp3_model &other) const
Fp3_model squared() const
static Fp3_model< n, modulus > zero()
Fp3_model operator+(const Fp3_model &other) const
static bigint< 3 *n > t
with t odd
static Fp3_model< n, modulus > random_element()