blob: cb3084fab9dc66645a8d83bca9ed920c3300a124 [file] [log] [blame]
Matthew Shyu9f398f22023-07-12 04:08:27 -07001/* SPDX-License-Identifier: BSD-2-Clause */
2/*
3 * Copyright (c) 2020 Linaro Limited
4 */
5
6#ifndef __AES_ARMV8_CE_H
7#define __AES_ARMV8_CE_H
8
9//#include <types_ext.h>
10#include <linux/types.h>
11
12/* Prototypes for assembly functions */
13u32 ce_aes_sub(u32 in);
14void ce_aes_invert(void *dst, const void *src);
15void ce_aes_ecb_encrypt(u8 out[], u8 const in[], u8 const rk[],
16 int rounds, int blocks, int first);
17void ce_aes_ecb_decrypt(u8 out[], u8 const in[], u8 const rk[],
18 int rounds, int blocks, int first);
19void ce_aes_cbc_encrypt(u8 out[], u8 const in[], u8 const rk[],
20 int rounds, int blocks, u8 iv[]);
21void ce_aes_cbc_decrypt(u8 out[], u8 const in[], u8 const rk[],
22 int rounds, int blocks, u8 iv[]);
23void ce_aes_ctr_encrypt(u8 out[], u8 const in[], u8 const rk[],
24 int rounds, int blocks, u8 ctr[], int first);
25void ce_aes_xts_encrypt(u8 out[], u8 const in[], u8 const rk1[],
26 int rounds, int blocks, u8 const rk2[],
27 u8 iv[]);
28void ce_aes_xts_decrypt(u8 out[], u8 const in[], u8 const rk1[],
29 int rounds, int blocks, u8 const rk2[],
30 u8 iv[]);
31void ce_aes_xor_block(u8 out[], u8 const op1[], u8 const op2[]);
32
33#endif /*__AES_ARMV8_CE_H*/