eccrypto-0.2.3: Elliptic Curve Cryptography for Haskell
Copyright(c) Marcel Fourné 20[09..]
LicenseBSD3
MaintainerMarcel Fourné (haskell@marcelfourne.de)
Stabilityexperimental
PortabilityGood
Safe HaskellTrustworthy
LanguageHaskell2010

Crypto.Common

Description

ECC Base algorithms & point formats for NIST Curves as specified in NISTReCur.pdf[http:/csrc.nist.govgroupsSTtoolkitdocumentsdss/NISTReCur.pdf] Re Timing-Attacks: We depend on (==) being resistant for Integer.

Synopsis

Documentation

wordMax :: Integral a => a Source #

return the maximum value storable in a Word

wordSize :: Int Source #

return the bitSize of a Word

sizeinWords :: Int -> Int Source #

determine the needed storage for a bitlength in Words

log2len :: Integer -> Int Source #

returning the binary length of an Integer, uses integer-gmp directly

testcond :: Word -> Int -> Word Source #

we want word w at position i to result in a word to multiply by, eliminating branching