What is ShiftRows in AES?
ShiftRows is the second step in each round of the AES encryption algorithm. In this step, each row of the state matrix is cyclically shifted to the left by a certain number of bytes:
- Row 0: Not shifted
- Row 1: Shifted 1 position to the left
- Row 2: Shifted 2 positions to the left
- Row 3: Shifted 3 positions to the left
This operation provides diffusion by ensuring that the bytes from each column of the input state are spread out to different columns in the output state.
How to use this calculator
Enter a 32-character hexadecimal string (representing a 4×4 matrix of bytes) in the input field. You can choose between the forward ShiftRows operation (for encryption) or the inverse ShiftRows operation (for decryption).
The calculator will display the original state matrix, visualize the shifting process, and show the resulting matrix after the transformation.