Linux Audio

Check our new training course

Loading...
v6.13.7
 1/* SPDX-License-Identifier: GPL-2.0-or-later */
 2#ifndef ASM_X86_ARIA_AVX_H
 3#define ASM_X86_ARIA_AVX_H
 4
 5#include <linux/types.h>
 6
 7#define ARIA_AESNI_PARALLEL_BLOCKS 16
 8#define ARIA_AESNI_PARALLEL_BLOCK_SIZE  (ARIA_BLOCK_SIZE * ARIA_AESNI_PARALLEL_BLOCKS)
 9
10#define ARIA_AESNI_AVX2_PARALLEL_BLOCKS 32
11#define ARIA_AESNI_AVX2_PARALLEL_BLOCK_SIZE  (ARIA_BLOCK_SIZE * ARIA_AESNI_AVX2_PARALLEL_BLOCKS)
12
13#define ARIA_GFNI_AVX512_PARALLEL_BLOCKS 64
14#define ARIA_GFNI_AVX512_PARALLEL_BLOCK_SIZE  (ARIA_BLOCK_SIZE * ARIA_GFNI_AVX512_PARALLEL_BLOCKS)
15
16asmlinkage void aria_aesni_avx_encrypt_16way(const void *ctx, u8 *dst,
17					     const u8 *src);
18asmlinkage void aria_aesni_avx_decrypt_16way(const void *ctx, u8 *dst,
19					     const u8 *src);
20asmlinkage void aria_aesni_avx_ctr_crypt_16way(const void *ctx, u8 *dst,
21					       const u8 *src,
22					       u8 *keystream, u8 *iv);
23asmlinkage void aria_aesni_avx_gfni_encrypt_16way(const void *ctx, u8 *dst,
24						  const u8 *src);
25asmlinkage void aria_aesni_avx_gfni_decrypt_16way(const void *ctx, u8 *dst,
26						  const u8 *src);
27asmlinkage void aria_aesni_avx_gfni_ctr_crypt_16way(const void *ctx, u8 *dst,
28						    const u8 *src,
29						    u8 *keystream, u8 *iv);
30
31asmlinkage void aria_aesni_avx2_encrypt_32way(const void *ctx, u8 *dst,
32					      const u8 *src);
33asmlinkage void aria_aesni_avx2_decrypt_32way(const void *ctx, u8 *dst,
34					      const u8 *src);
35asmlinkage void aria_aesni_avx2_ctr_crypt_32way(const void *ctx, u8 *dst,
36						const u8 *src,
37						u8 *keystream, u8 *iv);
38asmlinkage void aria_aesni_avx2_gfni_encrypt_32way(const void *ctx, u8 *dst,
39						   const u8 *src);
40asmlinkage void aria_aesni_avx2_gfni_decrypt_32way(const void *ctx, u8 *dst,
41						   const u8 *src);
42asmlinkage void aria_aesni_avx2_gfni_ctr_crypt_32way(const void *ctx, u8 *dst,
43						     const u8 *src,
44						     u8 *keystream, u8 *iv);
45
46struct aria_avx_ops {
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);
59
60
61};
62#endif
v6.8
 1/* SPDX-License-Identifier: GPL-2.0-or-later */
 2#ifndef ASM_X86_ARIA_AVX_H
 3#define ASM_X86_ARIA_AVX_H
 4
 5#include <linux/types.h>
 6
 7#define ARIA_AESNI_PARALLEL_BLOCKS 16
 8#define ARIA_AESNI_PARALLEL_BLOCK_SIZE  (ARIA_BLOCK_SIZE * ARIA_AESNI_PARALLEL_BLOCKS)
 9
10#define ARIA_AESNI_AVX2_PARALLEL_BLOCKS 32
11#define ARIA_AESNI_AVX2_PARALLEL_BLOCK_SIZE  (ARIA_BLOCK_SIZE * ARIA_AESNI_AVX2_PARALLEL_BLOCKS)
12
13#define ARIA_GFNI_AVX512_PARALLEL_BLOCKS 64
14#define ARIA_GFNI_AVX512_PARALLEL_BLOCK_SIZE  (ARIA_BLOCK_SIZE * ARIA_GFNI_AVX512_PARALLEL_BLOCKS)
15
16asmlinkage void aria_aesni_avx_encrypt_16way(const void *ctx, u8 *dst,
17					     const u8 *src);
18asmlinkage void aria_aesni_avx_decrypt_16way(const void *ctx, u8 *dst,
19					     const u8 *src);
20asmlinkage void aria_aesni_avx_ctr_crypt_16way(const void *ctx, u8 *dst,
21					       const u8 *src,
22					       u8 *keystream, u8 *iv);
23asmlinkage void aria_aesni_avx_gfni_encrypt_16way(const void *ctx, u8 *dst,
24						  const u8 *src);
25asmlinkage void aria_aesni_avx_gfni_decrypt_16way(const void *ctx, u8 *dst,
26						  const u8 *src);
27asmlinkage void aria_aesni_avx_gfni_ctr_crypt_16way(const void *ctx, u8 *dst,
28						    const u8 *src,
29						    u8 *keystream, u8 *iv);
30
31asmlinkage void aria_aesni_avx2_encrypt_32way(const void *ctx, u8 *dst,
32					      const u8 *src);
33asmlinkage void aria_aesni_avx2_decrypt_32way(const void *ctx, u8 *dst,
34					      const u8 *src);
35asmlinkage void aria_aesni_avx2_ctr_crypt_32way(const void *ctx, u8 *dst,
36						const u8 *src,
37						u8 *keystream, u8 *iv);
38asmlinkage void aria_aesni_avx2_gfni_encrypt_32way(const void *ctx, u8 *dst,
39						   const u8 *src);
40asmlinkage void aria_aesni_avx2_gfni_decrypt_32way(const void *ctx, u8 *dst,
41						   const u8 *src);
42asmlinkage void aria_aesni_avx2_gfni_ctr_crypt_32way(const void *ctx, u8 *dst,
43						     const u8 *src,
44						     u8 *keystream, u8 *iv);
45
46struct aria_avx_ops {
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);
59
60
61};
62#endif