multiplyTwo static method
Implementation
static ECPoint? multiplyTwo(ECPoint t, BigInt j, ECPoint x, BigInt k) {
int i = max(j.bitLength, k.bitLength) - 1;
ECPoint? R = t.curve.infinity;
ECPoint? both = t + x;
while (i >= 0) {
bool jBit = testBit(j, i);
bool kBit = testBit(k, i);
R = R!.twice();
if (jBit) {
if (kBit) {
R = R! + both;
} else {
R = R! + t;
}
} else if (kBit) {
R = R! + x;
}
--i;
}
return R;
}