59.4.8.1.2 Data Processing
To process data using XTS mode:
- Set AES_MR.OPMODE to XTS.
- Write KEY1.
- The following additional steps are required only if the data to
process is the first to be processed in the data unit, or if the data block to process
is not consecutive to the previous processed data block in the same data unit:
- AES_TWRx must be written with the encrypted Tweak Value (see Encrypted Tweak Generation for details) with bytes swapped as described in AES Register Endianness
- Write AES_ALPHARx with the alpha primitive corresponding to the block number in the data unit.
- Write the data length (payload) information in AES_BCNT.
- Fill AES_IDATARx.IDATA with the data to process according to the SMOD configuration used. If Manual mode or Auto mode is used, the DATRDY bit indicates when the data have been processed and can be read in AES_ODATARx. Repeat this step for as long as consecutive data blocks are processed in the same data unit.
