Saturday, February 18, 2017

Modern Block Cipher Structure

Since the creation of practical computers, cryptography algorithms have became much more complex than their historic predecessors. One of the fundamental building block of modern cryptosystem is the Block Cipher. A Block Cipher is an encryption algorithm that encrypts a fixed number of bits, hence the word "block." It ensures the confidentiality and at some degree the authenticity of the data, but it cannot guarantee integrity.

A block cipher is a symmetrical algorithm. It means that there is one secret key that is required to encrypt and decrypt using block cipher. In the case of data transmission, both parties on the channel needs to share the secret key. Just by itself, a block cipher with a given key is a one-to-one function. Using the same key, each block of plaintext will map to an unique block of ciphertext. Therefore, a block cipher is a deterministic function.

The fundamental design principal of the block cipher is the concept of confusion and diffusion from Shannon's A Mathematical Theory of Cryptography. Confusion means that the key relates in a complicated way to the ciphertext. In another word, the ciphertext should be drastically different from the plaintext, with a highly complicated relationship between the plaintext and the key. Generally, confusion are applied through the use of substitution or S-Boxes. Diffusion means that each symbols of the plaintext should affect multiple symbols of the ciphertext such that a change in one symbol of plaintext will result in a significant change in the ciphertext. Generally, diffusion are applied through the use of some type of permutation and expansion. One indication for the confusion and diffusion of a block cipher is the avalanche effect, that a insignificant change in the plaintext or the key (such as a bit flip) would result in a significant change in the ciphertext (such as a 50% difference). By applying both confusion and diffusion, modern block ciphers can thwart statistical and analytical attacks.

In modern block ciphers, confusion and diffusion are applied multiple times, resulting in an iterative cipher. Most block cipher structure, such as the Feistal Cipher Structure or the Permutation-Substitution Network are this type of framework. Each time both the operation are applied are generally referred to as a "round." In summary, a block cipher is structured as the chart below. There could also be a key derivation function that derives a round key for each round from the original key.


.
.
.
.