perf: projective scalar multiplication use dbl() rather than + (#530)

This commit is contained in:
yshekel
2024-06-05 20:35:21 +03:00
committed by GitHub
parent 3a276ef23c
commit 33b1f3c794

View File

@@ -175,7 +175,7 @@ public:
UNROLL
#endif
for (int i = 0; i < SCALAR_FF::NBITS; i++) {
if (i > 0) { res = res + res; }
if (i > 0) { res = dbl(res); }
if (scalar.get_scalar_digit(SCALAR_FF::NBITS - i - 1, 1)) { res = res + point; }
}
return res;