cryptonite-0.27: Cryptography Primitives sink

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
Instances
 Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods(==) :: Curve -> Curve -> Bool #(/=) :: Curve -> Curve -> Bool # Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Curve -> c Curve #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Curve #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Curve) #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Curve) #gmapT :: (forall b. Data b => b -> b) -> Curve -> Curve #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Curve -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Curve -> r #gmapQ :: (forall d. Data d => d -> u) -> Curve -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> Curve -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> Curve -> m Curve #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Curve -> m Curve #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Curve -> m Curve # Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods Source # Instance detailsDefined in Crypto.PubKey.ECC.Types MethodsshowsPrec :: Int -> Curve -> ShowS #show :: Curve -> String #showList :: [Curve] -> ShowS #

data Point Source #

Define a point on a curve.

Constructors

 Point Integer Integer PointO Point at Infinity
Instances
 Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods(==) :: Point -> Point -> Bool #(/=) :: Point -> Point -> Bool # Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Point -> c Point #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Point #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Point) #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Point) #gmapT :: (forall b. Data b => b -> b) -> Point -> Point #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Point -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Point -> r #gmapQ :: (forall d. Data d => d -> u) -> Point -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> Point -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> Point -> m Point #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Point -> m Point #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Point -> m Point # Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods Source # Instance detailsDefined in Crypto.PubKey.ECC.Types MethodsshowsPrec :: Int -> Point -> ShowS #show :: Point -> String #showList :: [Point] -> ShowS # Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methodsrnf :: Point -> () #

ECC Public Point

ECC Private Number

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

Constructors

 CurveBinary Integer CurveCommon
Instances
 Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CurveBinary -> c CurveBinary #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CurveBinary #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CurveBinary) #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CurveBinary) #gmapT :: (forall b. Data b => b -> b) -> CurveBinary -> CurveBinary #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CurveBinary -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CurveBinary -> r #gmapQ :: (forall d. Data d => d -> u) -> CurveBinary -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> CurveBinary -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> CurveBinary -> m CurveBinary #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CurveBinary -> m CurveBinary #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CurveBinary -> m CurveBinary # Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods Source # Instance detailsDefined in Crypto.PubKey.ECC.Types MethodsshowList :: [CurveBinary] -> ShowS # Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methodsrnf :: CurveBinary -> () #

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

Constructors

 CurvePrime Integer CurveCommon
Instances
 Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CurvePrime -> c CurvePrime #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CurvePrime #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CurvePrime) #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CurvePrime) #gmapT :: (forall b. Data b => b -> b) -> CurvePrime -> CurvePrime #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CurvePrime -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CurvePrime -> r #gmapQ :: (forall d. Data d => d -> u) -> CurvePrime -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> CurvePrime -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> CurvePrime -> m CurvePrime #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CurvePrime -> m CurvePrime #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CurvePrime -> m CurvePrime # Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods Source # Instance detailsDefined in Crypto.PubKey.ECC.Types MethodsshowList :: [CurvePrime] -> ShowS #

Parameters in common between binary and prime curves.

get the size of the curve in bits

Irreducible polynomial representing the characteristic of a CurveBinary.

Prime number representing the characteristic of a CurvePrime.

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

Constructors

 CurveCommon Fieldsecc_a :: Integercurve parameter aecc_b :: Integercurve parameter becc_g :: Pointbase pointecc_n :: Integerorder of Gecc_h :: Integercofactor
Instances
 Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CurveCommon -> c CurveCommon #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CurveCommon #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CurveCommon) #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CurveCommon) #gmapT :: (forall b. Data b => b -> b) -> CurveCommon -> CurveCommon #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CurveCommon -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CurveCommon -> r #gmapQ :: (forall d. Data d => d -> u) -> CurveCommon -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> CurveCommon -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> CurveCommon -> m CurveCommon #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CurveCommon -> m CurveCommon #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CurveCommon -> m CurveCommon # Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods Source # Instance detailsDefined in Crypto.PubKey.ECC.Types MethodsshowList :: [CurveCommon] -> ShowS #

# Recommended curves definition

data CurveName Source #

Define names for known recommended curves.

Instances
 Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods Source # Instance detailsDefined in Crypto.PubKey.ECC.Types MethodsenumFrom :: CurveName -> [CurveName] # Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CurveName -> c CurveName #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CurveName #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CurveName) #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CurveName) #gmapT :: (forall b. Data b => b -> b) -> CurveName -> CurveName #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CurveName -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CurveName -> r #gmapQ :: (forall d. Data d => d -> u) -> CurveName -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> CurveName -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> CurveName -> m CurveName #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CurveName -> m CurveName #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CurveName -> m CurveName # Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods Source # Instance detailsDefined in Crypto.PubKey.ECC.Types Methods Source # Instance detailsDefined in Crypto.PubKey.ECC.Types MethodsshowList :: [CurveName] -> ShowS #

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