20 return (this->
PX == other.
PX &&
21 this->PY == other.PY);
43 this->ell_VW == other.ell_VW &&
44 this->ell_VV == other.ell_VV);
66 return (this->
QX == other.
QX &&
67 this->QY == other.QY &&
68 this->coeffs == other.coeffs);
74 out << prec_Q.
coeffs.size() <<
"\n";
97 for (
size_t i = 0; i <
s; ++i)
102 prec_Q.
coeffs.emplace_back(c);
112 enter_block(
"Call to alt_bn128_final_exponentiation_first_chunk");
132 leave_block(
"Call to alt_bn128_final_exponentiation_first_chunk");
144 result = result.unitary_inverse();
154 enter_block(
"Call to alt_bn128_final_exponentiation_last_chunk");
221 leave_block(
"Call to alt_bn128_final_exponentiation_last_chunk");
228 enter_block(
"Call to alt_bn128_final_exponentiation");
235 leave_block(
"Call to alt_bn128_final_exponentiation");
259 current.X =
A * (
B-F);
260 current.Y = G.
squared() - (E_squared+E_squared+E_squared);
271 const alt_bn128_Fq2 X1 = current.X, Y1 = current.Y, Z1 = current.Z;
283 current.Y = E * (I-J)-(H * Y1);
292 enter_block(
"Call to alt_bn128_ate_precompute_G1");
301 leave_block(
"Call to alt_bn128_ate_precompute_G1");
307 enter_block(
"Call to alt_bn128_ate_precompute_G2");
324 bool found_one =
false;
327 for (
long i = loop_count.
max_bits(); i >= 0; --i)
338 result.coeffs.push_back(c);
343 result.coeffs.push_back(c);
359 result.coeffs.push_back(c);
362 result.coeffs.push_back(c);
364 leave_block(
"Call to alt_bn128_ate_precompute_G2");
375 bool found_one =
false;
381 for (
long i = loop_count.
max_bits(); i >= 0; --i)
427 enter_block(
"Call to alt_bn128_ate_double_miller_loop");
431 bool found_one =
false;
435 for (
long i = loop_count.
max_bits(); i >= 0; --i)
486 leave_block(
"Call to alt_bn128_ate_double_miller_loop");
503 enter_block(
"Call to alt_bn128_ate_reduced_pairing");
506 leave_block(
"Call to alt_bn128_ate_reduced_pairing");
Fp12_2over3over2_model Frobenius_map(unsigned long power) const
Fp12_2over3over2_model cyclotomic_exp(const bigint< m > &exponent) const
Fp12_2over3over2_model unitary_inverse() const
Fp12_2over3over2_model inverse() const
Fp12_2over3over2_model cyclotomic_squared() const
static Fp12_2over3over2_model< n, modulus > one()
static Fp2_model< n, modulus > one()
Fp2_model squared() const
void to_affine_coordinates()
void to_affine_coordinates()
alt_bn128_G2 mul_by_q() const
bool test_bit(const std::size_t bitno) const
#define D(var, file, col, who, lev,...)
alt_bn128_Fq12 alt_bn128_pairing(const alt_bn128_G1 &P, const alt_bn128_G2 &Q)
alt_bn128_Fq2 alt_bn128_twist
void consume_OUTPUT_NEWLINE(std::istream &in)
alt_bn128_Fq12 alt_bn128_final_exponentiation_last_chunk(const alt_bn128_Fq12 &elt)
std::istream & operator>>(std::istream &in, alt_bn128_G1 &g)
alt_bn128_GT alt_bn128_reduced_pairing(const alt_bn128_G1 &P, const alt_bn128_G2 &Q)
bigint< alt_bn128_q_limbs > alt_bn128_final_exponent_z
void consume_OUTPUT_SEPARATOR(std::istream &in)
Fp_model< alt_bn128_q_limbs, alt_bn128_modulus_q > alt_bn128_Fq
alt_bn128_GT alt_bn128_ate_reduced_pairing(const alt_bn128_G1 &P, const alt_bn128_G2 &Q)
alt_bn128_Fq12 alt_bn128_miller_loop(const alt_bn128_G1_precomp &prec_P, const alt_bn128_G2_precomp &prec_Q)
alt_bn128_ate_G2_precomp alt_bn128_ate_precompute_G2(const alt_bn128_G2 &Q)
bool alt_bn128_ate_is_loop_count_neg
std::ostream & operator<<(std::ostream &out, const alt_bn128_G1 &g)
void enter_block(const std::string &msg, const bool indent)
bigint< alt_bn128_q_limbs > alt_bn128_ate_loop_count
alt_bn128_G2_precomp alt_bn128_precompute_G2(const alt_bn128_G2 &Q)
void doubling_step_for_flipped_miller_loop(const alt_bn128_Fq two_inv, alt_bn128_G2 ¤t, alt_bn128_ate_ell_coeffs &c)
bool alt_bn128_final_exponent_is_z_neg
alt_bn128_Fq12 alt_bn128_exp_by_neg_z(const alt_bn128_Fq12 &elt)
alt_bn128_G1_precomp alt_bn128_precompute_G1(const alt_bn128_G1 &P)
Fp12_2over3over2_model< alt_bn128_q_limbs, alt_bn128_modulus_q > alt_bn128_Fq12
alt_bn128_Fq12 alt_bn128_final_exponentiation_first_chunk(const alt_bn128_Fq12 &elt)
alt_bn128_Fq12 alt_bn128_double_miller_loop(const alt_bn128_G1_precomp &prec_P1, const alt_bn128_G2_precomp &prec_Q1, const alt_bn128_G1_precomp &prec_P2, const alt_bn128_G2_precomp &prec_Q2)
alt_bn128_ate_G1_precomp alt_bn128_ate_precompute_G1(const alt_bn128_G1 &P)
alt_bn128_Fq12 alt_bn128_ate_miller_loop(const alt_bn128_ate_G1_precomp &prec_P, const alt_bn128_ate_G2_precomp &prec_Q)
alt_bn128_Fq2 alt_bn128_twist_coeff_b
void leave_block(const std::string &msg, const bool indent)
alt_bn128_GT alt_bn128_final_exponentiation(const alt_bn128_Fq12 &elt)
void consume_newline(std::istream &in)
alt_bn128_Fq12 alt_bn128_ate_pairing(const alt_bn128_G1 &P, const alt_bn128_G2 &Q)
void mixed_addition_step_for_flipped_miller_loop(const alt_bn128_G2 base, alt_bn128_G2 ¤t, alt_bn128_ate_ell_coeffs &c)
alt_bn128_Fq12 alt_bn128_ate_double_miller_loop(const alt_bn128_ate_G1_precomp &prec_P1, const alt_bn128_ate_G2_precomp &prec_Q1, const alt_bn128_ate_G1_precomp &prec_P2, const alt_bn128_ate_G2_precomp &prec_Q2)
#define T(meth, val, expected)
bool operator==(const alt_bn128_ate_G1_precomp &other) const
std::vector< alt_bn128_ate_ell_coeffs > coeffs
bool operator==(const alt_bn128_ate_G2_precomp &other) const
bool operator==(const alt_bn128_ate_ell_coeffs &other) const