Applied Cryptography
Image data were encrypted with AES in ECB mode, and the outline of the original picture could still be recognized in the encrypted image. Which of the following is the cause?
- AThe AES key was too short, so some blocks were left as they were without being encrypted
- BECB mode automatically generates a different key for each block, and the pattern of those keys appears in the encrypted image
- CIn ECB mode identical plaintext blocks always become identical ciphertext blocks, so the patterns of areas of the same color remain
Show answer and explanation
Answer: C. In ECB mode identical plaintext blocks always become identical ciphertext blocks, so the patterns of areas of the same color remain
ECB (electronic codebook) mode simply encrypts each block independently with the same key. So if the plaintext contains blocks with identical contents, identical blocks appear at the same positions in the ciphertext. In an image with long runs of the same color, such as a background, the information about where the same color is remains, and the example of an encrypted penguin image is well known. For this reason ECB mode is not used to encrypt general data; modes that produce a different ciphertext each time even from the same plaintext, such as CBC mode, CTR mode and GCM, are used instead.
- A. AES encrypts every block regardless of key length. The problem is not the key length but a property of the mode.
- B. ECB mode uses the same key for every block. No key appears in the image.
- C. Correct. That identical plaintext blocks become identical ciphertext blocks is the weakness of ECB mode.