key size used for an AES cipher specifies the number of transformation rounds that convert the input, called the plaintext, into the final output, called the ciphertext. The number of rounds are as follows: 10 rounds for 128-bit keys. 12 rounds for 192-bit keys. 14 rounds for 256-bit keys. Each round consists of several processing steps, including one that depends on the encryption key itself. A set of reverse rounds are applied to transform ciphertext back into the original plaintext using the same encryption key. High-level description of the algorithm round keys are derived from the cipher key using the AES key schedule. AES requires a separate 128-bit round key block for each round plus one more. Initial round key addition: each byte of the state is combined with a byte of the round key using bitwise xor. 9, 11 or 13 rounds: a non-linear substitution step where each byte is replaced with another according to a lookup table. a transposition step where the last three rows of the state are shifted cyclically a certain number of steps. a linear mixing operation which operates on the columns of the state, combining the four bytes in each column. Final round (making 10, 12 or 14 rounds in total): The step In the step, each byte in the state array is replaced with a using an 8-bit substitution box. Note that before round 0, the state array is simply the plaintext/input. This operation provides the non-linearity in the cipher. The S-box used is derived from the multiplicative inverse over , known to have good non-linearity properties. To avoid attacks based on simple algebraic properties, the S-box is constructed by combining the inverse function with an invertible affine transformation. The S-box is also chosen to avoid any fixed points (and so is a derangement), i.e., , and also any opposite fixed points, i.e., . While performing the decryption, the step (the inverse of ) is used, which requires first taking the inverse of the affine transformation and then finding the multiplicative inverse. The step The step operates on the rows of the state; it cyclically shifts the bytes in each row by a certain offset. For AES, the first row is left unchanged. Each byte of the second row is shifted one to the left. Similarly, the third and fourth rows are shifted by offsets of two and three respectively. In this way,