rijndael: split AES-NI functions to separate file
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Mon, 1 Dec 2014 19:10:19 +0000 (21:10 +0200)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Mon, 1 Dec 2014 19:10:19 +0000 (21:10 +0200)
commit67d529630e838daeb8cb9c6d7ef660c01ef34fee
tree04d944f397e45ebd79d34b34a85b8ae2e439da97
parentd53ea84bed37b973f7ce59262c50b33700cd8311
rijndael: split AES-NI functions to separate file

* cipher/Makefile.in: Add 'rijndael-aesni.c'.
* cipher/rijndael-aesni.c: New.
* cipher/rijndael-internal.h: New.
* cipher/rijndael.c (MAXKC, MAXROUNDS, BLOCKSIZE, ATTR_ALIGNED_16)
(USE_AMD64_ASM, USE_ARM_ASM, USE_PADLOCK, USE_AESNI, RIJNDAEL_context)
(keyschenc, keyschdec, padlockkey): Move to 'rijndael-internal.h'.
(u128_s, aesni_prepare, aesni_cleanup, aesni_cleanup_2_6)
(aesni_do_setkey, do_aesni_enc, do_aesni_dec, do_aesni_enc_vec4)
(do_aesni_dec_vec4, do_aesni_cfb, do_aesni_ctr, do_aesni_ctr_4): Move
to 'rijndael-aesni.c'.
(prepare_decryption, rijndael_encrypt, _gcry_aes_cfb_enc)
(_gcry_aes_cbc_enc, _gcry_aes_ctr_enc, rijndael_decrypt)
(_gcry_aes_cfb_dec, _gcry_aes_cbc_dec) [USE_AESNI]: Move to functions
in 'rijdael-aesni.c'.
* configure.ac [mpi_cpu_arch=x86]: Add 'rijndael-aesni.lo'.
--

Clean-up rijndael.c before new new hardware acceleration support gets added.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/Makefile.am
cipher/rijndael-aesni.c [new file with mode: 0644]
cipher/rijndael-internal.h [new file with mode: 0644]
cipher/rijndael.c
configure.ac