secp256k1GeEqVar static method

int secp256k1GeEqVar(
  1. Secp256k1Ge a,
  2. Secp256k1Ge b
)

Implementation

static int secp256k1GeEqVar(Secp256k1Ge a, Secp256k1Ge b) {
  Secp256k1Fe tmp = Secp256k1Fe();
  if (a.infinity != b.infinity) return 0;
  if (a.infinity.toBool) return 1;

  tmp = a.x.clone();
  secp256k1FeNormalizeWeak(tmp);
  if (!secp256k1FeEqual(tmp, b.x).toBool) return 0;

  tmp = a.y.clone();
  secp256k1FeNormalizeWeak(tmp);
  if (!secp256k1FeEqual(tmp, b.y).toBool) return 0;

  return 1;
}