
1105
11028E–ATARM–22-Apr-13
SAM9G46
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
The OFB and CFB modes of operation are only available if 2-key mode is selected (KEYMOD=1
in TDES_MR register).
46.4.2
Start Modes
The SMOD field in the TDES Mode Register (TDES_MR) allows selection of encryption (or
decryption) start mode.
46.4.2.1
Manual Mode
The sequence order is as follows:
Write the Mode Register (TDES_MR) with all required fields, including but not limited to
SMOD and OPMOD.
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 46-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