27. Hmac_sha256

27.1. Function description:

This demo shows the operation of HMAC SHA256, the means about filling data writed to fifo is via soft.

  • Configure the HMAC.

  • Enable HASH and filling data by soft to start calculation.

  • Waiting calculation done to compare the result with the golden data to check.

Note

When the length of the key is greater than one block size, need to using hash operation to get the real key for hmac operation. The golden data getted by hash online calculator.

27.2. Main configuration:

27.2.1. Hash configure

Algorithm

Mode

DMA

Data Type

sha256

hmac&hash

disable

no swap

27.3. Test result:

If the output result is same as the golden data, then print pass, if not print fail.

27.4. IO connection:

None