SLAU846B June 2023 – November 2024 MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3105 , MSPM0G3106 , MSPM0G3107 , MSPM0G3505 , MSPM0G3506 , MSPM0G3507
The electronic codebook (ECB) cipher is the simplest block cipher mode. The plaintext data is divided into 128-bit blocks, and each block is encrypted and decrypted independently from any other block. The ECB cipher is shown in Figure 23-5. Note that each 128-bit data block can be encrypted or decrypted individually without any knowledge of the other blocks of plaintext or ciphertext.
While ECB is simple to understand and implement, it has a key disadvantage: the same 128-bit plaintext block is always encrypted into the same ciphertext block, allowing patterns in the ciphertext to be detected.
The AES accelerator supports automated encryption and decryption of more than 128 bits of data in ECB block cipher mode through the use of DMA together with the AES accelerator. ECB mode utilizes two DMA channels (referred to as DMA_A, DMA_B in this section) for output and input to the AES accelerator, respectively. The DMA channel usage for ECB mode encryption and decryption operations is given in Table 23-3.
AES Operation | AES DMA Triggers | ||||
---|---|---|---|---|---|
CMEN | CMx | OPx | DMA_A (DMA_TRIG0) | DMA_B (DMA_TRIG1) | DMA_C (DMA_TRIG2) |
0x1 | 0x0 (ECB) | 0x0 (encryption) | Used to read ciphertext from AESADOUT | Used to write plaintext to AESADIN, which also triggers start of block encryption when 128 bits are written to AESADIN | Not used |
0x1/0x2 (decryption) | Used to read plaintext from AESADOUT | Used to write ciphertext to AESADIN, which also triggers start of block decryption when 128 bits are written to AESADIN | Not used |