SWCU194 March 2023 CC1314R10 , CC1354P10 , CC1354R10 , CC2674P10 , CC2674R10
A GCM operation can be interrupted during the AAD and crypto data processing phase at 128-bit aligned boundaries and the Host can store the intermediate processing state of the engine. The data to be stored for this consists of the intermediate IV, the TAG value and the internal block counter. The keys and mode settings are also part of the state, but these are not changed during operation.
To request the interruption of a GCM operation the CRYPTO:AESCTLG.ET_DIGEST bit has to be set, after writing the last data word of a 128-bit aligned crypto data part.
To continue a GCM operation that was previously interrupted, the intermediate processing state has to be restored:
The intermediate IV must be written to the AESIVn registers.
The intermediate TAG must be written to the AESKEY3_n registers (TAG accumulation is internally done in the AESKEY3_n registers).
The intermediate block counter value must be written to the CRYPTO:AESBLKCNTn registers.
The static part of the context, such as the AES keys, GHASH keys, length registers and mode for the operation must also be loaded with their original values to ensure correct continuation. When writing the mode, make sure that the GCM_CCM_CONTINUE bit and, depending on the data phase to continue from, the GCM_CCM_CONTINUE_AAD bit are set in the CRYPTO:AESCTL register to notify the engine it has to continue processing from the loaded state.