frobeniusMap method

Bls12Fp12 frobeniusMap()

Implementation

Bls12Fp12 frobeniusMap() {
  // Apply Frobenius to both halves
  final c0 = this.c0.frobeniusMap();
  var c1 = this.c1.frobeniusMap();

  // Multiply c1 by (u + 1)^((p - 1) / 6)
  final frobCoeff = Bls12Fp6.fromBls12Fp2(
    Bls12Fp2(
      c0: Bls12Fp([
        BigInt.parse('0x07089552b319d465'),
        BigInt.parse('0xc6695f92b50a8313'),
        BigInt.parse('0x97e83cccd117228f'),
        BigInt.parse('0xa35baecab2dc29ee'),
        BigInt.parse('0x1ce393ea5daace4d'),
        BigInt.parse('0x08f2220fb0fb66eb'),
      ]),
      c1: Bls12Fp([
        BigInt.parse('0xb2f66aad4ce5d646'),
        BigInt.parse('0x5842a06bfc497cec'),
        BigInt.parse('0xcf4895d42599d394'),
        BigInt.parse('0xc11b9cba40a8e8d0'),
        BigInt.parse('0x2e3813cbe5a0de89'),
        BigInt.parse('0x110eefda88847faf'),
      ]),
    ),
  );

  c1 = c1 * frobCoeff;

  return Bls12Fp12(c0: c0, c1: c1);
}