Block Cipher
A block cipher is a symmetric cipher that encrypts and decrypts fixed-length blocks (e.g., 128 bits) and requires a mode of operation to handle arbitrary-length data.
Purpose
It provides a secure transformation on fixed blocks and serves as the building block of provably secure encryption.
Mechanism
The encryption function E(K, P) maps an n-bit plaintext block to an n-bit ciphertext block and is a bijection. A key schedule derives round keys, and multiple rounds alternate substitution and permutation (SPN or Feistel). Modes such as ECB/CBC/CTR/GCM are needed for variable-length data.
Use cases
- AES-based encryption infrastructure
- Disk encryption (block-aligned)
- MAC constructions (e.g., CMAC)
- Pseudorandom-function constructions
Examples
- Input
AES-128 blockOutput16-byte ciphertext blockA mode is required for multiple blocks
Common errors
- Encrypting multiple blocks directly with the raw block cipher (i.e., ECB mode)
- Always use a secure mode (GCM, or CBC with an IV)
Related terms
Stream Cipher
A stream cipher encrypts byte by byte or bit by bit, XORing a keystream with the plaintext; it needs no padding and suits real-time and streaming data. GLOSSARY
Mode of Operation
A mode of operation is a scheme that lets a block cipher handle arbitrary-length data, defining how multiple plaintext blocks are chained during encryption; common ones include ECB, CBC, CTR, and GCM. GLOSSARY
AES
The Advanced Encryption Standard (AES) is the symmetric block cipher NIST standardized in 2001, supporting 128/192/256-bit keys, and is the de facto standard of modern encryption. GLOSSARY
Padding
Padding is the mechanism that extends the plaintext to a block boundary; common schemes include PKCS#7, zero padding, and ISO 10126, while AEAD modes need none. GLOSSARY