trngpsx
Vitis Drivers API Documentation
xtrngpsx.h File Reference

Overview

This file contains trng definitions of VersalNet.

Macros

#define XTRNGPSX_DEFAULT_SEED_LIFE   256U
 Default seed life. More...
 
#define XTRNGPSX_PERS_STRING_LEN_IN_WORDS   12U
 Personalization string length in words. More...
 
#define XTRNGPSX_PERS_STRING_LEN_IN_BYTES   48U
 Personalization string length in bytes. More...
 
#define XTRNGPSX_SEC_STRENGTH_IN_BYTES   32U
 security strength in Bytes More...
 

Enumerations

enum  XTrngpsx_ErrorState {
  XTRNGPSX_UNHEALTHY = 1, XTRNGPSX_HEALTHY, XTRNGPSX_CATASTROPHIC, XTRNGPSX_ERROR,
  XTRNGPSX_STARTUP_TEST
}
 
enum  XTrngpsx_State { XTRNGPSX_UNINITIALIZED_STATE = 1, XTRNGPSX_INSTANTIATE_STATE, XTRNGPSX_RESEED_STATE, XTRNGPSX_GENERATE_STATE }
 
enum  XTrngpsx_ErrorCodes {
  XTRNGPSX_INVALID_PARAM = 0x0, XTRNGPSX_INVALID_MODE, XTRNGPSX_INVALID_DF_LENGTH, XTRNGPSX_INVALID_SEED_LIFE,
  XTRNGPSX_INVALID_SEED_VALUE, XTRNGPSX_INVALID_SEED_LENGTH, XTRNGPSX_INVALID_STATE, XTRNGPSX_INVALID_ADAPTPROPTEST_CUTOFF_VALUE,
  XTRNGPSX_INVALID_REPCOUNTTEST_CUTOFF_VALUE, XTRNGPSX_USER_CFG_COPY_ERROR, XTRNGPSX_UNHEALTHY_STATE, XTRNGPSX_INVALID_BUF_SIZE,
  XTRNGPSX_RESEED_REQUIRED_ERROR, XTRNG_PSX_INVALID_PREDRES_VALUE, XTRNGPSX_MEMSET_UNINSTANTIATE_ERROR, XTRNGPSX_TIMEOUT_ERROR,
  XTRNGPSX_CATASTROPHIC_CTF_ERROR, XTRNGPSX_CATASTROPHIC_DTF_ERROR, XTRNGPSX_KAT_FAILED_ERROR, XTRNGPSX_WRITE_ERROR,
  XTRNGPSX_INVALID_BLOCKING_MODE
}
 

Functions

XTrngpsx_Config * XTrngpsx_LookupConfig (u16 DeviceId)
 This function returns a reference to an XTrngpsx_Config structure based on the DeviceId. More...
 
int XTrngpsx_CfgInitialize (XTrngpsx_Instance *InstancePtr, const XTrngpsx_Config *CfgPtr, UINTPTR EffectiveAddr)
 This function initializes the TRNGPSV instance/driver. More...
 
int XTrngpsx_Instantiate (XTrngpsx_Instance *InstancePtr, const u8 *Seed, u32 SeedLength, const u8 *PersStr, const XTrngpsx_UserConfig *UserCfg)
 This function instantiates the TRNG instance with user configure values. More...
 
int XTrngpsx_Reseed (XTrngpsx_Instance *InstancePtr, const u8 *Seed, u8 DLen)
 This function triggers and reseeds the DRBG module. More...
 
int XTrngpsx_Generate (XTrngpsx_Instance *InstancePtr, u8 *RandBuf, u32 RandBufSize, u8 PredResistance)
 This function generates and collects random data in to a buffer. More...
 
int XTrngpsx_Uninstantiate (XTrngpsx_Instance *InstancePtr)
 This function uninstantiates the TRNG instance. More...
 
int XTrngpsx_DRBGKat (XTrngpsx_Instance *InstancePtr)
 This function runs DRBG self test i.e DRBG full cycle Instantiate+Reseed, Reseed and Generate. More...
 
int XTrngpsx_HealthTest (XTrngpsx_Instance *InstancePtr)
 This function runs health tests. More...
 
int XTrngpsx_PreOperationalSelfTests (XTrngpsx_Instance *InstancePtr)
 This function runs preoperational self tests and updates TRNG error state. More...