packages feed

intel-aes 0.1.2.2 → 0.1.2.3

raw patch · 4 files changed

+22/−14 lines, 4 filesdep ~crypto-api

Dependency ranges changed: crypto-api

Files

Codec/Crypto/GladmanAES.hsc view
@@ -80,24 +80,24 @@  instance BlockCipher (AES N128) where 	blockSize = Tagged 128+	keyLength = Tagged 128 	encryptBlock = aesEnc 	decryptBlock = aesDec 	buildKey = aesBK 128-	keyLength = aesKL  instance BlockCipher (AES N192) where-	blockSize = Tagged 128+	blockSize = Tagged 192+	keyLength = Tagged 192 	encryptBlock = aesEnc 	decryptBlock = aesDec 	buildKey = aesBK 192-	keyLength = aesKL  instance BlockCipher (AES N256) where-	blockSize = Tagged 128+	blockSize = Tagged 256+	keyLength = Tagged 256 	encryptBlock = aesEnc 	decryptBlock = aesDec 	buildKey = aesBK 256-	keyLength = aesKL   aesEnc :: AES n -> B.ByteString -> B.ByteString
Codec/Crypto/IntelAES/AESNI.hs view
@@ -164,13 +164,14 @@  instance BlockCipher (IntelAES N128) where 	blockSize    = Tagged 128+	keyLength    = Tagged 128 	encryptBlock = template intel_AES_enc128 16 	decryptBlock = template intel_AES_dec128 16         -- What's the right behavior here?  Currently this refuses to         -- generate keys if given an insufficient # of bytes. 	buildKey bytes | B.length bytes >= 16 = Just$ newCtx bytes         buildKey _     | otherwise            = Nothing-	keyLength (IntelAES {aesKeyRaw}) = B.length aesKeyRaw * 8 -- bits+--	keyLength (IntelAES {aesKeyRaw}) = B.length aesKeyRaw * 8 -- bits  instance Serialize (IntelAES N128) where 	get = getGeneral 16@@ -179,21 +180,24 @@ -- <boilerplate> instance BlockCipher (IntelAES N192) where 	blockSize    = Tagged 192+	keyLength    = Tagged 192 	encryptBlock = template intel_AES_enc192 24 	decryptBlock = template intel_AES_dec192 24 	buildKey bytes | B.length bytes >= 24 = Just$ newCtx bytes         buildKey _     | otherwise            = Nothing-	keyLength (IntelAES {aesKeyRaw}) = B.length aesKeyRaw+--	keyLength (IntelAES {aesKeyRaw}) = B.length aesKeyRaw+ instance Serialize (IntelAES N192) where 	get = getGeneral 24 	put = putByteString . aesKeyRaw instance BlockCipher (IntelAES N256) where-	blockSize    = Tagged 192+	blockSize    = Tagged 256+	keyLength    = Tagged 256 	encryptBlock = template intel_AES_enc256 32 	decryptBlock = template intel_AES_dec256 32 	buildKey bytes | B.length bytes >= 32 = Just$ newCtx bytes         buildKey _     | otherwise            = Nothing-	keyLength (IntelAES {aesKeyRaw}) = B.length aesKeyRaw+--	keyLength (IntelAES {aesKeyRaw}) = B.length aesKeyRaw instance Serialize (IntelAES N256) where 	get = getGeneral 32 	put = putByteString . aesKeyRaw
SimpleRNGBench.hs view
@@ -19,7 +19,8 @@ import System.Exit (exitSuccess, exitFailure) import System.Environment import System.Random-import System.Posix    (sleep)+-- import System.PosixCompat (sleep)+import System.Posix (sleep) import System.CPUTime  (getCPUTime) -- import Data.Time.Clock (diffUTCTime) import System.CPUTime.Rdtsc
intel-aes.cabal view
@@ -1,5 +1,5 @@ Name:           intel-aes-Version:        0.1.2.2+Version:        0.1.2.3  License:                BSD3 License-file:           LICENSE@@ -85,7 +85,8 @@ ---------------------------------------------------------------------------------------------------- library   build-depends:  base >= 4 && < 5, random, DRBG, split, process, haskell98, time,-                  crypto-api, bytestring, cereal, tagged, largeword+                  crypto-api >= 0.5, +                  bytestring, cereal, tagged, largeword    exposed-modules:  Codec.Encryption.BurtonRNGSlow                  ,  Codec.Crypto.IntelAES@@ -107,11 +108,13 @@   Include-Dirs: cbits  - -- ---------------------------------------------------------------------------------------------------- Executable benchmark-intel-aes-rng   Main-is:        SimpleRNGBench.hs-  Build-Depends:  base >= 4 && < 5, split, rdtsc, unix, random, crypto-api, DRBG+  Build-Depends:  base >= 4 && < 5, split, rdtsc, random, DRBG+                , crypto-api >= 0.5+--                , unix-compat+                , unix                 , tagged, cereal, bytestring, process, haskell98, time, largeword                 , intel-aes   GHC-Options:    -O2 -threaded -rtsopts