Home GnuPG

Add carryless 8-bit addition fast-path for AES-NI CTR mode
e11895da1f4aUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Add carryless 8-bit addition fast-path for AES-NI CTR mode

* cipher/rijndael-aesni.c (do_aesni_ctr_4): Do addition using
CTR in big-endian form, if least-significant byte does not overflow.

Patch improves AES-NI CTR speed by 20%.

Benchmark on Intel Haswell (3.2 Ghz):

Before:
AES | nanosecs/byte mebibytes/sec cycles/byte

CTR enc |     0.273 ns/B    3489.8 MiB/s     0.875 c/B
CTR dec |     0.273 ns/B    3491.0 MiB/s     0.874 c/B

After:

CTR enc |     0.228 ns/B    4190.0 MiB/s     0.729 c/B
CTR dec |     0.228 ns/B    4190.2 MiB/s     0.729 c/B
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Aug 10 2015, 7:48 PM
Parents
rC80321eb3a63a: Add additional SHA3 test-vectors
Branches
Unknown
Tags
Unknown

Event Timeline

Jussi Kivilinna <jussi.kivilinna@iki.fi> committed rCe11895da1f4a: Add carryless 8-bit addition fast-path for AES-NI CTR mode (authored by Jussi Kivilinna <jussi.kivilinna@iki.fi>).Aug 12 2015, 4:41 PM