Skip to main content

Signature

Trait functions

init

Initializes an EC computation with the zero point.

Signature

Examples

add

Adds a point to the computation.

Arguments

  • p - The non-zero point to add

Signature

sub

Subtracts a point to the computation.

Arguments

  • p - The non-zero point to subtract

Signature

add_mul

Adds the product p * scalar to the state.

Arguments

  • scalar - The scalar to multiply the point by
  • p - The non-zero point to multiply and add

Signature

finalize_nz

Finalizes the EC computation and returns the result as a non-zero point.

Returns

  • Option - The resulting point, or None if the result is the zero point

Panics

Panics if the result is the point at infinity.

Signature

finalize

Finalizes the EC computation and returns the result. Returns the zero point if the computation results in the point at infinity.

Signature