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 Fp2_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 Fp2_model
117 friend std::ostream &operator<<<n, modulus>(
119 friend std::istream &
operator>>
123 template<mp_
size_t n, const big
int<n> &modulus>
127 template<mp_
size_t n, const big
int<n> &modulus>
131 template<mp_
size_t n, const big
int<n> &modulus>
135 template<mp_
size_t n, const big
int<n> &modulus>
140 template<mp_
size_t n, const big
int<n> &modulus>
143 template<mp_
size_t n, const big
int<n> &modulus>
146 template<mp_
size_t n, const big
int<n> &modulus>
149 template<mp_
size_t n, const big
int<n> &modulus>
152 template<mp_
size_t n, const big
int<n> &modulus>
155 template<mp_
size_t n, const big
int<n> &modulus>
static bigint< 2 *n > euler
(modulus^2-1)/2
static Fp2_model< n, modulus > nqr_to_t
nqr^t
Fp2_model operator+(const Fp2_model &other) const
static bigint< 2 *n > t_minus_1_over_2
(t-1)/2
static const Fp2_model< n, modulus > & one()
static size_t size_in_bits()
Fp2_model operator^(const bigint< m > &other) const
static Fp2_model< n, modulus > s_one
Fp2_model(const my_Fp &c0, const my_Fp &c1)
std::istream & operator>>(std::istream &in, alt_bn128_G1 &g)
Fp2_model operator-() const
static constexpr size_t extension_degree()
Fp2_model inverse() const
static Fp2_model< n, modulus > s_zero
static bool s_initialized
static my_Fp Frobenius_coeffs_c1[2]
non_residue^((modulus^i-1)/2) for i=0,1
static Fp2_model< n, modulus > nqr
a quadratic nonresidue in Fp2
bool operator==(const Fp2_model &other) const
static size_t size_in_bits()
static void static_init()
Fp_model< n, modulus > my_Fp
Fp2_model squared_karatsuba() const
Fp2_model squared_complex() const
Fp2_model operator*(const Fp2_model &other) const
std::ostream & operator<<(std::ostream &out, const alt_bn128_G1 &g)
alt_bn128_G1 operator*(const bigint< m > &lhs, const alt_bn128_G1 &rhs)
bool operator!=(const Fp2_model &other) const
Fp2_model squared() const
default is squared_complex
Fp2_model Frobenius_map(unsigned long power) const
FieldT power(const FieldT &base, const bigint< m > &exponent)
Fp2_model sqrt() const
HAS TO BE A SQUARE (else does not terminate)
static Fp2_model< n, modulus > random_element()
static const Fp2_model< n, modulus > & zero()
static const size_t tower_extension_degree
static bigint< n > base_field_char()
static bigint< 2 *n > t
with t odd
static size_t s
modulus^2 = 2^s * t + 1