# AES Transformation Function

Again AES Transformation Function is the important topic of the Subject Information and Network Security.

**Substitute bytes Transformation (Forward & Inverse): AES Transformation Function**

- Substitute bytes transformation is simple table lookup. There is the separate table for forward and inverse operation.
- 16 X 16 matrix of byte value called s-box that contains the permutation of all 256 8-bit values. Each individual byte of the state is mapped into a new byte in the following way.
- The leftmost 4-bit of the byte are used as row number and rightmost 4-bit are used as a column number.
- Now row and column number serve as an index into the box to select unique 8-bit output value.

- For example hexadecimal value 68 is referred to row 6 and column 8 and value in the table at that position is 45 so byte value 68 is replaced with 45.
- For inverse substitute byte procedure is same but S-box is different. The reverse of above example shown in the figure.

**AES Inverse S-Box**

##### S-box constructed in the following fashion:

- Construction of S-box:
- Initialize the S-box with the byte values in ascending sequence row by row.
- Map each byte in the S-box to its multiplicative inverse in the finite field GF (2
^{8}). The value {00} mapped to itself. - Consider that each byte in the S-box consists of 8 bits labelled (b
_{7}, b_{6}, b_{5}, b_{4}, b_{3}, b_{2}, b_{1}, b_{0}). Apply the transformation using matrix multiplication as shown in the figure. - Finally, convert that bit column vector to byte.

- Construction of IS-box:
- Initialize the IS-box with the byte values in ascending sequence row by row.
- Moreover, Consider that each byte in the IS-box consists of 8 bits labelled (b
_{7}, b_{6}, b_{5}, b_{4}, b_{3}, b_{2}, b_{1}, b_{0}). Apply the transformation using matrix multiplication as shown in the figure. - Moreover, Convert that bit column vector to byte.
- Map each byte in the IS-box to its multiplicative inverse in the finite field GF (2
^{8}).

**ShiftRows Transformation (Forward & Inverse)**

The **forward shift row transformation** performed as below:

- The first row of the state not altered.
- In second row we apply 1-byte circular left shift.
- Moreover, the third row, we apply 2-byte circular left shift.
- In the fourth row, we apply 3-byte circular left shift.

In the **inverse shift row transformation**, we apply right circular rotation.

- The first row of the state not altered.
- In second row we apply 1-byte circular right shift.
- the third row, we apply 2-byte circular right shift.
- In the fourth row, we apply 3-byte circular right shift.

**MixColumns Transformation (Forward & Inverse): AES Transformation Function**

In the forward MixColumn transformation each byte of a column mapped into a new value that a function of all bytes in that column.

The transformation can define by the following matrix multiplication on stats:

Moreover, In this case, the individual additions and multiplications performed in GF.

In the inverse MixColumn transformation procedure same but the matrix different which shown below.

**AddRoundKey Transformation: AES Transformation Function**

In this transformation, 128 bits state bitwise XORed with the 128 bits of the round key.

Moreover, It viewed as a byte level operation.

Example:

The inverse of AddRound Key is same because the inverse of XOR is again XOR.

**Related Terms**

Information and Network Security, Feistel Cipher, Details: Single Round, Transposition Techniques

## Leave a Reply