42.6.3.1.2 Authentication Header Processing

  • Configure CTRLA register as follows:
    1. CTRLA.STARTMODE as Manual
    2. CTRLA.CIPHER as Encryption
    3. CTRLA.KEYSIZE as per the key used
    4. CTRLA.AESMODE as GCM
    5. 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.