1 /* 2 * Copyright (c) 2020 - 2024 Renesas Electronics Corporation and/or its affiliates 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef SC324_AES_PRIVATE_H 8 #define SC324_AES_PRIVATE_H 9 10 #include <stdint.h> 11 #include "bsp_api.h" 12 13 typedef enum e_hw_sc324_aes_modes 14 { 15 SC324_AES_ECB = 0, 16 SC324_AES_CBC = 1, 17 SC324_AES_CTR = 2, 18 } hw_sc324_aes_modes_t; 19 20 typedef enum e_hw_sc324_aes_keysize 21 { 22 SC324_AES_KEYSIZE_128 = 0, 23 SC324_AES_KEYSIZE_256 = 1 24 } hw_sc324_aes_keysizes_t; 25 26 typedef enum e_hw_sc324_aes_encrypt_flag 27 { 28 SC324_AES_ENCRYPT = 0, 29 SC324_AES_DECRYPT = 1 30 } hw_sc324_aes_encrypt_flag_t; 31 32 typedef struct st_hw_sc324_aes_cfg 33 { 34 hw_sc324_aes_keysizes_t keysize; 35 hw_sc324_aes_modes_t mode; 36 } hw_sc324_aes_cfg_t; 37 38 typedef struct st_hw_sc324_aes_ctrl 39 { 40 hw_sc324_aes_keysizes_t keysize; 41 hw_sc324_aes_modes_t mode; 42 hw_sc324_aes_encrypt_flag_t encrypt_flag; 43 } hw_sc324_aes_ctrl_t; 44 45 fsp_err_t hw_sc324_aes_kernel_process_data(hw_sc324_aes_ctrl_t * p_ctrl, 46 const uint32_t * InData_Key, 47 const uint32_t * InData_IV, 48 const uint32_t num_words, 49 const uint32_t * InData_Text, 50 uint32_t * OutData_Text, 51 uint32_t * OutData_IV); 52 53 #endif /* SC324_AES_PRIVATE_H */ 54