fp4Square static method

Implementation

static (Bls12NativeFp2, Bls12NativeFp2) fp4Square(
  Bls12NativeFp2 a,
  Bls12NativeFp2 b,
) {
  Bls12NativeFp2 t0 = a.square();
  Bls12NativeFp2 t1 = b.square();
  Bls12NativeFp2 t2 = t1.mulByNonresidue();
  Bls12NativeFp2 c0 = t2 + t0;
  t2 = a + b;
  t2 = t2.square();
  t2 -= t0;
  Bls12NativeFp2 c1 = t2 - t1;

  return (c0, c1);
}