Advanced Encryption Standard - Interactive Learning Experience
The Advanced Encryption Standard (AES) is a symmetric encryption algorithm that operates on 128-bit blocks of data. It uses a substitution-permutation network structure with multiple rounds of transformation.
AES always works with 128-bit blocks (16 bytes), arranged in a 4Ć4 matrix called the State.
AES supports three key sizes:
AES uses four main transformation functions in each round:
Each byte in the state is replaced with a corresponding byte from the S-box (substitution box). This provides non-linearity to the cipher.
The rows of the state are cyclically shifted. Row 0 is not shifted, row 1 is shifted left by 1, row 2 by 2, and row 3 by 3.
Each column is multiplied by a fixed polynomial in GF(2āø). This provides diffusion by mixing the bytes within each column.
The state is XORed with the round key derived from the original key through key expansion.
The key expansion algorithm generates round keys from the original cipher key. For AES-128, it produces 11 round keys (including the initial key).
Here's a simplified implementation of AES core functions: