Skip to content
uencoder

AES S-Box

The AES S-box is a 16×16 byte substitution table that maps each input byte to its multiplicative inverse over GF(2^8) followed by an affine transformation, providing nonlinear confusion.

Purpose

It injects nonlinearity into the AES round function so that the input-output relation cannot be approximated by linear or low-degree polynomial functions, resisting linear cryptanalysis.

Mechanism

For an input byte b: if b ≠ 0, compute its GF(2^8) inverse b^-1 (b = 0 maps to 0), then apply a fixed 8×8 binary-matrix affine transformation plus a constant XOR. The S-box is designed for low differential uniformity and high nonlinearity.

Use cases

  • SubBytes step of AES
  • InvSubBytes for AES decryption
  • Lookup tables in AES hardware implementations

Related tools

References