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 /** @} */
105
106 /** @addtogroup APP_PKC_TYPEDEF Type definitions
107 * @{
108 */
109 typedef pkc_ecc_point_multi_t app_pkc_ecc_point_multi_t; /**< Pkc_ecc_point_multi_t typedef. */
110 typedef pkc_modular_add_t app_pkc_modular_add_t; /**< Pkc_modular_add_t typedef. */
111 typedef pkc_modular_sub_t app_pkc_modular_sub_t; /**< Pkc_modular_sub_t typedef. */
112 typedef pkc_modular_shift_t app_pkc_modular_shift_t; /**< Pkc_modular_shift_t typedef. */
113 typedef pkc_modular_compare_t app_pkc_modular_compare_t; /**< Pkc_modular_compare_t typedef. */
114 typedef pkc_montgomery_multi_t app_pkc_montgomery_multi_t; /**< Pkc_montgomery_multi_t typedef. */
115 typedef pkc_montgomery_inversion_t app_pkc_montgomery_inversion_t; /**< Pkc_montgomery_inversion_t typedef. */
116 typedef pkc_big_number_multi_t app_pkc_big_number_multi_t; /**< Pkc_big_number_multi_t typedef. */
117 typedef pkc_big_number_add_t app_pkc_big_number_add_t; /**< Pkc_big_number_add_t typedef. */
118
119 /**
120 * @brief PKC event callback definition
121 */
122 typedef void (*app_pkc_evt_handler_t)(app_pkc_evt_t *p_evt);
123
124 /** @} */
125
126 /** @addtogroup APP_PKC_ENUM Enumerations
127 * @{
128 */
129 /**@brief App pkc state types. */
130 typedef enum
131 {
132 APP_PKC_INVALID = 0,
133 APP_PKC_ACTIVITY,
134 #ifdef APP_DRIVER_WAKEUP_CALL_FUN
135 APP_PKC_SLEEP,
136 #endif
137 } app_pkc_state_t;
138
139 /** @} */
140
141 /** @addtogroup APP_PKC_STRUCT Structures
142 * @{
143 */
144 /**
145 * @brief PKC device structure definition
146 */
147 typedef struct
148 {
149 app_pkc_evt_handler_t evt_handler; /**< Pkc event callback. */
150 pkc_handle_t handle; /**< Pkc handle Structure. */
151 app_pkc_type_t ues_type; /**< Pkc operating mode Enumerations. */
152 app_pkc_state_t pkc_state; /**< App pkc state types. */
153 } pkc_env_t;
154
155 /**
156 * @brief PKC parameters structure definition
157 */
158 typedef struct
159 {
160 app_pkc_type_t use_type; /**< Specifies the operation mode of PKC. */
161 pkc_init_t init; /**< PKC operation parameters */
162 void *p_result; /**< Pointer to PKC result Buffer */
163 uint32_t *p_kout; /**< Pointer to Kout result in montgomery inversion */
164 pkc_env_t pkc_env; /**< PKC device structure definition. */
165 } app_pkc_params_t;
166
167 /** @} */
168
169 /* Exported functions --------------------------------------------------------*/
170 /** @addtogroup APP_PKC_DRIVER_FUNCTIONS Functions
171 * @{
172 */
173
174 /**
175 ****************************************************************************************
176 * @brief Initialize the APP PKC DRIVER according to the specified parameters
177 * in the app_pkc_params_t and app_pkc_evt_handler_t.
178 * @note If interrupt mode is set, you can use blocking mode. Conversely, if blocking mode
179 * is set, you can't use interrupt mode.
180 *
181 * @param[in] p_params: Pointer to app_pkc_params_t parameter which contains the
182 * configuration information for the specified PKC module.
183 * @param[in] evt_handler: PKC user callback function.
184 *
185 * @return Result of initialization.
186 ****************************************************************************************
187 */
188 uint16_t app_pkc_init(app_pkc_params_t *p_params, app_pkc_evt_handler_t evt_handler);
189
190 /**
191 ****************************************************************************************
192 * @brief De-initialize the APP PKC DRIVER peripheral.
193 *
194 * @return Result of De-initialization.
195 ****************************************************************************************
196 */
197 uint16_t app_pkc_deinit(void);
198 /**
199 ****************************************************************************************
200 * @brief Realize the point multiplication operation of ECC ellipse algorithm, : result = k * point, polling mode
201 *
202 * @param[in] p_input: pointer to the input parameter pkc_ecc_point_multi_t structure variable.
203 * @param[in] timeout: Timeout duration
204 *
205 * @return Result of operation.
206 ****************************************************************************************
207 */
208 uint16_t app_pkc_ecc_point_multi_sync(app_pkc_ecc_point_multi_t *p_input, uint32_t timeout);
209 /**
210 ****************************************************************************************
211 * @brief Realize the point multiplication operation of ECC ellipse algorithm, : result = k * point, Interrupt mode
212 *
213 * @param[in] p_input: pointer to the input parameter pkc_ecc_point_multi_t structure variable.
214 *
215 * @return Result of operation.
216 ****************************************************************************************
217 */
218 uint16_t app_pkc_ecc_point_multi_async(app_pkc_ecc_point_multi_t *p_input);
219 /**
220 ****************************************************************************************
221 * @brief Realization of modular addition: result = (A + B) mod P, Polling mode
222 *
223 * @param[in] p_input: pointer to the input parameter pkc_modular_add_t structure variable.
224 * @param[in] timeout: Timeout duration
225 *
226 * @return Result of operation.
227 ****************************************************************************************
228 */
229 uint16_t app_pkc_modular_add_sync(app_pkc_modular_add_t *p_input, uint32_t timeout);
230 /**
231 ****************************************************************************************
232 * @brief Realization of modular addition: result = (A + B) mod P, Interrupt mode
233 *
234 * @param[in] p_input: pointer to the input parameter pkc_modular_add_t structure variable.
235 *
236 * @return Result of operation.
237 ****************************************************************************************
238 */
239 uint16_t app_pkc_modular_add_async(app_pkc_modular_add_t *p_input);
240 /**
241 ****************************************************************************************
242 * @brief Implementation of modular subtraction: result = (A - B) mod P, Polling mode
243 *
244 * @param[in] p_input: pointer to the input parameter pkc_modular_sub_t structure variable.
245 * @param[in] timeout: Timeout duration
246 *
247 * @return Result of operation.
248 ****************************************************************************************
249 */
250 uint16_t app_pkc_modular_sub_sync(app_pkc_modular_sub_t *p_input, uint32_t timeout);
251 /**
252 ****************************************************************************************
253 * @brief Implementation of modular subtraction: result = (A - B) mod P, Interrupt mode
254 *
255 * @param[in] p_input: pointer to the input parameter pkc_modular_sub_t structure variable.
256 *
257 * @return Result of operation.
258 ****************************************************************************************
259 */
260 uint16_t app_pkc_modular_sub_async(app_pkc_modular_sub_t *p_input);
261 /**
262 ****************************************************************************************
263 * @brief Realization of module shift left operation: result = (A<<ShiftBits) mod P, Polling mode
264 *
265 * @param[in] p_input: pointer to the input parameter pkc_modular_shift_t structure variable.
266 * @param[in] timeout: Timeout duration
267 *
268 * @return Result of operation.
269 ****************************************************************************************
270 */
271 uint16_t app_pkc_modular_left_shift_sync(app_pkc_modular_shift_t *p_input, uint32_t timeout);
272 /**
273 ****************************************************************************************
274 * @brief Realization of module shift left operation: result = (A<<ShiftBits) mod P, Interrupt mode
275 *
276 * @param[in] p_input: pointer to the input parameter pkc_modular_shift_t structure variable.
277 *
278 * @return Result of operation.
279 ****************************************************************************************
280 */
281 uint16_t app_pkc_modular_left_shift_async(app_pkc_modular_shift_t *p_input);
282 /**
283 ****************************************************************************************
284 * @brief Realization of modular comparison operation: result = A mod P, Polling mode
285 *
286 * @param[in] p_input: pointer to the input parameter pkc_modular_compare_t structure variable.
287 * @param[in] timeout: Timeout duration
288 *
289 * @return Result of operation.
290 ****************************************************************************************
291 */
292 uint16_t app_pkc_modular_compare_sync(app_pkc_modular_compare_t *p_input, uint32_t timeout);
293 /**
294 ****************************************************************************************
295 * @brief Realization of modular comparison operation: result = A mod P, Interrupt mode
296 *
297 * @param[in] p_input: pointer to the input parameter pkc_modular_compare_t structure variable.
298 *
299 * @return Result of operation.
300 ****************************************************************************************
301 */
302 uint16_t app_pkc_modular_compare_async(app_pkc_modular_compare_t *p_input);
303 /**
304 ****************************************************************************************
305 * @brief Realization of modular multiplication: result = A*B mod P, Polling mode
306 *
307 * @param[in] p_input: pointer to the input parameter pkc_montgomery_multi_t structure variable.
308 * @param[in] timeout: Timeout duration
309 *
310 * @return Result of operation.
311 ****************************************************************************************
312 */
313 uint16_t app_pkc_montgomery_multi_sync(app_pkc_montgomery_multi_t *p_input, uint32_t timeout);
314 /**
315 ****************************************************************************************
316 * @brief Realization of modular multiplication: result = A*B mod P, Interrupt mode
317 *
318 * @param[in] p_input: pointer to the input parameter pkc_montgomery_multi_t structure variable.
319 *
320 * @return Result of operation.
321 ****************************************************************************************
322 */
323 uint16_t app_pkc_montgomery_multi_async(app_pkc_montgomery_multi_t *p_input);
324 /**
325 ****************************************************************************************
326 * @brief Realization of modular inversion: result = A^(-1)mod P, Polling mode
327 *
328 * @param[in] p_input: pointer to the input parameter pkc_montgomery_inversion_t structure variable.
329 * @param[in] timeout: Timeout duration
330 *
331 * @return Result of operation.
332 ****************************************************************************************
333 */
334 uint16_t app_pkc_montgomery_inversion_sync(app_pkc_montgomery_inversion_t *p_input, uint32_t timeout);
335 /**
336 ****************************************************************************************
337 * @brief Realization of modular inversion: result = A^(-1)mod P, Interrupt mode
338 *
339 * @param[in] p_input: pointer to the input parameter pkc_montgomery_inversion_t structure variable.
340 *
341 * @return Result of operation.
342 ****************************************************************************************
343 */
344 uint16_t app_pkc_montgomery_inversion_async(app_pkc_montgomery_inversion_t *p_input);
345 /**
346 ****************************************************************************************
347 * @brief Realize multiplication of large numbers: result = A*B, Polling mode
348 *
349 * @param[in] p_input: pointer to the input parameter pkc_big_number_multi_t structure variable.
350 * @param[in] timeout: Timeout duration
351 *
352 * @return Result of operation.
353 ****************************************************************************************
354 */
355 uint16_t app_pkc_big_number_multi_sync(app_pkc_big_number_multi_t *p_input, uint32_t timeout);
356 /**
357 ****************************************************************************************
358 * @brief Realize multiplication of large numbers: result = A*B, Interrupt mode
359 *
360 * @param[in] p_input: pointer to the input parameter pkc_big_number_multi_t structure variable.
361 *
362 * @return Result of operation.
363 ****************************************************************************************
364 */
365 uint16_t app_pkc_big_number_multi_async(app_pkc_big_number_multi_t *p_input);
366 /**
367 ****************************************************************************************
368 * @brief Realize addition of large numbers: result = A+B, Polling mode
369 *
370 * @param[in] p_input: pointer to the input parameter pkc_big_number_add_t structure variable.
371 * @param[in] timeout: Timeout duration
372 *
373 * @return Result of operation.
374 ****************************************************************************************
375 */
376 uint16_t app_pkc_big_number_add_sync(app_pkc_big_number_add_t *p_input, uint32_t timeout);
377 /**
378 ****************************************************************************************
379 * @brief Realize addition of large numbers: result = A+B, Interrupt mode
380 *
381 * @param[in] p_input: pointer to the input parameter pkc_big_number_add_t structure variable.
382 *
383 * @return Result of operation.
384 ****************************************************************************************
385 */
386 uint16_t app_pkc_big_number_add_async(app_pkc_big_number_add_t *p_input);
387
388 /**
389 ****************************************************************************************
390 * @brief Return the PKC handle.
391 *
392 * @return Pointer to the PKC handle.
393 ****************************************************************************************
394 */
395 pkc_handle_t *app_pkc_get_handle(void);
396
397 /** @} */
398
399 #endif
400
401 #ifdef __cplusplus
402 }
403 #endif
404
405 #endif
406
407 /** @} */
408 /** @} */
409 /** @} */
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,...
app_pkc_state_t
app_pkc_state_t
App pkc state types.
Definition: app_pkc.h:131
app_pkc_params_t::use_type
app_pkc_type_t use_type
Specifies the operation mode of PKC.
Definition: app_pkc.h:160
_pkc_montgomery_multi
PKC Montgomery Modular Multiplication expression input.
Definition: gr55xx_hal_pkc.h:232
_pkc_montgomery_inversion
PKC Montgomery Inversion expression input.
Definition: gr55xx_hal_pkc.h:245
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, Interrupt mode.
_pkc_modular_shift
PKC Modular Left Shift expression input.
Definition: gr55xx_hal_pkc.h:211
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:152
pkc_env_t::handle
pkc_handle_t handle
Pkc handle Structure.
Definition: app_pkc.h:150
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:117
app_pkc_modular_shift_t
pkc_modular_shift_t app_pkc_modular_shift_t
Pkc_modular_shift_t typedef.
Definition: app_pkc.h:112
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, Interrupt 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, Interrupt mode.
APP_PKC_ACTIVITY
@ APP_PKC_ACTIVITY
Definition: app_pkc.h:133
_pkc_modular_compare
PKC Modular Comparison expression input.
Definition: gr55xx_hal_pkc.h:222
app_pkc_params_t::init
pkc_init_t init
PKC operation parameters
Definition: app_pkc.h:161
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:122
_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:163
pkc_env_t::ues_type
app_pkc_type_t ues_type
Pkc operating mode Enumerations.
Definition: app_pkc.h:151
_pkc_big_number_add
PKC Big Number Addition expression input.
Definition: gr55xx_hal_pkc.h:267
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, Polling mode.
pkc_env_t::evt_handler
app_pkc_evt_handler_t evt_handler
Pkc event callback.
Definition: app_pkc.h:149
app_pkc_modular_add_t
pkc_modular_add_t app_pkc_modular_add_t
Pkc_modular_add_t typedef.
Definition: app_pkc.h:110
app_pkc_montgomery_inversion_t
pkc_montgomery_inversion_t app_pkc_montgomery_inversion_t
Pkc_montgomery_inversion_t typedef.
Definition: app_pkc.h:115
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, Polling 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, Polling 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_INVALID
@ APP_PKC_INVALID
Definition: app_pkc.h:132
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:200
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, Interrupt 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, Polling 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, Interrupt 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, Polling mode.
app_pkc_modular_sub_t
pkc_modular_sub_t app_pkc_modular_sub_t
Pkc_modular_sub_t typedef.
Definition: app_pkc.h:111
app_pkc_params_t::pkc_env
pkc_env_t pkc_env
PKC device structure definition.
Definition: app_pkc.h:164
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,...
app_pkc_montgomery_multi_t
pkc_montgomery_multi_t app_pkc_montgomery_multi_t
Pkc_montgomery_multi_t typedef.
Definition: app_pkc.h:114
_pkc_ecc_point_multi
PKC ECC Point Multiplication expression input.
Definition: gr55xx_hal_pkc.h:166
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, Interrupt mode.
app_pkc_params_t::p_result
void * p_result
Pointer to PKC result Buffer
Definition: app_pkc.h:162
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, Interrupt 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:109
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:148
_pkc_modular_add
PKC Modular Addition expression input.
Definition: gr55xx_hal_pkc.h:189
_pkc_big_number_multi
PKC Big Number Multiplication expression input.
Definition: gr55xx_hal_pkc.h:257
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, Interrupt mode.
app_pkc_params_t
PKC parameters structure definition.
Definition: app_pkc.h:159
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:116
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, Polling 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_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, Polling 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, Polling mode.
app_pkc_modular_compare_t
pkc_modular_compare_t app_pkc_modular_compare_t
Pkc_modular_compare_t typedef.
Definition: app_pkc.h:113