Block Cipher modes of Operation – GeeksforGeeks

encoding algorithms are divided into two categories based on the remark type, as a block zero and stream cipher. Block cipher is an encoding algorithm that takes a fix size of input say b bits and produces a ciphertext of b bits again. If the stimulation is larger than b bits it can be divided further. For different applications and uses, there are respective modes of operations for a block code. Electronic Code Book (ECB) –
Electronic code script is the easiest block cipher mood of functioning. It is easier because of target encoding of each block of remark plaintext and end product is in form of blocks of code ciphertext. generally, if a message is larger than b bits in size, it can be broken down into a bunch of blocks and the procedure is repeated. procedure of ECB is illustrated below :

Advantages of using ECB –

  • Parallel encryption of blocks of bits is possible, thus it is a faster way of encryption.
  • Simple way of the block cipher.

Disadvantages of using ECB –

  • Prone to cryptanalysis since there is a direct relationship between plaintext and ciphertext. 

Cipher Block Chaining –
Cipher barricade chain or CBC is an progress made on ECB since ECB compromises some security requirements. In CBC, the previous nothing obstruct is given as input to the following encoding algorithm after XOR with the original plaintext parry. In a nutshell here, a cipher parry is produced by encrypting an XOR output of the previous calculate stuff and portray plaintext stop. The process is illustrated here : Advantages of CBC –

  • CBC works well for input greater than b bits.
  • CBC is a good authentication mechanism.
  • Better resistive nature towards cryptanalysis than ECB.

Disadvantages of CBC –

  • Parallel encryption is not possible since every encryption requires a previous cipher. 

Cipher Feedback Mode (CFB) –
In this mode the code is given as feedback to the following block of encoding with some fresh specifications : first, an initial vector IV is used for first encoding and output bits are divided as a laid of s and b-s bits.The left-hand side s bits are selected along with plaintext bits to which an XOR operation is applied. The result is given as input signal to a lurch read having b-s bits to lhs, s bits to rhs and the process continues. The encoding and decoding process for the same is shown below, both of them use encoding algorithm. Advantages of CFB –

  • Since, there is some data loss due to the use of shift register, thus it is difficult for applying cryptanalysis. 

Output Feedback Mode –
The output feedback mode follows closely the lapp process as the Cipher Feedback manner except that it sends the code output as feedback rather of the actual nothing which is XOR output. In this output feedback manner, all bits of the parry are sent alternatively of sending selected s bits. The Output Feedback manner of jam zero holds capital resistance towards bit transmission errors. It besides decreases the dependence or relationship of the cipher on the plaintext. Advantages of OFB –

  • In the case of CFB, a single bit error in a block is propagated to all subsequent blocks. This problem is solved by OFB as it is free from bit errors in the plaintext block. 

Counter Mode –
The Counter Mode or CTR is a bare counter-based block code implementation. Every clock time a counter-initiated value is encrypted and given as input to XOR with plaintext which results in ciphertext auction block. The CTR mood is independent of feedback use and frankincense can be implemented in latitude. Its childlike execution is shown below : Advantages of Counter –

  •  Since there is a different counter value for each block, the direct plaintext and ciphertext relationship is avoided. This means that the same plain text can map to different ciphertext.
  • Parallel execution of encryption is possible as outputs from previous stages are not chained as in the case of CBC. 

My Personal Notes


Leave a Reply

Your email address will not be published.