Matthew Shyu | 9f398f2 | 2023-07-12 04:08:27 -0700 | [diff] [blame] | 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 | #include <linux/types.h> |
| 11 | |
| 12 | /* Prototypes for assembly functions */ |
| 13 | u32 ce_aes_sub(u32 in); |
| 14 | void ce_aes_invert(void *dst, const void *src); |
| 15 | void ce_aes_ecb_encrypt(u8 out[], u8 const in[], u8 const rk[], |
| 16 | int rounds, int blocks, int first); |
| 17 | void ce_aes_ecb_decrypt(u8 out[], u8 const in[], u8 const rk[], |
| 18 | int rounds, int blocks, int first); |
| 19 | void ce_aes_cbc_encrypt(u8 out[], u8 const in[], u8 const rk[], |
| 20 | int rounds, int blocks, u8 iv[]); |
| 21 | void ce_aes_cbc_decrypt(u8 out[], u8 const in[], u8 const rk[], |
| 22 | int rounds, int blocks, u8 iv[]); |
| 23 | void ce_aes_ctr_encrypt(u8 out[], u8 const in[], u8 const rk[], |
| 24 | int rounds, int blocks, u8 ctr[], int first); |
| 25 | void ce_aes_xts_encrypt(u8 out[], u8 const in[], u8 const rk1[], |
| 26 | int rounds, int blocks, u8 const rk2[], |
| 27 | u8 iv[]); |
| 28 | void ce_aes_xts_decrypt(u8 out[], u8 const in[], u8 const rk1[], |
| 29 | int rounds, int blocks, u8 const rk2[], |
| 30 | u8 iv[]); |
| 31 | void ce_aes_xor_block(u8 out[], u8 const op1[], u8 const op2[]); |
| 32 | |
| 33 | #endif /*__AES_ARMV8_CE_H*/ |