rinjdael: add parallel processing for CFB decryption with AES-NI
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Thu, 23 May 2013 11:15:41 +0000 (14:15 +0300)
committerWerner Koch <wk@gnupg.org>
Thu, 23 May 2013 15:33:54 +0000 (17:33 +0200)
commit319ee14f2aab8db56a830fd7ac8926f91b4f738a
treede81ffd33102bb974642bd51fb966d1a56306ae8
parentb402de8b9c4a9f269faf03ca952b1eb68a1f33c8
rinjdael: add parallel processing for CFB decryption with AES-NI

* cipher/cipher-selftest.c (_gcry_selftest_helper_cfb_128): New
function for CFB selftests.
* cipher/cipher-selftest.h (_gcry_selftest_helper_cfb_128): New
prototype.
* cipher/rijndael.c [USE_AESNI] (do_aesni_enc_vec4): New function.
(_gcry_aes_cfb_dec) [USE_AESNI]: Add parallelized CFB decryption.
(selftest_cfb_128): New function.
(selftest): Call selftest_cfb_128.
--

CFB decryption can be parallelized for additional performance. On Intel
Sandy-Bridge processor, this change makes CFB decryption 4.6 times faster.

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