diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2013-11-15 16:23:00 +0200 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2013-11-15 16:23:00 +0200 |
commit | ef9f52cbb39e46918c96200b09c21e931eff174f (patch) | |
tree | cb44bb767d8bdfd45c5376373f6ab6f32f351ab9 /cipher/camellia-arm.S | |
parent | c8ad83fb605fdbf6dc0b0dbcc8aedfbd477640da (diff) | |
download | libgcrypt-ef9f52cbb39e46918c96200b09c21e931eff174f.tar.gz |
Camellia: Add AVX/AES-NI key setup
* cipher/camellia-aesni-avx-amd64.S (key_bitlength, key_table): New
order of fields in ctx.
(camellia_f, vec_rol128, vec_ror128): New macros.
(__camellia_avx_setup128, __camellia_avx_setup256)
(_gcry_camellia_aesni_avx_keygen): New functions.
* cipher/camellia-aesni-avx2-amd64.S (key_bitlength, key_table): New
order of fields in ctx.
* cipher/camellia-arm.S (CAMELLIA_TABLE_BYTE_LEN, key_length): Remove
unused macros.
* cipher/camellia-glue.c (CAMELLIA_context): Move keytable to head for
better alignment; Make 'use_aesni_avx' and 'use_aesni_avx2' bitfield
members.
[USE_AESNI_AVX] (_gcry_camellia_aesni_avx_keygen): New prototype.
(camellia_setkey) [USE_AESNI_AVX || USE_AESNI_AVX2]: Read hw features
to variable 'hwf' and match features from it.
(camellia_setkey) [USE_AESNI_AVX]: Use AES-NI/AVX key setup if
available.
--
Use AVX/AES-NI for key-setup for small speed-up.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'cipher/camellia-arm.S')
-rw-r--r-- | cipher/camellia-arm.S | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/cipher/camellia-arm.S b/cipher/camellia-arm.S index 302f436c..c30d194a 100644 --- a/cipher/camellia-arm.S +++ b/cipher/camellia-arm.S @@ -28,11 +28,8 @@ .syntax unified .arm -#define CAMELLIA_TABLE_BYTE_LEN 272 - /* struct camellia_ctx: */ #define key_table 0 -#define key_length CAMELLIA_TABLE_BYTE_LEN /* register macros */ #define CTX %r0 |