๐Block cipher mode of operation
- tags
Block ciphers can be used securely to encrypt a single fixed-size block of data.
A mode of operation describes how to apply a block cipher to transform data large than one block.
Initialization Vector (IV) is an important aspect of many modes of operation.
Because block ciphers work on fixed-size blocks, many modes of operation require padding.
Modes
Electronic Codebook (ECB): the simplest mode of operation. Many security drawbacks. Not recommended.
Cipher Block Chaining (CBC): a better mode of operation. Fixes data patterns hiding and randomizes encryption process so that encrypting the same input twice produces different ciphertext.
Propagating Cipher Block Chaining (PCBC): a variation of CBC that is not commonly used.
Cipher Feedback (CFB): a self-synchronizing streaming mode of operation.
Output Feedback (OFB): a simple synchronous streaming mode of operation.
Counter (CTR): a streaming mode of operation that allows random access on encryption/decryption.
Galois/Counter Mode (GCM) and GMAC: improvement of CTR with added authentication. It can also be used for message authentication only.