elliptic_curve

Module with helper class for elliptic curves.

class EllipticCurve(name: str, order: int, generator: IPoint, point_cls: Type[IPoint], pub_key_cls: Type[IPublicKey], priv_key_cls: Type[IPrivateKey])

Bases: object

Class for a generic elliptic curve. This is not meant to be complete but just the minimum required to abstract the bip module from the specific ECC library.

m_name: str
m_order: int
m_generator: IPoint
m_point_cls: Type[IPoint]
m_pub_key_cls: Type[IPublicKey]
m_priv_key_cls: Type[IPrivateKey]
Name() str

Return the curve name.

Returns:

Curve name

Return type:

str

Order() int

Return the curve order.

Returns:

Curve order

Return type:

int

Generator() IPoint

Get the curve generator point.

Returns:

IPoint object

Return type:

IPoint object

PointClass() Type[IPoint]

Return the point class.

Returns:

Point class

Return type:

IPoint class

PublicKeyClass() Type[IPublicKey]

Return the public key class.

Returns:

Public key class

Return type:

IPublicKey class

PrivateKeyClass() Type[IPrivateKey]

Return the private key class.

Returns:

Private key class

Return type:

IPrivateKey class