XSecure_Sha3PadSelection - 2023.1 English

Standalone Library Documentation: BSP and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2023-05-16
Version
2023.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.