README.md
1CPRNG-AES
2=========
3
4This module provides a crypto pseudo random number generator using AES in counter mode.
5
6to import:
7
8 import Crypto.Random.AESCtr
9
10to use:
11
12 rng <- makeSystem
13 let (ran, rng') = getRandomBytes rng 1024
14
15it's also an instance of CryptoRandomGen from the crypto-api package.
16
17Statistics
18----------
19
20Using ent, a randomness property maker on one 1Mb sample.
21
22cprng-AES:
23
24 Entropy = 7.999837 bits per byte.
25 Optimum compression would reduce the size of this 1048576 byte file by 0 percent.
26 Chi square distribution for 1048576 samples is 237.02.
27 Arithmetic mean value of data bytes is 127.3422 (127.5 = random).
28 Monte Carlo value for Pi is 3.143589568 (error 0.06 percent).
29
30Compared to urandom with the same sampling:
31
32 Entropy = 7.999831 bits per byte.
33 Optimum compression would reduce the size of this 1048576 byte file by 0 percent.
34 Chi square distribution for 1048576 samples is 246.63.
35 Arithmetic mean value of data bytes is 127.6347 (127.5 = random).
36 Monte Carlo value for Pi is 3.132465868 (error 0.29 percent).
37
38