crypto-pubkey-types-0.4.2.2: Generic cryptography Public keys algorithm types

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

Crypto.Types.PubKey.ECC

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 = PointSource

ECC Public Point

type PrivateNumber = IntegerSource

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 -> CurveCommonSource

Parameters in common between binary and prime curves.

ecc_fx :: CurveBinary -> IntegerSource

Irreducible polynomial representing the characteristic of a CurveBinary.

ecc_p :: CurvePrime -> IntegerSource

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 -> CurveSource

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