eccrypto-0.0: Elliptic Curve Cryptography for Haskell

Copyright(c) Marcel Fourné 20[09..]
LicenseBSD3
MaintainerMarcel Fourné (haskell@marcelfourne.de)
Stabilityexperimental
PortabilityGood
Safe HaskellNone
LanguageHaskell98

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

zero :: Int -> Vector Word Source #

a vector of zeros of requested length

one :: Int -> Vector Word Source #

a vector of zeros of requested length, but least significant word 1

two :: Int -> Vector Word Source #

a vector of zeros of requested length, but least significant word 2

three :: Int -> Vector Word Source #

a vector of zeros of requested length, but least significant word 3

log2len :: (Integral a, Bits a) => a -> Int Source #

returning the binary length of an Integer

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

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