Clearmatics Libff
0.1
C++ library for Finite Fields and Elliptic Curves
|
Go to the documentation of this file.
8 #ifndef BLS12_381_G2_HPP_
9 #define BLS12_381_G2_HPP_
18 std::ostream &
operator<<(std::ostream &,
const bls12_381_G2 &);
19 std::istream &
operator>>(std::istream &, bls12_381_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;
105 template<mp_
size_t m>
108 return scalar_mul<bls12_381_G2, m>(rhs, lhs);
111 template<mp_
size_t m, const big
int<m> &modulus_p>
115 return scalar_mul<bls12_381_G2, m>(rhs, lhs.
as_bigint());
120 #endif // BLS12_381_G2_HPP_
static const bls12_381_G2 & one()
static bigint< base_field::num_limbs > base_field_char()
static std::size_t size_in_bits()
bool operator!=(const bls12_381_G2 &other) const
void write_uncompressed(std::ostream &) const
bool is_in_safe_subgroup() const
static bigint< h_limbs > h
static size_t size_in_bits()
static std::vector< std::size_t > wnaf_window_table
std::istream & operator>>(std::istream &in, alt_bn128_G1 &g)
bls12_381_G2 mul_by_cofactor() const
static bls12_381_G2 G2_one
static bls12_381_Fq2 coeff_a
static void batch_to_special_all_non_zeros(std::vector< bls12_381_G2 > &vec)
bls12_381_Fq2 twist_field
static const mp_size_t h_limbs
void print_coordinates() const
bool is_well_formed() const
static const bls12_381_G2 & zero()
bls12_381_Fr scalar_field
static void read_compressed(std::istream &, bls12_381_G2 &)
static bls12_381_G2 random_element()
bls12_381_G2 mul_by_q() const
bool operator==(const bls12_381_G2 &other) const
bls12_381_G2(const bls12_381_Fq2 &X, const bls12_381_Fq2 &Y, const bls12_381_Fq2 &Z)
static bls12_381_G2 G2_zero
static const bigint< n > & field_char()
static const mp_size_t h_bitcount
bigint< n > as_bigint() 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)
bls12_381_G2 add(const bls12_381_G2 &other) const
static void read_uncompressed(std::istream &, bls12_381_G2 &)
static std::vector< std::size_t > fixed_base_exp_window_table
bls12_381_G2 operator+(const bls12_381_G2 &other) const
void write_compressed(std::ostream &) const
static bls12_381_Fq2 coeff_b
bls12_381_G2 operator-() const
static bls12_381_Fq2 mul_by_b(const bls12_381_Fq2 &elt)
void to_affine_coordinates()
static bigint< scalar_field::num_limbs > order()
bls12_381_G2 mixed_add(const bls12_381_G2 &other) const