SLAU846A June 2023 – October 2023 MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3105 , MSPM0G3105-Q1 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3505 , MSPM0G3505-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1
The cipher feedback (CFB) mode is similar to the output feedback (OFB) mode, with the key difference being that the input block to the block cipher E used to generate the key stream is taken from the previous ciphertext block (after being XORed with the plaintext), vs. taken before being XORed with the plaintext (as in the case of OFB). As a result, the keystream is dependent upon the plaintext, which is not true of OFB. The CFB cipher is shown in Figure 23-8.
Like OFB, CFB requires an initialization vector (IV). In CFB mode, the initialization vector (IV) must be unpredictable.
The AES accelerator supports automated encryption and decryption of more than 128 bits of data in CFB block cipher mode through the use of DMA together with the AES accelerator. CFB mode utilizes three DMA channels (referred to as DMA_A, DMA_B, and DMA_C in this section) for input, output, and input to the AES accelerator, respectively. The DMA channel usage for CFB mode encryption and decryption operations is given in Table 23-6.
AES Operation | AES DMA Triggers | ||||
---|---|---|---|---|---|
CMEN | CMx | OPx | DMA_A (DMA_TRIG0) | DMA_B (DMA_TRIG1) | DMA_C (DMA_TRIG2) |
0x1 | 0x3 (CFB) | 0x0 (encryption) | Used to write plaintext of the current block to AESAXIN | Used to read ciphertext from AESADOUT, which also triggers the next encryption | Not used |
0x1 (decryption) | Used to write the ciphertext of the current block to AESAXIN | Used to read the plaintext from AESADOUT | Used to write the ciphertext of the current block to AESADIN, which also triggers the next decryption |