test/functional/test_framework/key.py
def affine(self, p1):
        """Convert a Jacobian point tuple p1 to affine form, or None if at infinity."""
        x1, y1, z1 = p1
        if z1 == 0:
            return None
        inv = modinv(z1, self.p)
        inv_2 = (inv**2) % self.p
        inv_3 = (inv_2 * inv) % self.p
        return ((inv_2 * x1) % self.p, (inv_3 * y1) % self.p, 1)
Convert a Jacobian point tuple p1 to affine form, or None if at infinity.
Convert a Jacobian point tuple p1 to affine form, or None if at infinity.
Convert a Jacobian point tuple p1 to affine form or None if at infinity .
def affine(self, p1):
        x1, y1, z1 = p1
        if z1 == 0:
            return None
        inv = modinv(z1, self.p)
        inv_2 = (inv**2) % self.p
        inv_3 = (inv_2 * inv) % self.p
        return ((inv_2 * x1) % self.p, (inv_3 * y1) % self.p, 1)
def affine ( self , p1 ) : x1 , y1 , z1 = p1 if z1 == 0 : return None inv = modinv ( z1 , self . p ) inv_2 = ( inv ** 2 ) % self . p inv_3 = ( inv_2 * inv ) % self . p return ( ( inv_2 * x1 ) % self . p , ( inv_3 * y1 ) % self . p , 1 )
Convert a Jacobian point tuple p1 to affine form, or None if at infinity.
Convert a Jacobian point tuple p1 to affine form or None if at infinity .
"""Convert a Jacobian point tuple p1 to affine form, or None if at infinity."""
self
p1