Simten
Accelerator~60 nodes•Interactive tutorial • ~10 min read

AES in Hardware

AES-GCM encrypts roughly 80% of HTTPS traffic today. It’s so ubiquitous that Intel, AMD, and ARM all built dedicated silicon to accelerate it: AES-NI, a set of CPU instructions that do one full round in a single clock cycle.

Why does AES need hardware help when something like ChaCha20 doesn’t? Because AES is genuinely complex at the gate level. One round requires a 256-entry lookup table (the S-box), Galois field multiplication, and multiple layers of XOR mixing. Without dedicated silicon, it’s slow and vulnerable to cache-timing attacks.

In this post, you’ll build the three hardware operations that make up one AES round (SubBytes, XTime, the GF(28) multiply at the heart of MixColumns, and the full MixColumns step), and verify each against the FIPS 197 test vectors.