Load the n-bit Initialization Vector (IV) in the top register. The operation of CBC mode is depicted in the following illustration. Cipher Block Chaining (CBC) ModeĬBC mode of operation provides message dependence for generating ciphertext and makes the system non-deterministic. In general, we do not wish to use a deterministic cipher, and hence the ECB mode should not be used in most applications. A ciphertext from ECB can allow an attacker to guess the plaintext by trial-and-error if the plaintext message is within predictable.įor example, if a ciphertext from the ECB mode is known to encrypt a salary figure, then a small number of trials will allow an attacker to recover the figure.
For example, the range of salary can be guessed. In reality, any application data usually have partial information which can be guessed. It is illustrated as follows − Analysis of ECB Mode
Thus, the operation is analogous to the assignment of code words in a codebook, and hence gets an official name − Electronic Codebook mode of operation (ECB). Encryption would then entail only looking up for required plaintext and select the corresponding ciphertext.
In fact, for a given key technically we can create a codebook of ciphertexts for all possible plaintext blocks. The ECB mode is deterministic, that is, if plaintext block P1, P2,…, Pm are encrypted twice under the same key, the output ciphertext blocks will be the same. He then takes the second block of plaintext and follows the same process with same key and so on so forth. The user takes the first block of plaintext and encrypts it with the key to produce the first block of ciphertext.
This mode is a most straightforward way of processing a series of sequentially listed message blocks. Hence, the long message is divided into a series of sequential message blocks, and the cipher operates on these blocks one at a time. Usually, the size of a message is larger than the block size. Interestingly, the different modes result in different properties being achieved which add to the security of the underlying block cipher.Ī block cipher processes the data blocks of fixed size. These are procedural rules for a generic block cipher. In this chapter, we will discuss the different modes of operation of a block cipher.