59.4.1 Operating Modes
The AESB supports the following modes of operation:
- ECB—Electronic Code Book
- CBC—Cipher Block Chaining
- CTR—Counter
The data pre-processing, post-processing and data chaining for the operating modes are performed automatically. Refer to NIST Special Publication 800-38A Recommendation for more complete information.
The modes are selected in AESB_MR.OPMOD.
In CTR mode, the size of the block counter embedded in the module is 16 bits. Therefore, there is a rollover after processing 1 megabyte of data. If the file to be processed is greater than 1 megabyte, this file must be split into fragments of 1 megabyte or less for the first fragment if the initial value of the counter is greater than 0. Prior to loading the first fragment into AESB_IDATARx registers, the AESB_IVRx registers must be cleared. For any fragment, after the transfer is completed and prior to transferring the next fragment, AESB_IVR0 must be programmed so that the fragment number (0 for the first fragment, 1 for the second one, and so on) is written in the 16 MSB of AESB_IVR0.
If the initial value of the counter is greater than 0 and the data buffer size to be processed is greater than 1 megabyte, the size of the first fragment to be processed must be 1 megabyte minus 16x(initial value) to prevent a rollover of the internal 1-bit counter.