Skip to main content

Signature

Impl functions

new

Creates a new EC point from its (x, y) coordinates.

Arguments

  • x - The x-coordinate of the point
  • y - The y-coordinate of the point

Returns

Returns None if the point (x, y) is not on the curve.

Examples

Signature

new_nz

Creates a new NonZero EC point from its (x, y) coordinates.

Signature

new_from_x

Creates a new EC point from its x coordinate.

Arguments

  • x - The x-coordinate of the point

Returns

Returns None if no point with the given x-coordinate exists on the curve.

Panics

Panics if x is 0, as this would be the point at infinity.

Examples

Signature

new_nz_from_x

Creates a new NonZero EC point from its x coordinate.

Signature

coordinates

Returns the coordinates of the EC point.

Returns

A tuple containing the (x, y) coordinates of the point.

Panics

Panics if the point is the point at infinity.

Examples

Signature

x

Returns the x coordinate of the EC point.

Panics

Panics if the point is the point at infinity.

Examples

Signature

y

Returns the y coordinate of the EC point.

Panics

Panics if the point is the point at infinity.

Examples

Signature

mul

Computes the product of an EC point by the given scalar.

Arguments

  • scalar - The scalar to multiply the point by

Returns

The resulting point after scalar multiplication.

Signature