One AES-128 round applies all four steps (SubBytes, ShiftRows, MixColumns, AddRoundKey) to a 128-bit state. Then you do it nine more times, plus a final round. In software on a general-purpose CPU, each round requires:
- –16 table lookups for SubBytes (memory dependent, cache-pressure)
- –16 byte-level rotations for ShiftRows
- –64 GF(28) multiplications and 48 XORs for MixColumns
- –16 XORs for AddRoundKey
That’s hundreds of operations per round, ten rounds per block, and a timing side channel if the S-box lookups hit different cache lines for different key bytes. A table-based software AES is fast enough, but it’s not safe enough without constant-time mitigation.
What AES-NI Actually Does
Intel’s AESENC instruction, introduced in 2010, performs one full AES round in a single clock cycle. The S-box becomes a hardware lookup with no memory traffic. ShiftRows is just wiring. MixColumns uses dedicated GF(28) multiplier circuits. The entire datapath is constant-time by construction: there are no branches, no memory accesses, no cache lines to leak.
Modern AES-NI pipelines the ten rounds with 3–4 cycle latency, achieving 1–2 clock cycles per byte of throughput. On a 3 GHz core that’s roughly 10–20 GB/s, fast enough that TLS overhead is effectively zero on any server with a modern CPU.
The contrast with ChaCha20 is stark. ChaCha20 was designed to be fast without hardware, because its ARX operations (add, rotate, XOR) are cheap on any CPU. AES was designed for hardware from day one, and performs poorly without it. This is why Cloudflare and others deploy ChaCha20-Poly1305 for clients that lack AES-NI (older mobile devices, IoT) while defaulting to AES-GCM everywhere else.
The MixColumns circuit you just built is the exact computation that AES-NI performs in dedicated silicon, minus the pipelining and the parallel SubBytes lookup. In a real ASIC implementation, you’d unroll all ten rounds and instantiate four MixColumn blocks in parallel (one per column), giving you a fully pipelined single-cycle AES core.