Skip to content
rrnewton edited this page Feb 8, 2011 · 14 revisions

Welcome to the intel-aes wiki!

This Haskell package provides AES encryption with optional hardware acceleration. Further, it provides statistically sound, splittable random number generation based on AES. The package is nothing more than a wrapper around the Intel-provided AESNI sample library that also bundles a fallback portable software implementation by Brian Gladman.

The package includes C and assembly sources. Also included are prebuilt dynamic libraries for these sources to make the build process less fragile. (Rebuilding requires the yasm assembler.) But prebuilt shared libraries are not included for all platforms yet. (Volunteers needed!)

Regarding portability, see this ticket.

Here are some example results from an Intel X5680 processor:

How many random numbers can we generate in a second on one thread?
First, timing with System.Random interface:
   14,482,725 random ints generated [System.Random stdGen]    
       16,061 random ints generated [PureHaskell/reference]   
       32,309 random ints generated [PureHaskell]             
    2,401,893 random ints generated [Gladman inefficient]     
   15,980,625 random ints generated [Gladman]                 
    2,329,500 random ints generated [IntelAES inefficient]    
   32,383,799 random ints generated [IntelAES]                
   Comparison to C's rand():
   71,347,778 random ints generated [rand in Haskell loop]    
Clone this wiki locally