Aes Algorithm
Aes Algorithm
(AES)
7.1
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
INTRODUCTION
7.2
7.1.1 History.
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.
7.3
7.1.3 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.
7.5
7.1.3 Continue
Figure 7.1 General design of AES encryption cipher
7.6
7.7
7.1.4 Continue
Figure 7.3 Block-to-state and state-to-block transformation
7.8
7.1.4 Continue
Example 7.1 Continue
7.9
7.10
72TRANSFORMATIONS
To provide security, AES uses four types of
transformations: substitution, permutation, mixing,
and key-adding.
Substitution
Permutation
Mixing
Key Adding
7.2.1 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.
7.12
7.2.1 Continue
Figure 7.6 SubBytes transformation
7.13
7.2.1 Continue
7.14
7.2.1 Continue
7.15
7.2.1 Continue
InvSubBytes
7.16
7.2.1 Continue
InvSubBytes (Continued)
7.17
7.2.1 Continue
Example 7.2
Figure 7.7 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 7.7 SubBytes transformation for Example 7.2
7.18
7.2.1 Continue
Figure 7.8 SubBytes and InvSubBytes processes
7.20
7.2.2 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
7.23
7.2.2 Continue
InvShiftRows
In the decryption, the transformation
InvShiftRows and the shifting is to the right.
7.24
is
called
7.2.2 Continue
Example 7.4
Figure 7.10 shows how a state is transformed using ShiftRows
transformation. The figure also shows that InvShiftRows
transformation creates the original state.
7.25
7.2.3 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 7.11 Mixing bytes using matrix multiplication
7.26
7.2.3 Continue
Figure 7.12 Constant matrices used by MixColumns and InvMixColumns
7.27
7.2.3 Continue
MixColumns
The MixColumns transformation operates at the column
level; it transforms each column of the state to a new
column.
Figure 7.13 MixColumns transformation
7.28
7.2.3 Continue
InvMixColumns
The InvMixColumns transformation is basically the same
as the MixColumns transformation.
Note
The MixColumns and InvMixColumns
transformations are inverses of each other.
7.29
7.2.3 Continue
Example 7.5
Figure 7.14 shows how a state is transformed using the
MixColumns transformation. The figure also shows that the
InvMixColumns transformation creates the original one.
Figure 7.14 The MixColumns transformation in Example 7.5
7.31
7.32
7.2.4 Continue
Figure 7.15 AddRoundKey transformation
7.33
7.34
7.36