0001
0002 #ifndef ASM_X86_SM4_AVX_H
0003 #define ASM_X86_SM4_AVX_H
0004
0005 #include <linux/types.h>
0006 #include <crypto/sm4.h>
0007
0008 typedef void (*sm4_crypt_func)(const u32 *rk, u8 *dst, const u8 *src, u8 *iv);
0009
0010 int sm4_avx_ecb_encrypt(struct skcipher_request *req);
0011 int sm4_avx_ecb_decrypt(struct skcipher_request *req);
0012
0013 int sm4_cbc_encrypt(struct skcipher_request *req);
0014 int sm4_avx_cbc_decrypt(struct skcipher_request *req,
0015 unsigned int bsize, sm4_crypt_func func);
0016
0017 int sm4_cfb_encrypt(struct skcipher_request *req);
0018 int sm4_avx_cfb_decrypt(struct skcipher_request *req,
0019 unsigned int bsize, sm4_crypt_func func);
0020
0021 int sm4_avx_ctr_crypt(struct skcipher_request *req,
0022 unsigned int bsize, sm4_crypt_func func);
0023
0024 #endif