hecc-0.3.2: Elliptic Curve Cryptography for Haskell

MaintainerMarcel Fourné (hecc@bitrot.dyndns.org)
Safe HaskellSafe-Infered

Codec.Crypto.ECC.F2

Description

A parallelized F(2^e) backend

Synopsis

Documentation

f2eAdd :: Array U DIM1 Bool -> Array U DIM1 Bool -> Array U DIM1 BoolSource

binary addition of a1 and a2

f2eMul :: Array U DIM1 Bool -> Array U DIM1 Bool -> Array U DIM1 BoolSource

binary multiplication of a1 and a2

f2eBitshift :: Array U DIM1 Bool -> Int -> Array U DIM1 BoolSource

a simple bitshift where n shifts left, so a negative n shifts right

f2eReduceBy :: Array U DIM1 Bool -> Array U DIM1 Bool -> Array U DIM1 BoolSource

polynomial reduction of a via r

f2eFromInteger :: Integer -> Array U DIM1 BoolSource

conversion helper function

f2ePow :: Array U DIM1 Bool -> Integer -> Array U DIM1 BoolSource

the power function, b ^ k, atm only specialised for k in {2,3}

f2eToInteger :: Array U DIM1 Bool -> IntegerSource

conversion helper function

f2eTestBit :: Array U DIM1 Bool -> Int -> BoolSource

test k if bit on position i is set

elimFalses :: Array U DIM1 Bool -> Array U DIM1 BoolSource

a helper function to shorten all leading 0 from a

modinvF2Source

Arguments

:: Array U DIM1 Bool

the polynomial to invert

-> Array U DIM1 Bool

the modulus

-> Array U DIM1 Bool

the inverted value

computing the modular inverse of a emod m, this is broken atm

f2eLen :: Unbox a => Array U sh a -> IntSource

helper function to get the length of a