Support compressed keys
This commit is contained in:
parent
56acac8cd3
commit
0a9a9b5a57
5 changed files with 31 additions and 13 deletions
|
@ -311,7 +311,7 @@ class EllipticCurveBackend:
|
|||
# To big integer
|
||||
private_key = BN(lib.EC_KEY_get0_private_key(eckey), link_only=True)
|
||||
# To binary
|
||||
private_key_buf = private_key.bytes()
|
||||
private_key_buf = private_key.bytes(self.public_key_length)
|
||||
# Cleanup
|
||||
lib.EC_KEY_free(eckey)
|
||||
return private_key_buf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue