crypto-pubkey-types-0.4.0: 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 

data CurveBinary Source

Define an elliptic curve in 𝔽(2^m) The first parameter is a bitfield representing the f(x) polynomial.

data CurvePrime Source

Define an elliptic curve in 𝔽p

the first parameter is a prime number

ecc_fx :: CurveBinary -> IntegerSource

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.