containsPoint method

bool containsPoint(
  1. BigInt x,
  2. BigInt y
)

Check if a given point (x, y) lies on the curve

Implementation

bool containsPoint(BigInt x, BigInt y) {
  BigInt leftSide = (y * y - ((x * x + a) * x + b)) % p;

  return leftSide == BigInt.zero;
}