- SubBytes—a non-linear substitution step where each byte is replaced with another according to a lookup table.
- ShiftRows—a transposition step where each row of the state is shifted cyclically a certain number of steps.
- MixColumns—a mixing operation which operates on the columns of the state, combining the four bytes in each column.
- AddRoundKey.
AES has 10 rounds in which state the following transformations
(called `layers’):
Byte
substitution (1 S-box used on every byte)
Shift rows
(permute bytes between groups/columns)
Mix columns
(uses matrix multiplication in GF(256))
Add round
key (XOR state with round key)
[1]ByteSub:
Each byte of state is replaced by byte indexed by row (left
4-bits) & column (right 4-bits)
Example: byte {95} is
replaced by byte in row 9 column 5 which has value
{2A}
[2] ShiftRows
Circular byte shift in each each
1st row is unchanged
2nd row does 1 byte circular shift to left
3rd row does 2
byte circular shift to left
4th row does 3
byte circular shift to left
Decrypt inverts using shifts to right.
Since state is processed by columns, this step permutes bytes
between the columns.
[3]MixColumn
The MixColumns stage is a
substitution that makes use of arithmetic over GF(2^8). Each byte of a column is mapped into a new value that is
a function of all four bytes in that column. It is designed as a matrix multiplication where each
byte is treated as a polynomial in GF(28). The inverse used
for decryption involves a different set of constants.
[4]AddRoundKey
Add
Round Key stage which is a simple bitwise
XOR of the current block with a portion of the expanded key. AES Key Scheduling:
Takes 128-bit (16-byte) key
and expands into array of 44 32-bit words.
AES Key Expansion:
AES Decryption:
AES decryption is not identical to encryption since steps done
in reverse.
AES can be
implemented very efficiently on an 8-bit processor.
AddRoundKey is a bytewise XOR operation.
ShiftRows is a simple byte
shifting operation.
SubBytes operates at the byte
level and only requires a lookup of a 256 byte table S.
MixColumns (matrix multiply)
can be implemented as byte XOR’s.
No comments:
Post a Comment