In favour of


Fast AES cipher implementation with advanced mode of operations

Version on this page:0.2.9
LTS Haskell 22.30:0.2.11
Stackage Nightly 2024-07-21:0.2.11
Latest on Hackage:0.2.11

See all snapshots cipher-aes appears in

BSD-3-Clause licensed and maintained by Vincent Hanquez
This version can be pinned in stack with:cipher-aes-0.2.9@sha256:333324191c0b0707ebdfc42c9f2c5a574772dfc77e7a671855a9250a20ad8362,3198

Module documentation for 0.2.9

  • Crypto
    • Crypto.Cipher
      • Crypto.Cipher.AES

Fast AES cipher implementation with advanced mode of operations.

The modes of operations available are ECB (Electronic code book), CBC (Cipher block chaining), CTR (Counter), XTS (XEX with ciphertext stealing), GCM (Galois Counter Mode).

The AES implementation uses AES-NI when available (on x86 and x86-64 architecture), but fallback gracefully to a software C implementation.

The software implementation uses S-Boxes, which might suffer for cache timing issues. However do notes that most other known software implementations, including very popular one (openssl, gnutls) also uses similar implementation. If it matters for your case, you should make sure you have AES-NI available, or you'll need to use a different implementation.