SLAU962A December 2025 – June 2026 MSPM33C321A , MSPM33C321A-Q1
The hash core expects two inputs; a MAC key and the message. Figure 14-2 shows the HMAC processing flow in time key size smaller than or equal to the block size. If the length of the MAC key is smaller than the block size, the application must pad the keys with extra zeroes at the end of the key. The total length of the key must equal the block size.
As shown in Figure 14-3 when the MAC key is longer than the block size, input data buffer is first loaded with the key equal to block size with the MODE_IN.MAC_KEY register bit set. As a full hash must be calculated over the MACK Key, and this result be used as the actual key for HMAC, the length information and pad message must be programmed with the last block of MAC key information.