•
Intermediate GHASH is stored in GHASHx register and Cipher Text available in DATA register.
•
Continue 3 to 5 till the input of plain text to get the cipher text and the Hash keys.
•
At the last input, set CTRLB.EOM.
•
Write last indata to DATA reg.
•
Wait for INTFLAG.ENCCMP to be set.
•
AES Hardware generates output in DATA register and final Hash key in GHASHx register.
•
Load [LEN(A)]64||[LEN(C)]64 in DATA register and set CTRLB.GFMUL and CTRLB.START as 1.
•
Wait for INTFLAG.GFMCMP to be set.
•
AES Hardware generates final GHASH value in GHASHx register.
Tag Generation
•
Configure CTRLA
1.1.
Set CTRLA.ENABLE to 0
1.2.
Set CTRLA.AESMODE as CTR
1.3.
Set CTRLA.ENABLE to 1
•
Load J0 value to INITVECTVx reg.
•
Load GHASHx value to DATA reg.
•
Set CTRLB.NEWMSG and CTRLB.START to start the Counter mode operation.
•
Wait for INTFLAG.ENCCMP to be set.
•
AES Hardware generates the GCM Tag output in DATA register.
38.6.4. Synchronization
Not applicable.
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
899