Portability | linux only (NEEDS PORTING) |
---|---|
Stability | experimental |
Maintainer | rrnewton@gmail.com |
This module provides an AES implementation that assumes AES-NI instructions are available on the processor. It will be non-portable as a result. Therefore, for most purposes Codec.Crypto.IntelAES should be used instead.
Note: This module is simply a wrapper around the Intel-provided AESNI sample library, found here:
http://software.intel.com/en-us/articles/download-the-intel-aesni-sample-library/
- testAESNI :: IO ()
- mkAESGen :: Int -> SimpleAESRNG
- type SimpleAESRNG = CRGtoRG (BCtoCRG (IntelAES N128))
- mkAESGen192 :: ByteString -> CRGtoRG (BCtoCRG (IntelAES N192))
- mkAESGen256 :: ByteString -> CRGtoRG (BCtoCRG (IntelAES N256))
- mkAESGen0 :: Int -> SimpleAESRNG0
- type SimpleAESRNG0 = CRGtoRG0 (BCtoCRG (IntelAES N128))
- data IntelAES n
- data N128
- data N192
- data N256
Documentation
testAESNI :: IO ()
This is not a meaningful test yet... one option would be to reproduce the tests in aessample.c
mkAESGen :: Int -> SimpleAESRNG
Expose a simple System.Random.RandomGen interface using 128 bit encryption.
type SimpleAESRNG = CRGtoRG (BCtoCRG (IntelAES N128))
The type of a simple RandomGen
instance.
mkAESGen192 :: ByteString -> CRGtoRG (BCtoCRG (IntelAES N192))
Same thing for 192 bit encryption.
mkAESGen256 :: ByteString -> CRGtoRG (BCtoCRG (IntelAES N256))
Ditto for 256 bit encryption.
mkAESGen0 :: Int -> SimpleAESRNG0
type SimpleAESRNG0 = CRGtoRG0 (BCtoCRG (IntelAES N128))
TEMP: Inefficient version for testing.
data IntelAES n