nist256p1_point

Module for nist256p1 point.

class Nist256p1Point(point_obj: PointJacobi)

Bases: IPoint

Nist256p1 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_point: PointJacobi
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 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