3110{
3111 assert(Param::siTbl[1] == 1);
3112 size_t idx = 0;
3113
3114 Fp6 d1 = Q1coeff[idx];
3115 Fp6::mulFp6_24_Fp_01(
d1, precP1);
3116 Fp6 d2 = Q2coeff[idx];
3117 Fp6::mulFp6_24_Fp_01(d2, precP2);
3118 idx++;
3119
3121 Fp6 e1 = Q1coeff[idx];
3122 Fp6::mulFp6_24_Fp_01(e1, precP1);
3123 Fp12::Dbl::mul_Fp2_024_Fp2_024(f1,
d1, e1);
3124
3126 Fp6 e2 = Q2coeff[idx];
3127 Fp6::mulFp6_24_Fp_01(e2, precP2);
3128 Fp12::Dbl::mul_Fp2_024_Fp2_024(f2, d2, e2);
3130
3131 idx++;
3133 for (size_t i = 2; i < Param::siTbl.size(); i++) {
3134 l1 = Q1coeff[idx];
3135 l2 = Q2coeff[idx];
3136 idx++;
3138
3139 Fp6::mulFp6_24_Fp_01(l1, precP1);
3140 Fp6::mulFp6_24_Fp_01(l2, precP2);
3141
3142 Fp12::Dbl::mul_Fp2_024_Fp2_024(f1, l1, l2);
3144
3145 if (Param::siTbl[i]) {
3146 l1 = Q1coeff[idx];
3147 l2 = Q2coeff[idx];
3148 idx++;
3149 Fp6::mulFp6_24_Fp_01(l1, precP1);
3150 Fp6::mulFp6_24_Fp_01(l2, precP2);
3151 Fp12::Dbl::mul_Fp2_024_Fp2_024(f1, l1, l2);
3153 }
3154 }
3155
3156#ifndef BN_SUPPORT_SNARK
3157
3158 Fp6::neg(
f.b_,
f.b_);
3159#endif
3160
3162 Fp6::mulFp6_24_Fp_01(
d1, precP1);
3163
3164 d2 = Q2coeff[idx];
3165 Fp6::mulFp6_24_Fp_01(d2, precP2);
3166 idx++;
3167
3168 e1 = Q1coeff[idx];
3169 Fp6::mulFp6_24_Fp_01(e1, precP1);
3170
3171 e2 = Q2coeff[idx];
3172 Fp6::mulFp6_24_Fp_01(e2, precP2);
3173
3174 Fp12::Dbl::mul_Fp2_024_Fp2_024(f1,
d1, e1);
3175 Fp12::Dbl::mul_Fp2_024_Fp2_024(f2, d2, e2);
3178}