Maintainer | Marcel Fourné (hecc@bitrot.dyndns.org) |
---|---|
Safe Haskell | Safe-Infered |
ECC Base algorithms & point formats
- class ECP a where
- data EC = EC (Integer, Integer, Integer)
- modinv :: Integral a => a -> a -> a
- pmul :: ECP a => a -> Integer -> a
- ison :: ECP a => a -> Bool
- binary :: Integer -> String
- data EPa
- data EPp
- data EPj
- data EPmj
- p256point :: ECP a => a
- p384point :: ECP a => a
- p521point :: ECP a => a
- class ECPF2 a where
- class ECCNum a where
- class ECurve a where
- data ECCNum a => ECSC a = ECSC (a, a, a)
- modinvF2K :: ECPF2 a => a -> a
- pmulF2 :: ECPF2 a => a -> Integer -> ECPF2 a => a
- isonF2 :: (ECPF2 a, Eq a) => a -> Bool
- data EPaF2
- data EPpF2
- b283point :: ECPF2 a => a
- k283point :: ECPF2 a => a
Documentation
class of all Elliptic Curve Points
function returning the appropriate INF in the specific ECP-Format, for generic higher-level-algorithms
fromAffineCoords :: EPa -> aSource
build point from one in affine coordinates
getBitLength :: a -> IntSource
get bitlength
get contents of the curve
generic getter, returning the affine x-value
generic getters, returning the affine y-value
add an elliptic point onto itself, base for padd a a
add 2 elliptic points
class of all Elliptic Curves, has the form y^2=x^3+A*x+B mod P, the parameters being A, B and P
:: Integral a | |
=> a | the number to invert |
-> a | the modulus |
-> a | the inverted value |
computing the modular inverse of a
mod
m
this is a generic handle for Point Multiplication. The implementation may change.
generic verify, if generic ECP is on EC via getx and gety
Elliptic Point Affine coordinates, two parameters x and y
Elliptic Point Projective coordinates, three parameters x, y and z, like affine (xz,yz)
Elliptic Point Jacobian coordinates, three parameter x, y and z, like affine (xz^2,yz^3)
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)
class of all Elliptic Curve Points
function returning the appropriate INF in the specific ECP-Format, for generic higher-level-algorithms
fromAffineCoordsF2 :: EPaF2 -> aSource
build point from one in affine coordinates
getBitLengthF2 :: a -> BitLengthSource
get bitlength
getCurveF2 :: a -> ECSC (Array U DIM1 Bool)Source
get contents of the curve
getxF2 :: a -> Array U DIM1 BoolSource
generic getter, returning the affine x-value
getyF2 :: a -> Array U DIM1 BoolSource
generic getters, returning the affine y-value
add an elliptic point onto itself, base for padd a a
add 2 elliptic points
All Elliptic Curves, binary
data ECCNum a => ECSC a Source
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
ECSC (a, a, a) |
:: ECPF2 a | |
=> a | the point to multiply |
-> Integer | times to multiply the point |
-> ECPF2 a | |
=> a | the result-point |
this is a generic handle for Point Multiplication. The implementation may change.
generic verify, if generic ECP is on EC via getx and gety
Elliptic Point Affine coordinates, two parameters x and y