Database Reference
In-Depth Information
4.6.2 he CBC Mode
The CBC mode uses an IV of size equal to the size of each block of
pixels. In this mode, each block of plaintext is XORed with the previ-
ous ciphertext block before being encrypted. This way, each ciphertext
block is dependent on all plaintext blocks up to that point. In decryp-
tion, the same XOR operation is repeated so that its effect is cancelled.
This mechanism is shown in Figure 4.14.
The main disadvantage of the CBC mode is that an error in (or attack
upon) one ciphertext block impacts two plaintext blocks upon decryp-
tion. On the other hand, if we have an image that has blocks of the
same input data, these blocks are encrypted to totally different cipher-
text data. So, the CBC mode is a better approach in encrypting images
in the spatial domain, especially when these images contain large areas
of the same activity. In the CBC mode, the encryption algorithm is
C j = E K ( C j −1 P j )
(4.7)
and the decryption algorithm is
P j = D K ( C j ) ⊕ C j −1 , j = 1, 2, 3, …
(4.8)
C 0 = IV
(4.9)
4.6.3 he CFB Mode
In contrast to the CBC mode, the CFB mode begins by encrypt-
ing the IV, and then an XOR operation is performed between the
P 1
P 2
P 3
C 0 = IV
Key
E K
Key
E K
Key
E K
C 1
C 2
C 3
Figure 4.14
Using a block cipher in the CBC mode.
 
Search WWH ::




Custom Search