isOnCurve method

bool isOnCurve()

Checks whether the point satisfies the BLS12-381 curve equation in projective form.

Implementation

bool isOnCurve() {
  if (infinity) return true;
  return (y.square() - (x.square() * x)) == Bls12NativeFp.b();
}