Monday, October 18, 2021

CTR Mode | Counter Mode | Mode of Block Cipher | Application of Counter Mode

Introduction

Cryptographic algorithm works on main two techniques: block and stream ciphers.

In a stream cipher, the plaintext is encrypted one bit at a time. In a block cipher, the plaintext is broken into blocks of a fixed length and the bits in each block are encrypted together. One of the main issues with block ciphers is that they only allow you to encrypt messages the fixed size as their block length.

If plaintext, which has a block size 64 bits easily encrypt. But encrypt a 65-bit message, you need a way to define how the second block should be encrypted.

The solution to this is called block cipher modes of operation. Need of block cipher mode is basic building block for providing data security. In block cipher rather than encrypting one bit at a time, block of bits is encrypted at a time.

There are 5 modes of operation for block cipher that may be used in a wide variety of applications like symmetric key cryptographic algorithm. These modes define how data encrypted and decrypted.


Counter Mode (CTR)

This mode is similar to OFB with the difference is that it uses counters or sequence number as input to the algorithm. There is no chaining process is done as shown in figure.

We put a constant value as initial value of counter which will be of same size as that of a plaintext block. In counter mode, the counter is encrypted and then XORed with the plain text to cipher text.

 


Figure: Encryption Process of Counter Mode

During decryption process same counter is used which was encrypted earlier and later XORed with cipher text to get the original plain text as shown in figure.


Figure: Decryption Process of Counter Mode

Application of Counter Mode

Use of counter mode is block oriented transmission, where application needs high speed.


To learn more about Counter Mode, Click here

        Watch more videos click here.

No comments:

Post a Comment