wire / wire-format / aes-block
AES is a symmetric block cipher with a 128-bit block size and key sizes of 128, 192, or 256 bits. A 128-bit block is a 4x4 matrix of bytes (state). Encryption: initial AddRoundKey, then (Nr-1) rounds of SubBytes (S-box), ShiftRows, MixColumns, AddRoundKey, then a final round without MixColumns. Nr = 10 (128-bit key), 12 (192-bit), or 14 (256-bit).
aka: AES (Advanced Encryption Standard) block structure
spec: FIPS 197 (AES)
AES is a symmetric block cipher with a 128-bit block size and key sizes of 128, 192, or 256 bits. A 128-bit block is a 4x4 matrix of bytes (state). Encryption: initial AddRoundKey, then (Nr-1) rounds of SubBytes (S-box), ShiftRows, MixColumns, AddRoundKey, then a final round without MixColumns. Nr = 10 (128-bit key), 12 (192-bit), or 14 (256-bit).
| field | size | meaning |
|---|---|---|
| State | 16 bytes (128 bits) | 4x4 matrix of bytes, column-major order. Input plaintext block. |
| SubBytes | in-place | Each byte replaced by S-box lookup (non-linear substitution, 256-entry table). |
| ShiftRows | in-place | Row i shifted left by i bytes (row 0: 0, row 1: 1, row 2: 2, row 3: 3). |
| MixColumns | in-place | Each column multiplied by a fixed 4x4 matrix over GF(2^8) (polynomial 0x11B). |
| AddRoundKey | 16 bytes | XOR state with the round key (128 bits, derived by key schedule). |
| Key schedule | 11/13/15 round keys | Expands the cipher key into (Nr+1) round keys using RotWord, SubWord (S-box), and Rcon (round constant). |
example:
00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff
AES input block (plaintext) in column-major order
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/aes-block
or /wire-format/aes-block.json