- In cryptography, a block cipher mode of operation is an algorithm that uses a block cipher to provide information security such as confidentiality or authenticity.
- A block cipher by itself is only suitable for the secure cryptographic transformation (encryption or decryption) of one fixed-length group of bits called a block.
- A mode of operation describes how to repeatedly apply a cipher’s single-block operation to securely transform amounts of data larger than a block.
- Initialization Vector (IV)
- Most modes require a unique binary sequence, often called an initialization vector (IV), for each encryption operation.
- The IV has to be non-repeating and, for some modes, random as well.
- The initialization vector is used to ensure distinct ciphertexts are produced even when the same plaintext is encrypted multiple times independently with the same key.
- Block cipher modes operate on whole blocks and require that the last part of the data be padded to a full block if it is smaller than the current block size.
- Historically, encryption modes have been studied extensively in regard to their error propagation properties under various scenarios of data modification.
- Later development regarded integrity protection as an entirely separate cryptographic goal.
- Some modern modes of operation combine confidentiality and authenticity in an efficient way, and are known as authenticated encryption modes.
Modes of Operations
Electronic Codebook (ECB) – worst
- Encryption parallelizable: Yes
- Decryption parallelizable: Yes
- Random read access: Yes
Cipher Block Chaining (CBC) – widely used
- Encryption parallelizable: No
- Decryption parallelizable: Yes
- Random read access: Yes
Cipher Feedback (CFB)
- Encryption parallelizable: No
- Decryption parallelizable: Yes
- Random read access: Yes
Output Feedback (OFB)
- Encryption parallelizable: No
- Decryption parallelizable: No
- Random read access: No
Counter (CTR)
- Encryption parallelizable: Yes
- Decryption parallelizable: Yes
- Random read access: Yes