46.5.3.1.1 Generating Hashkey
Follow these steps to generate the Hashkey:
- Configure the CTRLA register as follows:
- CTRLA.STARTMODE as manual (Auto for DMAC).
- CTRLA.CIPHER as encryption.
- CTRLA.KEYSIZE as per the key used.
- CTRLA.AESMODE as ECB.
- CTRLA.CTYPE as per the countermeasures required.
- Set CTRLA.ENABLE.
- Write zero to the CIPLEN register.
- Write the key in the KEYWORD register.
- Write the zeros to the INDATA register.
- Set CTRLB.Start.
- Wait for INTFLAG.ENCCMP to be set.
- AES Hardware generates Hash Subkey in the HASHKEY register.
