Unblock your way to Block Ciphers
Block ciphers as the name suggests operate on blocks of plaintext to produce blocks of ciphertext. These are typically useful to breakup large bytes of plaintext into smaller chunks for encryption and the chunks are then chained together with a particular mode of operation. Examples of such ciphers include DES (Data Encryption Standard), AES (Advanced Encryption Standard), IDEA etc.
The block size is typically fixed and usually in multiples of 8. For example with 64 bits block size an 84 bit plaintext will be broken down into two blocks, one containing 64 bits of plaintext and the other containing 20 bits. Very small blocks sizes should be avoided. A block size of m bits can support 2^m plaintext bit combinations. If m is very small and the attacker has a-priori knowledge of plaintext bits then the adversary can launch a dictionary attack on the cipher. This is best illustrated with the following example where m = 2.
With 2 bits we only have 4 possible combinations of plaintext and correspondingly ciphertext. Entropy wise this is clearly insufficient and susceptible to cryptanalysis.
As such a block cipher is said to be secure if the attacker cannot point out the difference between the block cipher and a random permutation. This property is also known as ciphertext indistinguishability. By definition:
A cryptosystem is considered secure in terms of indistinguishability if no adversary, given an encryption of a message randomly chosen from a two-element message space determined by the adversary, can identify the message choice with probability significantly better than that of random guessing ( 1?2).
In addition to ciphertext indistinguishability, block ciphers are evaluated based on criteria such as key size, block size, complexity of implementation and performance. These criteria can lead to choosing the appropriate block cipher for the use case at hand.
Another important aspect to consider when using a block cipher is choosing the correct mode of operation. We shall discuss more about the same in the next post. Till then have a secure week ahead :-)