forked from vincenthz/hs-cprng-aes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcprng-aes.cabal
78 lines (70 loc) · 2.66 KB
/
cprng-aes.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Name: cprng-aes
Version: 0.3.0
Description:
Simple crypto pseudo-random-number-generator with really good randomness property.
.
Using ent, a randomness property maker on one 1Mb sample:
Entropy = 7.999837 bits per byte.
Optimum compression would reduce the size of this 1048576 byte file by 0 percent.
Chi square distribution for 1048576 samples is 237.02
Arithmetic mean value of data bytes is 127.3422 (127.5 = random)
Monte Carlo value for Pi is 3.143589568 (error 0.06 percent)
.
Compared to urandom with the same sampling:
Entropy = 7.999831 bits per byte.
Optimum compression would reduce the size of this 1048576 byte file by 0 percent.
Chi square distribution for 1048576 samples is 246.63
Arithmetic mean value of data bytes is 127.6347 (127.5 = random).
Monte Carlo value for Pi is 3.132465868 (error 0.29 percent).
License: BSD3
License-file: LICENSE
Copyright: Vincent Hanquez <[email protected]>
Author: Vincent Hanquez <[email protected]>
Maintainer: Vincent Hanquez <[email protected]>
Synopsis: Crypto Pseudo Random Number Generator using AES in counter mode.
Build-Type: Simple
Category: Cryptography
stability: experimental
Cabal-Version: >=1.8
Homepage: http://github.com/vincenthz/hs-cprng-aes
data-files: README.md
Flag fastaes
Description: Use fast AES if available
Default: True
Flag cereal
Description: Use cereal
Default: False
Flag cryptoapi
Description: Use cryptoapi
Default: True
Library
Build-Depends: base >= 3 && < 5
, bytestring
, random
, crypto-random-api
, entropy >= 0.2
Exposed-modules: Crypto.Random.AESCtr
ghc-options: -Wall
if flag(fastaes) && (arch(i386) || arch(x86_64))
cpp-options: -DCIPHER_AES
Build-Depends: cipher-aes >= 0.1 && < 0.2
else
Build-Depends: cryptocipher
if flag(cereal)
Build-Depends: cereal >= 0.3.0 && < 0.4.0
cpp-options: -DUSE_CEREAL
if flag(cryptoapi)
Build-Depends: crypto-api >= 0.8
cpp-options: -DUSE_CRYPTOAPI
Benchmark bench-cprng-aes
hs-source-dirs: Benchmarks
Main-Is: Benchmarks.hs
type: exitcode-stdio-1.0
Build-depends: base >= 4 && < 5
, bytestring
, cprng-aes
, criterion
, mtl
source-repository head
type: git
location: git://github.com/vincenthz/hs-cprng-aes