36.6.3.1.2 Authentication Header Processing
- Configure CTRLA register as follows:
- CTRLA.STARTMODE as Manual
- CTRLA.CIPHER as Encryption
- CTRLA.KEYSIZE as per the key used
- CTRLA.AESMODE as GCM
- CTRLA.CTYPE as per the countermeasures required.
- Set CTRLA.ENABLE
- Write the key in KEYWORD register
- Set CTRLB.GFMUL
- Write the Authdata to INDATA reg
- Set CTRLB.START as1
- Wait for INTFLAG.GFMCMP to be set.
- AES Hardware generates output in GHASH register
- Continue steps 4 to 7 for remaining Authentication Header.
Note: If the Auth data is less than 128 bit, it has to be padded with zero to make it 128 bit aligned.