Commit 44893bc2 authored by Eric Biggers's avatar Eric Biggers Committed by Herbert Xu

crypto: x86/camellia-aesni-avx, avx2 - convert to skcipher interface

Convert the AESNI AVX and AESNI AVX2 implementations of Camellia from
the (deprecated) ablkcipher and blkcipher interfaces over to the
skcipher interface.  Note that this includes replacing the use of
ablk_helper with crypto_simd.
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 1af6d037
This diff is collapsed.
This diff is collapsed.
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#define CAMELLIA_TABLE_BYTE_LEN 272 #define CAMELLIA_TABLE_BYTE_LEN 272
#define CAMELLIA_PARALLEL_BLOCKS 2 #define CAMELLIA_PARALLEL_BLOCKS 2
struct crypto_skcipher;
struct camellia_ctx { struct camellia_ctx {
u64 key_table[CAMELLIA_TABLE_BYTE_LEN / sizeof(u64)]; u64 key_table[CAMELLIA_TABLE_BYTE_LEN / sizeof(u64)];
u32 key_length; u32 key_length;
...@@ -26,7 +28,7 @@ extern int __camellia_setkey(struct camellia_ctx *cctx, ...@@ -26,7 +28,7 @@ extern int __camellia_setkey(struct camellia_ctx *cctx,
const unsigned char *key, const unsigned char *key,
unsigned int key_len, u32 *flags); unsigned int key_len, u32 *flags);
extern int xts_camellia_setkey(struct crypto_tfm *tfm, const u8 *key, extern int xts_camellia_setkey(struct crypto_skcipher *tfm, const u8 *key,
unsigned int keylen); unsigned int keylen);
/* regular block cipher functions */ /* regular block cipher functions */
......
...@@ -1162,11 +1162,10 @@ config CRYPTO_CAMELLIA_AESNI_AVX_X86_64 ...@@ -1162,11 +1162,10 @@ config CRYPTO_CAMELLIA_AESNI_AVX_X86_64
tristate "Camellia cipher algorithm (x86_64/AES-NI/AVX)" tristate "Camellia cipher algorithm (x86_64/AES-NI/AVX)"
depends on X86 && 64BIT depends on X86 && 64BIT
depends on CRYPTO depends on CRYPTO
select CRYPTO_ALGAPI select CRYPTO_BLKCIPHER
select CRYPTO_CRYPTD
select CRYPTO_ABLK_HELPER
select CRYPTO_GLUE_HELPER_X86
select CRYPTO_CAMELLIA_X86_64 select CRYPTO_CAMELLIA_X86_64
select CRYPTO_GLUE_HELPER_X86
select CRYPTO_SIMD
select CRYPTO_XTS select CRYPTO_XTS
help help
Camellia cipher algorithm module (x86_64/AES-NI/AVX). Camellia cipher algorithm module (x86_64/AES-NI/AVX).
...@@ -1183,13 +1182,7 @@ config CRYPTO_CAMELLIA_AESNI_AVX2_X86_64 ...@@ -1183,13 +1182,7 @@ config CRYPTO_CAMELLIA_AESNI_AVX2_X86_64
tristate "Camellia cipher algorithm (x86_64/AES-NI/AVX2)" tristate "Camellia cipher algorithm (x86_64/AES-NI/AVX2)"
depends on X86 && 64BIT depends on X86 && 64BIT
depends on CRYPTO depends on CRYPTO
select CRYPTO_ALGAPI
select CRYPTO_CRYPTD
select CRYPTO_ABLK_HELPER
select CRYPTO_GLUE_HELPER_X86
select CRYPTO_CAMELLIA_X86_64
select CRYPTO_CAMELLIA_AESNI_AVX_X86_64 select CRYPTO_CAMELLIA_AESNI_AVX_X86_64
select CRYPTO_XTS
help help
Camellia cipher algorithm module (x86_64/AES-NI/AVX2). Camellia cipher algorithm module (x86_64/AES-NI/AVX2).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment