Sunday, 3 August 2014

Cipher Block Chaining Mode (CBC)



Cipher block chaining (CBC) is a mode of operation for a block cipher (one in which a sequence of bits are encrypted as a single unit or block with a cipher key applied to the entire block). Cipher block chaining uses what is known as an initialization vector (IV) of a certain length. One of its key characteristics is that it uses a chaining mechanism that causes the decryption of a block of ciphertext to depend on all the preceding ciphertext blocks. As a result, the entire validity of all preceding blocks is contained in the immediately previous ciphertext block. A single bit error in a ciphertext block affects the decryption of all subsequent blocks. Rearrangement of the order of the ciphertext blocks causes decryption to become corrupted. Basically, in cipher block chaining, each plaintext block is XORed with the immediately previous ciphertext block, and then encrypted.
Identical ciphertext blocks can only result if the same plaintext block is encrypted using both the same key and the initialization vector, and if the ciphertext block order is not changed. It has the advantage over the Electronic Code Book mode in that the XOR'ing process hides plaintext patterns.
Ideally, the initialization vector should be different for any two messages encrypted with the same key. Though the initialization vector need not be secret, some applications may find this desirable.
The mathematical formula for CBC encryption is

mathematical formula for CBC decryption is

 


 



Properties:
1. Identical plaintext.
The same sequence of ciphertext blocks result when the same
key and the same initialization vector are used.

2. Chaining dependencies.
The chaining mechanism causes Cj to depend on Cj −1 and Mj, so enciphering is not independent of reordering.

3. Error propagation.
An error in a ciphertext block Cj affects decipherment of Cj and Cj+1. For a reasonable enciphering algorithm, a single bit error affects 50% of the bits in the deciphered plaintext block M0j, while the bit error affects only that bit of M0j+1.

3. Error recovery.
The cryptosystem is said to be self-recovering, in the sense that while
an error in Cj results in incorrectly deciphered plaintext M0j and M0j+1, the ciphertext Cj+2 correctly deciphers to M0j+2=Mj+2.
 

No comments:

Post a Comment