0Pricing
Cryptology Academy · Lesson

CTR Mode & Stream-Cipher Behavior

Use counter mode to turn a block cipher into a keystream generator.

Welcome

Counter (CTR) mode transforms any block cipher into a stream cipher. It is parallelizable, requires no padding, and is the basis for AES-GCM. Let's master it.

CTR Mode Concept

Generate a keystream by encrypting successive counter values: Keystream[i] = AES(K, Nonce || Counter_i) Ciphertext = Plaintext XOR Keystream The counter increments for each block. Decryption is identical to encryption.

All lessons in this course

  1. Block Cipher Fundamentals & Padding
  2. ECB vs CBC: Patterns & IVs
  3. CTR Mode & Stream-Cipher Behavior
  4. GCM & Authenticated Encryption
← Back to Cryptology Academy