Lecture 8 - AES: The advanced encryption standard. In this chapter you will learn: Salient features of AES, the encryption key and its expansion, the overall structure of AES, the four steps in each round of processing, the substitution bytes step: subbytes and invsubbytes, the shift rows step: shiftrows and invshiftrows, the mix columns step: mixcolumns and invmixcolumns, the key expansion algorithm. | Lecture 8: AES: The Advanced Encryption Standard Lecture Notes on “Computer and Network Security” by Avi Kak (kak@) April 12, 2016 10:41am c 2016 Avinash Kak, Purdue University Goals: • To review the overall structure of AES and to focus particularly on the four steps used in each round of AES: (1) byte substitution, (2) shift rows, (3) mix columns, and (4) add round key. • Python and Perl implementations for creating the lookup tables for the byte substitution steps in encryption and decryption. • Python implementation of the Key Expansion Algorithms for the 128 bit, 192 bit, and 256 bit AES. • Perl implementations for creating histograms of the differentials and for constructing linear approximation tables in attacks on block ciphers. CONTENTS Section Title Page Salient Features of AES 3 The Encryption Key and Its Expansion 8 The Overall Structure of AES 10 The Four Steps in Each Round of Processing 13 The Substitution Bytes Step: SubBytes and InvSubBytes 17 Traditional Explanation of Byte Substitution: Constructing the 16 × 16 Lookup Table 20 Python and Perl Implementations for the AES Byte Substitution Step 25 The Shift Rows Step: ShiftRows and InvShiftRows 29 The Mix Columns Step: MixColumns and InvMixColumns 31 The Key Expansion Algorithm 34 The Algorithmic Steps in Going from one 4-Word Round Key to the Next 4-Word Round Key 38 Python Implementation of the Key Expansion Algorithm 44 Differential, Linear, and Interpolation Attacks on Block Ciphers 50 Homework Problems 83 2 Computer and Network Security by Avi Kak Lecture 8 : SALIENT FEATURES OF AES • AES is a block cipher with a block length of 128 bits. • AES allows for three different key lengths: 128, 192, or 256 bits. Most of our discussion will assume that the key length is 128 bits. [With regard to using a key length other than 128 bits, the main thing that changes in AES is how