Camellia, prepare glue code for AES-NI/AVX implementation
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Wed, 23 Jan 2013 09:55:03 +0000 (11:55 +0200)
committerWerner Koch <wk@gnupg.org>
Tue, 19 Feb 2013 10:02:24 +0000 (11:02 +0100)
commit537f12ce072d568f9fa344c447d32b2e0efffbe8
treebec3f13d3e200e70ac8594cc34927d95898c6a54
parent09ac5d87d11aa0b1fa0e0a4184ab03b3671a73e2
Camellia, prepare glue code for AES-NI/AVX implementation

* cipher/camellia-glue.c (ATTR_ALIGNED_16): Add macro.
(CAMELLIA_encrypt_stack_burn_size): Add macro.
(camellia_encrypt): Use macro above for stack burn size.
(CAMELLIA_decrypt_stack_burn_size): Add macro.
(camellia_decrypt): Use macro above for stack burn size.
(_gcry_camellia_ctr_enc): New function.
(_gcry_camellia_cbc_dec): New function.
(selftest_ctr_128): New function.
(selftest): Call function above.
* cipher/cipher.c (gcry_cipher_open) [USE_CAMELLIA]: Register bulk
functions for CBC-decryption and CTR-mode.
* src/cipher.h (_gcry_camellia_ctr_enc): New prototype.
(_gcry_camellia_cbc_dec): New prototype.
--

AES-NI/AVX implementation needs multi-block input, so prepare glue code for
that by adding bulk-functions for CBC-decryption and CTR-mode.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
cipher/camellia-glue.c
cipher/cipher.c
src/cipher.h