Q.1
14 MarksDefine substitution technique in cryptography. List various substitution technique and discuss any one with an example.
A substitution technique in cryptography is a method where letters, numbers, or symbols of a plaintext message are replaced by other letters, symbols, or groups of letters according to a predefined system or key.
- Caesar Cipher (Shift Cipher) (Monoalphabetic)
- Monoalphabetic Cipher (Arbitrary letter permutation)
- Playfair Cipher (Digraphic substitution using a matrix)
- Hill Cipher (Polygraphic substitution using linear matrix algebra)
- Polyalphabetic Cipher (Vigenère Cipher) (Multiple substitution alphabets driven by a keyword)
- One-Time Pad (Vernam Cipher) (Unconditionally secure random key XOR)
- Mechanism: Each plaintext letter is replaced by the letter shifted positions down the alphabet:
- Example with Key :
- Plaintext:
GTU G(6)JT(19)WU(20)X- Ciphertext:
JWX
Substitution replaces plaintext characters with alternative characters. Common techniques include Caesar, Playfair, Hill, and Vigenère ciphers. In Caesar cipher with shift , GTU encrypts to JWX.
What is the objective of attacking an encryption system? Write the two approaches to attack a conventional encryption scheme.
The primary objective of an adversary (cryptanalyst) is to:
- Recover the original plaintext from the intercepted ciphertext.
- Deduce the secret key , allowing the adversary to decrypt all past and future communications encrypted with that key.
- Cryptanalysis:
- Relies on the mathematical nature of the encryption algorithm, statistical characteristics of the plaintext language, and sample plaintext-ciphertext pairs.
- Types of Attacks:
- Ciphertext-Only: Adversary has only intercepted ciphertexts.
- Known-Plaintext: Adversary has matched pairs of plaintext and ciphertext.
- Chosen-Plaintext: Adversary can feed chosen plaintexts to the encryptor and observe outputs.
- Chosen-Ciphertext: Adversary can submit chosen ciphertexts to be decrypted.
- Brute-Force Attack:
- Trying every possible key in the entire key space on a piece of ciphertext until an intelligible English plaintext is produced.
- On average, half the key space must be searched ( trials for a -bit key). A 128-bit key ( keys) renders brute force computationally infeasible.
The objective is recovering plaintext or deducing the secret key. The two fundamental approaches are Cryptanalysis (exploiting algorithmic/statistical flaws) and Brute-Force Attacks (exhaustive search of all possible keys).
List various modes of operations of block cipher. Explain any three of them briefly.
Also asked in Summer 2024 Q1c
Block ciphers operate on fixed-size blocks (e.g., 64 or 128 bits). For longer messages, standard NIST modes are:
- Electronic Codebook (ECB)
- Cipher Block Chaining (CBC)
- Cipher Feedback (CFB)
- Output Feedback (OFB)
- Counter Mode (CTR)
- 1. Cipher Block Chaining (CBC) Mode:
- Mechanism: To eliminate ECB's pattern vulnerability, each plaintext block is XORed with the preceding ciphertext block before encryption.
- An Initialization Vector () is XORed with the first block:
- Advantage: Identical plaintext blocks produce completely different ciphertext blocks.
- Limitation: Sequential encryption (cannot be parallelized).
- 2. Electronic Codebook (ECB) Mode:
- Mechanism: The message is split into -bit blocks, and each block is encrypted independently using the same key :
- Advantage: Simple, allows parallel computation and random access.
- Defect: Deterministic; identical plaintext blocks yield identical ciphertext blocks, leaking structural patterns (e.g., the ECB Penguin image flaw).
- 3. Counter (CTR) Mode:
- Mechanism: A counter initialized by a nonce is incremented for each successive block:
- Advantages:
- Converts a block cipher into a stream cipher.
- Highly parallelizable for high-speed hardware and multi-core processing.
- Allows random block decryption without decrypting preceding blocks.
Block cipher modes handle arbitrarily long messages. ECB encrypts blocks independently (leaks patterns); CBC XORs with previous ciphertext blocks (secure against repetition); CTR encrypts an incrementing counter, enabling high-speed parallel execution.