Cipher Block Chaining Mode

Why
The cipher block chaining mode is important because it demonstrates a more sophisticated operating mode that is more secure than the ECB

What
The cipher block chaining mode is a mode of operation that creates ciphertext blocks that are not only dependent on the input blocks, but also on the previous ciphertext blocks that were generated

Predictable IVs
If the IVs are predictable, and malice captures $$C_1$$ encoded from $$P_1$$ using $$IV_1$$, then she can guess the value of $$P_1$$ by passing into the new encryption oracle $$G \oplus IV_1 \oplus IV_2$$, $$G$$ being her guess and $$IV_2$$ being the predicted IV. Then, the oracle will compute $$C_2 = E(G \oplus IV_1 \oplus IV_2 \oplus IV_2) = E(G \oplus IV_1)$$. If $$C_1 = C_2$$, then malice will become aware of the original plaintext message which she guessed to be $$G$$

CBC Encryption
$$C_0 = IV$$

$$C_i = E(P_i \oplus C_{i-1})$$

CBC Decryption
$$C_0 = IV$$

$$P_i = D(C_i) \oplus C_{i-1}$$