LOGBOOK

HELP

Quiz Entry - updated: 2026.10.15

In a counter-based mode ($C_i = E(K, M_i \oplus (IV + i - 1))$), two equal plaintext blocks $M_1 = M_2$ may enter the cipher differing in only one bit of the counter. Is that enough, and what practical problem drove the design of counter modes?

Yes, one bit is enough, because of the strict avalanche criterion. Counter modes were driven by 1990s laptop disk encryption, which needed random access to single blocks.

Why one bit suffices: with $IV + 0$ and $IV + 1$, the two cipher inputs can differ in just the last bit. A good block cipher satisfies the strict avalanche criterion (SAC): flipping any single input bit flips each output bit with probability 1/2. So the two ciphertext blocks look completely unrelated, and the pattern leak of ECB is gone. The same argument covers CTR, where consecutive counter values $E(IV + i - 1, K)$ produce unrelated keystream blocks.

Where the design came from: in the 1990s laptops spread, and lost or stolen laptops leaked sensitive data, so hard-disk encryption became urgent. But with a chaining mode like CBC, every small read or write would mean decrypting and re-encrypting long runs of data. A counter-based mode solves this:

  • any block can be decrypted or re-encrypted on its own (random access)
  • blocks can be processed in parallel
  • in CTR, the keystream can even be precomputed before the data arrives

Gotcha: in CTR the block cipher runs in encrypt mode for decryption too, because it only produces the keystream $S_i = E(IV + i - 1, K)$ that is XORed onto the data.

From Quiz: KRYPTOG / Symmetric Cryptography | Updated: Oct 15, 2026