Block cipher
A block cipher is a symmetric algorithm that transforms fixed-size blocks of data under a secret key.
Definition
A block cipher maps each fixed-size plaintext block to a ciphertext block of the same size under a key, and reverses that mapping for decryption. AES uses 128-bit blocks with several supported key sizes. Block size and key size are separate properties.
Modes of operation
A bare block cipher handles only one block. Modes such as CBC, CTR, and GCM define how to process longer or partial messages. Some modes require padding; others turn the block cipher into a stream-like construction. GCM also authenticates the result.
Safe use
ECB independently encrypts equal blocks to equal outputs and leaks visible patterns, so it is unsuitable for ordinary structured data. Other modes have their own nonce or IV requirements. Reuse, missing authentication, or incorrect padding can compromise an otherwise strong cipher.
No. Block size is the amount processed per primitive operation; key size controls the key space. AES always has a 128-bit block but supports 128-, 192-, and 256-bit keys.
No. CBC commonly does for non-aligned data, while CTR and authenticated modes can process partial final blocks without traditional padding.
Identical plaintext blocks produce identical ciphertext blocks, exposing structure and repetitions even though the values themselves are encrypted.