cyclotomicExp static method
Implementation
static Bls12NativeFp12 cyclotomicExp(Bls12NativeFp12 f) {
var tmp = Bls12NativeFp12.one();
bool foundOne = false;
final blsX = Bls12PairingUtils.blsX;
for (int b = 63; b >= 0; b--) {
bool bit = ((blsX >> b) & BigInt.one) == BigInt.one;
if (foundOne) {
tmp = cyclotomicSquare(tmp);
} else {
foundOne = bit;
}
if (bit) {
tmp *= f;
}
}
return tmp.conjugate();
}