TI BLE-Stack for Bluetooth API Documentation  3.03.00.00
Data Structures | Macros | Enumerations | Functions
tof_security.h File Reference

Detailed Description

ToF security module interface.

Go to the source code of this file.

Data Structures

struct  ctrDrbgState_t
 ctr DRBG State More...
 
struct  tofSecCfgPrms_t
 ToF Security Configuration Parameters. More...
 
struct  tofSecHandle_t
 ToF Security Handle. More...
 

Macros

#define CTR_DRBG_BLOCKLEN   16
 Length of CTR DRBG Block.
 
#define CTR_DRBG_INST_FLAG   0xAA
 CTR DRBG Flag.
 
#define CTR_DRBG_SEEDLEN   (CTR_DRBG_BLOCKLEN + CTR_DRBG_BLOCKLEN)
 Length of CTR DRBG Seed.
 
#define NUM_ELEMENTS(x)   (sizeof(x)/sizeof(x[0]))
 NUM_ELEMENTS calculates the num of elements in an array.
 
#define TOF_SEC_DBL_BUFF_SIZE   16
 Size of ToF_securoty double buffer.
 
#define TOF_SEC_FILL_1ST_BUFF   0x02
 Fill first buffers.
 
#define TOF_SEC_FILL_2ND_BUFF   0x03
 Fill second buffers.
 
#define TOF_SEC_FILL_BOTH_BUFFS   0x01
 Fill both buffers.
 
#define TOF_SEC_SYNCWORD_SIZE   8
 Length of Syncword.
 

Enumerations

enum  tofSecErrRes_t {
  TOF_SEC_SUCCESS_E = 0, TOF_SEC_GEN_FAIL_E, TOF_SEC_AES_FAIL_E, TOF_SEC_ALLOC_FAIL_E,
  TOF_SEC_INVALID_PRMS_FAIL_E
}
 ToF Security Error Result. More...
 
enum  tofSecMode_e { TOF_MODE_SINGLE_BUF = 0, TOF_MODE_DBL_BUF }
 ToF Security Mode. More...
 

Functions

int TOFSecurity_close (tofSecHandle_t *tofSecHandle)
 This function is used to close ToF Security and free buffers. More...
 
int TOFSecurity_genSeed (tofSecHandle_t *tofSecHandle)
 use TRNG HW module to generate a true 128-bit random seed More...
 
int TOFSecurity_genSyncWords (tofSecHandle_t *tofSecHandle, uint8_t bufferToFill)
 Will fill each Sync Word Buffer with numOfSyncWordsPerBuffer Sync Words. More...
 
int TOFSecurity_open (tofSecHandle_t *tofSecHandle, tofSecCfgPrms_t *tofSecCfgPrms)
 This function is used to open the tof security module (to default or to presets defined in tofSecCfgPrms) and reset the AES engine. More...
 
int TOFSecurity_setSeed (tofSecHandle_t *tofSecHandle, uint8_t *newSeed)
 This function is used to reseed the ctr drbg. More...
 
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale