Database Reference
In-Depth Information
Plaintext
Plaintext
Plaintext
Key
Key
Key
Encryption Algorithm
Encryption Algorithm
Encryption Algorithm
Ciphertex
t
Ciphertex
t
Ciphertex
t
Figure 4.13
Using a block cipher in the ECB mode.
each block is encrypted, separately, with the same encryption key.
As illustrated in Figure  4.13, the plaintext is divided into blocks
( P 1 , P 2 , P 3 ,… .) of size n bits, which are encrypted to ciphertext blocks
( C 1 , C 2 , C 3 ,… .). The encryption algorithm is
C j = E K ( P j )
(4.5)
and the decryption algorithm is
P j = D K ( C j )
(4.6)
where j = 1, 2, 3, …, E K is the encryption map with the key K, and D K
is the decryption map with the same key K.
The ECB mode has several advantages. There is no need to encrypt
a file progressively; the middle blocks can be encrypted first, then
the blocks at the end, and finally the blocks at the beginning. This is
important for encrypted files that are accessed randomly, like a data-
base. If a database is encrypted in the ECB mode, then any record can
be added, deleted, encrypted, or decrypted independently, assuming
that a record consists of independent encryption blocks.
The disadvantage of this mode is that identical plaintext blocks
are encrypted to identical ciphertext blocks; it does not hide data
patterns. The advantage is that error propagation is limited to a
single block. The disadvantage of ECB mode appears well in image
encryption if we have an image with large areas of the same color or
repeated patterns so that there are many blocks of the same plaintext.
This may reveal much information about the original image from the
encrypted image. This disadvantage is treated in CBC, CFB, and
OFB modes. So, all with those kinds of images are better than the
ECB mode.
Search WWH ::




Custom Search