rijndael: further optimizations for AES-NI accelerated CBC and CFB bulk modes
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Sat, 6 Dec 2014 13:09:13 +0000 (15:09 +0200)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Fri, 12 Dec 2014 21:49:57 +0000 (23:49 +0200)
commit4f46374502eb988d701b904f83819e2cf7b1755c
tree2266d894374b80252e6baa988cb1d228da451136
parent4a0795af021305f9240f23626a3796157db46bd7
rijndael: further optimizations for AES-NI accelerated CBC and CFB bulk modes

* cipher/rijndael-aesni.c (do_aesni_enc, do_aesni_dec): Pass
input/output through SSE register XMM0.
(do_aesni_cfb): Remove.
(_gcry_aes_aesni_encrypt, _gcry_aes_aesni_decrypt): Add loading/storing
input/output to/from XMM0.
(_gcry_aes_aesni_cfb_enc, _gcry_aes_aesni_cbc_enc)
(_gcry_aes_aesni_cfb_dec): Update to use renewed 'do_aesni_enc' and
move IV loading/storing outside loop.
(_gcry_aes_aesni_cbc_dec): Update to use renewed 'do_aesni_dec'.
--

CBC encryption speed is improved ~16% on Intel Haswell and CFB encryption ~8%.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/rijndael-aesni.c