View Source Tezex.Crypto.Curve (tezex v3.0.1)

Specific elliptic curve data.

Parameters:

Summary

Functions

Verifies if the point p is on the curve using the elliptic curve equation: y^2 = x^3 + A*x + B (mod P)

Get the curve length

Types

@type t() :: %Tezex.Crypto.Curve{
  A: non_neg_integer(),
  B: non_neg_integer(),
  G: Tezex.Crypto.Point.t(),
  N: non_neg_integer(),
  P: non_neg_integer(),
  name: atom()
}

Functions

@spec contains?(t(), Tezex.Crypto.Point.t()) :: boolean()

Verifies if the point p is on the curve using the elliptic curve equation: y^2 = x^3 + A*x + B (mod P)

Parameters:

Returns:

  • result [boolean/0]: true if point is on the curve, false otherwise
@spec get_length(t()) :: non_neg_integer()

Get the curve length

Parameters:

Returns: