Download presentation
Presentation is loading. Please wait.
Published byMark Norman Modified over 6 years ago
1
Advanced Encryption Standard (Symmetric key Algorithm)
(AES) (Symmetric key Algorithm) Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
2
INTRODUCTION The Advanced Encryption Standard (AES) is a symmetric-key block cipher published by the National Institute of Standards and Technology (NIST) in December 2001. In February 2001, NIST announced that a draft of the Federal Information Processing Standard (FIPS) was available for public review and comment. Finally, AES was published as FIPS 197 in the Federal Register in December 2001.
3
AES was designed for following characteristics:
1. Resistance against all known attacks. 2. Speed and code compactness on a wide range of platform 3. Design Simplicity, work with smart cards.
4
AES has defined three versions, with 10, 12, and 14 rounds.
AES is a non-Feistel cipher that encrypts and decrypts a data block of 128 bits. It uses 10, 12, or 14 rounds. The key size, which can be 128, 192, or 256 bits, depends on the number of rounds. Note AES has defined three versions, with 10, 12, and 14 rounds. Each version uses a different cipher key size (128, 192, or 256), but the round keys are always 128 bits.
5
Continue Three different AES version: AES128,AES192 and AES256
Figure: General design of AES encryption cipher The no. of round keys generated by the key-expansion algorithm is always one more Than the no. of rounds. Number of round keys= Nr + 1
6
Data Units(AES uses Five units of measurement to refer to data)
(Bit, Byte, Word, Block, State) Data units used in AES
7
State AES uses several rounds in which each round is made of several stages. Data block is transformed from one stage to another. Block-to-state and state-to-block transformation
8
Continue Changing plaintext to state Example
9
Structure of Each Round
Note: The pre-round section uses only one transformation (AddRoundKey) MixColumns transformation is missing in last round Figure: Structure of each round at the encryption site
10
TRANSFORMATIONS To provide security, AES uses four types of transformations: Substitution, Permutation, Mixing, and Key-adding.
11
Substitution AES, like DES, uses substitution. AES uses two invertible transformations. SubBytes The first transformation, SubBytes, is used at the encryption site. To substitute a byte, we interpret the byte as two hexadecimal digits. Note The SubBytes operation involves 16 independent byte-to-byte transformations.
12
Continue Figure: SubBytes transformation
13
Continue SubBytes transformation table (S-Boxes)
14
Continue InvSubBytes transformation table (S-Boxes)
15
Continue Example Figure shows how a state is transformed using the SubBytes transformation. The figure also shows that the InvSubBytes transformation creates the original one. Note that if the two bytes have the same values, their transformation is also the same. Figure: SubBytes transformation for Example 7.2
16
Continue Figure: SubBytes and InvSubBytes processes
17
Permutation Another transformation found in a round is shifting, which permutes the bytes. ShiftRows In the encryption, the transformation is called ShiftRows. Figure 7.9 ShiftRows transformation
18
Continue Example Figure shows how a state is transformed using ShiftRows transformation. The figure also shows that InvShiftRows transformation creates the original state. Figure: ShiftRows transformation in Example
19
Mixing We need an interbyte transformation that changes the bits inside a byte, based on the bits inside the neighboring bytes. We need to mix bytes to provide diffusion at the bit level. Figure: Mixing bytes using matrix multiplication
20
Continue Figure: Constant matrices used by MixColumns and InvMixColumns
21
Continue MixColumns The MixColumns transformation operates at the column level; it transforms each column of the state to a new column. Figure: MixColumns transformation
22
Continue InvMixColumns
The InvMixColumns transformation is basically the same as the MixColumns transformation. Note The MixColumns and InvMixColumns transformations are inverses of each other.
23
Continue
24
Continue Example In GF(28), irreducible polynomial mod(x4+x3+x+1)
({02} · {87}) ({03} · {6E}) {46} {A6} = {47} {87} ({02} · {6E}) ({03}· {46}) {A6} = {37} {87} {6E} ({02} · {46} ({03} · {A6}) = {94} ({03} · {87}) {6E} {46} ({02} · {A6} = {ED} For the first equation, {02} · {87} = x*(x7 + x2+x+1) = ( ) l because of the most left 1, ( ) ( ) = ( ); and {03} · {6E} = (x+1)*(x6 +x5 + x3+ x2+x) = (x6 +x5 + x3+ x2+x) (x)*(x6 +x5 + x3+ x2+x), the same statement for the second side. = {6E} ({02} · {6E}) = ( ) ( ) = ( ). {02} · {87} = {03} · {6E} = {46} = {A6} = Answer:Total = {47}
25
Continue Example Figure shows how a state is transformed using the MixColumns transformation. The figure also shows that the InvMixColumns transformation creates the original one. Figure: The MixColumns transformation in Example 7.5
26
The AddRoundKey transformation is the inverse of itself.
Key Adding AddRoundKey AddRoundKey proceeds one column at a time. AddRoundKey adds a round key word with each state column matrix; the operation in AddRoundKey is matrix addition. Note The AddRoundKey transformation is the inverse of itself.
27
Continue Figure: AddRoundKey transformation
28
KEY EXPANSION To create round keys for each round, AES uses a key-expansion process. If the number of rounds is Nr , the key-expansion routine creates Nr bit round keys from one single 128-bit cipher key.
29
Continued
30
Key Expansion in AES-128 Figure: Key expansion in AES
31
Continue
32
Continue The key-expansion routine can either use the above table when calculating the words or use the GF(28) field to calculate the leftmost byte dynamically, as shown below (prime is the irreducible polynomial):
33
Continue Example 7.6 Table shows how the keys for each round are calculated assuming that the 128-bit cipher key agreed upon by Alice and Bob is (24 75 A2 B E AA 54 87)16.
34
Continue Example Each round key in AES depends on the previous round key. The dependency, however, is nonlinear because of SubWord transformation. The addition of the round constants also guarantees that each round key will be different from the previous one. Example The two sets of round keys can be created from two cipher keys that are different only in one bit.
35
Continue Example Continue
36
Continue Example The concept of weak keys, as we discussed for DES, does not apply to AES. Assume that all bits in the cipher key are 0s. The following shows the words for some rounds: The words in the pre-round and the first round are all the same. In the second round, the first word matches with the third; the second word matches with the fourth. However, after the second round the pattern disappears; every word is different.
37
Key Expansion in AES-192 and AES-256
Key-expansion algorithms in the AES-192 and AES-256 versions are very similar to the key expansion algorithm in AES-128, with the following differences:
38
Key-Expansion Analysis
The key-expansion mechanism in AES has been designed to provide several features that thwart the cryptanalyst.
39
CIPHERS AES uses four types of transformations for encryption and decryption. In the standard, the encryption algorithm is referred to as the cipher and the decryption algorithm as the inverse cipher.
40
Original Design Figure: Ciphers and inverse ciphers of the original design
41
Alternative Design Figure: Invertibility of SubBytes and ShiftRows combinations
42
Continue Figure: Invertibility of MixColumns and AddRoundKey combination
43
Continue Figure: Cipher and reverse cipher in alternate design
44
Continue Changing Key-Expansion Algorithm
Instead of using InvRoundKey transformation in the reverse cipher, the key-expansion algorithm can be changed to create a different set of round keys for the inverse cipher.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.