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 = (a * x * x + y * y - BigInt.one - d * x * x * y * y) % p;
  return leftSide == BigInt.zero;
}