Understanding Vectorization Through a New XTS Implementation
summary
OpenSSL 3.5 ships a new AES‑XTS engine that implements AES rounds with VAESENC on AVX‑512 ZMM registers, broadcasts one 128‑bit key across lanes, and vectorizes four blocks per AES invocation while generating many tweaks in parallel using PCLMUL with 0x87 (carryless multiply and left‑shift/XOR trick). Tweak generation is interleaved between rounds to saturate different ports, the implementation issues four parallel instruction streams (stops there for register pressure) and shows roughly a 2× throughput gain in benchmarks.
AI-written summary · about
