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.
Cipher Block Chaining Mode (CBC)
To
overcome the problem of ECB mode, the cipher block chaining mode is used. In
this mode, first block of plaintext is XORed with an Initialization Vector (IV)
which is then encrypted using key k & produces cipher text block 1.
In next step each block of plaintext XORed with previous block of cipher text. The procedure is continuing till all plaintext block gets encrypted shown in figure. Plaintext block are represented by using P1, P2, P3,...,Pn and corresponding cipher text blocks are represented by using C1, C2, C3,...,Cn. Initialization vector doesn’t have special meaning it is simply used to make input message more complicated or unique.
|
In this
mode decryption process, cipher text block 1 get decrypted using same key used
earlier during encryption process & the output of this step is then XOR
with IV and produces Plaintext. In next step the cipher text block 2 is
decrypted and its output is XOR with cipher text block 1 which results
plaintext block 2. Repeat the process for all cipher text block in order to
produce original plaintext blocks as shown in figure.
Figure: Decryption Process of CBC Mode |
Application of CBC Mode
CBC mode
is applicable whenever large amounts of data need to be sent securely. (e.g.,
email, FTP, web etc..)
To learn more about CBC Mode, Click here
No comments:
Post a Comment