Applied Cryptography
Which of the following correctly describes a feature of CTR mode (counter mode) of a block cipher?
- AEach block is encrypted using the ciphertext of the previous block, so encryption cannot be done in parallel
- BPadding to make the plaintext a multiple of the block length is always required
- CA value combining a nonce and a counter is encrypted to make a keystream, which is XORed with the plaintext
Show answer and explanation
Answer: C. A value combining a nonce and a counter is encrypted to make a keystream, which is XORed with the plaintext
In CTR mode, a value combining a nonce and a counter incremented by 1 for each block is encrypted with the block cipher, and the output is XORed with the plaintext as a keystream. The keystream for each block can be computed independently of the previous block, so both encryption and decryption can be done in parallel, and any desired position can be decrypted on its own. The keystream can simply be cut to the length of the plaintext, so no padding is needed. Decryption also uses the block cipher only in the encryption direction.
- A. This is a property of encryption in CBC mode. CTR mode can encrypt in parallel.
- B. CTR mode cuts the keystream to the length of the plaintext, so no padding is needed.
- C. Correct. It is a mode that uses a block cipher like a stream cipher.