1 #ifndef ASM_X86_SERPENT_AVX_H
2 #define ASM_X86_SERPENT_AVX_H
4 #include <linux/crypto.h>
5 #include <crypto/serpent.h>
7 #define SERPENT_PARALLEL_BLOCKS 8
9 struct serpent_lrw_ctx
{
10 struct lrw_table_ctx lrw_table
;
11 struct serpent_ctx serpent_ctx
;
14 struct serpent_xts_ctx
{
15 struct serpent_ctx tweak_ctx
;
16 struct serpent_ctx crypt_ctx
;
19 asmlinkage
void serpent_ecb_enc_8way_avx(struct serpent_ctx
*ctx
, u8
*dst
,
21 asmlinkage
void serpent_ecb_dec_8way_avx(struct serpent_ctx
*ctx
, u8
*dst
,
24 asmlinkage
void serpent_cbc_dec_8way_avx(struct serpent_ctx
*ctx
, u8
*dst
,
26 asmlinkage
void serpent_ctr_8way_avx(struct serpent_ctx
*ctx
, u8
*dst
,
27 const u8
*src
, le128
*iv
);
29 asmlinkage
void serpent_xts_enc_8way_avx(struct serpent_ctx
*ctx
, u8
*dst
,
30 const u8
*src
, le128
*iv
);
31 asmlinkage
void serpent_xts_dec_8way_avx(struct serpent_ctx
*ctx
, u8
*dst
,
32 const u8
*src
, le128
*iv
);
34 extern void __serpent_crypt_ctr(void *ctx
, u128
*dst
, const u128
*src
,
37 extern void serpent_xts_enc(void *ctx
, u128
*dst
, const u128
*src
, le128
*iv
);
38 extern void serpent_xts_dec(void *ctx
, u128
*dst
, const u128
*src
, le128
*iv
);
40 extern int lrw_serpent_setkey(struct crypto_tfm
*tfm
, const u8
*key
,
43 extern void lrw_serpent_exit_tfm(struct crypto_tfm
*tfm
);
45 extern int xts_serpent_setkey(struct crypto_tfm
*tfm
, const u8
*key
,