secp256k1_keys_ecdsa
Module for secp256k1 keys based on ecdsa library.
- class Secp256k1PublicKeyEcdsa(key_obj: VerifyingKey)
Bases:
IPublicKey
Secp256k1 public key class.
- classmethod FromBytes(key_bytes: bytes) IPublicKey
Construct class from key bytes.
- Parameters:
key_bytes (bytes) – Key bytes
- Returns:
IPublicKey object
- Return type:
- Raises:
ValueError – If key bytes are not valid
- classmethod FromPoint(key_point: IPoint) IPublicKey
Construct class from key point.
- Parameters:
key_point (IPoint object) – Key point
- Returns:
IPublicKey object
- Return type:
- Raises:
ValueError – If key point is not valid
- m_ver_key: VerifyingKey
- static CurveType() EllipticCurveTypes
Get the elliptic curve type.
- Returns:
Elliptic curve type
- Return type:
- static CompressedLength() int
Get the compressed key length.
- Returns:
Compressed key length
- Return type:
int
- static UncompressedLength() int
Get the uncompressed key length.
- Returns:
Uncompressed key length
- Return type:
int
- UnderlyingObject() Any
Get the underlying object.
- Returns:
Underlying object
- Return type:
Any
- RawCompressed() DataBytes
Return raw compressed public key.
- Returns:
DataBytes object
- Return type:
DataBytes object
- class Secp256k1PrivateKeyEcdsa(key_obj: SigningKey)
Bases:
IPrivateKey
Secp256k1 private key class.
- classmethod FromBytes(key_bytes: bytes) IPrivateKey
Construct class from key bytes.
- Parameters:
key_bytes (bytes) – Key bytes
- Returns:
IPrivateKey object
- Return type:
- Raises:
ValueError – If key bytes are not valid
- m_sign_key
alias of
SigningKey
- static CurveType() EllipticCurveTypes
Get the elliptic curve type.
- Returns:
Elliptic curve type
- Return type:
- static Length() int
Get the key length.
- Returns:
Key length
- Return type:
int
- UnderlyingObject() Any
Get the underlying object.
- Returns:
Underlying object
- Return type:
Any
- PublicKey() IPublicKey
Get the public key correspondent to the private one.
- Returns:
IPublicKey object
- Return type:
IPublicKey object