This block uses the NIST-approved SHA-3 algorithm to generate a 384-bit hash on the input data. Because the SHA-3 hardware only accepts 104 byte blocks as the minimum input size, the input data will be padded with user selectable Keccak or NIST SHA-3 padding and is handled internally in the SHA-3 library.
Initialization & Configuration
The SHA-3 driver instance can be initialized using the
function.
A pointer to CsuDma instance has to be passed during initialization as the CSU DMA will be used for data transfers to the SHA module.
XSecure_Sha3Initialize()
SHA-3 Function Usage
When all the data is available on which the SHA3 hash must be calculated, the
XSecure_Sha3Digest()
can be used with the appropriate parameters as described. When all the data is not available, use the SHA3 functions in the following order:-
XSecure_Sha3Start()
-
XSecure_Sha3Update()
-
XSecure_Sha3Finish()
XSecure_Sha3Update()
XSecure_Sha3_ReadHash()
XSecure_Sha3Update()