Block cipher

A symmetric cipher that encrypts fixed-size blocks of plaintext into ciphertext blocks of the same size under a key; AES uses 128-bit blocks, DES used 64-bit blocks.

A block cipher is a symmetric algorithm that takes a fixed-length block of plaintext and a key and returns a ciphertext block of the same length. AES works on 128-bit blocks; the retired Data Encryption Standard and Triple DES used 64-bit blocks. Internally, block ciphers apply many rounds of substitution and permutation, or a Feistel structure in the case of DES, to achieve confusion and diffusion.

On its own a block cipher encrypts exactly one block. Real data is longer, so a mode of operation defines how successive blocks are processed and whether an initialization vector is needed. The mode also decides whether a short final block is padded: ECB and CBC work on whole blocks, so the last is usually padded, while counter mode and GCM use the cipher to generate a keystream and need no padding. Block size matters as well: with 64-bit blocks, repeated ciphertext blocks become likely after tens of gigabytes under one key, one reason those ciphers have been retired. The contrast is a stream cipher, which combines data with a keystream bit by bit or byte by byte.

Exam relevance: questions in this area tend to ask candidates to tell block ciphers from stream ciphers, and a scenario may turn on recognising that a block cipher’s security in use depends on its mode as much as on the algorithm.