Commit e16bf974 authored by Eric Biggers's avatar Eric Biggers Committed by Herbert Xu

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

Convert the AVX and AVX2 implementations of Serpent 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 340b8303
This diff is collapsed.
This diff is collapsed.
...@@ -2,8 +2,11 @@ ...@@ -2,8 +2,11 @@
#ifndef ASM_X86_SERPENT_AVX_H #ifndef ASM_X86_SERPENT_AVX_H
#define ASM_X86_SERPENT_AVX_H #define ASM_X86_SERPENT_AVX_H
#include <linux/crypto.h> #include <crypto/b128ops.h>
#include <crypto/serpent.h> #include <crypto/serpent.h>
#include <linux/types.h>
struct crypto_skcipher;
#define SERPENT_PARALLEL_BLOCKS 8 #define SERPENT_PARALLEL_BLOCKS 8
...@@ -33,7 +36,7 @@ extern void __serpent_crypt_ctr(void *ctx, u128 *dst, const u128 *src, ...@@ -33,7 +36,7 @@ extern void __serpent_crypt_ctr(void *ctx, u128 *dst, const u128 *src,
extern void serpent_xts_enc(void *ctx, u128 *dst, const u128 *src, le128 *iv); extern void serpent_xts_enc(void *ctx, u128 *dst, const u128 *src, le128 *iv);
extern void serpent_xts_dec(void *ctx, u128 *dst, const u128 *src, le128 *iv); extern void serpent_xts_dec(void *ctx, u128 *dst, const u128 *src, le128 *iv);
extern int xts_serpent_setkey(struct crypto_tfm *tfm, const u8 *key, extern int xts_serpent_setkey(struct crypto_skcipher *tfm, const u8 *key,
unsigned int keylen); unsigned int keylen);
#endif #endif
...@@ -1460,11 +1460,10 @@ config CRYPTO_SERPENT_SSE2_586 ...@@ -1460,11 +1460,10 @@ config CRYPTO_SERPENT_SSE2_586
config CRYPTO_SERPENT_AVX_X86_64 config CRYPTO_SERPENT_AVX_X86_64
tristate "Serpent cipher algorithm (x86_64/AVX)" tristate "Serpent cipher algorithm (x86_64/AVX)"
depends on X86 && 64BIT depends on X86 && 64BIT
select CRYPTO_ALGAPI select CRYPTO_BLKCIPHER
select CRYPTO_CRYPTD
select CRYPTO_ABLK_HELPER
select CRYPTO_GLUE_HELPER_X86 select CRYPTO_GLUE_HELPER_X86
select CRYPTO_SERPENT select CRYPTO_SERPENT
select CRYPTO_SIMD
select CRYPTO_XTS select CRYPTO_XTS
help help
Serpent cipher algorithm, by Anderson, Biham & Knudsen. Serpent cipher algorithm, by Anderson, Biham & Knudsen.
...@@ -1481,13 +1480,7 @@ config CRYPTO_SERPENT_AVX_X86_64 ...@@ -1481,13 +1480,7 @@ config CRYPTO_SERPENT_AVX_X86_64
config CRYPTO_SERPENT_AVX2_X86_64 config CRYPTO_SERPENT_AVX2_X86_64
tristate "Serpent cipher algorithm (x86_64/AVX2)" tristate "Serpent cipher algorithm (x86_64/AVX2)"
depends on X86 && 64BIT depends on X86 && 64BIT
select CRYPTO_ALGAPI
select CRYPTO_CRYPTD
select CRYPTO_ABLK_HELPER
select CRYPTO_GLUE_HELPER_X86
select CRYPTO_SERPENT
select CRYPTO_SERPENT_AVX_X86_64 select CRYPTO_SERPENT_AVX_X86_64
select CRYPTO_XTS
help help
Serpent cipher algorithm, by Anderson, Biham & Knudsen. Serpent cipher algorithm, by Anderson, Biham & Knudsen.
......
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