AES is a symmetric cipher, which means that the same key is used for encryption and decryption. All of the AES security is based on the key because the the algorithm to encrypt and decrypt is known. The main security issue that it has is the key exchange, because for an attacker it is easier to try to intercept this key than to try to discover it.
Let's now explain the decryption process in the AES algorith. As in the encryption, AES operates on a 4x4 matrix called state. As for the key, it can have a length of 128, 192 or 256 bits. This key size will determine the number of rounds that will be performed during the decryption process: 10, 12 or 14.
The process is as follows:
1 - Key expansion. The Rijndael key schedule is used.
2 - Initial round:
AddRoundKey
3 - Rounds:
InvShiftRows - Cyclic transposition of the bytes in the rows.
InvSubBytes - An inverse subtitution is applied to each byte of the state by using S-boxes
AddRoundKey - Each byte of the state is combined with the round key, which is obtained using a XOR operation.
InvMixColumns - Complex column mixing using a linear transformation on the columns.
4 - Final round, in which the following operations are performed:
InvShiftRows
InvSubBytes
AddRoundKey
The operations of the third round are the ones that area repeated depending on the size of the key.