Clearmatics Libff
0.1
C++ library for Finite Fields and Elliptic Curves
|
Go to the documentation of this file.
8 #ifndef ALT_BN128_G2_HPP_
9 #define ALT_BN128_G2_HPP_
18 std::ostream &
operator<<(std::ostream &,
const alt_bn128_G2 &);
19 std::istream &
operator>>(std::istream &, alt_bn128_G2 &);
24 #ifdef PROFILE_OP_COUNTS
25 static long long add_cnt;
26 static long long dbl_cnt;
42 (
h_bitcount + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
102 template<mp_
size_t m>
105 return scalar_mul<alt_bn128_G2, m>(rhs, lhs);
108 template<mp_
size_t m, const big
int<m> &modulus_p>
112 return scalar_mul<alt_bn128_G2, m>(rhs, lhs.
as_bigint());
116 #endif // ALT_BN128_G2_HPP_
static void read_uncompressed(std::istream &, alt_bn128_G2 &)
static void batch_to_special_all_non_zeros(std::vector< alt_bn128_G2 > &vec)
static const alt_bn128_G2 & one()
bool operator==(const alt_bn128_G2 &other) const
alt_bn128_G2 operator+(const alt_bn128_G2 &other) const
static size_t size_in_bits()
std::istream & operator>>(std::istream &in, alt_bn128_G1 &g)
static bigint< h_limbs > h
alt_bn128_G2 mul_by_q() const
static bigint< scalar_field::num_limbs > order()
static size_t size_in_bits()
alt_bn128_G2 operator-() const
alt_bn128_Fr scalar_field
void write_uncompressed(std::ostream &) const
static std::vector< size_t > fixed_base_exp_window_table
alt_bn128_G2 mul_by_cofactor() const
static alt_bn128_G2 G2_zero
static bigint< base_field::num_limbs > base_field_char()
static const mp_size_t h_bitcount
alt_bn128_G2 add(const alt_bn128_G2 &other) const
static alt_bn128_Fq2 coeff_a
alt_bn128_Fq2 twist_field
bool is_well_formed() const
static const bigint< n > & field_char()
bigint< n > as_bigint() const
std::ostream & operator<<(std::ostream &out, const alt_bn128_G1 &g)
void to_affine_coordinates()
alt_bn128_G1 operator*(const bigint< m > &lhs, const alt_bn128_G1 &rhs)
static void read_compressed(std::istream &, alt_bn128_G2 &)
static const alt_bn128_G2 & zero()
static std::vector< size_t > wnaf_window_table
alt_bn128_G2(const alt_bn128_Fq2 &X, const alt_bn128_Fq2 &Y, const alt_bn128_Fq2 &Z)
static alt_bn128_G2 G2_one
bool operator!=(const alt_bn128_G2 &other) const
static alt_bn128_Fq2 coeff_b
static alt_bn128_G2 random_element()
static alt_bn128_Fq2 mul_by_b(const alt_bn128_Fq2 &elt)
void write_compressed(std::ostream &) const
alt_bn128_G2 mixed_add(const alt_bn128_G2 &other) const
void print_coordinates() const
static const mp_size_t h_limbs
bool is_in_safe_subgroup() const