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

Method negate

test/functional/test_framework/key.py:86–89  ·  view source on GitHub ↗

Negate a Jacobian point tuple p1.

(self, p1)

Source from the content-addressed store, hash-verified

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."""
88 x1, y1, z1 = p1
89 return (x1, (self.p - y1) % self.p, z1)
90
91 def on_curve(self, p1):
92 """Determine whether a Jacobian tuple p is on the curve (and not infinity)"""

Callers 1

setMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected