Quiz Entry - updated: 2026.07.14
What is a block cipher and how does it differ from a stream cipher?
A block cipher encrypts fixed-size blocks of plaintext (e.g., 128 bits at a time) using a key, while a stream cipher encrypts bit by bit.
The core trade-off is when the cipher commits: a stream cipher acts on each bit as it arrives (ideal for low-latency streams), while a block cipher waits for a whole block, which lets it apply much heavier internal mixing and gives it the structure needed to build integrity checks like CBC-MAC.
Block cipher characteristics:
- Processes data in fixed-size blocks (e.g., 64 or 128 bits)
- The same key is used for every block
- A block cipher is a keyed permutation — for a given key, it's a bijective mapping from plaintext blocks to ciphertext blocks
- Often called the "workhorse" of cryptography — encrypts 90%+ of all data
Key parameters:
| Parameter | Symbol | Description |
|---|---|---|
| Block size | n | Size of input/output block (e.g., 128 bits) |
| Key length | k | Length of the secret key (e.g., 128, 192, 256 bits) |
| Number of rounds | r | How many times the round function is applied |
vs. Stream ciphers:
- Block ciphers need padding if plaintext isn't a multiple of block size
- Block ciphers can provide integrity (e.g., CBC-MAC)
- Stream ciphers are typically faster for streaming data
Go deeper:
Block cipher (Wikipedia) — block size, key, rounds, and the security models.