SWCU194 March 2023 CC1314R10 , CC1354P10 , CC1354R10 , CC2674P10 , CC2674R10
In most systems, the message data in stored in the host memory in little-endian fashion. The Hash engine is designed as a little-endian core to prevent data swap in the system. As a result, the message data must be provided in a little-endian fashion to the core.
The following code examples show how the data must be provided to the Hash engine, based on the FIPS 180-4 specification.
The byte highlighted in red is the first byte of the data or digest block.
Data in:"abcdbcdecdefdefgefghfghighijhi
jkijkljklmklmnlmnomnopnopq"
"61626364 62636465 63646566 64656667
65666768 66676869 6768696a 696a6b6c
68696a6b 6a6b6c6d 6b6c6d6e 6c6d6e6f
6d6e6f70 6e6f7071
Digest out:"248d6a61 d20638b8 e5c02693 0ce6039
Hash data in external RAM, loaded through DMAC:
Word_0 [31:0]64636261
Word_1 [31:0]65646362
Word_2 [31:0]66656463
...
Output digest, read through the slave interface or DMA:
HASHDIGESTA [31:0]:616a8d24
HASHDIGESTB [31:0]:b83806d2
HASHDIGESTC [31:0]:9326c0e5