Cryptography Reference
In-Depth Information
AES — Detailed Description
Much of the following description is taken from this author's topic [169], since
we maintain that it remains the best explanation at this level. The mathematics
required for this section is contained in Appendix A.
The Advanced Encryption Standard (AES) — Rijndael
In order to give even a brief description of Rijndael, we need to describe the
essential components of it.
The State
The state is the intermediate cipher resulting from application of the round
function. The state can be depicted as a 4
Nb matrix, with bytes as entries,
where Nb is the block length divided by 32. For instance, if the input block
has 256 bits, then Nb = 8 = 256 / 32, and the state would appear as a matrix
×
) 8 )
( a i,j )
M 4 × 8 ((
Z
/ 2
Z
of bytes. In this case, the state has 32 bytes. For an input block of 192 bits,
the state would have 24 bytes as a 4
×
Nb =4
×
6 matrix, and for a block of
length 128, it would have 16 bytes as a 4
×
Nb =4
×
4 matrix. Thus, we have
variable state size.
Note that the input block (or plaintext if the mode of operation is ECB) is
put into the state (matrix) by column: a 0 , 0 ,a 1 , 0 ,a 2 , 0 ,a 3 , 0 ,a 0 , 1 ,a 1 , 1 ... , and at
the end of the execution of the cipher the bytes are taken from the state in the
same order.
The Cipher Key
As with the state, the cipher key is portrayed as a 4
×
Nk matrix of bytes,
where Nk is the keylength divided by 32. For instance, if the key length is 128
bits, then the cipher key is ( k i,j )
) 8 ). Hence, we have variable
key size 16, 24, or 32 bytes, depending on key length 128, 192, or 256 bits.
M 4 × 4 ((
Z
/ 2
Z
Key Schedule and Round Keys
The roundkeys can be derived from the cipher key by means of the following
key schedule . There are two parts.
(1) The total number of round key bits equals B
( Nr +1), where B is the block
length and Nr is the number of rounds defined for each case in Table 3.1
on page 146. For instance, if the block length is 128 bits and Nr = 12 ,
then 1664 round key bits are required.
·
(2) The cipher key is expanded into the expanded key in the following fashion.
The expanded key is a linear array of 4-byte words (i.e. columns of the
key matrix), where the first Nk words contain the cipher key. All other
words are defined recursively in terms of previously defined words.
Search WWH ::




Custom Search