app_pkc.h
Go to the documentation of this file.
1 /**
2 ****************************************************************************************
3 *
4 * @file app_pkc.h
5 * @author BLE Driver Team
6 * @brief Header file containing functions prototypes of PKC app library.
7 *
8 ****************************************************************************************
9 * @attention
10 #####Copyright (c) 2019 GOODIX
11 All rights reserved.
12
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met:
15 * Redistributions of source code must retain the above copyright
16 notice, this list of conditions and the following disclaimer.
17 * Redistributions in binary form must reproduce the above copyright
18 notice, this list of conditions and the following disclaimer in the
19 documentation and/or other materials provided with the distribution.
20 * Neither the name of GOODIX nor the names of its contributors may be used
21 to endorse or promote products derived from this software without
22 specific prior written permission.
23
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 POSSIBILITY OF SUCH DAMAGE.
35 ****************************************************************************************
36 */
37
38 /** @addtogroup PERIPHERAL Peripheral Driver
39 * @{
40 */
41
42 /** @addtogroup APP_DRIVER APP DRIVER
43 * @{
44 */
45
46 /** @defgroup APP_PKC PKC
47 * @brief PKC APP module driver.
48 * @{
49 */
50
51
52 #ifndef _APP_PKC_H_
53 #define _APP_PKC_H_
54
55 #include "grx_hal.h"
56 #include "app_drv_error.h"
57 #include "app_drv_config.h"
58
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62
63 #ifdef HAL_PKC_MODULE_ENABLED
64
65 /** @addtogroup APP_PKC_ENUM Enumerations
66 * @{
67 */
68
69 /**
70 * @brief PKC operating mode Enumerations definition
71 */
72 typedef enum
73 {
74 APP_PKC_TYPE_INTERRUPT, /**< Interrupt operation mode. */
75 APP_PKC_TYPE_POLLING, /**< Polling operation mode. */
76 APP_PKC_TYPE_MAX /**< Only for check parameter, not used as input parameters. */
77 } app_pkc_type_t;
78
79
80 /**
81 * @brief PKC event Enumerations definition
82 */
83 typedef enum
84 {
85 APP_PKC_EVT_ERROR, /**< Error reported by PKC peripheral. */
86 APP_PKC_EVT_DONE /**< Encryption and decryption completed. */
87 } app_pkc_evt_type_t;
88 /** @} */
89
90
91 /** @addtogroup APP_PKC_STRUCT Structures
92 * @{
93 */
94
95 /**
96 * @brief PKC event structure definition
97 */
98 typedef struct
99 {
100 app_pkc_evt_type_t type; /**< Type of event. */
101 uint32_t error_code; /**< Error Code. */
102 } app_pkc_evt_t;
103
104 /** @addtogroup APP_PKC_TYPEDEF Typedefs
105 * @{
106 */
107 typedef pkc_ecc_point_multi_t app_pkc_ecc_point_multi_t; /**< Pkc_ecc_point_multi_t typedef. */
108 typedef pkc_modular_add_t app_pkc_modular_add_t; /**< Pkc_modular_add_t typedef. */
109 typedef pkc_modular_sub_t app_pkc_modular_sub_t; /**< Pkc_modular_sub_t typedef. */
110 typedef pkc_modular_shift_t app_pkc_modular_shift_t; /**< Pkc_modular_shift_t typedef. */
111 typedef pkc_modular_compare_t app_pkc_modular_compare_t; /**< Pkc_modular_compare_t typedef. */
112 typedef pkc_montgomery_multi_t app_pkc_montgomery_multi_t; /**< Pkc_montgomery_multi_t typedef. */
113 typedef pkc_montgomery_inversion_t app_pkc_montgomery_inversion_t; /**< Pkc_montgomery_inversion_t typedef. */
114 typedef pkc_big_number_multi_t app_pkc_big_number_multi_t; /**< Pkc_big_number_multi_t typedef. */
115 typedef pkc_big_number_add_t app_pkc_big_number_add_t; /**< Pkc_big_number_add_t typedef. */
116 /** @} */
117
118 /**
119 * @brief PKC event callback definition
120 */
121 typedef void (*app_pkc_evt_handler_t)(app_pkc_evt_t *p_evt);
122
123 /**@brief App pkc state types. */
124 typedef enum
125 {
126 APP_PKC_INVALID = 0,
127 APP_PKC_ACTIVITY,
128 #ifdef APP_DRIVER_WAKEUP_CALL_FUN
129 APP_PKC_SLEEP,
130 #endif
131 } app_pkc_state_t;
132
133 /**
134 * @brief PKC device structure definition
135 */
136 typedef struct
137 {
138 app_pkc_evt_handler_t evt_handler; /**< Pkc event callback. */
139 pkc_handle_t handle; /**< Pkc handle Structure. */
140 app_pkc_type_t ues_type; /**< Pkc operating mode Enumerations. */
141 app_pkc_state_t pkc_state; /**< App pkc state types. */
142 } pkc_env_t;
143
144 /**
145 * @brief PKC parameters structure definition
146 */
147 typedef struct
148 {
149 app_pkc_type_t use_type; /**< Specifies the operation mode of PKC. */
150 pkc_init_t init; /**< PKC operation parameters */
151 void *p_result; /**< Pointer to PKC result Buffer */
152 uint32_t *p_kout; /**< Pointer to Kout result in montgomery inversion */
153 pkc_env_t pkc_env; /**< PKC device structure definition. */
154 } app_pkc_params_t;
155
156 /** @} */
157
158 /* Exported functions --------------------------------------------------------*/
159 /** @addtogroup APP_PKC_DRIVER_FUNCTIONS Functions
160 * @{
161 */
162
163 /**
164 ****************************************************************************************
165 * @brief Initialize the APP PKC DRIVER according to the specified parameters
166 * in the app_pkc_params_t and app_pkc_evt_handler_t.
167 * @note If interrupt mode is set, you can use blocking mode. Conversely, if blocking mode
168 * is set, you can't use interrupt mode.
169 *
170 * @param[in] p_params: Pointer to app_pkc_params_t parameter which contains the
171 * configuration information for the specified PKC module.
172 * @param[in] evt_handler: PKC user callback function.
173 *
174 * @return Result of initialization.
175 ****************************************************************************************
176 */
177 uint16_t app_pkc_init(app_pkc_params_t *p_params, app_pkc_evt_handler_t evt_handler);
178
179 /**
180 ****************************************************************************************
181 * @brief De-initialize the APP PKC DRIVER peripheral.
182 *
183 * @return Result of De-initialization.
184 ****************************************************************************************
185 */
186 uint16_t app_pkc_deinit(void);
187 /**
188 ****************************************************************************************
189 * @brief Realize the point multiplication operation of ECC ellipse algorithm锛�: result = k * point锛孭olling mode
190 *
191 * @param[in] p_input: pointer to the input parameter pkc_ecc_point_multi_t structure variable.
192 * @param[in] timeout: Timeout duration
193 *
194 * @return Result of operation.
195 ****************************************************************************************
196 */
197 uint16_t app_pkc_ecc_point_multi_sync(app_pkc_ecc_point_multi_t *p_input, uint32_t timeout);
198 /**
199 ****************************************************************************************
200 * @brief Realize the point multiplication operation of ECC ellipse algorithm锛�: result = k * point锛孖nterrupt mode
201 *
202 * @param[in] p_input: pointer to the input parameter pkc_ecc_point_multi_t structure variable.
203 *
204 * @return Result of operation.
205 ****************************************************************************************
206 */
207 uint16_t app_pkc_ecc_point_multi_async(app_pkc_ecc_point_multi_t *p_input);
208 /**
209 ****************************************************************************************
210 * @brief Realization of modular addition: result = (A + B) mod P锛孭olling mode
211 *
212 * @param[in] p_input: pointer to the input parameter pkc_modular_add_t structure variable.
213 * @param[in] timeout: Timeout duration
214 *
215 * @return Result of operation.
216 ****************************************************************************************
217 */
218 uint16_t app_pkc_modular_add_sync(app_pkc_modular_add_t *p_input, uint32_t timeout);
219 /**
220 ****************************************************************************************
221 * @brief Realization of modular addition: result = (A + B) mod P锛孖nterrupt mode
222 *
223 * @param[in] p_input: pointer to the input parameter pkc_modular_add_t structure variable.
224 *
225 * @return Result of operation.
226 ****************************************************************************************
227 */
228 uint16_t app_pkc_modular_add_async(app_pkc_modular_add_t *p_input);
229 /**
230 ****************************************************************************************
231 * @brief Implementation of modular subtraction: result = (A - B) mod P锛孭olling mode
232 *
233 * @param[in] p_input: pointer to the input parameter pkc_modular_sub_t structure variable.
234 * @param[in] timeout: Timeout duration
235 *
236 * @return Result of operation.
237 ****************************************************************************************
238 */
239 uint16_t app_pkc_modular_sub_sync(app_pkc_modular_sub_t *p_input, uint32_t timeout);
240 /**
241 ****************************************************************************************
242 * @brief Implementation of modular subtraction: result = (A - B) mod P锛孖nterrupt mode
243 *
244 * @param[in] p_input: pointer to the input parameter pkc_modular_sub_t structure variable.
245 *
246 * @return Result of operation.
247 ****************************************************************************************
248 */
249 uint16_t app_pkc_modular_sub_async(app_pkc_modular_sub_t *p_input);
250 /**
251 ****************************************************************************************
252 * @brief Realization of module shift left operation: result = (A<<ShiftBits) mod P锛孭olling mode
253 *
254 * @param[in] p_input: pointer to the input parameter pkc_modular_shift_t structure variable.
255 * @param[in] timeout: Timeout duration
256 *
257 * @return Result of operation.
258 ****************************************************************************************
259 */
260 uint16_t app_pkc_modular_left_shift_sync(app_pkc_modular_shift_t *p_input, uint32_t timeout);
261 /**
262 ****************************************************************************************
263 * @brief Realization of module shift left operation: result = (A<<ShiftBits) mod P锛孖nterrupt mode
264 *
265 * @param[in] p_input: pointer to the input parameter pkc_modular_shift_t structure variable.
266 *
267 * @return Result of operation.
268 ****************************************************************************************
269 */
270 uint16_t app_pkc_modular_left_shift_async(app_pkc_modular_shift_t *p_input);
271 /**
272 ****************************************************************************************
273 * @brief Realization of modular comparison operation: result = A mod P锛孭olling mode
274 *
275 * @param[in] p_input: pointer to the input parameter pkc_modular_compare_t structure variable.
276 * @param[in] timeout: Timeout duration
277 *
278 * @return Result of operation.
279 ****************************************************************************************
280 */
281 uint16_t app_pkc_modular_compare_sync(app_pkc_modular_compare_t *p_input, uint32_t timeout);
282 /**
283 ****************************************************************************************
284 * @brief Realization of modular comparison operation: result = A mod P锛孖nterrupt mode
285 *
286 * @param[in] p_input: pointer to the input parameter pkc_modular_compare_t structure variable.
287 *
288 * @return Result of operation.
289 ****************************************************************************************
290 */
291 uint16_t app_pkc_modular_compare_async(app_pkc_modular_compare_t *p_input);
292 /**
293 ****************************************************************************************
294 * @brief Realization of modular multiplication: result = A*B mod P锛孭olling mode
295 *
296 * @param[in] p_input: pointer to the input parameter pkc_montgomery_multi_t structure variable.
297 * @param[in] timeout: Timeout duration
298 *
299 * @return Result of operation.
300 ****************************************************************************************
301 */
302 uint16_t app_pkc_montgomery_multi_sync(app_pkc_montgomery_multi_t *p_input, uint32_t timeout);
303 /**
304 ****************************************************************************************
305 * @brief Realization of modular multiplication: result = A*B mod P锛孖nterrupt mode
306 *
307 * @param[in] p_input: pointer to the input parameter pkc_montgomery_multi_t structure variable.
308 *
309 * @return Result of operation.
310 ****************************************************************************************
311 */
312 uint16_t app_pkc_montgomery_multi_async(app_pkc_montgomery_multi_t *p_input);
313 /**
314 ****************************************************************************************
315 * @brief Realization of modular inversion: result = A^(-1)mod P锛孭olling mode
316 *
317 * @param[in] p_input: pointer to the input parameter pkc_montgomery_inversion_t structure variable.
318 * @param[in] timeout: Timeout duration
319 *
320 * @return Result of operation.
321 ****************************************************************************************
322 */
323 uint16_t app_pkc_montgomery_inversion_sync(app_pkc_montgomery_inversion_t *p_input, uint32_t timeout);
324 /**
325 ****************************************************************************************
326 * @brief Realization of modular inversion: result = A^(-1)mod P锛孖nterrupt mode
327 *
328 * @param[in] p_input: pointer to the input parameter pkc_montgomery_inversion_t structure variable.
329 *
330 * @return Result of operation.
331 ****************************************************************************************
332 */
333 uint16_t app_pkc_montgomery_inversion_async(app_pkc_montgomery_inversion_t *p_input);
334 /**
335 ****************************************************************************************
336 * @brief Realize multiplication of large numbers: result = A*B锛孭olling mode
337 *
338 * @param[in] p_input: pointer to the input parameter pkc_big_number_multi_t structure variable.
339 * @param[in] timeout: Timeout duration
340 *
341 * @return Result of operation.
342 ****************************************************************************************
343 */
344 uint16_t app_pkc_big_number_multi_sync(app_pkc_big_number_multi_t *p_input, uint32_t timeout);
345 /**
346 ****************************************************************************************
347 * @brief Realize multiplication of large numbers: result = A*B锛孖nterrupt mode
348 *
349 * @param[in] p_input: pointer to the input parameter pkc_big_number_multi_t structure variable.
350 *
351 * @return Result of operation.
352 ****************************************************************************************
353 */
354 uint16_t app_pkc_big_number_multi_async(app_pkc_big_number_multi_t *p_input);
355 /**
356 ****************************************************************************************
357 * @brief Realize addition of large numbers: result = A+B锛孭olling mode
358 *
359 * @param[in] p_input: pointer to the input parameter pkc_big_number_add_t structure variable.
360 * @param[in] timeout: Timeout duration
361 *
362 * @return Result of operation.
363 ****************************************************************************************
364 */
365 uint16_t app_pkc_big_number_add_sync(app_pkc_big_number_add_t *p_input, uint32_t timeout);
366 /**
367 ****************************************************************************************
368 * @brief Realize addition of large numbers: result = A+B锛孖nterrupt mode
369 *
370 * @param[in] p_input: pointer to the input parameter pkc_big_number_add_t structure variable.
371 *
372 * @return Result of operation.
373 ****************************************************************************************
374 */
375 uint16_t app_pkc_big_number_add_async(app_pkc_big_number_add_t *p_input);
376
377 /**
378 ****************************************************************************************
379 * @brief Return the PKC handle.
380 *
381 * @return Pointer to the PKC handle.
382 ****************************************************************************************
383 */
384 pkc_handle_t *app_pkc_get_handle(void);
385
386 /** @} */
387
388 #endif
389
390 #ifdef __cplusplus
391 }
392 #endif
393
394 #endif
395
396 /** @} */
397 /** @} */
398 /** @} */
APP_PKC_ACTIVITY
@ APP_PKC_ACTIVITY
Definition: app_pkc.h:127
app_pkc_ecc_point_multi_sync
uint16_t app_pkc_ecc_point_multi_sync(app_pkc_ecc_point_multi_t *p_input, uint32_t timeout)
Realize the point multiplication operation of ECC ellipse algorithm锛�: result = k * point锛孭olling mod...
app_pkc_params_t::use_type
app_pkc_type_t use_type
Specifies the operation mode of PKC.
Definition: app_pkc.h:149
_pkc_montgomery_multi
PKC Montgomery Modular Multiplication expression input.
Definition: gr55xx_hal_pkc.h:233
_pkc_montgomery_inversion
PKC Montgomery Inversion expression input.
Definition: gr55xx_hal_pkc.h:246
app_pkc_modular_compare_async
uint16_t app_pkc_modular_compare_async(app_pkc_modular_compare_t *p_input)
Realization of modular comparison operation: result = A mod P锛孖nterrupt mode.
_pkc_modular_shift
PKC Modular Left Shift expression input.
Definition: gr55xx_hal_pkc.h:212
app_pkc_init
uint16_t app_pkc_init(app_pkc_params_t *p_params, app_pkc_evt_handler_t evt_handler)
Initialize the APP PKC DRIVER according to the specified parameters in the app_pkc_params_t and app_p...
pkc_env_t::pkc_state
app_pkc_state_t pkc_state
App pkc state types.
Definition: app_pkc.h:141
pkc_env_t::handle
pkc_handle_t handle
Pkc handle Structure.
Definition: app_pkc.h:139
app_pkc_big_number_add_t
pkc_big_number_add_t app_pkc_big_number_add_t
Pkc_big_number_add_t typedef.
Definition: app_pkc.h:115
app_pkc_modular_shift_t
pkc_modular_shift_t app_pkc_modular_shift_t
Pkc_modular_shift_t typedef.
Definition: app_pkc.h:110
APP_PKC_TYPE_MAX
@ APP_PKC_TYPE_MAX
Only for check parameter, not used as input parameters.
Definition: app_pkc.h:76
app_pkc_montgomery_multi_async
uint16_t app_pkc_montgomery_multi_async(app_pkc_montgomery_multi_t *p_input)
Realization of modular multiplication: result = A*B mod P锛孖nterrupt mode.
app_pkc_big_number_add_async
uint16_t app_pkc_big_number_add_async(app_pkc_big_number_add_t *p_input)
Realize addition of large numbers: result = A+B锛孖nterrupt mode.
_pkc_modular_compare
PKC Modular Comparison expression input.
Definition: gr55xx_hal_pkc.h:223
app_pkc_params_t::init
pkc_init_t init
PKC operation parameters
Definition: app_pkc.h:150
_pkc_handle
PKC handle Structure definition.
Definition: gr55xx_hal_pkc.h:134
app_pkc_params_t::p_kout
uint32_t * p_kout
Pointer to Kout result in montgomery inversion.
Definition: app_pkc.h:152
pkc_env_t::ues_type
app_pkc_type_t ues_type
Pkc operating mode Enumerations.
Definition: app_pkc.h:140
_pkc_big_number_add
PKC Big Number Addition expression input.
Definition: gr55xx_hal_pkc.h:268
app_pkc_evt_t::error_code
uint32_t error_code
Error Code.
Definition: app_pkc.h:101
app_pkc_modular_left_shift_sync
uint16_t app_pkc_modular_left_shift_sync(app_pkc_modular_shift_t *p_input, uint32_t timeout)
Realization of module shift left operation: result = (A<<ShiftBits) mod P锛孭olling mode.
pkc_env_t::evt_handler
app_pkc_evt_handler_t evt_handler
Pkc event callback.
Definition: app_pkc.h:138
app_pkc_modular_add_t
pkc_modular_add_t app_pkc_modular_add_t
Pkc_modular_add_t typedef.
Definition: app_pkc.h:108
app_pkc_montgomery_inversion_t
pkc_montgomery_inversion_t app_pkc_montgomery_inversion_t
Pkc_montgomery_inversion_t typedef.
Definition: app_pkc.h:113
app_pkc_big_number_multi_sync
uint16_t app_pkc_big_number_multi_sync(app_pkc_big_number_multi_t *p_input, uint32_t timeout)
Realize multiplication of large numbers: result = A*B锛孭olling mode.
app_pkc_type_t
app_pkc_type_t
PKC operating mode Enumerations definition.
Definition: app_pkc.h:73
app_pkc_montgomery_inversion_sync
uint16_t app_pkc_montgomery_inversion_sync(app_pkc_montgomery_inversion_t *p_input, uint32_t timeout)
Realization of modular inversion: result = A^(-1)mod P锛孭olling mode.
APP_PKC_TYPE_POLLING
@ APP_PKC_TYPE_POLLING
Polling operation mode.
Definition: app_pkc.h:75
pkc_init_t
PKC Init Structure definition.
Definition: gr55xx_hal_pkc.h:111
app_pkc_evt_type_t
app_pkc_evt_type_t
PKC event Enumerations definition.
Definition: app_pkc.h:84
_pkc_modular_sub
PKC Modular Subtraction expression input.
Definition: gr55xx_hal_pkc.h:201
app_pkc_big_number_multi_async
uint16_t app_pkc_big_number_multi_async(app_pkc_big_number_multi_t *p_input)
Realize multiplication of large numbers: result = A*B锛孖nterrupt mode.
grx_hal.h
This file contains all the functions prototypes for the HAL module driver.
app_pkc_big_number_add_sync
uint16_t app_pkc_big_number_add_sync(app_pkc_big_number_add_t *p_input, uint32_t timeout)
Realize addition of large numbers: result = A+B锛孭olling mode.
app_pkc_montgomery_inversion_async
uint16_t app_pkc_montgomery_inversion_async(app_pkc_montgomery_inversion_t *p_input)
Realization of modular inversion: result = A^(-1)mod P锛孖nterrupt mode.
APP_PKC_EVT_ERROR
@ APP_PKC_EVT_ERROR
Error reported by PKC peripheral.
Definition: app_pkc.h:85
app_pkc_montgomery_multi_sync
uint16_t app_pkc_montgomery_multi_sync(app_pkc_montgomery_multi_t *p_input, uint32_t timeout)
Realization of modular multiplication: result = A*B mod P锛孭olling mode.
app_pkc_modular_sub_t
pkc_modular_sub_t app_pkc_modular_sub_t
Pkc_modular_sub_t typedef.
Definition: app_pkc.h:109
app_pkc_params_t::pkc_env
pkc_env_t pkc_env
PKC device structure definition.
Definition: app_pkc.h:153
app_pkc_ecc_point_multi_async
uint16_t app_pkc_ecc_point_multi_async(app_pkc_ecc_point_multi_t *p_input)
Realize the point multiplication operation of ECC ellipse algorithm锛�: result = k * point锛孖nterrupt m...
app_pkc_montgomery_multi_t
pkc_montgomery_multi_t app_pkc_montgomery_multi_t
Pkc_montgomery_multi_t typedef.
Definition: app_pkc.h:112
_pkc_ecc_point_multi
PKC ECC Point Multiplication expression input.
Definition: gr55xx_hal_pkc.h:166
app_pkc_state_t
app_pkc_state_t
App pkc state types.
Definition: app_pkc.h:125
app_pkc_modular_left_shift_async
uint16_t app_pkc_modular_left_shift_async(app_pkc_modular_shift_t *p_input)
Realization of module shift left operation: result = (A<<ShiftBits) mod P锛孖nterrupt mode.
app_pkc_params_t::p_result
void * p_result
Pointer to PKC result Buffer
Definition: app_pkc.h:151
app_pkc_modular_add_async
uint16_t app_pkc_modular_add_async(app_pkc_modular_add_t *p_input)
Realization of modular addition: result = (A + B) mod P锛孖nterrupt mode.
app_pkc_deinit
uint16_t app_pkc_deinit(void)
De-initialize the APP PKC DRIVER peripheral.
app_pkc_ecc_point_multi_t
pkc_ecc_point_multi_t app_pkc_ecc_point_multi_t
Pkc_ecc_point_multi_t typedef.
Definition: app_pkc.h:107
APP_PKC_TYPE_INTERRUPT
@ APP_PKC_TYPE_INTERRUPT
Interrupt operation mode.
Definition: app_pkc.h:74
pkc_env_t
PKC device structure definition.
Definition: app_pkc.h:137
_pkc_modular_add
PKC Modular Addition expression input.
Definition: gr55xx_hal_pkc.h:190
_pkc_big_number_multi
PKC Big Number Multiplication expression input.
Definition: gr55xx_hal_pkc.h:258
app_pkc_modular_sub_async
uint16_t app_pkc_modular_sub_async(app_pkc_modular_sub_t *p_input)
Implementation of modular subtraction: result = (A - B) mod P锛孖nterrupt mode.
app_pkc_params_t
PKC parameters structure definition.
Definition: app_pkc.h:148
app_pkc_get_handle
pkc_handle_t * app_pkc_get_handle(void)
Return the PKC handle.
app_pkc_big_number_multi_t
pkc_big_number_multi_t app_pkc_big_number_multi_t
Pkc_big_number_multi_t typedef.
Definition: app_pkc.h:114
app_pkc_modular_compare_sync
uint16_t app_pkc_modular_compare_sync(app_pkc_modular_compare_t *p_input, uint32_t timeout)
Realization of modular comparison operation: result = A mod P锛孭olling mode.
app_pkc_evt_t
PKC event structure definition.
Definition: app_pkc.h:99
app_drv_error.h
Header file of app driver error code.
APP_PKC_INVALID
@ APP_PKC_INVALID
Definition: app_pkc.h:126
APP_PKC_EVT_DONE
@ APP_PKC_EVT_DONE
Encryption and decryption completed.
Definition: app_pkc.h:86
app_drv_config.h
Header file of app driver config code.
app_pkc_modular_add_sync
uint16_t app_pkc_modular_add_sync(app_pkc_modular_add_t *p_input, uint32_t timeout)
Realization of modular addition: result = (A + B) mod P锛孭olling mode.
app_pkc_evt_t::type
app_pkc_evt_type_t type
Type of event.
Definition: app_pkc.h:100
app_pkc_modular_sub_sync
uint16_t app_pkc_modular_sub_sync(app_pkc_modular_sub_t *p_input, uint32_t timeout)
Implementation of modular subtraction: result = (A - B) mod P锛孭olling mode.
app_pkc_evt_handler_t
void(* app_pkc_evt_handler_t)(app_pkc_evt_t *p_evt)
PKC event callback definition.
Definition: app_pkc.h:121
app_pkc_modular_compare_t
pkc_modular_compare_t app_pkc_modular_compare_t
Pkc_modular_compare_t typedef.
Definition: app_pkc.h:111