So, lets look at how CBC works first. The following picture shows the encryption when using CBC (in this case, using AES as the cipher). Basically, Cipher-Block-Chaining means that previous to putting the cleartext data block into the cipher itself (…