Model definitions for point and curves
Defines a single point on the curve
Defines the entire elliptic curve
module ECurve.Models exposing (Point, Curve)
{-| Model definitions for point and curves
@docs Point, Curve
-}
import BigInt exposing (BigInt)
{-| Defines a single point on the curve
-}
type alias Point =
{ x : BigInt
, y : BigInt
, z : BigInt
, p : BigInt -- Curve.p
, a : BigInt -- Curve.a
, zInv : BigInt
, compressed : Bool
}
{-| Defines the entire elliptic curve
-}
type alias Curve =
{ p : BigInt
, a : BigInt
, b : BigInt
, g : Point
, n : BigInt
, h : BigInt
, pLength : Int
}