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 "gr55xx_hal.h"
56 #include "app_drv_error.h"
57 #ifdef ENV_USE_FREERTOS
58 #include "app_rtos_cfg.h"
59 #endif
60
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64
65 #ifdef HAL_PKC_MODULE_ENABLED
66
67 /** @addtogroup APP_PKC_ENUM Enumerations
68 * @{
69 */
70
71 /**
72 * @brief PKC operating mode Enumerations definition
73 */
74 typedef enum
75 {
76 APP_PKC_TYPE_INTERRUPT, /**< Interrupt operation mode. */
77 APP_PKC_TYPE_POLLING, /**< Polling operation mode. */
78 APP_PKC_TYPE_MAX /**< Only for check parameter, not used as input parameters. */
79 } app_pkc_type_t;
80
81
82 /**
83 * @brief PKC event Enumerations definition
84 */
85 typedef enum
86 {
87 APP_PKC_EVT_ERROR, /**< Error reported by PKC peripheral. */
88 APP_PKC_EVT_DONE /**< Encryption and decryption completed. */
89 } app_pkc_evt_type_t;
90 /** @} */
91
92
93 /** @addtogroup APP_PKC_STRUCT Structures
94 * @{
95 */
96
97 /**
98 * @brief PKC parameters structure definition
99 */
100 typedef struct
101 {
102 app_pkc_type_t use_type; /**< Specifies the operation mode of PKC. */
103 pkc_init_t init; /**< PKC operation parameters */
104 void *p_result; /**< Pointer to PKC result Buffer */
105 uint32_t *p_kout; /**< Pointer to Kout result in montgomery inversion */
106 } app_pkc_params_t;
107
108 /**
109 * @brief PKC event structure definition
110 */
111 typedef struct
112 {
113 app_pkc_evt_type_t type; /**< Type of event. */
114 uint32_t error_code; /**< PKC error code. */
115 } app_pkc_evt_t;
116 /** @} */
117
118 /** @addtogroup APP_PKC_TYPEDEF Typedefs
119 * @{
120 */
121 typedef pkc_ecc_point_multi_t app_pkc_ecc_point_multi_t; /**< pkc_ecc_point_multi_t typedef. */
122 typedef pkc_modular_add_t app_pkc_modular_add_t; /**< pkc_modular_add_t typedef. */
123 typedef pkc_modular_sub_t app_pkc_modular_sub_t; /**< pkc_modular_sub_t typedef. */
124 typedef pkc_modular_shift_t app_pkc_modular_shift_t; /**< pkc_modular_shift_t typedef. */
125 typedef pkc_modular_compare_t app_pkc_modular_compare_t; /**< pkc_modular_compare_t typedef. */
126 typedef pkc_montgomery_multi_t app_pkc_montgomery_multi_t; /**< pkc_montgomery_multi_t typedef. */
127 typedef pkc_montgomery_inversion_t app_pkc_montgomery_inversion_t; /**< pkc_montgomery_inversion_t typedef. */
128 typedef pkc_big_number_multi_t app_pkc_big_number_multi_t; /**< pkc_big_number_multi_t typedef. */
129 typedef pkc_big_number_add_t app_pkc_big_number_add_t; /**< pkc_big_number_add_t typedef. */
130
131 /**
132 * @brief PKC event callback definition
133 */
134 typedef void (*app_pkc_evt_handler_t)(app_pkc_evt_t *p_evt);
135
136 /** @} */
137
138 /* Exported functions --------------------------------------------------------*/
139 /** @addtogroup APP_PKC_DRIVER_FUNCTIONS Functions
140 * @{
141 */
142 /**
143 ****************************************************************************************
144 * @brief Initialize the APP PKC DRIVER according to the specified parameters
145 * in the app_pkc_params_t and app_pkc_evt_handler_t.
146 * @note If interrupt mode is set, you can use blocking mode. Conversely, if blocking mode
147 * is set, you can't use interrupt mode.
148 *
149 * @param[in] p_params: Pointer to app_pkc_params_t parameter which contains the
150 * configuration information for the specified PKC module.
151 * @param[in] evt_handler: PKC user callback function.
152 *
153 * @return Result of initialization.
154 ****************************************************************************************
155 */
156 uint16_t app_pkc_init(app_pkc_params_t *p_params, app_pkc_evt_handler_t evt_handler);
157
158 /**
159 ****************************************************************************************
160 * @brief De-initialize the APP PKC DRIVER peripheral.
161 *
162 * @return Result of De-initialization.
163 ****************************************************************************************
164 */
165 uint16_t app_pkc_deinit(void);
166
167 /**
168 ****************************************************************************************
169 * @brief Realize the point multiplication operation of ECC ellipse algorithm，: result = k * point，Polling mode
170 *
171 * @param[in] p_input: pointer to the input parameter pkc_ecc_point_multi_t structure variable.
172 * @param[in] timeout: Timeout duration
173 *
174 * @return Result of operation.
175 ****************************************************************************************
176 */
177 uint16_t app_pkc_ecc_point_multi_sync(app_pkc_ecc_point_multi_t *p_input, uint32_t timeout);
178
179 /**
180 ****************************************************************************************
181 * @brief Realize the point multiplication operation of ECC ellipse algorithm，: result = k * point，Interrupt mode
182 *
183 * @param[in] p_input: pointer to the input parameter pkc_ecc_point_multi_t structure variable.
184 *
185 * @return Result of operation.
186 ****************************************************************************************
187 */
188 uint16_t app_pkc_ecc_point_multi_async(app_pkc_ecc_point_multi_t *p_input);
189
190 /**
191 ****************************************************************************************
192 * @brief Realization of modular addition: result = (A + B) mod P，Polling mode
193 *
194 * @param[in] p_input: pointer to the input parameter pkc_modular_add_t structure variable.
195 * @param[in] timeout: Timeout duration
196 *
197 * @return Result of operation.
198 ****************************************************************************************
199 */
200 uint16_t app_pkc_modular_add_sync(app_pkc_modular_add_t *p_input, uint32_t timeout);
201
202 /**
203 ****************************************************************************************
204 * @brief Realization of modular addition: result = (A + B) mod P，Interrupt mode
205 *
206 * @param[in] p_input: pointer to the input parameter pkc_modular_add_t structure variable.
207 *
208 * @return Result of operation.
209 ****************************************************************************************
210 */
211 uint16_t app_pkc_modular_add_async(app_pkc_modular_add_t *p_input);
212
213 /**
214 ****************************************************************************************
215 * @brief Implementation of modular subtraction: result = (A - B) mod P，Polling mode
216 *
217 * @param[in] p_input: pointer to the input parameter pkc_modular_sub_t structure variable.
218 * @param[in] timeout: Timeout duration
219 *
220 * @return Result of operation.
221 ****************************************************************************************
222 */
223 uint16_t app_pkc_modular_sub_sync(app_pkc_modular_sub_t *p_input, uint32_t timeout);
224
225 /**
226 ****************************************************************************************
227 * @brief Implementation of modular subtraction: result = (A - B) mod P，Interrupt mode
228 *
229 * @param[in] p_input: pointer to the input parameter pkc_modular_sub_t structure variable.
230 *
231 * @return Result of operation.
232 ****************************************************************************************
233 */
234 uint16_t app_pkc_modular_sub_async(app_pkc_modular_sub_t *p_input);
235
236 /**
237 ****************************************************************************************
238 * @brief Realization of module shift left operation: result = (A<<ShiftBits) mod P，Polling mode
239 *
240 * @param[in] p_input: pointer to the input parameter pkc_modular_shift_t structure variable.
241 * @param[in] timeout: Timeout duration
242 *
243 * @return Result of operation.
244 ****************************************************************************************
245 */
246 uint16_t app_pkc_modular_left_shift_sync(app_pkc_modular_shift_t *p_input, uint32_t timeout);
247
248 /**
249 ****************************************************************************************
250 * @brief Realization of module shift left operation: result = (A<<ShiftBits) mod P，Interrupt mode
251 *
252 * @param[in] p_input: pointer to the input parameter pkc_modular_shift_t structure variable.
253 *
254 * @return Result of operation.
255 ****************************************************************************************
256 */
257 uint16_t app_pkc_modular_left_shift_async(app_pkc_modular_shift_t *p_input);
258
259 /**
260 ****************************************************************************************
261 * @brief Realization of modular comparison operation: result = A mod P，Polling mode
262 *
263 * @param[in] p_input: pointer to the input parameter pkc_modular_compare_t structure variable.
264 * @param[in] timeout: Timeout duration
265 *
266 * @return Result of operation.
267 ****************************************************************************************
268 */
269 uint16_t app_pkc_modular_compare_sync(app_pkc_modular_compare_t *p_input, uint32_t timeout);
270
271 /**
272 ****************************************************************************************
273 * @brief Realization of modular comparison operation: result = A mod P，Interrupt mode
274 *
275 * @param[in] p_input: pointer to the input parameter pkc_modular_compare_t structure variable.
276 *
277 * @return Result of operation.
278 ****************************************************************************************
279 */
280 uint16_t app_pkc_modular_compare_async(app_pkc_modular_compare_t *p_input);
281
282 /**
283 ****************************************************************************************
284 * @brief Realization of modular multiplication: result = A*B mod P，Polling mode
285 *
286 * @param[in] p_input: pointer to the input parameter pkc_montgomery_multi_t structure variable.
287 * @param[in] timeout: Timeout duration
288 *
289 * @return Result of operation.
290 ****************************************************************************************
291 */
292 uint16_t app_pkc_montgomery_multi_sync(app_pkc_montgomery_multi_t *p_input, uint32_t timeout);
293
294 /**
295 ****************************************************************************************
296 * @brief Realization of modular multiplication: result = A*B mod P，Interrupt mode
297 *
298 * @param[in] p_input: pointer to the input parameter pkc_montgomery_multi_t structure variable.
299 *
300 * @return Result of operation.
301 ****************************************************************************************
302 */
303 uint16_t app_pkc_montgomery_multi_async(app_pkc_montgomery_multi_t *p_input);
304
305 /**
306 ****************************************************************************************
307 * @brief Realization of modular inversion: result = A^(-1)mod P，Polling mode
308 *
309 * @param[in] p_input: pointer to the input parameter pkc_montgomery_inversion_t structure variable.
310 * @param[in] timeout: Timeout duration
311 *
312 * @return Result of operation.
313 ****************************************************************************************
314 */
315 uint16_t app_pkc_montgomery_inversion_sync(app_pkc_montgomery_inversion_t *p_input, uint32_t timeout);
316
317 /**
318 ****************************************************************************************
319 * @brief Realization of modular inversion: result = A^(-1)mod P，Interrupt mode
320 *
321 * @param[in] p_input: pointer to the input parameter pkc_montgomery_inversion_t structure variable.
322 *
323 * @return Result of operation.
324 ****************************************************************************************
325 */
326 uint16_t app_pkc_montgomery_inversion_async(app_pkc_montgomery_inversion_t *p_input);
327
328 /**
329 ****************************************************************************************
330 * @brief Realize multiplication of large numbers: result = A*B，Polling mode
331 *
332 * @param[in] p_input: pointer to the input parameter pkc_big_number_multi_t structure variable.
333 * @param[in] timeout: Timeout duration
334 *
335 * @return Result of operation.
336 ****************************************************************************************
337 */
338 uint16_t app_pkc_big_number_multi_sync(app_pkc_big_number_multi_t *p_input, uint32_t timeout);
339
340 /**
341 ****************************************************************************************
342 * @brief Realize multiplication of large numbers: result = A*B，Interrupt mode
343 *
344 * @param[in] p_input: pointer to the input parameter pkc_big_number_multi_t structure variable.
345 *
346 * @return Result of operation.
347 ****************************************************************************************
348 */
349 uint16_t app_pkc_big_number_multi_async(app_pkc_big_number_multi_t *p_input);
350
351 /**
352 ****************************************************************************************
353 * @brief Realize addition of large numbers: result = A+B，Polling mode
354 *
355 * @param[in] p_input: pointer to the input parameter pkc_big_number_add_t structure variable.
356 * @param[in] timeout: Timeout duration
357 *
358 * @return Result of operation.
359 ****************************************************************************************
360 */
361 uint16_t app_pkc_big_number_add_sync(app_pkc_big_number_add_t *p_input, uint32_t timeout);
362
363 /**
364 ****************************************************************************************
365 * @brief Realize addition of large numbers: result = A+B，Interrupt mode
366 *
367 * @param[in] p_input: pointer to the input parameter pkc_big_number_add_t structure variable.
368 *
369 * @return Result of operation.
370 ****************************************************************************************
371 */
372 uint16_t app_pkc_big_number_add_async(app_pkc_big_number_add_t *p_input);
373
374 /**
375 ****************************************************************************************
376 * @brief Return the PKC handle.
377 *
378 * @return Pointer to the PKC handle.
379 ****************************************************************************************
380 */
381 pkc_handle_t *app_pkc_get_handle(void);
382
383 #ifdef ENV_RTOS_USE_SEMP
384 #endif
385
386 /** @} */
387
388 #endif
389
390 #ifdef __cplusplus
391 }
392 #endif
393
394 #endif
395
396 /** @} */
397 /** @} */
398 /** @} */
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，Polling mode...
app_pkc_params_t::use_type
app_pkc_type_t use_type
Specifies the operation mode of PKC.
Definition: app_pkc.h:102
_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)
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:129
app_pkc_modular_shift_t
pkc_modular_shift_t app_pkc_modular_shift_t
pkc_modular_shift_t typedef.
Definition: app_pkc.h:124
APP_PKC_TYPE_MAX
@ APP_PKC_TYPE_MAX
Only for check parameter, not used as input parameters.
Definition: app_pkc.h:78
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.
_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:103
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:134
_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:105
_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
PKC error code.
Definition: app_pkc.h:114
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.
app_pkc_modular_add_t
pkc_modular_add_t app_pkc_modular_add_t
pkc_modular_add_t typedef.
Definition: app_pkc.h:122
app_pkc_montgomery_inversion_t
pkc_montgomery_inversion_t app_pkc_montgomery_inversion_t
pkc_montgomery_inversion_t typedef.
Definition: app_pkc.h:127
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:75
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:77
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:86
_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.
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:87
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:123
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，Interrupt mo...
app_pkc_montgomery_multi_t
pkc_montgomery_multi_t app_pkc_montgomery_multi_t
pkc_montgomery_multi_t typedef.
Definition: app_pkc.h:126
_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:104
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.
gr55xx_hal.h
This file contains all the functions prototypes for the HAL module driver.
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:121
APP_PKC_TYPE_INTERRUPT
@ APP_PKC_TYPE_INTERRUPT
Interrupt operation mode.
Definition: app_pkc.h:76
_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:101
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:128
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_rtos_cfg.h
Header file of app rtos config code.
app_pkc_evt_t
PKC event structure definition.
Definition: app_pkc.h:112
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:88
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:113
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:125