iPXE
Data Fields
aes_table_entry Union Reference

A single AES lookup table entry. More...

Data Fields

uint8_t byte [8]
 Viewed as an array of bytes. More...
 

Detailed Description

A single AES lookup table entry.

This represents the product (in the Galois field GF(2^8)) of an eight-byte vector multiplier with a single scalar multiplicand.

The vector multipliers used for AES will be {1,1,1,3,2,1,1,3} for MixColumns and {1,9,13,11,14,9,13,11} for InvMixColumns. This allows for the result of multiplying any single column of the [Inv]MixColumns matrix by a scalar value to be obtained simply by extracting the relevant four-byte subset from the lookup table entry.

For example, to find the result of multiplying the second column of the MixColumns matrix by the scalar value 0x80:

MixColumns column[0]: { 2, 1, 1, 3 } MixColumns column[1]: { 3, 2, 1, 1 } MixColumns column[2]: { 1, 3, 2, 1 } MixColumns column[3]: { 1, 1, 3, 2 } Vector multiplier: { 1, 1, 1, 3, 2, 1, 1, 3 } Scalar multiplicand: 0x80 Lookup table entry: { 0x80, 0x80, 0x80, 0x9b, 0x1b, 0x80, 0x80, 0x9b }

The second column of the MixColumns matrix is {3,2,1,1}. The product of this column with the scalar value 0x80 can be obtained by extracting the relevant four-byte subset of the lookup table entry:

MixColumns column[1]: { 3, 2, 1, 1 } Vector multiplier: { 1, 1, 1, 3, 2, 1, 1, 3 } Lookup table entry: { 0x80, 0x80, 0x80, 0x9b, 0x1b, 0x80, 0x80, 0x9b } Product: { 0x9b, 0x1b, 0x80, 0x80 }

The column lookups require only seven bytes of the eight-byte entry: the remaining (first) byte is used to hold the scalar multiplicand itself (i.e. the first byte of the vector multiplier is always chosen to be 1).

Definition at line 112 of file aes.c.

Field Documentation

◆ byte

uint8_t aes_table_entry::byte[8]

Viewed as an array of bytes.

Definition at line 114 of file aes.c.

Referenced by __attribute__(), aes_final(), aes_generate(), aes_invmixcolumns_entry(), aes_key_sbox(), aes_mixcolumns_entry(), and aes_setkey().


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