Last week, I committed new ASM implementations of our AES-PRNG, AES-CTR and AES-GCM for mORMot 2.
They handle eight 128-bit at once in an interleaved fashion, as permitted by the CTR chaining mode. The aes-ni opcodes (
aesenc aesenclast) are used for AES process, and the GMAC of the AES-GCM mode is computed using the
Resulting performance is amazing: on my simple Core i3, I reach 2.6 GB/s for
aes-128-ctr, and 1.5 GB/s for
aes-128-gcm for instance - the first being actually faster than OpenSSL!