Table 38-1. Relevant Input/Output Data Registers for different Confidentiality modes
Confidentiality Mode
Relevant Input / Output Data Registers
ECB
All
CBC
All
OFB
All
128-bit CFB
All
64-bit CFB
First and Second
32-bit CFB
First
16-bit CFB
First
8-bit CFB
First
CTR
All
38.6.2.4. Start Modes
The Start mode field in the Control A Register (CTRLA.STARTMODE) allows the selection of encryption
start mode.
1.
Manual Start Mode
In the Manual Start Mode the sequence is as follows:
1.1.
Write the 128/192/256 bit key in the Key Register (KEYWORDx)
1.2.
Write the initialization vector or counter in the Initialization Vector Register (INTVECTx).
The initialization vector concerns all modes except ECB
1.3.
Enable interrupts in Interrupt Enable Set Register (INTENSET), depending on whether an
interrupt is required or not at the end of processing.
1.4.
Write the data to be encrypted or decrypted in the Data Registers (DATA).
1.5.
Set the START bit in Control B Register (CTRLB.START) to begin the encryption or the
decryption process.
1.6.
When the processing completes, the Encryption Complete bit in the Interrupt Flag Register
(INTFLAG.ENCCMP) raises. If Encryption Complete interrupt has been enabled, the
interrupt line of the AES is activated.
1.7.
When the software reads one of the Output Data Registers (DATA), INTFLAG.ENCCMP bit
is automatically cleared.
2.
Auto start Mode
The Auto Start Mode is similar to the manual one, except in this mode, as soon as the correct
number of input data registers is written, processing is automatically started without setting the
START bit in the Control B Register. DMA operation uses this mode.
3.
Last Output Data Mode (LOD)
This mode is used to generate message authentication code (MAC) on data in CCM mode of
operation. The CCM mode combines counter mode for encryption and CBC-MAC generation for
authentication.
When LOD is disabled in CCM mode then counter mode of encryption is performed on the input data
block.
When LOD is enabled in CCM mode then CBC-MAC generation is performed. Zero block is used as the
initialization vector by the hardware. Also software read from the Output Data Register (DATA) is not
required to clear the ENCCMP flag. The ENCCMP flag is automatically cleared by writing into the Input
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
893