multiplyByPow2 method
Implementation
EdwardsPoint multiplyByPow2(int k) {
if (k <= 0) {
throw const FormatException('exponent must be positive and non-zero');
}
ProjectivePoint s = toProjective();
for (int i = 0; i < k - 1; i++) {
s = s.dbl().toProjective();
}
// Unroll last doubling so we can go directly to extended coordinates.
return s.dbl().toExtended();
}