0% found this document useful (0 votes)
11 views

Block Cipher Modes of Operation

Uploaded by

hrp.bizconnect
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Block Cipher Modes of Operation

Uploaded by

hrp.bizconnect
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Unit 2 : Basics of Cryptography

Block cipher Mode


Stream ciphers convert one symbol of plaintext directly into a symbol of ciphertext.
Block ciphers encrypt a group of plaintext symbols as one block.
What is Block Cipher?

A block cipher is a symmetric cryptographic technique which we used to encrypt a fixed-size


data block using a shared, secret key. During encryption, we used plaintext and ciphertext is
the resultant encrypted text. It uses the same key to encrypt both the plaintext, and the ciphertext.

A block cipher processes the data blocks of fixed size. Typically, a message's size exceeds a
block's size. As a result, the lengthy message is broken up into a number of sequential message
blocks, and the cipher operates on these blocks one at a time.

o Block Cipher modes of Operation

o Electronic Code Book (ECB) Mode


o Cipher Block Chaining (CBC) Mode
o Cipher Feedback (CFB) Mode
o Output Feedback (OCB) Mode
o Counter (CTR) Mode

Electronic Code Book (ECB)

Electronic code book is the easiest block cipher mode of functioning. It is easier because of direct
encryption of each block of input plaintext and output is in form of blocks of encrypted 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.
Fig.Procedure of ECB

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 (CBC)

Cipher block chaining or CBC is an advancement made on ECB since ECB compromises some
security requirements. In CBC, the previous cipher block is given as input to the next encryption
algorithm after XOR with the original plaintext block. In a nutshell here, a cipher block is produced
by encrypting an XOR output of the previous cipher block and present plaintext block.
Fig.Procedure of CBC

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 cipher is given as feedback to the next block of encryption with some new
specifications: first, an initial vector IV is used for first encryption and output bits are divided as
a set 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 to a shift register having b-s bits to lhs,s
bits to rhs and the process continues. The encryption and decryption process for the same is
shown below, both of them use encryption algorithms.

Fig.Procedure of CFB

Advantages of CFB –
● Since, there is some data loss due to the use of shift register, thus it is difficult for applying
cryptanalysis.
Disadvantages of using CFB –
● The drawbacks of CFB are the same as those of CBC mode. Both block losses and
concurrent encryption of several blocks are not supported by the encryption. Decryption,
however, is parallelizable and loss-tolerant.
Output Feedback Mode –

The output feedback mode follows nearly the same process as the Cipher Feedback mode except
that it sends the encrypted output as feedback instead of the actual cipher which is XOR output. In
this output feedback mode, all bits of the block are sent instead of sending selected s bits. The
Output Feedback mode of block cipher holds great resistance towards bit transmission errors. It
also decreases the dependency or relationship of the cipher on the plaintext.

Fig.Procedure of OFB

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.
Disadvantages of OFB-
● The drawback of OFB is that, because to its operational modes, it is more susceptible to a
message stream modification attack than CFB.
● Counter Mode(CTR)
The Counter Mode or CTR is a simple counter-based block cipher implementation. Every time a
counter-initiated value is encrypted and given as input to XOR with plaintext which results in
ciphertext block. The CTR mode is independent of feedback use and thus can be implemented in
parallel.

Fig.Procedure of CTR

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.
Disadvantages of Counter-
● The fact that CTR mode requires a synchronous counter at both the transmitter and the receiver
is a severe drawback. The recovery of plaintext is erroneous when synchronisation is lost.
Difference Between Block Cipher and Stream
Cipher -

Block Cipher Stream Cipher

This encryption type converts plain text This encryption type converts plain text one byte at a
one block at a time. time.

Block cipher is less complex. The complexity of stream cipher is more.

Block cipher offers better data Stream cipher is limited to maintaining


security confidentiality, not authentication.

Block Cipher operates slower Stream Cipher works at a faster pace than Block Cipher.
compared to Stream Cipher.

E.g OTP E.G AES

You might also like