XSecure_Sha3PadSelection - 2021.1 English

Xilinx Standalone Library Documentation OS and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2021-06-16
Version
2021.1 English

This function provides an option to select the SHA-3 padding type to be used while calculating the hash.

Note: The default provides support for NIST SHA-3. If a user wants to change the padding to Keccak SHA-3, this function should be called after XSecure_Sha3Initialize()

Prototype

s32 XSecure_Sha3PadSelection(XSecure_Sha3 *InstancePtr, XSecure_Sha3PadType Sha3PadType);

Parameters

The following table lists the XSecure_Sha3PadSelection function arguments.

Table 1. XSecure_Sha3PadSelection Arguments
Name Description
InstancePtr Pointer to the XSecure_Sha3 instance.
Sha3PadType Type of SHA3 padding to be used.
  • For NIST SHA-3 padding - XSECURE_CSU_NIST_SHA3
  • For KECCAK SHA-3 padding - XSECURE_CSU_KECCAK_SHA3

Returns

XST_SUCCESS if pad selection is successful. XST_FAILURE if pad selecction is failed.