
AES Key Expansion Algorithm in Block Cipher - Data Encryption Course
Learn the AES key expansion algorithm step by step for key length of 128 bits, essential for data encryption in block cipher. Dr. Fatimah Al-Ubaidy explains the key generation process and the significance of round constants in the encryption process.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Mustansiriyah University Engineering College AES Block Cipher Computer Engineering Dep. Key Generation Algorithm Lecturer: Dr. Fatimah Al-Ubaidy Block Cipher Class: Third Stage Course name: Data Encryption AES Key Expansion (for key length of 128 bits) The AES key expansion algorithm takes as input a 4-word (16-byte) key and produces a linear array of 44 words (176 bytes). This is sufficient to provide a 4-word round key for the initial AddRoundKey stage and each of the 10 rounds of the cipher. The following pseudocode describes the expansion: for (i = 0 ; i < 4 ; i++) [key[4*i] , key[4*i+1] , key[4*i+2] , key[4*i+3]] for (i = 4; i < 44 ; i++) temp = w[i 1]; if (i mod 4 = 0) temp = SubWord ( RotWord ( temp ) ) Rcon[i / 4]; w[i] = w[i 4] temp Where *RotWord performs a one-byte circular left shift on a word. *SubWord performs a byte substitution on each byte of its input word using the S-box. *Rcon[j] is a round constant. 1
Mustansiriyah University Engineering College AES Block Cipher Computer Engineering Dep. Key Generation Algorithm Lecturer: Dr. Fatimah Al-Ubaidy Block Cipher Class: Third Stage Course name: Data Encryption AES Key Expansion The round constant is different for each round and is defined as Rcon[j] = (RC[j], 0, 0, 0), with RC[1] = 1, RC[j] = 2 RC[j - 1]. The values of RC[j] in hexadecimal are: For example: Suppose that the round key for round 8 is EA D2 73 21 B5 8D BA D2 31 2B F5 60 7F 8D 29 2F Then the first 4 bytes (first column) of the round key for round 9 are calculated as follows: 2
Mustansiriyah University Engineering College AES Block Cipher Computer Engineering Dep. Key Generation Algorithm Lecturer: Dr. Fatimah Al-Ubaidy Block Cipher Class: Third Stage Course name: Data Encryption The powerful of the expansion key algorithm: Knowledge of a part of the cipher key or round key does not enable calculation of many other round-key bits. An invertible transformation [i.e., knowledge of any N consecutive words of the expanded key enables regeneration the entire expanded key] (N is key size in words). Speed on a wide range of processors. Usage of round constants to eliminate symmetries. Diffusion of cipher key differences into the round keys; that is, each key bit affects many round key bits. Enough nonlinearity to prohibit the full determination of round key differences from cipher key differences only. Simplicity of description. 3
Mustansiriyah University Engineering College AES Block Cipher Computer Engineering Dep. Key Generation Algorithm Lecturer: Dr. Fatimah Al-Ubaidy Block Cipher Class: Third Stage Course name: Data Encryption 4