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:
parent
1434c8b49c
commit
4628087b35
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue