forked from Minki/linux
facd416fbc
Introduce new assembler functions to avoid use temporary stack buffers in glue code. This also allows use of vector instructions for xoring output in CTR and CBC modes and construction of IVs for CTR mode. ECB mode sees ~0.5% decrease in speed because added one extra function call. CBC mode decryption and CTR mode benefit from vector operations and gain ~3%. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
20 lines
558 B
C
20 lines
558 B
C
#ifndef ASM_X86_SERPENT_AVX_H
|
|
#define ASM_X86_SERPENT_AVX_H
|
|
|
|
#include <linux/crypto.h>
|
|
#include <crypto/serpent.h>
|
|
|
|
#define SERPENT_PARALLEL_BLOCKS 8
|
|
|
|
asmlinkage void serpent_ecb_enc_8way_avx(struct serpent_ctx *ctx, u8 *dst,
|
|
const u8 *src);
|
|
asmlinkage void serpent_ecb_dec_8way_avx(struct serpent_ctx *ctx, u8 *dst,
|
|
const u8 *src);
|
|
|
|
asmlinkage void serpent_cbc_dec_8way_avx(struct serpent_ctx *ctx, u8 *dst,
|
|
const u8 *src);
|
|
asmlinkage void serpent_ctr_8way_avx(struct serpent_ctx *ctx, u8 *dst,
|
|
const u8 *src, le128 *iv);
|
|
|
|
#endif
|