xilsecure
Vitis Drivers API Documentation
XilSecure SHA Client APIs

Functions

int XSecure_Sha3Initialize (void)
 This function stores the Sha3 initialize state as initialized if the current state is uninitialized. More...
 
int XSecure_Sha3Update (XSecure_ClientInstance *InstancePtr, const u64 InDataAddr, u32 Size)
 This function sends IPI request to update the SHA3 engine with the input data. More...
 
int XSecure_Sha3Finish (XSecure_ClientInstance *InstancePtr, const u64 OutDataAddr)
 This function sends IPI request final data to SHA3 engine which includes SHA3 padding and reads final hash. More...
 
int XSecure_Sha3Digest (XSecure_ClientInstance *InstancePtr, const u64 InDataAddr, const u64 OutDataAddr, u32 Size)
 This function sends IPI request to calculate hash on single block of data. More...
 

Function Documentation

int XSecure_Sha3Digest ( XSecure_ClientInstance *  InstancePtr,
const u64  InDataAddr,
const u64  OutDataAddr,
u32  Size 
)

This function sends IPI request to calculate hash on single block of data.

Parameters
InstancePtrPointer to the client instance
InDataAddrAddress of the input buffer where the input data is stored
OutDataAddrAddress of the output buffer to store the output hash
SizeSize of the data to be updated to SHA3 engine
Returns
  • XST_SUCCESS If the sha3 hash calculation is successful
  • XST_FAILURE If there is a failure

Perform input parameter validation on InstancePtr. Return XST_FAILURE if input parameters are invalid

Initialize SHA3

Send an IPI request to the PLM by using the CDO command to call XSecure_ShaOperation API and returns the status of the IPI response.

References XSECURE_ADDR_HIGH_SHIFT, XSECURE_API_SHA3_UPDATE, XSecure_Printf, XSecure_ProcessMailbox(), and XSecure_Sha3Initialize().

Referenced by XSecure_PpkVerify().

int XSecure_Sha3Finish ( XSecure_ClientInstance *  InstancePtr,
const u64  OutDataAddr 
)

This function sends IPI request final data to SHA3 engine which includes SHA3 padding and reads final hash.

Parameters
InstancePtrPointer to the client instance
OutDataAddrAddress of the output buffer to store the output hash
Returns
  • XST_SUCCESS If finished without any errors
  • XST_FAILURE If there is a failure

Perform input parameter validation on InstancePtr. Return XST_FAILURE if input parameters are invalid

Validate Sha3state. Return XST_FAILURE if the state is XSECURE_SHA_UNINITIALIZED

Send an IPI request to the PLM by using the CDO command to call XSecure_ShaOperation API and it returns the status of the IPI response.

References XSECURE_API_SHA3_UPDATE, XSecure_Printf, XSecure_ProcessMailbox(), and XSECURE_SHA_UPDATE.

Referenced by XSecure_Sha3Digest(), XSecure_Sha3Hash(), and XSecure_SpkAuthentication().

int XSecure_Sha3Initialize ( void  )

This function stores the Sha3 initialize state as initialized if the current state is uninitialized.

Returns
  • XST_SUCCESS If the Sha3 state is changed to initialized state
  • XST_FAILURE If the Sha3 is not in uninitialized state

Referenced by XSecure_PpkVerify(), XSecure_Sha3Digest(), XSecure_Sha3Hash(), and XSecure_SpkAuthentication().

int XSecure_Sha3Update ( XSecure_ClientInstance *  InstancePtr,
const u64  InDataAddr,
u32  Size 
)

This function sends IPI request to update the SHA3 engine with the input data.

Parameters
InstancePtrPointer to the client instance
InDataAddrAddress of the output buffer to store the output hash
SizeSize of the data to be updated to SHA3 engine
Returns
  • XST_SUCCESS If the update is successful
  • XST_FAILURE If there is a failure

Perform input parameter validation on InstancePtr. Return XST_FAILURE if input parameters are invalid

Validate Sha3state. Return XST_FAILURE if the state is not XSECURE_SHA_UNINITIALIZED

Send an IPI request to the PLM by using the CDO command to call XSecure_ShaOperation API and returns the status of the IPI response.

References XSECURE_API_SHA3_UPDATE, XSecure_Printf, XSecure_ProcessMailbox(), and XSECURE_SHA_UPDATE.

Referenced by XSecure_Sha3Digest(), XSecure_Sha3Hash(), and XSecure_SpkAuthentication().