Page 47 - DCAP516_COMPUTER_SECURITY
P. 47
Unit 4: Cryptography
Notes
Figure 4.3: Subbyte Step
The ShiftRows Step
Figure 4.4: Shift Rows Step
In the ShiftRows step as shown in Figure 4.4, bytes in each row of the state are shifted cyclically
to the left. The number of places each byte is shifted differs for each row.
The ShiftRows step operates on the rows of the state; it cyclically shifts the bytes in each row by
a certain offset. For AES, the first row is left unchanged. Each byte of the second row is shifted
one to the left. Similarly, the third and fourth rows are shifted by offsets of two and three
respectively. For the block of size 128 bits and 192 bits the shifting pattern is the same. In this
way, each column of the output state of the ShiftRows step is composed of bytes from each
column of the input state. (Rijndael variants with a larger block size have slightly different
offsets). In the case of the 256-bit block, the first row is unchanged and the shifting for second,
third and fourth row is 1 byte, 3 bytes and 4 bytes respectively—this change only applies for the
Rijndael cipher when used with a 256-bit block, as AES does not use 256-bit blocks.
The MixColumns Step
Figure 4.5: MixColumn Step
LOVELY PROFESSIONAL UNIVERSITY 41