# Curvy.Point (Curvy v0.3.0) View Source

Module used for manipulating ECDSA point coordinates.

# Link to this section Summary

## Types

Jacobian Point Coordiantes

Point Coordinates

## Functions

Adds two elliptic curve points.

Doubles an elliptic curve point.

Compares two elliptic curve points.

Converts the signature to a `Point` using the given hash integer and recovery ID.

Mutiplies an elliptic curve point with the given scalar.

Flips the elliptic curve point to `(x, -y)`.

Subtracts the second elliptic curve point from the first.

# Link to this section Types

Link to this type

# jacobian()

View Source

## Specs

`jacobian() :: %{x: integer(), y: integer(), z: integer()}`

Jacobian Point Coordiantes

Link to this type

# t()

View Source

## Specs

`t() :: %Curvy.Point{x: integer(), y: integer()}`

Point Coordinates

# Link to this section Functions

Link to this function

View Source

## Specs

`add(t(), t()) :: t()`

Adds two elliptic curve points.

Returns a `Point`.

Link to this function

# double(point)

View Source

## Specs

`double(t()) :: t()`

Doubles an elliptic curve point.

Returns a `Point`.

Link to this function

# equals(p, q)

View Source

## Specs

`equals(point :: t(), other :: t()) :: boolean()`

Compares two elliptic curve points.

Returns a `t:boolean`.

Link to this function

# from_signature(signature, e, recid)

View Source

## Specs

```from_signature(Curvy.Signature.t(), integer(), Curvy.Signature.recovery_id()) ::
t() | :error```

Converts the signature to a `Point` using the given hash integer and recovery ID.

Link to this function

# mul(point, scalar)

View Source

## Specs

`mul(t(), integer()) :: t()`

Mutiplies an elliptic curve point with the given scalar.

Returns a `Point`.

Link to this function

# negate(point)

View Source

## Specs

`negate(point :: t()) :: t()`

Flips the elliptic curve point to `(x, -y)`.

Returns a `Point`.

Link to this function

# subtract(point, other)

View Source

## Specs

`subtract(t(), t()) :: t()`

Subtracts the second elliptic curve point from the first.

Returns a `Point`.