Copyright | (c) Marcel Fourné 20[09..] |
---|---|
License | BSD3 |
Maintainer | Marcel Fourné (haskell@marcelfourne.de) |
Stability | beta |
Portability | Good |
Safe Haskell | Safe |
Language | Haskell98 |
This module contain the internal functions. It's use should be limited to the ECDH and ECDSA modules, which export certain types without constructors, so the timing attack surface is only over the verified functions. ECC Base algorithms & point formats for NIST Curves as specified in NISTReCur.pdf[http:/csrc.nist.govgroupsSTtoolkitdocumentsdss/NISTReCur.pdf]
Synopsis
- data EC a where
- data ECPF a where
- isinf :: EC a -> ECPF a -> Bool
- export :: EC a -> ECPF a -> (Integer, Integer)
- affine :: EC a -> ECPF a -> (Integer, Integer)
- pdouble :: EC a -> ECPF a -> ECPF a
- padd :: EC a -> ECPF a -> ECPF a -> ECPF a
- ison :: EC a -> ECPF a -> Bool
- pmul :: EC a -> ECPF a -> FPrime -> ECPF a
Documentation
all Elliptic Curves, the parameters being the BitLength L, A, B and P
isinf :: EC a -> ECPF a -> Bool Source #
internal function, codifies point at infinity, is used in comparisons
export :: EC a -> ECPF a -> (Integer, Integer) Source #
translate point in internal format to a pair of Integers in affine x and y coordinate | this is intended as interface to other libraries
affine :: EC a -> ECPF a -> (Integer, Integer) Source #
generic getter, returning the affine x and y-value