frobeniusMap method

Bls12NativeFp12 frobeniusMap()

Implementation

Bls12NativeFp12 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 = Bls12NativeFp6.fromFp2(
    Bls12NativeFp2(
      c0: Bls12NativeFp.nP(
        BigInt.parse(
          "3850754370037169011952147076051364057158807420970682438676050522613628423219637725072182697113062777891589506424760",
        ),
      ),
      c1: Bls12NativeFp.nP(
        BigInt.parse(
          "151655185184498381465642749684540099398075398968325446656007613510403227271200139370504932015952886146304766135027",
        ),
      ),
    ),
  );

  c1 = c1 * frobCoeff;

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