-- 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
-- | F(2^e)-Backend
module Codec.Crypto.ECC.F2
-- | binary addition of a1 and a2
f2eAdd :: Array U DIM1 Bool -> Array U DIM1 Bool -> Array U DIM1 Bool
-- | binary multiplication of a1 and a2
f2eMul :: Array U DIM1 Bool -> Array U DIM1 Bool -> Array U DIM1 Bool
-- | a simple bitshift where n shifts left, so a negative
-- n shifts right
f2eBitshift :: Array U DIM1 Bool -> Int -> Array U DIM1 Bool
-- | polynomial reduction of a via r
f2eReduceBy :: Array U DIM1 Bool -> Array U DIM1 Bool -> Array U DIM1 Bool
f2eFromInteger :: Integer -> Array U DIM1 Bool
f2ePow :: Array U DIM1 Bool -> Integer -> Array U DIM1 Bool
f2eToInteger :: Array U DIM1 Bool -> Integer
f2eTestBit :: Array U DIM1 Bool -> Int -> Bool
elimFalses :: Array U DIM1 Bool -> Array U DIM1 Bool
-- | computing the modular inverse of a emod m,
-- this is broken atm
modinvF2 :: Array U DIM1 Bool -> Array U DIM1 Bool -> Array U DIM1 Bool
f2eLen :: Unbox a => Array U sh a -> Int
instance Eq a => Eq (Array U DIM1 a)
-- | 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 -> Array U (Z :. Int) Bool -> Array U (Z :. Int) Bool -> Array U (Z :. Int) Bool -> Array U (Z :. Int) Bool -> Array U (Z :. Int) Bool -> StandardCurveF2
stdcF_l :: StandardCurveF2 -> Int
stdcF_p :: StandardCurveF2 -> Array U (Z :. Int) Bool
stdcF_a :: StandardCurveF2 -> Array U (Z :. Int) Bool
stdcF_b :: StandardCurveF2 -> Array U (Z :. Int) Bool
stdcF_xp :: StandardCurveF2 -> Array U (Z :. Int) Bool
stdcF_yp :: StandardCurveF2 -> Array U (Z :. Int) Bool
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 (Array U DIM1 Bool)
getxF2 :: ECPF2 a => a -> Array U DIM1 Bool
getyF2 :: ECPF2 a => a -> Array U DIM1 Bool
pdoubleF2 :: ECPF2 a => a -> a
paddF2 :: ECPF2 a => a -> a -> a
class ECCNum a
eadd :: ECCNum a => a -> a -> a
emul :: ECCNum a => a -> a -> a
epow :: ECCNum a => a -> Integer -> a
emod :: ECCNum a => a -> a -> a
-- | All Elliptic Curves, binary
class ECurve a
getA :: ECurve a => a -> Array U DIM1 Bool
getB :: ECurve a => a -> Array U DIM1 Bool
getP :: ECurve a => a -> Array U DIM1 Bool
-- | 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 ECCNum a => ECSC a
ECSC :: (a, a, a) -> ECSC a
-- | 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 (Array U DIM1 Bool), Array U DIM1 Bool, Array U DIM1 Bool) -> EPaF2
InfaF2 :: EPaF2
-- | Elliptic Point Projective coordinates, three parameters x, y and z,
-- like affine (xz,yz)
data EPpF2
EPpF2 :: (BitLength, ECSC (Array U DIM1 Bool), Array U DIM1 Bool, Array U DIM1 Bool, Array U DIM1 Bool) -> 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 a, ECCNum a) => Eq (ECSC a)
instance Eq EPaF2
instance Eq EPpF2
instance ECPF2 EPpF2
instance Show EPpF2
instance ECPF2 EPaF2
instance Show EPaF2
instance ECurve (ECSC (Array U DIM1 Bool))
instance Show (ECSC (Array U DIM1 Bool))
instance ECCNum (Array U DIM1 Bool)
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