5.1 AES Implementation

This section is not intended to be a detailed description of the AES algorithm or its history. The intention is rather to describe the AVR-specific implementations for the various parts of the algorithm. Since memory is a scarce resource in embedded applications, the focus has been on saving code memory. The bootloader application will never be run the same time as the main code, and it is therefore not important to save data memory (RAM) as long as the data memory requirements do not exceed the capacity of the microcontroller.

In the following subsections, some basic mathematical operations and their AVR-specific implementations are described. Note that there are some references to finite field theory from mathematics. Knowledge of finite fields is not required to read this document, but the interested reader should study the AES specification.

Note: If the reader has sufficient knowledge of the implementation of AES, they can skip to Software Implementation and Usage without loss of continuity.