2721{
2731 if (Param::useNAF) {
2732 Qneg[0] = Q[0];
2733 Fp2::neg(Qneg[1], Q[1]);
2734 }
2735
2737 Fp6::pointDblLineEval(d,
T,
P);
2738 Fp6 e;
2739 assert(Param::siTbl[1] == 1);
2740 Fp6::pointAddLineEval(e,
T, Q,
P);
2741 Fp12::Dbl::mul_Fp2_024_Fp2_024(
f, d, e);
2742
2744
2745 for (size_t i = 2; i < Param::siTbl.size(); i++) {
2746
2747 Fp6::pointDblLineEval(
l,
T,
P);
2748
2750
2751 Fp12::Dbl::mul_Fp2_024(
f,
l);
2752
2753 if (Param::siTbl[i] > 0) {
2754
2755
2756 Fp6::pointAddLineEval(
l,
T, Q,
P);
2757 Fp12::Dbl::mul_Fp2_024(
f,
l);
2758 }
2759 else if (Param::siTbl[i] < 0) {
2760 Fp6::pointAddLineEval(
l,
T, Qneg,
P);
2761 Fp12::Dbl::mul_Fp2_024(
f,
l);
2762 }
2763 }
2764
2765
2767 ecop::FrobEndOnTwist_1(Q1, Q);
2769#ifdef BN_SUPPORT_SNARK
2770 ecop::FrobEndOnTwist_2(Q2, Q);
2771 Fp2::neg(Q2[1], Q2[1]);
2772#else
2773 ecop::FrobEndOnTwist_8(Q2, Q);
2774
2775 Fp6::neg(
f.b_,
f.b_);
2776 Fp2::neg(
T[1],
T[1]);
2777#endif
2779 Fp6::pointAddLineEval(d,
T, Q1,
P);
2780 Fp6::pointAddLineEval(e,
T, Q2,
P);
2781 Fp12::Dbl::mul_Fp2_024_Fp2_024(ft, d, e);
2783
2785}
void mul(const Fp12 &rhs)
#define T(meth, val, expected)