SLAA547C July 2013 – July 2021 MSP430FR5739
CBC is a common method to cipher multiple blocks of data. The mode introduces pseudo-randomness between cipher blocks to obscure data patterns between plaintext blocks. Figure 4-13 describes DES CBC modes for encryption and decryption.
Encoding in CBC modes begins with an XOR of the IV block and the first Plain text box. The result is encrypted to give the first block of Cipher text. This cipher text is then XORed with the next block of plaint text, which is then encoded. This process repeats until all data blocks are enciphered. The IV block is then updated to equal the last enciphered block.
Decoding in CBC happens in a similar way. In decoding, however, the XOR step happens after the decoding process. The first cipher text block is decoded then XORed with IV block to get the plain text. Continuing blocks are XORed with the previous cipher block after decoding, and the last cipher block is taken as the updated IV.
Triple DES with CBC works in the same way as DES with CBC. In Figure 4-13, replace the DES Encode module with 3DES Encode and the DES Decode module with 3DES Decode to have a visualization of the mode.