Skip to main content

CTR Mode Encryption Visualizer

Watch counter blocks generate a keystream that XORs with plaintext — step by step

About the CTR Mode

CTR mode turns a block cipher into a stream cipher: encrypt an incrementing counter, XOR the keystream with your plaintext. Its parallelizability and seekability make it common — and its pitfalls (nonce reuse reveals XOR of plaintexts) make it worth understanding.

This visualizer encrypts step by step, showing the counter blocks, the keystream, and how each plaintext byte transforms. Watch what happens when you reuse a nonce — the demonstration is unforgettable and entirely local.

How to use

  1. Enter a key, nonce, and message.
  2. Step through counter blocks and the generated keystream.
  3. Try reusing a nonce across two messages to see why it breaks.