1 /**
2   ******************************************************************************
3   * @file    stm32wbaxx_hal_cryp_ex.h
4   * @author  MCD Application Team
5   * @brief   Header file of CRYPEx HAL module.
6   ******************************************************************************
7   * @attention
8   *
9   * Copyright (c) 2022 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software is licensed under terms that can be found in the LICENSE file
13   * in the root directory of this software component.
14   * If no LICENSE file comes with this software, it is provided AS-IS.
15   *
16   ******************************************************************************
17   */
18 
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 #ifndef STM32WBAxx_HAL_CRYP_EX_H
21 #define STM32WBAxx_HAL_CRYP_EX_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /* Includes ------------------------------------------------------------------*/
28 #include "stm32wbaxx_hal_def.h"
29 
30 /** @addtogroup STM32WBAxx_HAL_Driver
31   * @{
32   */
33 
34 #if defined(AES)
35 
36 /** @defgroup CRYPEx CRYPEx
37   * @brief CRYP Extension HAL module driver.
38   * @{
39   */
40 
41 /* Exported types ------------------------------------------------------------*/
42 /** @defgroup CRYPEx_Exported_Types CRYPEx Exported Types
43   * @{
44   */
45 
46 /**
47   * @}
48   */
49 /* Exported constants --------------------------------------------------------*/
50 /** @defgroup CRYPEx_Exported_Constants CRYPEx Constants
51   * @{
52   */
53 
54 /**
55   * @}
56   */
57 /* Private types -------------------------------------------------------------*/
58 /** @defgroup CRYPEx_Private_Types CRYPEx Private Types
59   * @{
60   */
61 
62 /**
63   * @}
64   */
65 
66 /* Private variables ---------------------------------------------------------*/
67 /** @defgroup CRYPEx_Private_Variables CRYPEx Private Variables
68   * @{
69   */
70 
71 /**
72   * @}
73   */
74 
75 /* Private constants ---------------------------------------------------------*/
76 /** @defgroup CRYPEx_Private_Constants CRYPEx Private Constants
77   * @{
78   */
79 
80 /**
81   * @}
82   */
83 
84 /* Private macros ------------------------------------------------------------*/
85 /** @defgroup CRYPEx_Private_Macros CRYPEx Private Macros
86   * @{
87   */
88 
89 /**
90   * @}
91   */
92 
93 /* Private functions ---------------------------------------------------------*/
94 /** @defgroup CRYPEx_Private_Functions CRYPEx Private Functions
95   * @{
96   */
97 
98 /**
99   * @}
100   */
101 
102 /* Exported functions --------------------------------------------------------*/
103 /** @defgroup CRYPEx_Exported_Functions CRYPEx Exported Functions
104   * @{
105   */
106 
107 /** @addtogroup CRYPEx_Exported_Functions_Group1 Extended AES processing functions
108   * @{
109   */
110 HAL_StatusTypeDef HAL_CRYPEx_AESGCM_GenerateAuthTAG(CRYP_HandleTypeDef *hcryp, const uint32_t *pAuthTag,
111                                                     uint32_t Timeout);
112 HAL_StatusTypeDef HAL_CRYPEx_AESCCM_GenerateAuthTAG(CRYP_HandleTypeDef *hcryp, const uint32_t *pAuthTag,
113                                                     uint32_t Timeout);
114 /**
115   * @}
116   */
117 
118 /** @addtogroup CRYPEx_Exported_Functions_Group2 Wrap and Unwrap key functions
119   * @{
120   */
121 HAL_StatusTypeDef HAL_CRYPEx_UnwrapKey(CRYP_HandleTypeDef *hcryp, uint32_t *pInput, uint32_t Timeout);
122 HAL_StatusTypeDef HAL_CRYPEx_WrapKey(CRYP_HandleTypeDef *hcryp, uint32_t *pInput, uint32_t *pOutput, uint32_t Timeout);
123 /**
124   * @}
125   */
126 
127 /** @addtogroup CRYPEx_Exported_Functions_Group3 Encrypt and Decrypt Shared key functions
128   * @{
129   */
130 HAL_StatusTypeDef HAL_CRYPEx_EncryptSharedKey(CRYP_HandleTypeDef *hcryp, uint32_t *pKey, uint32_t *pOutput, uint32_t ID,
131                                               uint32_t Timeout);
132 HAL_StatusTypeDef HAL_CRYPEx_DecryptSharedKey(CRYP_HandleTypeDef *hcryp, uint32_t *pKey, uint32_t ID, uint32_t Timeout);
133 /**
134   * @}
135   */
136 
137 /**
138   * @}
139   */
140 
141 /**
142   * @}
143   */
144 #endif /* AES */
145 
146 /**
147   * @}
148   */
149 
150 #ifdef __cplusplus
151 }
152 #endif
153 
154 #endif /* STM32WBAxx_HAL_CRYP_EX_H */
155