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