hecc-0.4.0.1: Elliptic Curve Cryptography for Haskell

MaintainerMarcel Fourné (hecc@bitrot.dyndns.org)
Safe HaskellNone

Codec.Crypto.ECC.Base

Description

ECC Base algorithms & point formats

Synopsis

Documentation

data EC a whereSource

all Elliptic Curves, the parameters being the BitLength L, A, B and P

Constructors

ECi :: (BitLength, Integer, Integer, Integer, Integer) -> EC Integer 
ECb :: (BitLength, F2, F2, F2, F2) -> EC F2 

Instances

Eq (EC a) 
Show (EC a) 
Serialize (EC Integer) 

getBitLength :: EC a -> IntSource

get bitlength

geta :: EC a -> aSource

get Curve parameter A

getb :: EC a -> aSource

get Curve parameter B

getp :: EC a -> aSource

get Curve parameter P

getr :: EC a -> aSource

get Curve order r

data ECPF a whereSource

data of all Elliptic Curve Points

Instances

getCurve :: ECPF a -> EC aSource

get contents of the curve

getx :: ECPF a -> aSource

generic getter, returning the x-value

gety :: ECPF a -> aSource

generic getter, returning the y-value

getz :: ECPF a -> aSource

generic getter, returning the z-value for points having them

getaz4 :: ECPF a -> aSource

generic getter, returning the a*z^4-value for points having them

getxA :: ECPF a -> aSource

generic getter, returning the affine x-value

getyA :: ECPF a -> aSource

generic getter, returning the affine y-value

padd :: ECPF a -> ECPF a -> ECPF aSource

add 2 elliptic points

pdouble :: ECPF a -> ECPF aSource

add an elliptic point onto itself, base for padd a a

modinvSource

Arguments

:: Integral a 
=> a

the number to invert

-> a

the modulus

-> a

the inverted value

computing the modular inverse of a mod m

pmul :: ECPF a -> Integer -> ECPF aSource

this is a generic handle for Point Multiplication. The implementation may change.

ison :: ECPF a -> BoolSource

generic verify, if generic ECP is on EC via getxA and getyA

binary :: Integer -> StringSource

binary representation of an integer |taken from http:haskell.orghaskellwikiFibonacci_primes_in_parallel