Classes | Typedefs | Enumerations | Functions
app_pkc.h File Reference

Header file containing functions prototypes of PKC app library. More...

`#include "grx_hal.h"`
`#include "app_drv_error.h"`
`#include "app_drv_config.h"`

Go to the source code of this file.

## Classes
struct | app_pkc_evt_t
| PKC event structure definition. More...
struct | pkc_env_t
| PKC device structure definition. More...
struct | app_pkc_params_t
| PKC parameters structure definition. More...

## Typedefs
typedef pkc_ecc_point_multi_t | app_pkc_ecc_point_multi_t
typedef pkc_modular_add_t | app_pkc_modular_add_t
typedef pkc_modular_sub_t | app_pkc_modular_sub_t
typedef pkc_modular_shift_t | app_pkc_modular_shift_t
typedef pkc_modular_compare_t | app_pkc_modular_compare_t
typedef pkc_montgomery_multi_t | app_pkc_montgomery_multi_t
typedef pkc_montgomery_inversion_t | app_pkc_montgomery_inversion_t
typedef pkc_big_number_multi_t | app_pkc_big_number_multi_t
typedef pkc_big_number_add_t | app_pkc_big_number_add_t
typedef void(* | app_pkc_evt_handler_t) (app_pkc_evt_t *p_evt)
| PKC event callback definition. More...

## Enumerations
enum | app_pkc_type_t { APP_PKC_TYPE_INTERRUPT, APP_PKC_TYPE_POLLING, APP_PKC_TYPE_MAX }
| PKC operating mode Enumerations definition. More...
enum | app_pkc_evt_type_t { APP_PKC_EVT_ERROR, APP_PKC_EVT_DONE }
| PKC event Enumerations definition. More...
enum | app_pkc_state_t { APP_PKC_INVALID = 0, APP_PKC_ACTIVITY }
| App pkc state types. More...

## Functions
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_pkc_evt_handler_t. More...
uint16_t | app_pkc_deinit (void)
| De-initialize the APP PKC DRIVER peripheral. More...
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. More...
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 mode. More...
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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
pkc_handle_t * | app_pkc_get_handle (void)
| Return the PKC handle. More...

## Detailed Description

Header file containing functions prototypes of PKC app library.

Author
  BLE Driver Team

Attention
  #####Copyright (c) 2019 GOODIX All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file app_pkc.h.