36 assert(
sizeof(mp_limb_t) == 8 ||
sizeof(mp_limb_t) == 4);
40 alt_bn128_modulus_r = bigint_r(
"21888242871839275222246405745257275088548364400416034343698204186575808495617");
42 if (
sizeof(mp_limb_t) == 8)
44 alt_bn128_Fr::Rsquared = bigint_r(
"944936681149208446651664254269745548490766851729442924617792859073125903783");
45 alt_bn128_Fr::Rcubed = bigint_r(
"5866548545943845227489894872040244720403868105578784105281690076696998248512");
48 if (
sizeof(mp_limb_t) == 4)
50 alt_bn128_Fr::Rsquared = bigint_r(
"944936681149208446651664254269745548490766851729442924617792859073125903783");
51 alt_bn128_Fr::Rcubed = bigint_r(
"5866548545943845227489894872040244720403868105578784105281690076696998248512");
55 alt_bn128_Fr::euler = bigint_r(
"10944121435919637611123202872628637544274182200208017171849102093287904247808");
57 alt_bn128_Fr::t = bigint_r(
"81540058820840996586704275553141814055101440848469862132140264610111");
66 alt_bn128_modulus_q = bigint_q(
"21888242871839275222246405745257275088696311157297823662689037894645226208583");
68 if (
sizeof(mp_limb_t) == 8)
70 alt_bn128_Fq::Rsquared = bigint_q(
"3096616502983703923843567936837374451735540968419076528771170197431451843209");
71 alt_bn128_Fq::Rcubed = bigint_q(
"14921786541159648185948152738563080959093619838510245177710943249661917737183");
74 if (
sizeof(mp_limb_t) == 4)
76 alt_bn128_Fq::Rsquared = bigint_q(
"3096616502983703923843567936837374451735540968419076528771170197431451843209");
77 alt_bn128_Fq::Rcubed = bigint_q(
"14921786541159648185948152738563080959093619838510245177710943249661917737183");
81 alt_bn128_Fq::euler = bigint_q(
"10944121435919637611123202872628637544348155578648911831344518947322613104291");
83 alt_bn128_Fq::t = bigint_q(
"10944121435919637611123202872628637544348155578648911831344518947322613104291");
140 alt_bn128_Fq(
"10307601595873709700152284273816112264069230130616436755625194854815875713954"));
142 alt_bn128_Fq(
"3505843767911556378687030309984248845540243509899259641013678093033130930403"));
212 alt_bn128_Fq(
"11559732032986387107991004021392285783925812861821192530917403151452391805634")),
214 alt_bn128_Fq(
"4082367875863433681332203403145435568316851327593401208105741076214120093531")),
274 alt_bn128_final_exponent =
bigint<12*alt_bn128_q_limbs>(
"552484233613224096312617126783173147097382103762957654188882734314196910839907541213974502761540629817009608548654680343627701153829446747810907373256841551006201639677726139946029199968412598804882391702273019083653272047566316584365559776493027495458238373902875937659943504873220554161550525926302303331747463515644711876653177129578303191095900909191624817826566688241804408081892785725967931714097716709526092261278071952560171111444072049229123565057483750161460024353346284167282452756217662335528813519139808291170539072125381230815729071544861602750936964829313608137325426383735122175229541155376346436093930287402089517426973178917569713384748081827255472576937471496195752727188261435633271238710131736096299798168852925540549342330775279877006784354801422249722573783561685179618816480037695005515426162362431072245638324744480");
static Fp2_model< n, modulus > Frobenius_coeffs_c1[12]
static Fp2_model< n, modulus > non_residue
static bigint< 2 *n > t_minus_1_over_2
static Fp2_model< n, modulus > zero()
static Fp2_model< n, modulus > nqr_to_t
Fp2_model inverse() const
static Fp2_model< n, modulus > one()
static my_Fp Frobenius_coeffs_c1[2]
static Fp2_model< n, modulus > nqr
static bigint< 2 *n > euler
static my_Fp2 Frobenius_coeffs_c2[6]
static my_Fp2 Frobenius_coeffs_c1[6]
static my_Fp2 non_residue
static Fp_model< n, modulus > multiplicative_generator
static Fp_model< n, modulus > zero()
static Fp_model< n, modulus > one()
static bigint< n > t_minus_1_over_2
static Fp_model< n, modulus > root_of_unity
static bigint< n > Rcubed
static bool modulus_is_valid()
static Fp_model< n, modulus > nqr_to_t
static Fp_model< n, modulus > nqr
static bigint< n > Rsquared
static std::vector< size_t > wnaf_window_table
static std::vector< size_t > fixed_base_exp_window_table
static alt_bn128_G1 G1_one
static alt_bn128_G1 G1_zero
static std::vector< size_t > wnaf_window_table
static alt_bn128_G2 G2_one
static alt_bn128_G2 G2_zero
static std::vector< size_t > fixed_base_exp_window_table
alt_bn128_Fq2 alt_bn128_twist
bigint< alt_bn128_q_limbs > alt_bn128_final_exponent_z
Fp2_model< alt_bn128_q_limbs, alt_bn128_modulus_q > alt_bn128_Fq2
Fp_model< alt_bn128_q_limbs, alt_bn128_modulus_q > alt_bn128_Fq
alt_bn128_Fq alt_bn128_twist_mul_by_b_c0
alt_bn128_Fq2 alt_bn128_twist_mul_by_q_Y
alt_bn128_Fq alt_bn128_coeff_b
bigint< alt_bn128_q_limbs > alt_bn128_modulus_q
bool alt_bn128_ate_is_loop_count_neg
bigint< alt_bn128_q_limbs > alt_bn128_ate_loop_count
bool alt_bn128_final_exponent_is_z_neg
void init_alt_bn128_params()
alt_bn128_Fq2 alt_bn128_twist_coeff_b
alt_bn128_Fq alt_bn128_twist_mul_by_b_c1
Fp_model< alt_bn128_r_limbs, alt_bn128_modulus_r > alt_bn128_Fr
bigint< alt_bn128_r_limbs > alt_bn128_modulus_r
alt_bn128_Fq2 alt_bn128_twist_mul_by_q_X
bigint< 12 *alt_bn128_q_limbs > alt_bn128_final_exponent