Product Specs

Table Of Contents
28 ECB AES electronic codebook mode
encryption
Page
264
28 ECB AES electronic codebook mode encryption
The AES electronic codebook mode encryption (ECB) can be used for a range of cryptographic functions
like hash generation, digital signatures, and keystream generation for data encryption/decryption. The ECB
encryption block supports 128 bit AES encryption (encryption only, not decryption).
AES ECB operates with EasyDMA access to system Data RAM for in-place operations on cleartext
and ciphertext during encryption. ECB uses the same AES core as the CCM and AAR blocks and is an
asynchronous operation which may not complete if the AES core is busy.
AES ECB features:
128 bit AES encryption
Supports standard AES ECB block encryption
Memory pointer support
DMA data transfer
AES ECB performs a 128 bit AES block encrypt. At the STARTECB task, data and key is loaded into
the algorithm by EasyDMA. When output data has been written back to memory, the ENDECB event is
triggered.
AES ECB can be stopped by triggering the STOPECB task.
28.1 Shared resources
The ECB, CCM, and AAR share the same AES module. The ECB will always have lowest priority and if there
is a sharing conflict during encryption, the ECB operation will be aborted and an ERRORECB event will be
generated.
28.2 EasyDMA
The ECB implements an EasyDMA mechanism for reading and writing to the Data RAM. This DMA cannot
access the program memory or any other parts of the memory area except RAM.
If the ECBDATAPTR is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault
or RAM corruption. See Memory on page 23 for more information about the different memory regions.
The EasyDMA will have finished accessing the Data RAM when the ENDECB or ERRORECB is generated.
28.3 ECB data structure
Input to the block encrypt and output from the block encrypt are stored in the same data structure.
ECBDATAPTR should point to this data structure before STARTECB is initiated.
Table 53: ECB data structure overview
Property
Address offset
Description
KEY
0
16 byte AES key
CLEARTEXT
16
16 byte AES cleartext input block
CIPHERTEXT
32
16 byte AES ciphertext output block