1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 #ifndef ASM_X86_ARIA_AVX_H
3 #define ASM_X86_ARIA_AVX_H
5 #include <linux/types.h>
7 #define ARIA_AESNI_PARALLEL_BLOCKS 16
8 #define ARIA_AESNI_PARALLEL_BLOCK_SIZE (ARIA_BLOCK_SIZE * ARIA_AESNI_PARALLEL_BLOCKS)
10 #define ARIA_AESNI_AVX2_PARALLEL_BLOCKS 32
11 #define ARIA_AESNI_AVX2_PARALLEL_BLOCK_SIZE (ARIA_BLOCK_SIZE * ARIA_AESNI_AVX2_PARALLEL_BLOCKS)
13 #define ARIA_GFNI_AVX512_PARALLEL_BLOCKS 64
14 #define ARIA_GFNI_AVX512_PARALLEL_BLOCK_SIZE (ARIA_BLOCK_SIZE * ARIA_GFNI_AVX512_PARALLEL_BLOCKS)
16 asmlinkage
void aria_aesni_avx_encrypt_16way(const void *ctx
, u8
*dst
,
18 asmlinkage
void aria_aesni_avx_decrypt_16way(const void *ctx
, u8
*dst
,
20 asmlinkage
void aria_aesni_avx_ctr_crypt_16way(const void *ctx
, u8
*dst
,
22 u8
*keystream
, u8
*iv
);
23 asmlinkage
void aria_aesni_avx_gfni_encrypt_16way(const void *ctx
, u8
*dst
,
25 asmlinkage
void aria_aesni_avx_gfni_decrypt_16way(const void *ctx
, u8
*dst
,
27 asmlinkage
void aria_aesni_avx_gfni_ctr_crypt_16way(const void *ctx
, u8
*dst
,
29 u8
*keystream
, u8
*iv
);
31 asmlinkage
void aria_aesni_avx2_encrypt_32way(const void *ctx
, u8
*dst
,
33 asmlinkage
void aria_aesni_avx2_decrypt_32way(const void *ctx
, u8
*dst
,
35 asmlinkage
void aria_aesni_avx2_ctr_crypt_32way(const void *ctx
, u8
*dst
,
37 u8
*keystream
, u8
*iv
);
38 asmlinkage
void aria_aesni_avx2_gfni_encrypt_32way(const void *ctx
, u8
*dst
,
40 asmlinkage
void aria_aesni_avx2_gfni_decrypt_32way(const void *ctx
, u8
*dst
,
42 asmlinkage
void aria_aesni_avx2_gfni_ctr_crypt_32way(const void *ctx
, u8
*dst
,
44 u8
*keystream
, u8
*iv
);
47 void (*aria_encrypt_16way
)(const void *ctx
, u8
*dst
, const u8
*src
);
48 void (*aria_decrypt_16way
)(const void *ctx
, u8
*dst
, const u8
*src
);
49 void (*aria_ctr_crypt_16way
)(const void *ctx
, u8
*dst
, const u8
*src
,
50 u8
*keystream
, u8
*iv
);
51 void (*aria_encrypt_32way
)(const void *ctx
, u8
*dst
, const u8
*src
);
52 void (*aria_decrypt_32way
)(const void *ctx
, u8
*dst
, const u8
*src
);
53 void (*aria_ctr_crypt_32way
)(const void *ctx
, u8
*dst
, const u8
*src
,
54 u8
*keystream
, u8
*iv
);
55 void (*aria_encrypt_64way
)(const void *ctx
, u8
*dst
, const u8
*src
);
56 void (*aria_decrypt_64way
)(const void *ctx
, u8
*dst
, const u8
*src
);
57 void (*aria_ctr_crypt_64way
)(const void *ctx
, u8
*dst
, const u8
*src
,
58 u8
*keystream
, u8
*iv
);