AES Accelerator Operation
407
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
AES256 Accelerator
shows the behavior of the 'AES trigger 0-2' for the different cipher modes selected by
AESCMx.
Table 14-2. 'AES trigger 0-2' Operation When AESCMEN = 1
AESCMx
AESOPx
'AES trigger 0'
'AES trigger 1'
'AES trigger 2'
00
ECB
00
encryption
Set after encryption ready,
set again until 128 bit are
read from AESADOUT
Set to load the first block and set
after 'AES trigger 0' was served the
last time, set again until 128 bit are
written to AESADIN
not set
01 or 11
decryption
Set after decryption ready,
set again until 128 bit are
read from AESADOUT
Set to load the first block and set
after 'AES trigger 0' was served the
last time, set again until 128 bit are
written to AESADIN
not set
01
CBC
00
encryption
Set after encryption ready,
set again until 128 bit are
read from AESADOUT
Set after 'AES trigger 0' was
served the last time, set again until
128 bit are written to AESAXDIN
not set
01 or 11
decryption
Set after decryption ready,
set again until 128 bit are
written to from AESAXIN
Set after 'AES trigger 0' was
served the last time, set again until
128 bit are read from AESADOUT
Set after 'AES trigger 1' was
served the last time, set again until
128 bit are written to AESADIN
10
OFB
00
encryption
Set after encryption ready,
set again until 128 bit are
written to AESAXIN
Set after 'AES trigger 0' was
served the last time, set again until
128 bit are read from AESADOUT
Set after 'AES trigger 1' was
served the last time, set again until
128 bit are written to AESAXDIN
01 or 11
decryption
Set after decryption ready,
set again until 128 bit are
written to AESAXIN
Set after 'AES trigger 0' was
served the last time, set again until
128 bit are read from AESADOUT
Set after 'AES trigger 1' was
served the last time, set again until
128 bit are written to AESAXDIN
11
CFB
00
encryption
Set after encryption ready,
set again until 128 bit are
written to AESAXIN
Set after 'AES trigger 0' was
served the last time, set again until
128 bit are read from AESADOUT
not set
01 or 11
decryption
Set after decryption ready,
set again until 128 bit are
written to AESAXIN
Set after 'AES trigger 0' was
served the last time, set again until
128 bit are read from AESADOUT
Set after 'AES trigger 1' was
served the last time, set again until
128 bit are written to AESADIN
The retriggering of the 'AES trigger 0-2' until 128-bit of data are written or read from the corresponding
register supports both byte and word access for writing and reading the state through the DMA.
For AESCMEN = 0, no DMA triggers are generated.
The following sections explain the configuration of the AES module for automatic cipher mode execution
using DMA.
It is assumed that the key is written by software (or by a separate DMA transfer) before writing the first
block to the AES state. The key shadow register always restores the original key, so that there is no need
to reload it. The AESAKEY register should not be written after AESBLKCNTx is written to a non-zero
value.
The number of blocks to be encrypted or decrypted must be programmed into the AESBLKCNTx bits
before writing the first data. Writing a non-zero value into AESBLKCNTx starts the cipher mode sequence
and, thus, AESBLKCNTx must be written after the DMA channels are configured.
Throughout these sections, the different DMA channels are called DMA_A, DMA_B, and so on. In the
figures, these letters appear in dotted circles showing which operation is going to be executed by which
DMA channel. The DMA counter must be loaded with a multiple of 8 for word mode or a multiple of 16 for
byte mode and the single transfer mode of the DMA must be selected. The DMA priorities of DMA_A,
DMA_B, and DMA_C do not play any role but static DMA priorities must be enabled. The DMA triggers
must be configured as level-sensitive triggers.