18template<mp_
size_t n, const big
int<n>& modulus>
21template<mp_
size_t n, const big
int<n>& modulus>
24template<mp_
size_t n, const big
int<n>& modulus>
39template<mp_
size_t n, const big
int<n>& modulus>
46#ifdef PROFILE_OP_COUNTS
47 static long long add_cnt;
48 static long long sub_cnt;
49 static long long mul_cnt;
50 static long long sqr_cnt;
51 static long long inv_cnt;
70 Fp_model(
const long x,
const bool is_unsigned=
false);
111 template<mp_
size_t m>
128#ifdef PROFILE_OP_COUNTS
129template<mp_
size_t n, const big
int<n>& modulus>
132template<mp_
size_t n, const big
int<n>& modulus>
135template<mp_
size_t n, const big
int<n>& modulus>
138template<mp_
size_t n, const big
int<n>& modulus>
141template<mp_
size_t n, const big
int<n>& modulus>
145template<mp_
size_t n, const big
int<n>& modulus>
148template<mp_
size_t n, const big
int<n>& modulus>
151template<mp_
size_t n, const big
int<n>& modulus>
154template<mp_
size_t n, const big
int<n>& modulus>
157template<mp_
size_t n, const big
int<n>& modulus>
160template<mp_
size_t n, const big
int<n>& modulus>
163template<mp_
size_t n, const big
int<n>& modulus>
166template<mp_
size_t n, const big
int<n>& modulus>
169template<mp_
size_t n, const big
int<n>& modulus>
172template<mp_
size_t n, const big
int<n>& modulus>
175template<mp_
size_t n, const big
int<n>& modulus>
178template<mp_
size_t n, const big
int<n>& modulus>
182#include <libff/algebra/fields/fp.tcc>
bool operator!=(const Fp_model &other) const
Fp_model operator-() const
static Fp_model< n, modulus > multiplicative_generator
Fp_model operator*(const Fp_model &other) const
static bigint< n > field_char()
static Fp_model< n, modulus > zero()
Fp_model(const bigint< n > &b)
Fp_model & operator*=(const Fp_model &other)
static Fp_model< n, modulus > one()
unsigned long as_ulong() const
static const mp_size_t num_limbs
Fp_model(const long x, const bool is_unsigned=false)
bool operator==(const Fp_model &other) const
Fp_model & operator-=(const Fp_model &other)
void mul_reduce(const bigint< n > &other)
static bigint< n > t_minus_1_over_2
static Fp_model< n, modulus > root_of_unity
static Fp_model< n, modulus > geometric_generator()
static size_t size_in_bits()
Fp_model operator+(const Fp_model &other) const
static bigint< n > Rcubed
static bool modulus_is_valid()
friend std::ostream & operator(std::ostream &out, const Fp_model< n, modulus > &p)
static Fp_model< n, modulus > nqr_to_t
void set_ulong(const unsigned long x)
Fp_model & operator^=(const bigint< m > &pow)
static Fp_model< n, modulus > nqr
Fp_model operator^(const bigint< m > &pow) const
static bigint< n > Rsquared
static Fp_model< n, modulus > arithmetic_generator()
Fp_model & operator+=(const Fp_model &other)
bigint< n > as_bigint() const
Fp_model operator-(const Fp_model &other) const
static Fp_model< n, modulus > random_element()
Fp_model operator^(const unsigned long pow) const
Fp_model & operator^=(const unsigned long pow)
static const constexpr bigint< n > & mod
std::istream & operator>>(std::istream &in, alt_bn128_G1 &g)
std::ostream & operator<<(std::ostream &out, const alt_bn128_G1 &g)