1Name:                cipher-aes
2Version:             0.2.11
3Description:
4    Fast AES cipher implementation with advanced mode of operations.
5    .
6    The modes of operations available are ECB (Electronic code book),
7    CBC (Cipher block chaining), CTR (Counter), XTS (XEX with ciphertext stealing),
8    GCM (Galois Counter Mode).
9    .
10    The AES implementation uses AES-NI when available (on x86 and x86-64 architecture),
11    but fallback gracefully to a software C implementation.
12    .
13    The software implementation uses S-Boxes, which might suffer for cache timing issues.
14    However do notes that most other known software implementations, including very popular
15    one (openssl, gnutls) also uses similar implementation. If it matters for your
16    case, you should make sure you have AES-NI available, or you'll need to use a different
17    implementation.
18    .
19License:             BSD3
20License-file:        LICENSE
21Copyright:           Vincent Hanquez <vincent@snarc.org>
22Author:              Vincent Hanquez <vincent@snarc.org>
23Maintainer:          Vincent Hanquez <vincent@snarc.org>
24Synopsis:            Fast AES cipher implementation with advanced mode of operations
25Category:            Cryptography
26Build-Type:          Simple
27Homepage:            https://github.com/vincenthz/hs-cipher-aes
28Cabal-Version:       >=1.8
29Extra-Source-Files:  Tests/*.hs
30                     cbits/*.h
31                     cbits/aes_x86ni_impl.c
32
33Flag support_aesni
34  Description:       allow compilation with AESNI on system and architecture that supports it
35  Default:           True
36
37Library
38  Build-Depends:     base >= 4 && < 5
39                   , bytestring
40                   , byteable
41                   , securemem >= 0.1.2
42                   , crypto-cipher-types >= 0.0.6 && < 0.1
43  Exposed-modules:   Crypto.Cipher.AES
44  ghc-options:       -Wall -optc-O3 -fno-cse -fwarn-tabs
45  C-sources:         cbits/aes_generic.c
46                     cbits/aes.c
47                     cbits/gf.c
48                     cbits/cpu.c
49  if flag(support_aesni) && (os(linux) || os(freebsd)) && (arch(i386) || arch(x86_64))
50    CC-options:      -mssse3 -maes -mpclmul -DWITH_AESNI
51    C-sources:       cbits/aes_x86ni.c
52
53Test-Suite test-cipher-aes
54  type:              exitcode-stdio-1.0
55  hs-source-dirs:    Tests
56  Main-Is:           Tests.hs
57  Build-depends:     base >= 4 && < 5
58                   , cipher-aes
59                   , crypto-cipher-types >= 0.0.6
60                   , crypto-cipher-tests >= 0.0.8
61                   , bytestring
62                   , byteable
63                   , QuickCheck >= 2
64                   , test-framework >= 0.3.3
65                   , test-framework-quickcheck2 >= 0.2.9
66
67Benchmark bench-cipher-aes
68  hs-source-dirs:    Benchmarks
69  Main-Is:           Benchmarks.hs
70  type:              exitcode-stdio-1.0
71  Build-depends:     base >= 4 && < 5
72                   , bytestring
73                   , cipher-aes
74                   , crypto-cipher-types >= 0.0.6
75                   , crypto-cipher-benchmarks >= 0.0.4
76                   , criterion
77                   , mtl
78
79source-repository head
80  type:     git
81  location: https://github.com/vincenthz/hs-cipher-aes
82