-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Elliptic Curve Cryptography for Haskell -- -- Pure math & algorithms for Elliptic Curve Cryptography in Haskell @package hecc @version 0.2 -- | ECC Standard Curves, taken from Standard Documents found somewhere(tm) module Codec.Encryption.ECC.StandardCurves data StandardCurve StandardCurve :: Integer -> Integer -> Integer -> Integer -> Integer -> StandardCurve stdc_p :: StandardCurve -> Integer stdc_a :: StandardCurve -> Integer stdc_b :: StandardCurve -> Integer stdc_xp :: StandardCurve -> Integer stdc_yp :: StandardCurve -> Integer p521 :: StandardCurve p256 :: StandardCurve -- | ECC Base algorithms & point formats module Codec.Encryption.ECC.Base -- | class of all Elliptic Curve Points class ECP a inf :: ECP a => a getx :: ECP a => a -> EC -> Integer gety :: ECP a => a -> EC -> Integer pdouble :: ECP a => a -> EC -> a padd :: ECP a => a -> a -> EC -> a -- | class of all Elliptic Curves, has the form y^2=x^3+A*x+B mod P, the -- parameters being A, B and P data EC EC :: (Integer, Integer, Integer) -> EC -- | computing the modular inverse of a mod m modinv :: Integer -> Integer -> Integer -- | this is a generic handle for Point Multiplication. The implementation -- may change. pmul :: ECP a => a -> Integer -> EC -> a -- | generic verify, if generic ECP is on EC via getx and gety ison :: ECP a => a -> EC -> Bool -- | given a generator and a curve, generate a point randomly genkey :: ECP a => a -> EC -> IO a -- | Elliptic Point Affine coordinates, two parameters x and y data EPa EPa :: (Integer, Integer) -> EPa Infa :: EPa -- | Elliptic Point Projective coordinates, three parameters x, y and z, -- like affine (xz,yz) data EPp EPp :: (Integer, Integer, Integer) -> EPp Infp :: EPp -- | Elliptic Point Jacobian coordinates, three parameter x, y and z, like -- affine (xz^2,yz^3) data EPj EPj :: (Integer, Integer, Integer) -> EPj Infj :: EPj -- | Elliptic Point Modified Jacobian coordinates, four parameters x,y,z -- and A*z^4 (A being the first curve-parameter), like affine coordinates -- (xz^2,yz^3) data EPmj EPmj :: (Integer, Integer, Integer, Integer) -> EPmj Infmj :: EPmj instance Eq EPmj instance Eq EPj instance Eq EPp instance Eq EPa instance Eq EC instance ECP EPmj instance Show EPmj instance ECP EPj instance Show EPj instance ECP EPp instance Show EPp instance ECP EPa instance Show EPa instance Show EC