-- 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.3.3 -- | ECC Standard Curves, taken from Standard Documents found somewhere(tm) module Codec.Crypto.ECC.StandardCurves data StandardCurve StandardCurve :: Int -> Integer -> Integer -> Integer -> Integer -> Integer -> StandardCurve stdc_l :: StandardCurve -> Int stdc_p :: StandardCurve -> Integer stdc_a :: StandardCurve -> Integer stdc_b :: StandardCurve -> Integer stdc_xp :: StandardCurve -> Integer stdc_yp :: StandardCurve -> Integer p521 :: StandardCurve p256 :: StandardCurve p384 :: StandardCurve data StandardCurveF2 StandardCurveF2 :: Int -> F2 -> F2 -> F2 -> F2 -> F2 -> StandardCurveF2 stdcF_l :: StandardCurveF2 -> Int stdcF_p :: StandardCurveF2 -> F2 stdcF_a :: StandardCurveF2 -> F2 stdcF_b :: StandardCurveF2 -> F2 stdcF_xp :: StandardCurveF2 -> F2 stdcF_yp :: StandardCurveF2 -> F2 k283 :: StandardCurveF2 b283 :: StandardCurveF2 -- | ECC Base algorithms & point formats module Codec.Crypto.ECC.Base -- | class of all Elliptic Curve Points class ECP a inf :: ECP a => a fromAffineCoords :: ECP a => EPa -> a getBitLength :: ECP a => a -> Int getCurve :: ECP a => a -> EC getx :: ECP a => a -> Integer gety :: ECP a => a -> Integer pdouble :: ECP a => a -> a padd :: ECP a => a -> a -> 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 :: Integral a => a -> a -> a -- | this is a generic handle for Point Multiplication. The implementation -- may change. pmul :: ECP a => a -> Integer -> a -- | generic verify, if generic ECP is on EC via getx and gety ison :: ECP a => a -> Bool binary :: Integer -> String -- | Elliptic Point Affine coordinates, two parameters x and y data EPa EPa :: (BitLength, EC, Integer, Integer) -> EPa Infa :: EPa -- | Elliptic Point Projective coordinates, three parameters x, y and z, -- like affine (xz,yz) data EPp EPp :: (BitLength, EC, 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 :: (BitLength, EC, 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 :: (BitLength, EC, Integer, Integer, Integer, Integer) -> EPmj Infmj :: EPmj p256point :: ECP a => a p384point :: ECP a => a p521point :: ECP a => a -- | class of all Elliptic Curve Points class ECPF2 a infF2 :: ECPF2 a => a fromAffineCoordsF2 :: ECPF2 a => EPaF2 -> a getBitLengthF2 :: ECPF2 a => a -> BitLength getCurveF2 :: ECPF2 a => a -> ECSC getxF2 :: ECPF2 a => a -> F2 getyF2 :: ECPF2 a => a -> F2 pdoubleF2 :: ECPF2 a => a -> a paddF2 :: ECPF2 a => a -> a -> a -- | All Elliptic Curves, binary class ECurve a getA :: ECurve a => a -> F2 getB :: ECurve a => a -> F2 getP :: ECurve a => a -> F2 -- | class of (non-hyper) Elliptic Curves, has the form y^2+x*y=x^3+A*x^2+B -- mod P, the parameters being A, B and P data ECSC ECSC :: (F2, F2, F2) -> ECSC -- | computing the modular inverse of a emod m modinvF2K :: ECPF2 a => a -> a -- | this is a generic handle for Point Multiplication. The implementation -- may change. pmulF2 :: ECPF2 a => a -> Integer -> ECPF2 a => a -- | generic verify, if generic ECP is on EC via getx and gety isonF2 :: (ECPF2 a, Eq a) => a -> Bool -- | Elliptic Point Affine coordinates, two parameters x and y data EPaF2 EPaF2 :: (BitLength, ECSC, F2, F2) -> EPaF2 InfaF2 :: EPaF2 -- | Elliptic Point Projective coordinates, three parameters x, y and z, -- like affine (xz,yz) data EPpF2 EPpF2 :: (BitLength, ECSC, F2, F2, F2) -> EPpF2 InfpF2 :: EPpF2 b283point :: ECPF2 a => a k283point :: ECPF2 a => a instance Eq EC instance Eq EPa instance Eq EPp instance Eq EPj instance Eq EPmj instance Eq ECSC instance Eq EPaF2 instance Eq EPpF2 instance ECPF2 EPpF2 instance Show EPpF2 instance ECPF2 EPaF2 instance Show EPaF2 instance ECurve ECSC instance Show ECSC 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