psi method

Implementation

G2NativeProjective psi() {
  // 1 / ((u+1) ^ ((q-1)/3))
  final coeffX = Bls12NativeFp2(
    c0: Bls12NativeFp.zero(),
    c1: Bls12NativeFp.nP(
      BigInt.parse(
        "4002409555221667392624310435006688643935503118305586438271171395842971157480381377015405980053539358417135540939437",
      ),
    ),
  );
  // 1 / ((u+1) ^ (p-1)/2)
  final coeffY = Bls12NativeFp2(
    c0: Bls12NativeFp.nP(
      BigInt.parse(
        "2973677408986561043442465346520108879172042883009249989176415018091420807192182638567116318576472649347015917690530",
      ),
    ),
    c1: Bls12NativeFp.nP(
      BigInt.parse(
        "1028732146235106349975324479215795277384839936929757896155643118032610843298655225875571310552543014690878354869257",
      ),
    ),
  );
  return G2NativeProjective(
    x: x.frobeniusMap() * coeffX,
    y: y.frobeniusMap() * coeffY,
    z: z.frobeniusMap(),
  );
}