-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | F(2^e) math for cryptography -- -- A timing attack resistant F(2^e) backend, all operations on -- little-endian data in unboxed bit vectors @package hF2 @version 0.1 -- | A timing attack resistant F(2^e) backend, all operations on -- little-endian data in unboxed bit vectors module Data.F2 type F2 = Vector Bit -- | binary addition of a and b add :: F2 -> F2 -> F2 -- | a simple bitshift where n shifts right, a negative n -- shifts left shift :: F2 -> Int -> F2 -- | binary multiplication of a and b mul :: F2 -> F2 -> F2 -- | polynomial reduction of a via r reduceBy :: F2 -> F2 -> F2 -- | the power function, b ^ k, using Montgomery ladder -- and some low-k hardcoding against overheads pow :: F2 -> F2 -> F2 -- | conversion helper function fromInteger :: Integer -> F2 -- | conversion helper function toInteger :: F2 -> Integer -- | the length of an F(2^e) length :: F2 -> Int -- | is the number even? The last bit decides... even :: F2 -> Bool -- | is the number odd? The last bit decides... odd :: F2 -> Bool -- | computing k/f mod m by binary inversion of -- f in m div :: F2 -> F2 -> F2 -> F2 bininv :: F2 -> F2 -> F2