Home GnuPG

rijndael-aesni: interleave last CTR encryption round with xoring

Description

rijndael-aesni: interleave last CTR encryption round with xoring

* cipher/rijndael-aesni.c (do_aesni_ctr_8): Interleave aesenclast
with input xoring.

Structure of 'aesenclast' instruction allows reordering last
encryption round and xoring of input block for small ~0.5%
improvement in performance.

Intel i7-4790K @ 4.0 Ghz:
AES | nanosecs/byte mebibytes/sec cycles/byte

CTR enc |     0.159 ns/B      6002 MiB/s     0.636 c/B
CTR dec |     0.159 ns/B      6001 MiB/s     0.636 c/B
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Dec 1 2018, 11:21 AM
Parents
rC168668228c7c: Use explicit_bzero for wipememory
Branches
Unknown
Tags
Unknown