SmartSnippets DA1459x SDK
Data Structures | Enumerations | Functions
hw_aes.h File Reference

Definition of API for the AES Engine Low Level Driver. More...

#include <stdbool.h>
#include "hw_aes_hash.h"

Go to the source code of this file.

Data Structures

struct  hw_aes_config_t
 AES engine configuration structure. More...
 

Enumerations

enum  HW_AES_ERROR
 AES engine error codes.
 
enum  HW_AES_MODE { HW_AES_MODE_ECB = 0, HW_AES_MODE_CTR = 2, HW_AES_MODE_CBC = 3 }
 AES Mode. More...
 
enum  HW_AES_OPERATION { HW_AES_OPERATION_DECRYPT = 0, HW_AES_OPERATION_ENCRYPT = 1 }
 AES operation. More...
 
enum  HW_AES_KEY_SIZE { HW_AES_KEY_SIZE_128 = 0, HW_AES_KEY_SIZE_192 = 1, HW_AES_KEY_SIZE_256 = 2 }
 AES key size. More...
 
enum  HW_AES_KEY_EXPAND { HW_AES_KEY_EXPAND_BY_SW = 0, HW_AES_KEY_EXPAND_BY_HW = 1 }
 AES key expansion modes. More...
 
enum  HW_AES_OUTPUT_DATA_MODE { HW_AES_OUTPUT_DATA_MODE_ALL = 0, HW_AES_OUTPUT_DATA_MODE_FINAL_BLOCK = 1 }
 AES Output Mode. More...
 

Functions

__STATIC_INLINE void hw_aes_set_mode (HW_AES_MODE aes_mode)
 Set AES Mode. More...
 
__STATIC_INLINE HW_AES_MODE hw_aes_get_mode (void)
 Get AES Mode. More...
 
__STATIC_INLINE void hw_aes_set_operation (HW_AES_OPERATION operation)
 Set AES operation, e.g. encryption or decryption. More...
 
__STATIC_INLINE void hw_aes_set_key_size (HW_AES_KEY_SIZE key_size)
 Set AES key size. More...
 
__STATIC_INLINE void hw_aes_set_key_expansion (HW_AES_KEY_EXPAND key_expand)
 Set AES key expansion mode. More...
 
__STATIC_INLINE void hw_aes_set_output_data_mode (HW_AES_OUTPUT_DATA_MODE output_data_mode)
 Set AES engine output data mode. More...
 
__STATIC_INLINE void hw_aes_start_operation (HW_AES_OPERATION aes_operation)
 Start AES operation (Encryption/Decryption). More...
 
bool hw_aes_check_input_data_len_restrictions (void)
 Check if the restrictions of the input data length are fulfilled. More...
 
void hw_aes_set_init_vector (const uint8_t *iv_cnt_ptr)
 Set the Initialization Vector in CBC Mode or the Counter in CTR Mode. More...
 
bool hw_aes_is_key_valid (uint8_t idx)
 Check whether the Encryption Key is revoked or not. More...
 
uint32_t hw_aes_key_address_get (uint8_t key_idx)
 Get User Data Encryption Key memory address. More...
 
void hw_aes_load_keys (uint32_t key_src_addr, HW_AES_KEY_SIZE key_size, HW_AES_KEY_EXPAND key_exp)
 Load the AES keys from OTP/RAM to Crypto Engine. More...
 
HW_AES_ERROR hw_aes_init (const hw_aes_config_t *aes_cfg)
 AES engine initialization function. More...
 

Detailed Description

Definition of API for the AES Engine Low Level Driver.

Copyright (C) 2023 Renesas Electronics Corporation and/or its affiliates. All rights reserved. Confidential Information.

This software ("Software") is supplied by Renesas Electronics Corporation and/or its affiliates ("Renesas"). Renesas grants you a personal, non-exclusive, non-transferable, revocable, non-sub-licensable right and license to use the Software, solely if used in or together with Renesas products. You may make copies of this Software, provided this copyright notice and disclaimer ("Notice") is included in all such copies. Renesas reserves the right to change or discontinue the Software at any time without notice.

THE SOFTWARE IS PROVIDED "AS IS". RENESAS DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. TO THE MAXIMUM EXTENT PERMITTED UNDER LAW, IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE, EVEN IF RENESAS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. USE OF THIS SOFTWARE MAY BE SUBJECT TO TERMS AND CONDITIONS CONTAINED IN AN ADDITIONAL AGREEMENT BETWEEN YOU AND RENESAS. IN CASE OF CONFLICT BETWEEN THE TERMS OF THIS NOTICE AND ANY SUCH ADDITIONAL LICENSE AGREEMENT, THE TERMS OF THE AGREEMENT SHALL TAKE PRECEDENCE. BY CONTINUING TO USE THIS SOFTWARE, YOU AGREE TO THE TERMS OF THIS NOTICE.IF YOU DO NOT AGREE TO THESE TERMS, YOU ARE NOT PERMITTED TO USE THIS SOFTWARE.