1 /* USER CODE BEGIN Header */ 2 /** 3 ****************************************************************************** 4 * @file bpka.h 5 * @author MCD Application Team 6 * @brief This file contains the interface of the BLE PKA module. 7 ****************************************************************************** 8 * @attention 9 * 10 * Copyright (c) 2022 STMicroelectronics. 11 * All rights reserved. 12 * 13 * This software is licensed under terms that can be found in the LICENSE file 14 * in the root directory of this software component. 15 * If no LICENSE file comes with this software, it is provided AS-IS. 16 * 17 ****************************************************************************** 18 */ 19 /* USER CODE END Header */ 20 21 #ifndef BPKA_H__ 22 #define BPKA_H__ 23 24 #include <stdint.h> 25 26 /* Enumerated values used for the return of the functions: 27 * (warning: this enum must be aligned with BLEPLAT corresponding one) 28 */ 29 enum 30 { 31 BPKA_OK = 0, 32 BPKA_FULL = -1, 33 BPKA_BUSY = -2, 34 BPKA_EOF = -3, 35 BPKA_ERROR = -5 36 }; 37 38 void BPKA_Reset( void ); 39 40 int BPKA_StartP256Key( const uint32_t* local_private_key ); 41 42 void BPKA_ReadP256Key( uint32_t* local_public_key ); 43 44 int BPKA_StartDhKey( const uint32_t* local_private_key, 45 const uint32_t* remote_public_key ); 46 47 int BPKA_ReadDhKey( uint32_t* dh_key ); 48 49 int BPKA_Process( void ); 50 51 void BPKA_BG_Process( void ); 52 53 /* Callback used by BPKA_Process to indicate the end of the processing 54 */ 55 void BPKACB_Complete( void ); 56 57 void BPKACB_Process( void ); 58 59 #endif /* BPKA_H__ */ 60