1 /* 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 
11 /* Prototypes for assembly functions */
12 uint32_t ce_aes_sub(uint32_t in);
13 void ce_aes_invert(void *dst, const void *src);
14 void ce_aes_ecb_encrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[],
15 			int rounds, int blocks, int first);
16 void ce_aes_ecb_decrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[],
17 			int rounds, int blocks, int first);
18 void ce_aes_cbc_encrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[],
19 			int rounds, int blocks, uint8_t iv[]);
20 void ce_aes_cbc_decrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[],
21 			int rounds, int blocks, uint8_t iv[]);
22 void ce_aes_ctr_encrypt(uint8_t out[], uint8_t const in[], uint8_t const rk[],
23 			int rounds, int blocks, uint8_t ctr[], int first);
24 void ce_aes_xts_encrypt(uint8_t out[], uint8_t const in[], uint8_t const rk1[],
25 			int rounds, int blocks, uint8_t const rk2[],
26 			uint8_t iv[]);
27 void ce_aes_xts_decrypt(uint8_t out[], uint8_t const in[], uint8_t const rk1[],
28 			int rounds, int blocks, uint8_t const rk2[],
29 			uint8_t iv[]);
30 void ce_aes_xor_block(uint8_t out[], uint8_t const op1[], uint8_t const op2[]);
31 
32 #endif /*__AES_ARMV8_CE_H*/
33