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 output feedback mode leverages an initialization vector (IV) to generate a keystream by repeatedly encrypting the IV with the cipher key. The output ciphertext is obtained by XORing plaintext with the encrypted and re-encrypted versions of the initialization vector. The OFB cipher is shown in Figure 23-6.
In OFB mode, the initialization vector must be a nonce (number used once). To prevent loss of confidentiality, each IV must only be used one time with a given key, and any value passed into the cipher Ek for a given key k must not be used as an initialization vector with the same key k.
The AES accelerator supports automated encryption and decryption of more than 128 bits of data in OFB block cipher mode through the use of DMA together with the AES accelerator. OFB 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 OFB 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_TRIG2DMA_TRIG) |
0x1 | 0x2 (OFB) | 0x0 (encryption) | Used to write plaintext of the current block to AESAXIN | Used to read ciphertext from AESADOUT | Used to write the plaintext of the current block to AESAXDIN, which also triggers the next encryption |
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 AESAXDIN, which also triggers the next decryption |