liveBook · Manning

Counter mode encryption

Counter mode encryption generates a keystream by encrypting successive counter values with a block cipher and combines it with plaintext to produce ciphertext.

How 2 Manning books explain it

Real-World Cryptography

AES-CTR is a counter-mode construction that applies AES to successive counter values to generate a keystream or pseudorandom-looking output.

How it is used
Encrypts plaintext as the counter-mode component used by AES-GCM.
How deep it goes
Explains nonce construction, counters, keystream XOR, truncation, capacity, and nonce-reuse failure without implementation detail.
Examples
Uses 96-bit nonces, 32-bit counters, 16-byte blocks, keystream truncation, and repeated-nonce ciphertext comparison.
What you can do after
Operate AES-CTR by generating nonce-counter keystream blocks, XORing them with plaintext, and avoiding nonce reuse.

Read how Real-World Cryptography explains counter mode encryption →

Hacking Cryptography

Counter mode encrypts successive counter values with a block cipher to generate a keystream that is combined with plaintext.

How it is used
Uses a block cipher to produce a keystream for encrypting successive plaintext blocks.
How deep it goes
Defines keystream generation and plaintext combination, but does not provide implementation steps or attack analysis.
Examples
Uses a keystream-generation diagram to contrast stream-cipher processing with direct block-cipher ciphertext output.
What you can do after
Evaluate how block-cipher processing can emulate keystream-based encryption across multiple plaintext blocks.

Read how Hacking Cryptography explains counter mode encryption →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.