Counter (CTR) mode

A block cipher mode that encrypts successive counter values to produce a keystream XORed with the plaintext, turning a block cipher into a parallelisable stream cipher.

Counter mode is a block cipher mode of operation specified in NIST SP 800-38A. The cipher does not encrypt the plaintext directly. It encrypts a sequence of counter blocks, typically built from a nonce and an incrementing counter, and the outputs form a keystream that is XORed with the plaintext. Each block depends only on its own counter value, so blocks can be processed in parallel or read at any position, and no padding is required.

Its security rests on one condition: each counter block must be unique across all messages under a key. If a value repeats, two messages share keystream, and XORing their ciphertexts cancels it and exposes the XOR of the plaintexts, the same failure as reusing a one-time pad. CTR also provides confidentiality only: flipping a ciphertext bit flips the matching plaintext bit, undetected. Galois/Counter Mode adds an authentication tag to CTR encryption. Compare ECB, which leaks patterns, and CBC, which chains blocks and so cannot encrypt them in parallel.

Exam relevance: a scenario that stresses parallel processing, random access or a block cipher behaving like a stream cipher is likely to point to CTR. Candidates are expected to know that counter reuse is its critical failure and that it gives no integrity on its own.