cryptonite-0.3: Cryptography Primitives sink

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
StabilityExperimental
PortabilityExcellent
Safe HaskellSafe-Inferred
LanguageHaskell2010

Crypto.PubKey.ECC.Types

Contents

Description

Synopsis

Documentation

data Curve Source

Define either a binary curve or a prime curve.

Constructors

CurveF2m CurveBinary

𝔽(2^m)

CurveFP CurvePrime

𝔽p

data Point Source

Define a point on a curve.

Constructors

Point Integer Integer 
PointO

Point at Infinity

type PublicPoint = Point Source

ECC Public Point

type PrivateNumber = Integer Source

ECC Private Number

data CurveBinary Source

Define an elliptic curve in 𝔽(2^m). The firt parameter is the Integer representatioin of the irreducible polynomial f(x).

data CurvePrime Source

Define an elliptic curve in 𝔽p. The first parameter is the Prime Number.

common_curve :: Curve -> CurveCommon Source

Parameters in common between binary and prime curves.

ecc_fx :: CurveBinary -> Integer Source

Irreducible polynomial representing the characteristic of a CurveBinary.

ecc_p :: CurvePrime -> Integer Source

Prime number representing the characteristic of a CurvePrime.

data CurveCommon Source

Define common parameters in a curve definition of the form: y^2 = x^3 + ax + b.

Constructors

CurveCommon 

Fields

ecc_a :: Integer

curve parameter a

ecc_b :: Integer

curve parameter b

ecc_g :: Point

base point

ecc_n :: Integer

order of G

ecc_h :: Integer

cofactor

recommended curves definition

getCurveByName :: CurveName -> Curve Source

Get the curve definition associated with a recommended known curve name.