RM0090
DES and TDES Cipher block chaining (DES/TDES-CBC) mode
●
DES/TDES-CBC mode encryption
Figure 205
mode encryption. This mode begins by dividing a plaintext message into 64-bit data
blocks. In TCBC encryption, the first input block (I
swapping (refer to
ORing the first plaintext data block (P
The input block is processed through the DEA in the encrypt state using K1. The output
of this process is fed back directly to the input of the DEA, which performs the DES in
the decrypt state using K2. The output of this process is fed directly to the input of the
DEA, which performs the DES in the encrypt state using K3. The resultant 64-bit output
block (O
block is then exclusive-ORed with the second plaintext data block to produce the
second input block, (I
The second input block is processed through the TDEA to produce the second
ciphertext block. This encryption process continues to "chain" successive cipher and
plaintext blocks together until the last plaintext block in the message is encrypted. If the
message does not consist of an integral number of data blocks, then the final partial
data block should be encrypted in a manner specified for the application.
●
DES/TDES-CBC mode decryption
In DES/TDES-CBC decryption (see
directly as the input block (I
for the encrypt process. The input block is processed through the DEA in the decrypt
state using K3. The output of this process is fed directly to the input of the DEA where
the DES is processed in the encrypt state using K2. This resulting value is directly fed
to the input of the DEA where the DES is processed in the decrypt state using K1. The
resulting output block is exclusive-ORed with the IV (which must be the same as that
used during encryption) to produce the first plaintext block (P
ciphertext block is then used as the next input block and is processed through the
TDEA. The resulting output block is exclusive-ORed with the first ciphertext block to
produce the second plaintext data block (P
second block of data.) The TCBC decryption process continues in this manner until the
last complete ciphertext block has been decrypted. Ciphertext representing a partial
data block must be decrypted in a manner specified for the application.
illustrates the DES and Triple-DES Cipher block chaining (DES/TDES-CBC)
Section 20.3.3: Data type on page
) is used directly as the ciphertext (C
1
⊕ P
) = (C
2
1
). The keying sequence is reversed compared to that used
1
Doc ID 018909 Rev 4
Cryptographic processor (CRYP)
), obtained after bit/byte/half-word
1
567), is formed by exclusive-
) with a 64-bit initialization vector IV (I
1
), that is, C
1
). Note that I
and P
2
2
2
Figure
206), the first ciphertext block (C
⊕ C
= O
). (Note that P
2
2
1
= IV ⊕ P
1
= O
. This first ciphertext
1
1
now refer to the second block.
1
⊕ IV). The second
= O
1
1
and O
refer to the
2
2
).
1
) is used
554/1422
Need help?
Do you have a question about the STM32F40 Series and is the answer not in the manual?
Questions and answers