- CBC (Cipher Block Chaining)
- Operation: Encrypts 64-bit blocks of plaintext, where each block is XOR-ed with the previous ciphertext block before being encrypted. Uses a 64-bit initialization vector (IV) for the first block.
- Characteristics: Errors propagate through the encryption process, meaning a single error can affect subsequent blocks.
- ECB (Electronic Code Book)
- Operation: Encrypts each block of plaintext separately. Identical plaintext blocks are encrypted into identical ciphertext blocks.
- Characteristics: Secure for short messages but vulnerable to pattern recognition and replication attacks.
- CFB (Cipher Feedback)
- Operation: A stream cipher mode where the previous ciphertext block is fed back into the encryption process to generate the keystream.
- Characteristics: Errors propagate, meaning an error in one block affects the subsequent blocks.
- OFB (Output Feedback)
- Operation: A stream cipher mode where a keystream is generated by encrypting an initialization vector and then XOR-ing it with the plaintext. The keystream is independent of the plaintext.
- Characteristics: Errors do not propagate, making it more resilient to transmission errors.
- CTR (Counter)
- Operation: Uses a counter to generate the keystream, which is then XOR-ed with the plaintext to produce the ciphertext.
- Characteristics: Suitable for encrypting long messages. The use of a counter ensures that each block is encrypted uniquely, even if the plaintext blocks are identical.
These cipher modes offer different trade-offs in terms of security, error propagation, and performance, making them suitable for various applications depending on the specific requirements of the encryption task.