1 /**
2   ******************************************************************************
3   * @file    stm32h5xx_hal_cryp_ex.h
4   * @author  MCD Application Team
5   * @brief   Header file of CRYPEx HAL module.
6   ******************************************************************************
7   * @attention
8   *
9   * Copyright (c) 2023 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software component is licensed by ST under BSD 3-Clause license,
13   * the "License"; You may not use this file except in compliance with the
14   * License. You may obtain a copy of the License at:
15   *                        opensource.org/licenses/BSD-3-Clause
16   *
17   ******************************************************************************
18   */
19 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32H5xx_HAL_CRYP_EX_H
22 #define STM32H5xx_HAL_CRYP_EX_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32h5xx_hal_def.h"
30 
31 /** @addtogroup STM32H5xx_HAL_Driver
32   * @{
33   */
34 
35 #if defined(AES)
36 
37 /** @defgroup CRYPEx CRYPEx
38   * @brief CRYP Extension HAL module driver.
39   * @{
40   */
41 
42 /* Exported types ------------------------------------------------------------*/
43 /* Exported constants --------------------------------------------------------*/
44 /* Private types -------------------------------------------------------------*/
45 /* Private variables ---------------------------------------------------------*/
46 /* Private constants ---------------------------------------------------------*/
47 /* Private macros ------------------------------------------------------------*/
48 /* Private functions ---------------------------------------------------------*/
49 /* Exported functions --------------------------------------------------------*/
50 /** @defgroup CRYPEx_Exported_Functions CRYPEx Exported Functions
51   * @{
52   */
53 
54 /** @addtogroup CRYPEx_Exported_Functions_Group1 Extended AES processing functions
55   * @{
56   */
57 HAL_StatusTypeDef HAL_CRYPEx_AESGCM_GenerateAuthTAG(CRYP_HandleTypeDef *hcryp, uint32_t *pAuthTag, uint32_t Timeout);
58 HAL_StatusTypeDef HAL_CRYPEx_AESCCM_GenerateAuthTAG(CRYP_HandleTypeDef *hcryp, uint32_t *pAuthTag, uint32_t Timeout);
59 /**
60   * @}
61   */
62 
63 /** @addtogroup CRYPEx_Exported_Functions_Group2 Wrap and Unwrap key functions
64   * @{
65   */
66 HAL_StatusTypeDef HAL_CRYPEx_UnwrapKey(CRYP_HandleTypeDef *hcryp, uint32_t *pInput, uint32_t Timeout);
67 HAL_StatusTypeDef HAL_CRYPEx_WrapKey(CRYP_HandleTypeDef *hcryp, uint32_t *pInput, uint32_t *pOutput, uint32_t Timeout);
68 /**
69   * @}
70   */
71 
72 /** @addtogroup CRYPEx_Exported_Functions_Group3 Encrypt and Decrypt Shared key functions
73   * @{
74   */
75 HAL_StatusTypeDef HAL_CRYPEx_EncryptSharedKey(CRYP_HandleTypeDef *hcryp, uint32_t *pKey, uint32_t *pOutput, uint32_t ID,
76                                               uint32_t Timeout);
77 HAL_StatusTypeDef HAL_CRYPEx_DecryptSharedKey(CRYP_HandleTypeDef *hcryp, uint32_t *pKey, uint32_t ID, uint32_t Timeout);
78 /**
79   * @}
80   */
81 
82 /**
83   * @}
84   */
85 
86 /**
87   * @}
88   */
89 #endif /* AES */
90 
91 /**
92   * @}
93   */
94 
95 #ifdef __cplusplus
96 }
97 #endif
98 
99 #endif /* STM32H5xx_HAL_CRYP_EX_H */
100