MCPcopy Create free account
hub / github.com/ElementsProject/elements / has_even_y

Method has_even_y

test/functional/test_framework/key.py:82–84  ·  view source on GitHub ↗

Whether the point p1 has an even Y coordinate when expressed in affine coordinates.

(self, p1)

Source from the content-addressed store, hash-verified

80 return ((inv_2 * x1) % self.p, (inv_3 * y1) % self.p, 1)
81
82 def has_even_y(self, p1):
83 """Whether the point p1 has an even Y coordinate when expressed in affine coordinates."""
84 return not (p1[2] == 0 or self.affine(p1)[1] & 1)
85
86 def negate(self, p1):
87 """Negate a Jacobian point tuple p1."""

Callers 5

compute_xonly_pubkeyFunction · 0.80
tweak_add_privkeyFunction · 0.80
tweak_add_pubkeyFunction · 0.80
verify_schnorrFunction · 0.80
sign_schnorrFunction · 0.80

Calls 1

affineMethod · 0.95

Tested by

no test coverage detected