Cipher Block Chaining – CBC

AES is a block cipher, meaning that the algorithm operates on fixed-size blocks of data. The cipher key is used to encrypt data in blocks of 16 bytes. For a known input block and a constant (although unknown) encryption key, the output block will always be the same. This might provide useful information for somebody wanting to attack the cipher system.

There are some methods commonly used which cause identical plaintext blocks being encrypted to different ciphertext blocks. One such method is called Cipher Block Chaining (CBC).

CBC is a method of connecting the cipher blocks so that leading blocks influence all trailing blocks. This is achieved by first performing an XOR operation on the current plaintext block and the previous ciphertext block. The XOR result is then encrypted instead of the plaintext block. This increases the number of plaintext bits one ciphertext bit depends on.