59.4.8 XEX-based Tweaked-codebook Mode (XTS)
XTS mode comprises the AES engine with XOR on inputs and outputs. After each encryption/decryption, the value used for the XOR is multiplied by the first GF(2128) alpha primitive (0x2) and then used for the next encryption/decryption. The XTS mode uses two different keys and defines a Tweak Value (i) as additional input.
XTS processing is computed on 128-bit input data fields.
The data length can be any integer multiple of a byte. The AES embeds an auto-padding feature which can be disabled by writing AES_BCNT=0, so the length of the data (payload and padding) must be a multiple of 128 bits.
The AES key length can be any length supported by the AES module.
