Data Fields
aes_table Struct Reference

An AES lookup table. More...

Data Fields

union aes_table_entry entry [256]
 Table entries, indexed by S(N)

Detailed Description

An AES lookup table.

This represents the products (in the Galois field GF(2^8)) of a constant eight-byte vector multiplier with all possible 256 scalar multiplicands.

The entries are indexed by the AES [Inv]SubBytes S-box output values (denoted S(N)). This allows for the result of multiplying any single column of the [Inv]MixColumns matrix by S(N) to be obtained simply by extracting the relevant four-byte subset from the Nth table entry. For example:

Input byte (N): 0x3a SubBytes output S(N): 0x80 MixColumns column[1]: { 3, 2, 1, 1 } Vector multiplier: { 1, 1, 1, 3, 2, 1, 1, 3 } Table entry[0x3a]: { 0x80, 0x80, 0x80, 0x9b, 0x1b, 0x80, 0x80, 0x9b } Product: { 0x9b, 0x1b, 0x80, 0x80 }

Since the first byte of the eight-byte vector multiplier is always chosen to be 1, the value of S(N) may be lookup up by extracting the first byte of the Nth table entry.

Definition at line 139 of file aes.c.

Field Documentation

Table entries, indexed by S(N)

Definition at line 141 of file aes.c.

Referenced by aes_final(), aes_generate(), aes_key_sbox(), and aes_setkey().

The documentation for this struct was generated from the following file: