SubBytes

In this process, each byte of the state matrix is changed using Rijndael S-boxes. The S-box used is given by a mathematic function on the Galois field (28), which is used because its non linear properties. Once the S-box to use is obtained, the byte transformation is given by its two hexadecimal digits, which are used as the row and the column of the S-box for locating the new value of the byte.