RTUComputer ScienceYr 2021 · Sem 72021

Q14Information System Security

Question

4 marks

Explain the various modes of operation in block ciphers.

Answer

A comprehensive theoretical breakdown of Block Cipher Modes of Operation. Details how ECB fails catastrophically at hiding data patterns, while CBC and CTR use mathematical XOR chaining and Nonces to achieve absolute cryptographic security.

A block cipher (like AES) mathematically encrypts a strictly fixed 128-bit block of data. However, real-world files are Gigabytes in size. To encrypt a massive file, the data must be violently chopped into 128-bit blocks, and a "Mode of Operation" defines the exact mathematical architecture for processing these sequential blocks.

1. Electronic Codebook (ECB)

  • Mechanism: The most primitive architecture. Every single 128-bit block is encrypted completely independently using the exact same Key.
  • Catastrophic Flaw: If Block 1 and Block 5 contain the exact same plaintext (e.g., a background color in an image), ECB will mathematically output the EXACT same ciphertext for both blocks. Hackers can visually see patterns in the encrypted data. It is absolutely forbidden in modern security.

2. Cipher Block Chaining (CBC)

  • Mechanism: Absolute mathematical chaining. Before Plaintext Block 2 is encrypted, it is violently XORed with the Ciphertext of Block 1. This creates a massive mathematical cascade.
  • Initialization Vector (IV): Since Block 1 has no previous block, it is XORed with a random IV.
  • Merit: If two blocks have identical plaintext, their ciphertexts will be completely different because the previous ciphertext alters the math. It completely destroys data patterns.

3. Counter (CTR)

  • Mechanism: It completely abandons the traditional block cipher approach and turns AES into a Stream Cipher. It encrypts a mathematically incrementing Counter (Nonce + 1, Nonce + 2) to generate a Keystream.
  • Execution: The raw Plaintext is simply violently XORed with this generated Keystream.
  • Merit: Explosive performance. Because the blocks do not depend on each other (unlike CBC), CTR mode can be mathematically processed in parallel across massive multi-core CPUs.
Back to Paper