In AES's Galois field, addition and XOR are the same operation

Galois Finite Fields and the Advanced Encryption Standard (AES)

A lecture walkthrough of how AES uses GF(2^8), the Galois field with 256 elements. Bytes map to polynomials over single-bit coefficients, so addition, subtraction, and XOR all collapse into one operation, and multiplication is polynomial multiplication reduced by 0x11b. The AES round then chains S-box inverses, ShiftRows, MixColumns, and key XOR—layered operations that resist the linear attacks simpler ciphers fall to.

Because of this single-bit binary wraparound, it turns out that in GF(2^8), addition, subtraction, and XOR are all the same operation.
  1. mmozeiko

    > Inverses exist for each operation, which makes decryption possible.

    It is worth mentioning that in modern AES usage this feature does not really matter, because block cipher is used in CTR mode. In CTR block cipher is used to create long keystream bytes (pretty much one-time-pad key). This keystream gets xor'ed with plaintext to get ciphertext. Then getting from ciphertext back to plaintext is exactly the same xor operation with same keystream, no inverse AES operations needed.

  2. benlivengood

    Hey, one of my university professors! GF2^8 is also great for RAID6+ and Reed Solomon codes.

    Back in the day it was tractable to build AES lookup tables for computing MixColumns and SubBytes similar to the site's multiplication table. Then djb found a remote timing attack, so processors started implementing hardware AES instructions.

  3. ceroxylon

    >Weirdly, members of a field of size pn are equivalent to polynomials of degree up to n

    Wouldn't it be equivalent to polynomials of degree less than n (up to n−1)?

More from this day

2026-10-19