The next step in the cycle of a round consists in the permutation of a block at the byte level. To this end the bytes are exchanged within the individual lines (bi,0, bi,1, bi,2,..., ) of a block according to the schemata depicted in Tables 19.11-19.13.
Before ShiftRow | After ShiftRow | ||||||
---|---|---|---|---|---|---|---|
0 | 4 | 8 | 12 | 0 | 4 | 8 | 12 |
1 | 5 | 9 | 13 | 5 | 9 | 13 | 1 |
2 | 6 | 10 | 14 | 10 | 14 | 2 | 6 |
3 | 7 | 11 | 15 | 15 | 3 | 7 | 11 |
Before ShiftRow | After ShiftRow | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
0 | 4 | 8 | 12 | 16 | 20 | 0 | 4 | 8 | 12 | 16 | 20 |
1 | 5 | 9 | 13 | 17 | 21 | 5 | 9 | 13 | 17 | 21 | 1 |
2 | 6 | 10 | 14 | 18 | 22 | 10 | 14 | 18 | 22 | 2 | 6 |
3 | 7 | 11 | 15 | 19 | 23 | 15 | 19 | 23 | 3 | 7 | 11 |
Before ShiftRow | After ShiftRow | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 |
1 | 5 | 9 | 13 | 17 | 21 | 25 | 29 | 5 | 9 | 13 | 17 | 21 | 25 | 29 | 1 |
2 | 6 | 10 | 14 | 18 | 22 | 26 | 30 | 14 | 18 | 22 | 26 | 30 | 2 | 6 | 10 |
3 | 7 | 11 | 15 | 19 | 23 | 27 | 31 | 19 | 23 | 27 | 31 | 3 | 7 | 11 | 15 |
In each first row no exchange takes place. In lines i = 2, 3, 4 the bytes are rotated left by positions, from position j to position j − mod Lb, where is taken from Table 19.14
Lb |
|
|
|
---|---|---|---|
4 | 1 | 2 | 3 |
6 | 1 | 2 | 3 |
8 | 1 | 3 | 4 |
For inverting this step positions j in rows i = 2, 3, 4 are shifted to positions j + mod Lb.
Team-Fly |