Comparing symmetric encryption operation modes
When encrypting data using symmetric encryption, an operating mode defines the way the plaintext, key, and algorithm are configured to encrypt the text. Block ciphers can encrypt a variety of block sizes, such as 64-bit, 128-bit, or 256-bit, in the following modes of operation:
- Electronic Codebook (ECB)
- Cipher Block Chaining (CBC)
- Cipher Feedback (CFB)
- Output Feedback (OFB)
- Counter Mode (CTR)
In this section, we'll take a look at the different modes of operation used to encrypt data. We'll start with the simplest, ECB, and then move on to CBC, CFB, and OFB, which add feedback to strengthen the encryption process. We'll then finish with a look at CTR, which provides security using parallelism, to provide a more efficient way to encrypt data.
Let's start with ECB.
Using ECB
ECB is a simple block-cipher operating mode that encrypts each block of text independently, and is illustrated...