ed25519_point

Module for ed25519 point.

class Ed25519PointConst

Bases: object

Class container for ed25519 point constants.

POINT_COORD_BYTE_LEN: int = 32
class Ed25519Point(point_bytes: bytes)

Bases: IPoint

Ed25519 point class.

classmethod FromBytes(point_bytes: bytes) IPoint

Construct class from point bytes.

Parameters:

point_bytes (bytes) – Point bytes

Returns:

IPoint object

Return type:

IPoint

classmethod FromCoordinates(x: int, y: int) IPoint

Construct class from point coordinates.

Parameters:
  • x (int) – X coordinate of the point

  • y (int) – Y coordinate of the point

Returns:

IPoint object

Return type:

IPoint

m_enc_bytes: bytes
m_is_generator: bool
m_x: Optional[int]
m_y: Optional[int]
static CurveType() EllipticCurveTypes

Get the elliptic curve type.

Returns:

Elliptic curve type

Return type:

EllipticCurveTypes

static CoordinateLength() int

Get the coordinate length.

Returns:

Coordinate key length

Return type:

int

UnderlyingObject() Any

Get the underlying object.

Returns:

Underlying object

Return type:

Any

X() int

Get point X coordinate.

Returns:

Point X coordinate

Return type:

int

Y() int

Get point Y coordinate.

Returns:

Point Y coordinate

Return type:

int

Raw() DataBytes

Return the point encoded to raw bytes.

Returns:

DataBytes object

Return type:

DataBytes object

RawEncoded() DataBytes

Return the encoded point raw bytes.

Returns:

DataBytes object

Return type:

DataBytes object

RawDecoded() DataBytes

Return the decoded point raw bytes.

Returns:

DataBytes object

Return type:

DataBytes object

__add__(point: IPoint) IPoint

Add point to another point.

Parameters:

point (IPoint object) – IPoint object

Returns:

IPoint object

Return type:

IPoint object

__radd__(point: IPoint) IPoint

Add point to another point.

Parameters:

point (IPoint object) – IPoint object

Returns:

IPoint object

Return type:

IPoint object

__mul__(scalar: int) IPoint

Multiply point by a scalar.

Parameters:

scalar (int) – scalar

Returns:

IPoint object

Return type:

IPoint object

__rmul__(scalar: int) IPoint

Multiply point by a scalar.

Parameters:

scalar (int) – scalar

Returns:

IPoint object

Return type:

IPoint object