cryptol-3.0.0: Cryptol: The Language of Cryptography

Copyright | (c) Levent Erkok
License | BSD3
Maintainer | erkokl@gmail.com
Stability | experimental
Safe Haskell | Safe-Inferred
Language | Haskell2010

Cryptol.AES

Description

A TBox-based implementation of AES primitives, based on the AES example code from SBV. Here we've stripped out everything except the basic primitives needed, which essentially boil down to table table lookups in most cases.

Synopsis

- type State = [Word32]
- type Key = [Word32]
- keyExpansionWords :: Integer -> Key -> [Word32]
- invMixColumns :: State -> State
- aesRound :: State -> State
- aesFinalRound :: State -> State
- aesInvRound :: State -> State
- aesInvFinalRound :: State -> State

# Documentation

type State = [Word32] Source #

AES state. The state consists of four 32-bit words, each of which is in turn treated as four GF28's, i.e., 4 bytes. The T-Box implementation keeps the four-bytes together for efficient representation.

type Key = [Word32] Source #

The key, which can be 128, 192, or 256 bits. Represented as a sequence of 32-bit words.

keyExpansionWords :: Integer -> Key -> [Word32] Source #

invMixColumns :: State -> State Source #

The `InvMixColumns` transformation, as described in Section 5.3.3 of the standard. Note that this transformation is only used explicitly during key-expansion in the T-Box implementation of AES.

aesRound :: State -> State Source #

aesFinalRound :: State -> State Source #

aesInvRound :: State -> State Source #

aesInvFinalRound :: State -> State Source #