SWCU192 November 2021 CC1312R7 , CC1352P7 , CC2652P7 , CC2652R7
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-2 RFC 1321 specifications.
The byte highlighted in red is the first byte of the data or digest block.
FIPS 180-2, chapter B.2:
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]64636261Word_1 [31:0]65646362
Word_2 [31:0]66656463
...
Output digest, read through the slave interface or DMA:
HASH_DIGEST_A [31:0]:616a8d24HASH_DIGEST_B [31:0]:b83806d2
HASH_DIGEST_C [31:0]:9326c0e5