1
0
Fork 0
mirror of https://github.com/bitcoin/bips.git synced 2025-03-03 18:57:18 +01:00

Update secp256k1.py

This commit is contained in:
VolodymyrBg 2025-03-02 17:18:54 +02:00 committed by GitHub
parent 1434c8b49c
commit 4628087b35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -240,6 +240,10 @@ class GE:
return self
return GE(self.x, -self.y)
def __sub__(self, a):
"""Subtract a group element from another."""
return self + (-a)
def to_bytes_compressed(self):
"""Convert a non-infinite group element to 33-byte compressed encoding."""
assert not self.infinity