1089
6437E–ATARM–23-Apr-13
SAM9M11
45.4.1
Operation Modes
The TDES supports the following modes of operation:
ECB: Electronic Code Book
CBC: Cipher Block Chaining
OFB: Output Feedback
CFB: Cipher Feedback
– CFB8 (CFB where the length of the data segment is 8 bits)
– CFB16 (CFB where the length of the data segment is 16 bits)
– CFB32 (CFB where the length of the data segment is 32 bits)
– CFB64 (CFB where the length of the data segment is 64 bits)
The data pre-processing, post-processing and data chaining for each mode are automatically
performed. Refer to the FIPS Publication 81 for more complete information.
These modes are selected by setting the OPMOD field in the TDES Mode Register (TDES_MR).
In CFB mode, four data sizes are possible (8, 16, 32 and 64 bits), configurable by means of the
45.4.2
Start Modes
The SMOD field in the TDES Mode Register (TDES_MR) allows selection of encryption (or
decryption) start mode.
45.4.2.1
Manual Mode
The sequence is as follows:
Write the 64-bit key(s) in the different Key Word Registers (TDES_KEYxWxR), depending on
whether one, two or three keys are required.
Write the initialization vector (or counter) in the Initialization Vector Registers (TDES_IVxR).
Note:
The Initialization Vector Registers concern all modes except ECB.
Set the bit DATRDY (Data Ready) in the TDES Interrupt Enable register (TDES_IER),
depending on whether an interrupt is required or not at the end of processing.
Write the data to be encrypted/decrypted in the authorized Input Data Registers (See
TableNote:
In 32-, 16- and 8-bit CFB mode, writing to TDES_IDATA2R register is not allowed and may lead to
errors in processing.
Table 45-1.
Authorized Input Data Registers
Operation Mode
Input Data Registers to Write
ECB
All
CBC
All
OFB
All
CFB 64-bit
All
CFB 32-bit
TDES_IDATA1R
CFB 16-bit
TDES_IDATA1R
CFB 8-bit
TDES_IDATA1R