BCU BCA 5th Sem — Cryptography and Network Security Solved Question Bank
Solved Question Bank by Nikhil P
PART I: SECTION A — 2 MARKS QUESTIONS (Papers 1 to 5)
Model Question Paper – 1

Q1. Define cryptography.

Formal Definition: Cryptography is the science and art of transforming intelligible messages into unintelligible forms and vice-versa, guaranteeing secure communication over insecure channels against adversaries (Stallings/Forouzan).
Key Components / Formula / Mechanism: Comprises Plaintext (P), Ciphertext (C), Secret Key (K), encryption function C = E_K(P), and decryption function P = D_K(C), ensuring confidentiality and integrity.
Example / Use-Case: Transport Layer Security (TLS 1.3) protocol and Advanced Encryption Standard (AES).

Q2. List the three basic security goals of information security.

Formal Definition: The three foundational security goals of information security—collectively termed the CIA Triad—are Confidentiality, Integrity, and Availability, designed to safeguard information assets against unauthorized threats.
Key Components / Formula / Mechanism: Confidentiality prevents unauthorized information disclosure (via encryption); Integrity guarantees protection against unauthorized modification (via hashes/MACs); Availability ensures authorized users uninterrupted access to system resources.
Example / Use-Case: Online banking using AES encryption, SHA-256 integrity checks, and redundant server clusters.

Q3. Differentiate between a threat and a security attack.

Formal Definition: A threat is a potential security violation where a circumstance, capability, or event could cause harm, whereas a security attack is an intentional action executed to exploit a vulnerability (Stallings / RFC 4949).
Key Components / Formula / Mechanism: A threat is a latent danger or capability; an attack is the active or passive operational execution that exploits that vulnerability.
Example / Use-Case: An unencrypted Wi-Fi link is a threat; sniffing credentials via Wireshark is an attack.

Q4. Define symmetric-key cryptography.

Formal Definition: Symmetric-key cryptography (secret-key cryptography) is an encryption scheme where communicating parties share a single identical secret key for both plaintext encryption and ciphertext decryption (Forouzan).
Key Components / Formula / Mechanism: Operates via C = E_K(P) and P = D_K(C). For n communicating parties, n(n - 1) / 2 shared keys are required, requiring secure key distribution.
Example / Use-Case: AES-256 for full-disk encryption (BitLocker) and DES/3DES in legacy payment systems.

Q5. State Kerckhoffs' Principle.

Formal Definition: Kerckhoffs' Principle states that a cryptographic system must remain secure even if everything about the system—including algorithm design and source code—is public knowledge, provided only the key is kept secret.
Key Components / Formula / Mechanism: Security depends solely on key secrecy, length, and randomness, explicitly rejecting "security through obscurity" and enabling rigorous open peer review.
Example / Use-Case: Public cryptographic standards such as AES and RSA, whose mathematical designs are public.

Q6. What is a substitution cipher?

Formal Definition: A substitution cipher is an encryption method where plaintext characters, bits, or symbol groups are systematically replaced with ciphertext characters according to a fixed translation key.
Key Components / Formula / Mechanism: Includes monoalphabetic (fixed mapping, e.g., shift C = (P + k) mod 26) and polyalphabetic (multiple mappings across positions, e.g., Vigenère).
Example / Use-Case: Caesar cipher (monoalphabetic), Playfair cipher (digraphic), and modern AES S-boxes.

Q7. List the five modes of operation of modern block ciphers.

Formal Definition: Block cipher modes of operation are standardized procedures (NIST SP 800-38A) for applying a block cipher algorithm with a symmetric key to securely encrypt arbitrary-length plaintext.
Key Components / Formula / Mechanism: 1. Electronic Codebook (ECB), 2. Cipher Block Chaining (CBC), 3. Cipher Feedback (CFB), 4. Output Feedback (OFB), and 5. Counter (CTR) mode.
Example / Use-Case: CBC mode used in IPsec VPN tunnels and CTR mode used in high-speed TLS 1.3.

Q8. Define asymmetric-key cryptography.

Formal Definition: Asymmetric-key (public-key) cryptography is an encryption system using mathematically linked key pairs: a public key freely distributed for encryption/verification and a private key kept secret for decryption/signing (Stallings).
Key Components / Formula / Mechanism: Based on one-way trapdoor functions (e.g., integer factorization). Requires only 2n keys for n entities. Operates via C = E_Kpub(P) and P = D_Kpriv(C).
Example / Use-Case: RSA and ECC (Elliptic Curve Cryptography) used in TLS handshakes and SSH.

Q9. What is a digital signature?

Formal Definition: A digital signature is a mathematical cryptographic scheme that binds an electronic document or message to the identity of the signer, providing data authentication, integrity, and non-repudiation.
Key Components / Formula / Mechanism: Created by signing a message hash with the sender's private key (S = E_Kpriv(H(M))); verified by any party using the sender's public key (H(M) == D_Kpub(S)).
Example / Use-Case: ECDSA in Bitcoin blockchain transactions and RSA digital signatures in software code signing.

Q10. Define key management.

Formal Definition: Key management is the comprehensive set of policies, protocols, and mechanisms that oversee the secure lifecycle of cryptographic keys within a cryptosystem (NIST SP 800-57 / Forouzan).
Key Components / Formula / Mechanism: Encompasses end-to-end lifecycle phases: secure key generation, key exchange/distribution, protected key storage, periodic key rotation, revocation, and zeroization/destruction.
Example / Use-Case: Public Key Infrastructure (PKI) with Certificate Authorities, and AWS Key Management Service (KMS).

Model Question Paper – 2

Q1. Define data integrity.

Formal Definition: Data integrity is the security service ensuring information is protected against unauthorized modification, insertion, or deletion, preserving complete accuracy during transmission or storage (Stallings).
Key Components / Formula / Mechanism: Enforced via cryptographic hash functions H(M) or MACs to verify that H(M_received) = H(M_sent).
Example / Use-Case: HMAC-SHA256 in TLS record protocols to detect unauthorized network tampering.

Q2. What is modular arithmetic?

Formal Definition: Modular arithmetic is an integer arithmetic system where numbers wrap around upon reaching a modulus n, written as a ≡ b (mod n) if n divides (a - b).
Key Components / Formula / Mechanism: Operates on ring Z_n = {0, 1, ..., n-1}, preserving addition and multiplication closure under modulo operations.
Example / Use-Case: Forms the mathematical foundation for RSA modular exponentiation (C = M^e mod n) and Diffie-Hellman key exchange.

Q3. Define a transposition cipher.

Formal Definition: A transposition cipher is a classical enciphering technique that rearranges the positions of plaintext characters according to a regular system, without changing their identities.
Key Components / Formula / Mechanism: Preserves single-letter frequency distributions while disrupting n-gram patterns using permutation vectors or columnar matrices.
Example / Use-Case: Rail Fence cipher, Columnar Transposition, and Permutation boxes (P-boxes) in DES and AES block ciphers.

Q4. What is a polyalphabetic substitution cipher?

Formal Definition: A polyalphabetic substitution cipher encrypts plaintext by substituting characters using multiple monoalphabetic cipher alphabets determined by a periodic key.
Key Components / Formula / Mechanism: Shifts characters via C_i = (P_i + K_(i mod m)) mod 26, flattening letter-frequency spikes to defeat simple frequency analysis.
Example / Use-Case: Vigenère cipher (using the Vigenère tableau) and the rotor-based WWII Enigma machine.

Q5. Define the Autokey Cipher.

Formal Definition: The Autokey Cipher is a polyalphabetic substitution cipher that eliminates periodic keyword patterns by incorporating the plaintext directly into the keystream.
Key Components / Formula / Mechanism: Uses a short initial seed key K followed by plaintext characters: Key = (k_1, ..., k_m, p_1, p_2, ...), encrypting via C_i = (P_i + K_i) mod 26.
Example / Use-Case: Classical Autokey cipher; provided the conceptual origin for modern Cipher Feedback (CFB) stream modes.

Q6. What is Electronic Codebook (ECB) mode?

Formal Definition: Electronic Codebook (ECB) is the basic block cipher mode where plaintext is divided into fixed blocks, each encrypted independently with the identical key.
Key Components / Formula / Mechanism: Follows C_i = E_K(P_i); identical plaintext blocks produce identical ciphertext blocks, preserving structural patterns and leaking statistical data.
Example / Use-Case: Encrypting small single-block items like session keys; insecure for multi-block messages or bitmap images.

Q7. Define an Initialization Vector (IV).

Formal Definition: An Initialization Vector (IV) is a fixed-size, non-secret arbitrary or pseudorandom binary block used with a secret key to initialize cipher execution.
Key Components / Formula / Mechanism: Guarantees semantic security so encrypting identical plaintexts under the same key produces distinct ciphertexts; XORed with block 1: C_1 = E_K(P_1 ⊕ IV).
Example / Use-Case: Required in CBC and GCM modes within IPsec, WPA2, and TLS 1.3.

Q8. What is a trapdoor one-way function?

Formal Definition: A trapdoor one-way function is a mathematical function that is easy to compute in one direction, but computationally infeasible to invert without special secret information called the "trapdoor".
Key Components / Formula / Mechanism: Forward y = f(x) is easy; inversion x = f^{-1}(y) is hard without key k, but efficient x = f^{-1}_k(y) with k.
Example / Use-Case: Foundational to RSA, where public encryption is modular exponentiation and private decryption uses trapdoor exponent d.

Q9. Define a message digest.

Formal Definition: A message digest is a fixed-length cryptographic hash output generated by processing an arbitrary-length message through a deterministic, one-way hash algorithm.
Key Components / Formula / Mechanism: Produces h = H(M); provides preimage resistance, second-preimage resistance, collision resistance, and the strict avalanche effect.
Example / Use-Case: SHA-256 (256-bit output) and SHA-3; used in digital signatures and file integrity verification.

Q10. What is a Key Distribution Center (KDC)?

Formal Definition: A Key Distribution Center (KDC) is a centralized, trusted third-party service that authenticates principals and securely distributes symmetric session keys in large networks.
Key Components / Formula / Mechanism: Holds a master key with each entity; reduces key management complexity from O(N^2) to O(N) by issuing encrypted tickets.
Example / Use-Case: Needham-Schroeder protocol and Kerberos authentication server (AS/TGS).

Model Question Paper – 3

Q1. Define availability in information security.

Formal Definition: According to RFC 2828 and Stallings, availability is the property ensuring timely, reliable, and uninterrupted access to information, computing systems, and services by authorized users upon demand.
Key Components / Mechanism: Maintained via redundant hardware, failover clustering, load balancing, and data backups; evaluated by Uptime = [MTBF / (MTBF + MTTR)] × 100%.
Example / Use-Case: Mitigating DDoS attacks using Cloudflare scrubbing centers and RAID storage arrays.

Q2. What is a masquerading attack?

Formal Definition: A masquerade attack (Stallings) occurs when an unauthorized entity pretends to be a legitimate user by utilizing forged credentials or stolen tokens to gain unauthorized access privileges.
Key Components / Mechanism: Involves credential theft, IP/MAC spoofing, and session hijacking; typically paired with replay attacks to evade authentication controls.
Example / Use-Case: Using stolen Kerberos tickets (pass-the-ticket) or spoofed IP packets to obtain domain administrator access.

Q3. Define the Greatest Common Divisor (GCD).

Formal Definition: In number theory (Stallings), the Greatest Common Divisor gcd(a, b) is the largest positive integer dividing non-zero integers a and b without remainder.
Key Components / Formula: Integers are coprime if gcd(a, b) = 1. Computed via Euclidean algorithm: gcd(a, b) = gcd(b, a mod b).
Example / Use-Case: RSA key generation, where public exponent e requires gcd(e, φ(n)) = 1 to guarantee modular inverse d exists.

Q4. What is a monoalphabetic substitution cipher?

Formal Definition: A monoalphabetic substitution cipher is a symmetric cipher where each letter in the plaintext alphabet is mapped to a unique, fixed replacement character in the ciphertext alphabet.
Key Components / Mechanism: Fixed 1-to-1 bijection with 26! keyspace; highly vulnerable to frequency analysis because plaintext letter distributions are completely preserved in ciphertext.
Example / Use-Case: Caesar cipher (fixed shift k = 3) and general mixed-alphabet substitution ciphers.

Q5. Define a Multiplicative Cipher. State the condition for selecting a valid key.

Formal Definition: A monoalphabetic substitution cipher where plaintext P is multiplied by secret key k modulo 26: C = (P × k) mod 26.
Key Condition / Mechanism: Key k must be coprime to 26 (gcd(k, 26) = 1) to ensure inverse k-1 exists for decryption; yields φ(26) = 12 valid keys.
Example / Use-Case: For k = 7, inverse is k-1 = 15 since (7 × 15) mod 26 = 1.

Q6. What is the A5/1 stream cipher?

Formal Definition: A5/1 is a symmetric stream cipher standardized by ETSI to provide over-the-air voice privacy and communication security in 2G GSM cellular networks.
Key Components / Mechanism: Constructed from three LFSRs (lengths 19, 22, and 23 bits; total 64-bit state) advanced via irregular majority-vote clocking using tapping bits; keyed with a 64-bit session key.
Example / Use-Case: Bit-by-bit XOR encryption of 114-bit speech frames between GSM mobile stations and Base Transceiver Stations (BTS).

Q7. State Fermat's Little Theorem.

Formal Definition: If p is prime and a is any positive integer coprime to p (gcd(a, p) = 1), then ap - 1 ≡ 1 (mod p).
Key Formula / Mechanism: Alternatively, ap ≡ a (mod p). Used to compute modular inverses: a-1 ≡ ap - 2 (mod p).
Example / Use-Case: Primality testing (Miller-Rabin) and accelerating modular exponentiations in RSA and Diffie-Hellman cryptosystems.

Q8. What is a session key?

Formal Definition: A session key is a temporary, single-use symmetric cryptographic key generated dynamically to encrypt and authenticate all messages during a single communication session between two endpoints.
Key Components / Mechanism: Short lifetime limits exposure to cryptanalysis; generated via CSPRNG, distributed via asymmetric key exchange (RSA/Diffie-Hellman), and destroyed upon session teardown.
Example / Use-Case: Ephemeral AES-256 session keys negotiated during TLS 1.3 handshakes to encrypt HTTPS web browser traffic.

Q9. Define an X.509 digital certificate.

Formal Definition: An X.509 certificate is an ITU-T standard digital credential that securely binds a public key to an entity's verified identity through the digital signature of a trusted Certificate Authority (CA).
Key Components / Structure: Version, Serial Number, Signature Algorithm, Issuer Name, Validity Period, Subject Name, Subject Public Key Info, and CA Signature.
Example / Use-Case: SSL/TLS server certificates used in HTTPS to authenticate web domains and establish encrypted TLS tunnels.

Q10. What is the Schnorr Digital Signature Scheme?

Formal Definition: An asymmetric cryptographic signature scheme based on the hardness of the discrete logarithm problem (DLP) in cyclic groups.
Key Mechanism: Computes compact signature (e, s) using public key y = g-x mod p, challenge e = H(M || gk mod p), and response s = (k + x × e) mod q.
Example / Use-Case: Bitcoin Taproot (BIP 340) for efficient multi-signatures and batch verification.

Model Question Paper – 4

Q1. Define a security service. List any two security services.

Formal Definition: In ITU-T X.800, a security service is a processing or communication service provided by a protocol layer to ensure adequate security of systems and data transfers against attacks.
Key Examples / Classification: Two primary security services defined under X.800 are: (1) Data Confidentiality (protects transmitted data against unauthorized disclosure) and (2) Peer Entity Authentication (assures communicating entities of each other's verified identities).
Example / Use-Case: TLS/HTTPS providing confidentiality and server authentication in secure web browsing.

Q2. What is a multiplicative inverse in modular arithmetic?

Formal Definition: In modular arithmetic, the multiplicative inverse of integer a modulo n is an integer x satisfying a · x ≡ 1 (mod n), denoted a-1.
Key Condition / Formula: An inverse exists if and only if gcd(a, n) = 1, computed using the Extended Euclidean Algorithm.
Example / Use-Case: Modulo 26: 3-1 ≡ 9 as 3 × 9 = 27 ≡ 1 (mod 26); used in RSA key generation.

Q3. Define the Hill Cipher.

Formal Definition: The Hill Cipher is a polygraphic substitution cipher based on linear algebra, encrypting blocks of m plaintext letters simultaneously via matrix multiplication modulo 26.
Key Formula / Mechanism: Encryption computes C = (P × K) mod 26 and decryption computes P = (C × K-1) mod 26, where key matrix K must satisfy gcd(det(K), 26) = 1.
Example / Use-Case: Encrypting letter pairs (digrams) using a 2×2 matrix to conceal single-letter frequency patterns.

Q4. What is a One-Time Pad Cipher?

Formal Definition: The One-Time Pad (Vernam Cipher) is a symmetric stream cipher that is mathematically unbreakable (information-theoretically secure), as proven by Claude Shannon.
Key Properties / Formula: Encryption: Ci = Pi ⊕ Ki; Decryption: Pi = Ci ⊕ Ki. Requires a truly random key at least as long as the plaintext, used strictly once.
Example / Use-Case: Ultra-secure diplomatic communications, such as the historic Moscow–Washington hotline.

Q5. Define Counter (CTR) mode.

Formal Definition: Counter (CTR) mode is a block cipher mode of operation that turns a block cipher into a stream cipher by encrypting successive counter values combined with a nonce.
Key Mechanism / Formula: Keystream Oi = EK(Nonce || Counteri) produces ciphertext Ci = Pi ⊕ Oi. Supports parallel processing and random-access decryption without error propagation.
Example / Use-Case: High-speed network encryption including IPsec and AES-GCM in TLS 1.3.

Q6. What is Euler's Phi-Function?

Formal Definition: Euler's Phi-Function φ(n) counts positive integers up to n coprime to n, where gcd(k, n) = 1.
Key Properties / Formula: For prime p, φ(p) = p - 1. For distinct primes p, q, φ(pq) = (p - 1)(q - 1).
Example / Use-Case: In RSA, for p = 7, q = 11, φ(77) = 6 × 10 = 60, used to calculate decryption exponent d.

Q7. Define the RSA cryptosystem.

Formal Definition: The RSA cryptosystem (Rivest-Shamir-Adleman) is an asymmetric public-key algorithm whose security is based on the computational hardness of factoring large prime products.
Key Mechanism / Formula: Public key (e, n) and private key (d, n) where n = p × q and d ≡ e-1 (mod φ(n)). Encryption: C = Me mod n; Decryption: M = Cd mod n.
Example / Use-Case: Digital signatures, key exchange, and SSL/TLS certificate authentication.

Q8. What is a Certification Authority (CA)?

Formal Definition: A Certification Authority (CA) is a trusted third-party entity in Public Key Infrastructure (PKI) that verifies user identities and binds them to public keys by issuing digitally signed certificates.
Key Components / Functions: Validates subscriber identity, digitally signs X.509 certificates with its private key, publishes Certificate Revocation Lists (CRLs), and supports Online Certificate Status Protocol (OCSP).
Example / Use-Case: Trusted root CAs such as DigiCert and Let's Encrypt issuing SSL/TLS certificates for HTTPS websites.

Q9. Define Transport Layer Security (TLS).

Formal Definition: Transport Layer Security (TLS), successor to SSL, is an IETF cryptographic protocol providing privacy, mutual authentication, and data integrity over computer networks.
Key Architecture / Layers: Operates above TCP across two sub-protocols: TLS Handshake Protocol (negotiates cipher suites, authenticates peers) and TLS Record Protocol (provides symmetric encryption and HMAC integrity).
Example / Use-Case: Securing web traffic in HTTPS and email transmission via STARTTLS.

Q10. What is S/MIME?

Formal Definition: Secure/Multipurpose Internet Mail Extensions (S/MIME) is an IETF standard protocol providing end-to-end security services—confidentiality, authentication, integrity, and non-repudiation—for electronic mail.
Key Components / Mechanism: Built on X.509 digital certificates and PKCS #7 / CMS packaging. Employs asymmetric cryptography (RSA/ECDSA) for digital signatures and key distribution, and symmetric ciphers (AES) for bulk email encryption.
Example / Use-Case: Enterprise secure email signing and encryption supported natively in Microsoft Outlook and Apple Mail.

Model Question Paper – 5

Q1. Define steganography.

Formal Definition: Steganography is the cryptographic art of concealing secret messages within innocuous cover media, ensuring unauthorized observers cannot detect covert communication.
Key Components / Formula / Mechanism: Example / Use-Case: Digital watermarking for copyright protection and covert key exchange in 24-bit PNG images.

Q2. What is a linear congruence? Write its general form.

Formal Definition: A linear congruence is a first-degree modular equation where an unknown multiplied by a constant is congruent to an integer modulo m.
Key Components / Formula / Mechanism: Example / Use-Case: RSA key computation and Affine ciphers (e.g., 3x ≡ 4 (mod 7) gives x ≡ 6).

Q3. Define a security mechanism. Give any two examples.

Formal Definition: Under ITU-T X.800, a security mechanism is a technical process, algorithm, or device designed to detect, prevent, or recover from security attacks.
Key Components / Formula / Mechanism: Divided into Specific Mechanisms (layer-specific controls) and Pervasive Mechanisms (system-wide facilities like audit trails).
Example / Two Examples:

Q4. What is the Vigenère Cipher?

Formal Definition: The Vigenère cipher is a polyalphabetic substitution cipher that encrypts alphabetic text using repeated keyword letters to produce varying Caesar shifts.
Key Components / Formula / Mechanism: Example / Use-Case: Diplomatic message encryption; historically analyzed using Kasiski examination.

Q5. Define a Feistel Cipher.

Formal Definition: A Feistel cipher is a symmetric block cipher framework where plaintext blocks are split into equal halves (L and R) and processed across repeated rounds.
Key Components / Formula / Mechanism: Example / Use-Case: Structural foundation of Data Encryption Standard (DES - 16 rounds) and Blowfish.

Q6. What is AES? List its three standard key sizes.

Formal Definition: Advanced Encryption Standard (AES) is a symmetric block cipher standardized by NIST (FIPS PUB 197) that processes data in fixed 128-bit blocks using a substitution-permutation network.
Key Components / Formula / Mechanism: Example / Use-Case: Disk encryption (BitLocker) and secure web traffic via TLS 1.3 / HTTPS.

Q7. What is the RC4 stream cipher?

Formal Definition: RC4 is a variable key-size symmetric stream cipher designed by Ron Rivest that generates a pseudo-random keystream XORed byte-by-byte with plaintext.
Key Components / Formula / Mechanism: Example / Use-Case: Historically used in IEEE 802.11 WEP/WPA (TKIP) and SSL/TLS; now deprecated.

Q8. Define collision resistance in cryptographic hash functions.

Formal Definition: Collision resistance is a property of a cryptographic hash function H making it computationally infeasible to find two distinct inputs producing the identical digest.
Key Components / Formula / Mechanism: Example / Use-Case: Critical in SHA-256 digital certificates and blockchain integrity to prevent forgery.

Q9. What is the Digital Signature Standard (DSS)?

Formal Definition: The Digital Signature Standard (DSS) is a federal standard published by NIST (FIPS PUB 186) specifying algorithms for generating and verifying unforgeable digital signatures.
Key Components / Formula / Mechanism: Example / Use-Case: Legally binding e-signatures, operating system code signing, and X.509 PKI certificates.

Q10. Define Secure Sockets Layer (SSL).

Formal Definition: Secure Sockets Layer (SSL) is a standard cryptographic protocol suite developed by Netscape to establish an authenticated, encrypted, and tamper-resistant network connection over TCP.
Key Components / Formula / Mechanism: Example / Use-Case: Securing HTTPS web traffic and financial transactions; modernized and superseded by TLS.

PART II: SECTION B — 6 MARKS QUESTIONS (Papers 1 to 5)
Model Question Paper – 1

Q11. Explain data confidentiality and privacy with suitable examples.

1. Core Concept & Formal Definition

2. Conceptual Architecture Diagram

+-------------------------------------------------------------+
|              DATA PRIVACY (Governance & Policy)             |
|   - User Consent   - Purpose Limitation   - Data Retention  |
+------------------------------+------------------------------+
                               | Mandates Technical Controls
                               v
+-------------------------------------------------------------+
|         DATA CONFIDENTIALITY (Technical Security)           |
|    Plaintext Data ---> [ AES-256 / TLS 1.3 ] ---> Cipher    |
+-------------------------------------------------------------+

3. Core Dimensions & Features

4. Summary Comparison & Practical Examples

Dimension Data Confidentiality Data Privacy
Focus Technical secrecy and access prevention Ethical and lawful personal data handling
Enforcement AES-256, TLS 1.3, strict RBAC Consent notices, minimization policies
Example Encrypting hospital EHR databases prevents unauthorized access. Securing patient consent before sharing records with third parties.

Q12. Find gcd(210, 45) using the Euclidean Algorithm.

1. Core Concept & Euclidean Division Theorem

The Euclidean Algorithm computes the Greatest Common Divisor (GCD) of two positive integers a and b (where a ≥ b) based on the division algorithm:

a = q × b + r,   where 0 ≤ r < b

The core property states that gcd(a, b) = gcd(b, r). The process repeats until the remainder becomes zero; the last non-zero remainder is the GCD.

2. Step-by-Step Division Algorithm Computation

Given integers: a = 210, b = 45.

The remainder reaches 0 at Step 3. The last non-zero remainder is 15.

3. Computation Trace Table & Execution Pipeline

  [210, 45] ---> 210 = 45(4) + 30 ---> Remainder = 30
                      |
                      v
  [45, 30]  ---> 45  = 30(1) + 15 ---> Remainder = 15 (Last non-zero)
                      |
                      v
  [30, 15]  ---> 30  = 15(2) + 0  ---> Terminate (r = 0)
Iteration (i) Dividend (a) Divisor (b) Quotient (q) Remainder (r) Division Relation
1 210 45 4 30 210 = 45(4) + 30
2 45 30 1 15 45 = 30(1) + 15
3 30 15 2 0 30 = 15(2) + 0

4. Mathematical Verification & Final Result

Final Answer: gcd(210, 45) = 15

Q13. Encrypt the plaintext CODE using an Additive Cipher with key K = 9. Decrypt the resulting ciphertext.

1. Core Concept & Mathematical Formulation

The Additive Cipher (Shift Cipher) is a monoalphabetic substitution cipher mapping characters in ℤ₂₆ (A = 0, B = 1, ..., Z = 25) using modular arithmetic:

2. Character Mapping & Encryption Process

Plaintext values: C = 2, O = 14, D = 3, E = 4.

Generated Ciphertext: LXMN

3. Decryption Process & Verification

Ciphertext values: L = 11, X = 23, M = 12, N = 13.

Recovered Plaintext: CODE

4. Transformation Summary Table

Plaintext Char Value (P) Encryption: (P + 9) mod 26 Cipher Value (C) Ciphertext Char Decryption: (C - 9) mod 26 Recovered Char
C 2 (2 + 9) mod 26 = 11 11 L (11 - 9) mod 26 = 2 C
O 14 (14 + 9) mod 26 = 23 23 X (23 - 9) mod 26 = 14 O
D 3 (3 + 9) mod 26 = 12 12 M (12 - 9) mod 26 = 3 D
E 4 (4 + 9) mod 26 = 13 13 N (13 - 9) mod 26 = 4 E
Ciphertext: LXMN  |  Decrypted Plaintext: CODE

Q14. Explain the working of Cipher Block Chaining (CBC) mode with a neat diagram.

1. Core Concept & Formal Definition

Cipher Block Chaining (CBC) is a block cipher feedback mode (NIST SP 800-38A). Each plaintext block is XORed with the preceding ciphertext block prior to encryption under key K, eliminating ECB mode's pattern-leakage vulnerability.

Encryption: C₁ = Eᵢ(P₁ ⊕ IV),   Cᵢ = Eᵢ(Pᵢ ⊕ Cᵢ̋₁)   (i ≥ 2)
Decryption: P₁ = Dᵢ(C₁) ⊕ IV,   Pᵢ = Dᵢ(Cᵢ) ⊕ Cᵢ̋₁   (i ≥ 2)

2. Architectural Diagram (Encryption & Decryption)

  [ CBC Encryption ]                     [ CBC Decryption ]
  P_1       P_2                          C_1       C_2
   |         |                            |   +-----+   |
  (+)<-IV   (+)<--C_1                   [D_K] |   [D_K] |
   |         |                            |   v     |   v
 [E_K]     [E_K]                         (+)<-IV   (+)<--C_1
   |         |                            |         |
  C_1       C_2                          P_1       P_2

3. Core Operational Features & Dimensions

4. Summary Characteristics & Applications

Feature Operational Behavior Impact
Block Alignment Fixed blocks (e.g., 128-bit AES) Requires PKCS#7 padding
Parallel Execution Serial encryption, parallel decryption Decryption scales with cores
Primary Use IPsec ESP, BitLocker, TLS suites Standard bulk symmetric cipher

Q15. Explain the three important security requirements of a cryptographic hash function.

1. Core Concept & Formal Definition

A Cryptographic Hash Function is a deterministic algorithm H: {0, 1}* → {0, 1}ⁿ compressing arbitrary-length input M into a fixed n-bit digest h = H(M) (NIST SP 800-107). It requires three cardinal security properties.

2. Architectural Security Models Diagram

1. Pre-image Resistance:        Given h   ---> Infeasible to find M with H(M) = h
2. Second Pre-image Resistance: Given M_1 ---> Infeasible to find M_2 != M_1 with H(M_2) = H(M_1)
3. Collision Resistance:        Given ∅   ---> Infeasible to find ANY M_1 != M_2 with H(M_1) = H(M_2)

3. Core Dimensions of the Security Requirements

4. Comparative Summary of Hash Requirements

Property Given Complexity Attack Mitigated
Pre-image Digest h O(2ⁿ) Password cracking
Second Pre-image Message M₁ O(2ⁿ) Document substitution
Collision None O(2ⁿ/²) Signature forgery (Birthday attack)

Q16. Explain the security services provided by digital signatures.

1. Core Concept & Formal Definition

A Digital Signature is an asymmetric cryptographic mechanism (NIST FIPS 186-5) binding an entity to digital data using private key PR and public key PU.

The sender signs digest S = E_PR(H(M)). The recipient decrypts S with public key PU and checks if decrypted hash h' matches local hash H(M).

2. Operational Architecture Diagram

[ SIGNING ]
  Message (M) ---> [ Hash H ] ---> [ Sign with PR_Alice ] ---> Signature (S)
                                                                    |
+----------------------- Transmit (M + S) --------------------------+
|
v
[ VERIFYING ]
  Message (M) ---> [ Hash H ] ------------------------> Digest H(M)
                                                           | (Compare)
  Signature (S) -> [ Decrypt with PU_Alice ] ---------> Digest H'
                                      Check: H(M) == H' ? Valid : Invalid

3. Core Security Services Provided

4. Summary Matrix & Real-World Applications

Security Service Cryptographic Enabler Primary Application
Authentication Asymmetric key (PR_A) S/MIME, PGP email
Integrity Cryptographic hash (SHA-256) Software code signing
Non-Repudiation Exclusive private key custody Banking fund transfers (SWIFT)

Model Question Paper – 2

Q11. Explain any five security mechanisms defined in the X.800 Security Architecture.

1. Core Concept & Formal Definition

Under ITU-T X.800, a security mechanism is a technical process, algorithm, or device implementing one or more security services (confidentiality, integrity, authentication). X.800 divides mechanisms into specific protocol-layer mechanisms and pervasive management mechanisms.

2. Architectural Relationship Diagram

[X.800 Specific Security Mechanisms]
Encipherment       --> Confers Data Confidentiality
Digital Signature  --> Guarantees Non-Repudiation
Access Control     --> Enforces Entity Authorization
Data Integrity     --> Detects Unauthorized Modification
Auth Exchange      --> Verifies Communicating Identities

3. Detailed Explanation of Five Mechanisms

4. Summary Mapping Table

Security Mechanism Primary Method Service Provided Protocol Example
Encipherment Symmetric / Asymmetric Confidentiality AES in TLS 1.3
Digital Signature Private key signing Non-Repudiation RSA in X.509
Access Control ACLs & tickets Access Control RADIUS / Firewalls
Data Integrity Hashes & HMACs Integrity HMAC in IPsec AH
Auth Exchange Challenge-response Entity Authentication Kerberos / CHAP

Q12. Explain the four major types of cryptanalytic attacks.

1. Core Concept & Formal Classification

Cryptanalysis is the study of mathematical principles for recovering plaintext or key without prior key knowledge. Modern cryptanalysis classifies attacks into an escalating hierarchy based on adversary access to ciphertexts, plaintexts, and cryptographic oracles.

2. Cryptanalytic Attack Capability Hierarchy

Attacker Capability & Oracle Access:
[Ciphertext-Only] --> [Known-Plaintext] --> [Chosen-Plaintext] --> [Chosen-Ciphertext]
(Intercepted C)       (Known P-C pairs)     (Encryption Oracle)   (Decryption Oracle)

3. Detailed Analysis of the Four Attack Types

4. Summary Comparison Table

Attack Type Attacker Knowledge Oracle Access Primary Defense
Ciphertext-Only Intercepted C only None (Passive) Large keyspace & high entropy
Known-Plaintext Known (P, C) pairs Historical capture Strong non-linear S-boxes
Chosen-Plaintext Chosen P and ciphertexts Encryption oracle Randomized padding & IVs
Chosen-Ciphertext Chosen C and plaintexts Decryption oracle Authenticated encryption (AEAD)

Q13. Encrypt the plaintext DATA using a Multiplicative Cipher with key K = 5. Decrypt the resulting ciphertext.

1. Mathematical Formulation

A Multiplicative Cipher is a substitution cipher over ℤ26. Encryption: C = (P × K) mod 26 with gcd(K, 26) = 1. Since gcd(5, 26) = 1, key K = 5 is valid. Decryption: P = (C × K-1) mod 26.

2. Encryption of Plaintext "DATA"

Mapping A=0, ..., Z=25 yields D=3, A=0, T=19, A=0 with key K = 5:

Plaintext Value (P) (P × 5) Modulo 26 Ciphertext
D 3 3 × 5 = 15 15 mod 26 = 15 P
A 0 0 × 5 = 0 0 mod 26 = 0 A
T 19 19 × 5 = 95 95 mod 26 = 17 R
A 0 0 × 5 = 0 0 mod 26 = 0 A

Resulting Ciphertext: PARA

3. Multiplicative Inverse Derivation (K-1)

Find K-1 satisfying 5 × K-1 ≡ 1 (mod 26). Extended Euclidean Algorithm: 26 = 5(5) + 1 &implies; 1 = 26 - 5(5) &implies; 5(-5) ≡ 1 (mod 26). Since -5 ≡ 21 (mod 26), verify: 5 × 21 = 105 = 4(26) + 1 ≡ 1 (mod 26). Hence, K-1 = 21.

4. Decryption of Ciphertext "PARA"

Decryption mapping for P=15, A=0, R=17, A=0 using K-1 = 21:

Ciphertext Value (C) (C × 21) Modulo 26 Plaintext
P 15 15 × 21 = 315 315 mod 26 = 3 D
A 0 0 × 21 = 0 0 mod 26 = 0 A
R 17 17 × 21 = 357 357 mod 26 = 19 T
A 0 0 × 21 = 0 0 mod 26 = 0 A

Recovered Plaintext: DATA (Decryption verified).


Q14. Explain the working of Counter (CTR) mode with a neat diagram.

1. Core Concept & Formal Definition

Counter (CTR) mode (NIST SP 800-38A) turns a block cipher into a stream cipher. CTR encrypts successive counter values combined with a Nonce to produce a keystream, XORed with plaintext blocks without padding.

2. Architectural Block Diagram

[Nonce | Counter 1]         [Nonce | Counter 2]         [Nonce | Counter i]
        |                           |                           |
  +-----------+               +-----------+               +-----------+
K>| Encrypt Ek|             K>| Encrypt Ek|             K>| Encrypt Ek|
  +-----------+               +-----------+               +-----------+
        | Keystream 1               | Keystream 2               | Keystream i
 P1 --->(+)                  P2 --->(+)                  Pi --->(+)
        |                           |                           |
  Ciphertext C1               Ciphertext C2               Ciphertext Ci
(Decryption uses forward Ek: Pi = Ci XOR Keystream i)

3. Key Operational Principles

4. Summary Operational Dimensions

Dimension Implementation Advantage
Circuit Area Forward cipher EK only Halves silicon cost
Throughput Parallel block processing High pipeline speed
Error Impact 1-bit error affects 1 plaintext bit No error cascade
Security Rule Unique (Nonce, Counter) pair Prevents two-time pad leak

Q15. Differentiate between conventional signatures and digital signatures.

1. Core Concept & Formal Definition

A conventional signature is a physical, handwritten mark made with ink on paper signifying personal assent. A digital signature is a cryptographic construct using asymmetric cryptography that binds the signer's private key to a document hash digest, providing authenticity, integrity, and non-repudiation.

2. Verification Architecture Model

Conventional Signature:
[Physical Paper] ---> Written with Ink Pen ---> Subjective Visual Inspection

Digital Signature:
[Message M] ---> Hash H(M) ---> Encrypt with Private Key ---> Signature S
Verification:
Decrypt S with Public Key ---> H'; Compare H(M) == H' (Deterministic Match)

3. Core Differentiating Dimensions

4. Summary Comparison Table

Parameter Conventional Signature Digital Signature
Medium Physical ink and paper Asymmetric cryptography & hashing
Content Binding Independent of document text Unique to each message bitstring
Verification Subjective visual inspection Deterministic algorithmic check
Tamper Proof Weak; requires forensic tests Absolute; bit change breaks signature
Reusability Signature pattern can be copied Cannot be copied or transferred

Q16. Explain the Diffie–Hellman Key Agreement Protocol.

1. Core Concept & Theoretical Basis

The Diffie–Hellman Key Agreement Protocol (1976) enables two parties (Alice and Bob) to establish a shared secret key over an insecure channel without transmitting the secret itself. Security relies on the hardness of the Discrete Logarithm Problem in finite cyclic groups ℤp*.

2. Protocol Exchange Architecture

Public Parameters: Large prime p, Primitive root g modulo p
ALICE (Private X_A)                           BOB (Private X_B)
Compute: Y_A = (g ^ X_A) mod p               Compute: Y_B = (g ^ X_B) mod p
         |------------ Public Key Y_A ----------->|
         |<----------- Public Key Y_B ------------|
Shared Secret Derivation:                    Shared Secret Derivation:
K = (Y_B ^ X_A) mod p                        K = (Y_A ^ X_B) mod p
  = g ^ (X_A * X_B) mod p                      = g ^ (X_A * X_B) mod p

3. Protocol Execution Steps

4. Numerical Demonstration & Security Characteristics

Parameter Alice Execution Bob Execution
Domain Setup Public agreement on prime p = 23, Generator g = 5
Key Pair Private XA = 6 → YA = 56 mod 23 = 8 Private XB = 15 → YB = 515 mod 23 = 19
Shared Key (K) K = 196 mod 23 = 2 K = 815 mod 23 = 2
Vulnerability Vulnerable to MitM; authenticated using digital certificates (ECDHE)

Model Question Paper – 3

Q11. Explain the relationship between security goals, security services and security mechanisms with suitable examples. (6 Marks)

1. Core Concept & Formal Definition

Under ITU-T X.800 and RFC 4949, security architecture is organized into three tiers:

2. Architectural Relationship Model
Security Goals (CIA Triad: Confidentiality, Integrity, Availability)
       |  (Enforced via Policies)
       v
Security Services (Data Confidentiality, Data Integrity, Authentication)
       |  (Implemented via Algorithms)
       v
Security Mechanisms (AES-256-GCM, SHA-256 HMAC, RSA / ECDSA Signatures)
3. Core Dimensions & Features
4. Summary Mapping & Concrete Examples
Security Goal Security Service Security Mechanism Practical Example
Confidentiality Connection Confidentiality AES-256-GCM Encrypting HTTPS application payloads.
Integrity Connectionless Integrity SHA-256 HMAC Verifying packet authenticity in TLS.
Non-Repudiation Origin Non-Repudiation RSA / ECDSA Legally signing electronic bank transfers.
Availability Availability Service Ingress Rate Limiting Thwarting SYN flood volumetric DDoS attacks.

Q12. Explain the set of residues Zn and congruence relations with suitable examples. (6 Marks)

1. Core Concept & Formal Definition

In modular arithmetic and abstract algebra:

2. Mathematical Model & Partitioning
Integer Partitioning into Residue Classes modulo n = 5:
  [0] = {..., -5, 0, 5, ...}     [3] = {..., -2, 3, 8, ...}
  [1] = {..., -4, 1, 6, ...}     [4] = {..., -1, 4, 9, ...}
  [2] = {..., -3, 2, 7, ...}     Z_5 = {[0], [1], [2], [3], [4]}
Congruence Criterion: a ≡ b (mod n) <===> (a - b) = k·n, k ∈ Z
3. Core Dimensions & Features
4. Summary & Concrete Examples
Operation Algebraic Rule Calculation (n = 7) Result
Residue r = a mod n −17 mod 7 4, since −17 = (−3)(7) + 4
Congruence n | (a − b) 23 ≡ 2 (mod 7) Valid: 7 | (23 − 2 = 21)
Addition (a + b) mod n (5 + 6) mod 7 11 mod 7 = 4 ∈ Z7
Multiplication (a × b) mod n (4 × 5) mod 7 20 mod 7 = 6 ∈ Z7

Q13. Explain the One-Time Pad Cipher and its important requirements. (6 Marks)

1. Core Concept & Formal Definition

Devised by Vernam (1917) and proven by Shannon (1949), the One-Time Pad (OTP) cipher provides information-theoretic security:

2. Mathematical Model & Flow
Encryption:  Plaintext  P : 0 1 0 0 1 0 0 0 ('H')
                            ⊕   ⊕   ⊕   ⊕   ⊕   ⊕   ⊕   ⊕
             Random Key K : 1 1 0 1 0 1 1 0 (Shared Pad, |K| = |P|)
                            =   =   =   =   =   =   =   =
             Ciphertext C : 1 0 0 1 1 1 1 0
Decryption:  C ⊕ K = (P ⊕ K) ⊕ K = P ⊕ (K ⊕ K) = P ⊕ 0 = P ('H')
3. Core Dimensions & Key Requirements
4. Summary Table of Requirements
Requirement Technical Objective Vulnerability if Breached Mitigation
True Randomness Uniform probability across keys PRNG seed cryptanalysis Hardware noise sources
Length (|K| ≥ |P|) Prevents periodic repetitions Reduces to Vigenere cipher 1:1 pad allocation
Zero Key Reuse Preserves ciphertext independence C1 ⊕ C2 leaks plaintext XOR Single-use pad rule
Secure Destruction Guarantees forward secrecy Stored pads expose past traffic Immediate register wipe

Q14. Explain the working of Cipher Feedback (CFB) mode with a neat diagram. (6 Marks)

1. Core Concept & Formal Definition

Cipher Feedback (CFB) mode, specified in NIST SP 800-38A, converts a symmetric block cipher (e.g., AES) into a self-synchronizing stream cipher:

2. Architecture & Diagram
[CFB Encryption - Segment i]               [CFB Decryption - Segment i]
   +-------------------------+                +-------------------------+
   |  Shift Register (I_i)   |                |  Shift Register (I_i)   |
   +-------------------------+                +-------------------------+
                |                                          |
                v                                          v
      +-------------------+                      +-------------------+
 K -->| Block Cipher (E)  |                K --->| Block Cipher (E)  | <-- Forward E
      +-------------------+                      +-------------------+
                |                                          |
                v                                          v
       [Select MSB s-bits]                        [Select MSB s-bits]
                |                                          |
      P_i ----->(+)                              C_i ----->(+)
                 |                                          |
                 v                                          v
        C_i (Transmitted)                          P_i (Decrypted Plaintext)
3. Core Dimensions & Features
4. Summary & Comparison
Parameter CFB Mode Specification Comparison with CBC Operational Benefit
Cipher Routine Forward EK for Encrypt & Decrypt CBC requires both EK and DK Reduces hardware footprint
Segment Unit (s) s = 8 or s = 128 bits CBC requires 128-bit blocks Real-time terminal streams
IV Requirement Unique, unpredictable nonce Static IV enables replays Unique session keystreams
Error Recovery Self-syncs after b clean bits Stream ciphers lose sync Robust over noisy links

Q15. State the Chinese Remainder Theorem and explain its applications. (6 Marks)

1. Core Concept & Formal Definition

The Chinese Remainder Theorem (CRT) is a central theorem of modular arithmetic and public-key cryptography:

2. Architecture & Solution Model
System of Congruences:                Ring Isomorphism:
  x ≡ a_1 (mod m_1)
  x ≡ a_2 (mod m_2)                        Z_M  <========>  Z_m1 × Z_m2 × ... × Z_mk
        :                                   x   <-------->  (a_1,  a_2,  ...,  a_k)
  x ≡ a_k (mod m_k)                   [Single Large Mod]    [Fast Parallel Moduli]
------------------------------------------------------------------------------------
Formula Steps:  1. M = ∏ m_i   2. M_i = M / m_i   3. y_i = (M_i)^(-1) mod m_i
                4. x = [ ∑ (a_i · M_i · y_i) ] mod M
3. Core Dimensions & Features
4. Summary Table of Applications
Application Implementation Role Benefit / Speedup Numerical Example
RSA Decryption Computes cd mod n via p and q Speeds up private key ops ≈ 4× Decomposes 2048-bit math to 1024-bit
Secret Sharing Asmuth-Bloom threshold scheme Any k of n shares recover secret Modular shares S mod mi
RNS Hardware Residue Number System arithmetic Carry-free parallel computation High-speed DSP signal filters
Calculation Example Solve x ≡ 2 (mod 3), x ≡ 3 (mod 5) M=15; M1=5,y1=2; M2=3,y2=2 x = (20 + 18) mod 15 = 8

Q16. Explain the different types of attacks and forgery attacks on digital signatures. (6 Marks)

1. Core Concept & Formal Definition

Security analysis of digital signature schemes (KeyGen, Sign, Verify) is formalized under the Goldwasser-Micali-Rivest (GMR) model:

2. Attack Taxonomy Architecture
+---------------------------------------------------------------------------------+
|               DIGITAL SIGNATURE ATTACK TAXONOMY (GMR MODEL)                     |
+---------------------------------------------------------------------------------+
          |                                                    |
          v (By Adversary Goal)                                v (By Adversary Access)
+---------------------------------------+   +-------------------------------------+
| 1. Total Break:                       |   | 1. Key-Only Attack:                 |
|    Recovers private signing key K_pr  |   |    Only public key K_pub available  |
| 2. Universal Forgery:                 |   | 2. Known-Message Attack:            |
|    Constructs efficient signing code  |   |    Possesses valid (m_i, σ_i) pairs |
| 3. Selective Forgery:                 |   | 3. Generic Chosen-Message:          |
|    Forges signature for target msg    |   |    Queries fixed list of messages   |
| 4. Existential Forgery:               |   | 4. Adaptive Chosen-Message (CMA):   |
|    Forges valid pair for arbitrary m  |   |    Queries oracle dynamically       |
+---------------------------------------+   +-------------------------------------+
3. Core Dimensions & Features
4. Summary Table of Attacks
Attack / Forgery Severity Mechanism / Attack Vector Standard Defense
Total Break Critical Mathematical factorization (n = pq) Sufficient key length (≥ 2048-bit RSA)
Universal Forgery Severe Algorithmic inversion without key Provably secure reductions
Selective Forgery High Collision or preimage exploitation Cryptographic hashing (SHA-256)
Existential Forgery Moderate Homomorphic algebraic relations Randomized padding (RSA-PSS)
Adaptive CMA Severe Iterative signing oracle queries Deterministic nonces (RFC 6979)

Model Question Paper – 4

Q11. Explain the importance and need for information security.

1. Core Concept

According to NIST SP 800-12, information security preserves the confidentiality, integrity, and availability of information systems. Pervasive connectivity and escalating cyber threats make robust security essential to safeguard organizational assets, maintain regulatory compliance, and ensure stakeholder trust.

2. Information Security Architecture
Adversarial Threats ──▶ [Security Controls: Crypto / Auth / Firewall] ──▶ [CIA Triad Enforced]
3. Key Needs and Objectives
4. Security Dimensions Matrix
Security Dimension Primary Objective Threat Mitigated Standard Control
Confidentiality Prevent unauthorized disclosure. Eavesdropping, packet sniffing. AES encryption, access control.
Integrity Ensure data authenticity. Tampering, message alteration. SHA-256 hashing, HMAC signatures.
Availability Ensure uninterrupted access. DoS attacks, server outages. Redundancy, load balancing.

Q12. Explain the three versions of AES: AES-128, AES-192 and AES-256.

1. Core Concept

Standardized by NIST in FIPS PUB 197, AES is a symmetric block cipher based on Rijndael. It encrypts 128-bit blocks across three versions differing in key length, round count, and expanded key words.

2. AES Encryption Processing Flow
128-bit Plaintext ──▶ [Initial Round] ──▶ [Rounds 1 to Nr-1] ──▶ [Final Round] ──▶ 128-bit Ciphertext
3. Key Dimensions
4. AES Specification Matrix
Version Key Size Rounds Expanded Words Application
AES-128 128 bits 10 44 words (11 keys) Standard web traffic.
AES-192 192 bits 12 52 words (13 keys) Corporate networks.
AES-256 256 bits 14 60 words (15 keys) Military defense.

Q13. Explain the round-key generation procedure in DES.

1. Core Concept

In DES (NIST FIPS PUB 46-3), the key schedule derives sixteen 48-bit subkeys (K1 to K16) from a 64-bit master key to parameterize each Feistel round.

2. DES Key Schedule Architecture
64-bit Key ──▶ [PC-1] ──▶ (C0, D0: 28b each) ──▶ [Circular Left Shifts] ──▶ [PC-2] ──▶ 48-bit Ki
3. Procedural Steps
4. Transformation Matrix
Stage Input Size Output Size Operation
PC-1 64 bits 56 bits Drops 8 parity bits.
Shift-1 28 bits × 2 28 bits × 2 Left shift by 1 bit.
Shift-2 28 bits × 2 28 bits × 2 Left shift by 2 bits.
PC-2 56 bits 48 bits Selects 48-bit Ki.

Q14. Explain the different methods of integer factorization.

1. Core Concept

Integer factorization decomposes a composite integer n into non-trivial prime factors (n = p * q). In asymmetric cryptography (e.g., RSA), system security depends on the computational hardness of factoring large integers.

2. Factorization Algorithms Taxonomy
Composite Modulus (n) ──▶ [Special-Purpose: Trial Div / Fermat / Pollard] OR [General-Purpose: QS / GNFS]
3. Key Factorization Algorithms
4. Factorization Methods Matrix
Method Category Time Complexity Optimal Target
Trial Division Special-purpose O(sqrt(p)) Small prime divisors (p < 10^6).
Fermat's Method Special-purpose O(abs(x - sqrt(n))) Primes p, q close to sqrt(n).
Pollard's Rho Special-purpose O(p^(1/2)) Medium factors (p <= 2^60).
GNFS General-purpose Sub-exponential Standard RSA moduli (>= 2048 bits).

Q15. Explain the structure and important fields of an X.509 digital certificate.

1. Core Concept

Defined in ITU-T X.509 and RFC 5280, an X.509 digital certificate is an ASN.1 structured credential binding an entity's identity to their public key via a trusted Certificate Authority (CA) digital signature.

2. X.509 Certificate Structure
Certificate ──▶ [TBSCertificate (Fields & Extensions)] ──▶ [Algorithm ID] ──▶ [CA Digital Signature]
3. Core Structural Fields
4. Important Fields Matrix
Field ASN.1 Element Purpose Example
Version version Syntax specification. v3 (integer 2).
Serial Number serialNumber Revocation management. Unique CA identifier.
Issuer DN issuer Signing CA identity. CN=DigiCert CA.
Validity validity Operating timeframe. NotBefore / NotAfter.
Signature signatureValue CA digital signature. Encrypted hash digest.

Q16. Explain the signing and verification procedures of the Elliptic Curve Digital Signature Algorithm (ECDSA).

1. Core Concept

Standardized in ANSI X9.62, ECDSA provides digital signatures matching RSA-3072 security, based on the hardness of the Elliptic Curve Discrete Logarithm Problem (ECDLP).

2. ECDSA Operation Workflow
Signing: (m, d) ──▶ Point P = k*G ──▶ Signature (r, s)
Verification: (Signature, m, Q) ──▶ Point P' = u1*G + u2*Q ──▶ Check: x1' mod n == r
3. Key Procedural Steps
4. Procedural Summary Matrix
Step Signer Operation Verifier Operation
Digest Compute e = H(m). Compute e = H(m).
Nonce Pick random secret k. Compute w = s^(-1) mod n.
Point Point P = k * G. Point P' = u1 * G + u2 * Q.
Tuple Output (r, s). Verify if x1' mod n == r.

Model Question Paper – 5

Q11. Explain the different types of matrices with suitable examples.

1. Core Concept & Formal Definition

A matrix is a rectangular array of numbers or algebraic expressions arranged in m rows and n columns (order m × n). In cryptography, matrices defined over modular rings (ℤ26) and finite Galois fields (GF(28)) are essential for polygraphic substitution (Hill cipher) and linear diffusion (AES MixColumns).

2. Cryptographic Matrix Taxonomy

                    +-----------------------------+
                    | Cryptographic Matrix Family |
                    +--------------+--------------+
                                   |
      +---------------+------------+------------+---------------+
      |               |                         |               |
[Square Matrix] [Identity Matrix]         [Invertible Matrix] [Diagonal Matrix]
    m = n          I * A = A                 det(A) != 0         a_ij = 0 (i!=j)
   [3   2]          [1   0]               gcd(det, 26)=1             [5   0]
   [5   7]          [0   1]                 A * A^-1 = I             [0   3]

3. Core Dimensions & Primary Matrix Types

4. Summary Comparison & Applications Table

Matrix Type Defining Mathematical Property Cryptographic Role Concrete Example
Square Row count equals column count (m = n) Block cipher key spaces K = [[3, 2], [5, 7]]
Identity aii = 1, aij = 0 (i ≠ j) Neutral operation verification I2 = [[1, 0], [0, 1]]
Invertible det(A) ≠ 0 and gcd(det(A), m) = 1 Decryption key derivation K × K-1 ≡ I (mod 26)
Diagonal aij = 0 for all i ≠ j Decoupled parallel scaling diag(5, 3) in GF(28)

Q12. Solve the following linear congruence using the multiplicative inverse method: 7x ≡ 9 (mod 26).

1. Core Concept & Solvability Criterion

A linear congruence of the form ax ≡ b (mod m) admits a unique solution modulo m if and only if gcd(a, m) = 1. Under the multiplicative inverse method, we find the modular inverse a-1 (mod m) such that a × a-1 ≡ 1 (mod m), and multiply both sides to obtain x ≡ a-1 × b (mod m).

2. Algorithmic Solution Architecture

[Given: 7x ≡ 9 (mod 26)]
          |
          v
[Check gcd(7, 26) = 1] --------------> [1 | 9 => Unique Solution Exists]
          |
          v
[Extended Euclidean Algorithm] ------> [Backtracking yields 7^-1 ≡ 15 mod 26]
          |
          v
[Multiply: x ≡ 9 * 15 (mod 26)] -----> [x = 135 mod 26 = 5]
          |
          v
[Verification: 7 * 5 = 35 ≡ 9 mod 26] -> [Confirmed Unique Solution: x = 5]

3. Step-by-Step Mathematical Solution

4. Summary Computation Table

Stage Formula / Operation Computed Value Mathematical Role
Solvability Test gcd(7, 26) via Euclidean division gcd = 1 Guarantees unique solution
Modular Inverse Extended Euclidean back-substitution 7-1 ≡ 15 (mod 26) Cancels coefficient 7
Root Extraction x ≡ 9 × 15 = 135 mod 26 x = 5 Primary root in ℤ26
Verification 7(5) = 35 mod 26 35 ≡ 9 (mod 26) Confirms algebraic correctness

Q13. Explain the Rail Fence Cipher. Encrypt the plaintext HELLOWORLD using a two-rail Rail Fence Cipher.

1. Core Concept & Formal Definition

The Rail Fence Cipher (zigzag cipher) is a classical transposition cipher in which plaintext characters are written diagonally downward and upward across k parallel imaginary lines (“rails”) in an oscillating wave. Ciphertext is subsequently extracted by reading row by row from top to bottom, altering letter positions without changing letter identity.

2. Two-Rail Zigzag Transposition Diagram

Plaintext Index:   0   1   2   3   4   5   6   7   8   9
Plaintext Char:    H   E   L   L   O   W   O   R   L   D

Rail 1 (Even):     H . . . L . . . O . . . O . . . L .   -->  H L O O L
                     .   /   .   /   .   /   .   /   .
Rail 2 (Odd):      . E . . . L . . . W . . . R . . . D   -->  E L W R D

Extracted Ciphertext: H L O O L E L W R D

3. Encryption & Decryption Execution Steps

4. Summary Transposition Table

Rail Level Assigned Index Positions Character Stream Segment Length
Rail 1 (Top) 0, 2, 4, 6, 8 H, L, O, O, L 5 characters
Rail 2 (Bottom) 1, 3, 5, 7, 9 E, L, W, R, D 5 characters
Ciphertext Rail 1 + Rail 2 concatenation HLOOLELWRD 10 characters
Plaintext Interleaved rail reconstruction HELLOWORLD 10 characters

Q14. Explain the working of Output Feedback (OFB) mode with a neat diagram.

1. Core Concept & Formal Definition

Output Feedback (OFB) mode is an authenticated confidentiality mode of operation (standardized in NIST SP 800-38A) that converts a symmetric block cipher into a synchronous stream cipher. It generates a continuous sequence of pseudo-random keystream blocks by iteratively encrypting the previous cipher output, which is subsequently bitwise XORed with plaintext blocks.

2. Architecture & Execution Flow Diagram

            Initialization Vector (IV)
                        |
                        v
               +-----------------+
   Key (K) --->| Block Encrypt E |
               +-----------------+
                        |-------------------+ (Internal Feedback)
                        v                   |
               Keystream Block (O1)         |
                        |                   |
Plaintext (P1) ------->(X)                  |
                        |                   v
                        v          +-----------------+
               Ciphertext (C1)     | Block Encrypt E | <--- Key (K)
                                   +-----------------+
                                            |
                                            v
                                   Keystream Block (O2)
                                            |
                      Plaintext (P2) ------> (X)
                                            |
                                            v
                                   Ciphertext (C2)

3. Core Dimensions & Operational Features

4. Summary Comparison & Specification Table

Operational Dimension OFB Mode Specification Cryptographic Benefit
Cipher Classification Synchronous stream cipher emulator Encipher arbitrary bit-lengths without padding
Decryption Engine Forward block encryption EK Eliminates inverse decryption circuitry
Error Extension Isolated to flipped bit (0-bit propagation) Ideal for error-prone noisy satellite/RF links
Pre-processing Full keystream offline generation allowed Zero encryption delay on data transmission

Q15. Explain the important features of the Whirlpool hash function.

1. Core Concept & Formal Definition

Whirlpool is an iterated cryptographic hash function designed by Vincent Rijmen and Paulo S. Barreto, standardized in ISO/IEC 10118-3. It operates on arbitrary message inputs of length up to 2256 − 1 bits and produces a fixed 512-bit message digest using a dedicated 512-bit block cipher inside a Miyaguchi-Preneel compression scheme.

2. Architecture & Compression Pipeline Diagram

Message (M) ---> [Pad: '1' + '0's + 256-bit Length] ---> 512-bit Message Blocks (M_i)
                                                                 |
Intermediate Hash (H_0 = IV = 0^512)                             |
           |                                                     |
           v                                                     v
   +---------------+                                     +---------------+
   | W Block Cipher| <===== Key: H_{i-1}                 | W Block Cipher|
   +---------------+                                     +---------------+
           |                                                     |
           +-----> (X) <--- H_{i-1}                              +-----> (X)
                    |                                                     |
                    v                                                     v
                  (X) <--- M_i                                          Digest
                    |                                                 (512-bit)
                    v
                  H_i  (Miyaguchi-Preneel: H_i = E_{H_{i-1}}(M_i) ⊕ H_{i-1} ⊕ M_i)

3. Core Dimensions & Important Features

4. Technical Specifications Table

Architectural Parameter Whirlpool Specification Cryptographic Significance
Output Digest Size 512 bits (64 bytes) Equal to SHA-512, standardized under ISO/IEC 10118-3
Message Block Size 512 bits (arranged as 8 × 8 state) Processed iteratively via Miyaguchi-Preneel compression
Internal Rounds 10 iterative rounds Square-cipher lineage with optimal MDS matrix diffusion
Security Resistance 256-bit collision, 512-bit preimage Robust resistance against all known analytical attacks

Q16. Explain the security services provided by S/MIME.

1. Core Concept & Formal Definition

Secure/Multipurpose Internet Mail Extensions (S/MIME), standardized in RFC 8551, is an IETF industry standard protocol providing end-to-end cryptographic security services for electronic messaging. Built on the Cryptographic Message Syntax (CMS) and X.509 Public Key Infrastructure, it protects MIME message entities across untrusted intermediate SMTP relays.

2. Architecture & Security Processing Flow Diagram

SENDER                                                            RECEIVER
+---------------+                                             +---------------+
| Email Content |                                             | Email Content |
+-------+-------+                                             +-------^-------+
        |                                                             |
        v                                                             |
[Digital Signature] (Sender Private Key) ---- SHA-256 / RSA/ECDSA --> [Verify Signature]
        |                                                             |
        v                                                             |
[Symmetric Encryption] (Session Key K_s) ---- AES-256-CBC ----------> [Decrypt Content]
        |                                                             ^
        v                                                             |
[Session Key Encryption] (Receiver PubKey) -- RSA / ECDH -----------> [Decrypt K_s]
        |                                                             |
        +=============> SMTP Relay Network (Untrusted) ===============+

3. Core Dimensions & Security Services

4. Summary Service Specification Table

Security Service Cryptographic Mechanism CMS Object / Algorithm Standard
Confidentiality Symmetric payload encryption + Key wrapping EnvelopedData / AES-256, RSA-OAEP
Integrity Cryptographic message hashing SignedData / SHA-256, SHA-512
Authentication Sender private key digital signature SignedData / RSA, ECDSA, Ed25519
Non-Repudiation X.509 PKI certificate chain binding X.509 v3 hierarchical CA verification

PART III: SECTION C — 8 MARKS QUESTIONS (Papers 1 to 5)
Model Question Paper – 1

Q17. Explain passive and active attacks with their types and suitable examples.

1. Core Concept & Formal Definition

In network security (RFC 4949 / William Stallings), a security attack is any action that compromises the integrity, confidentiality, or availability of organizational information assets.

2. Architecture & Execution Flowchart

[ PASSIVE ATTACK: Eavesdropping & Monitoring ]
Sender Alice ------------ Transmission ------------> Receiver Bob
                                |
                                v (Intercepts / Reads)
                          Attacker Eve (No data change)

[ ACTIVE ATTACK: Tampering & Impersonation ]
Sender Alice ----> [ Attacker Mallory: Alters / Drops / Forges ] ----> Receiver Bob

3. Detailed Operational Activities & Processing Phases

4. Summary Comparison & Specification Parameters

Dimension Passive Attacks Active Attacks
Data Impact Zero modification; data remains untouched Data altered, injected, deleted, or blocked
Security Goal Breaches confidentiality and privacy Breaches integrity, availability, authenticity
Detection Very difficult (leaves no network traces) Feasible (detected via logs and hashes)
Primary Defense Prevention via robust encryption (AES) Detection via MACs, digital signatures, IDS
Examples Packet sniffing (Wireshark), wiretapping Man-in-the-Middle, replay, TCP SYN flood

Q18. Explain the DES encryption process with a neat diagram.

1. Core Concept & Formal Definition

The Data Encryption Standard (DES) (NIST FIPS PUB 46-3) is a symmetric block cipher that enciphers 64-bit plaintext blocks into 64-bit ciphertext blocks using a 56-bit effective key via a 16-round Feistel network.

2. Architecture & Execution Flowchart

               64-bit Plaintext Block
                         |
                         v
             [Initial Permutation (IP)]
                         |
           +-------------+-------------+
           |                           |
       L_0 (32 bits)               R_0 (32 bits)
           |                           |
           |        +-------------+    |
           |        | Round Funct |<---+--- Subkey K_1 (48 bits)
           |        |   F(R, K)   |    |
           v        +------+------+    |
         (XOR) <-----------+           |
           |                           |
           \-------------\ /-----------/ (32-bit Swap)
                          X
           /-------------/ \-----------\
           |                           |
       L_1 (32 bits)               R_1 (32 bits)
           :                           :
           :   [ Rounds 2 to 16 ]      :
           |                           |
       L_16 (32 bits)              R_16 (32 bits)
           |                           |
           \-------------   -----------/ (Pre-output Swap)
                          X
           /-------------   -----------\
           | (R_16 || L_16)            |
           +-------------+-------------+
                         |
                         v
           [Inverse Initial Permutation IP^-1]
                         |
                         v
               64-bit Ciphertext Block

3. Detailed Operational Activities & Processing Phases

4. Summary Comparison & Specification Parameters

Round Function: R_i = L_{i-1} ⊕ P(S(E(R_{i-1}) ⊕ K_i)),   L_i = R_{i-1}
Recombination: Ciphertext = IP^-1(R_16 || L_16)
Parameter DES Standard Specification
Block Size 64 bits (Plaintext and Ciphertext)
Key Size 64-bit raw key (8 parity bits discarded) → 56-bit effective key
Rounds 16 identical Feistel iterations
Subkey Size 48 bits per round (derived via PC-1, circular shifts, PC-2)
S-Boxes 8 non-linear substitution boxes (each maps 6 bits → 4 bits)

Q19. Explain the four main transformations performed during AES encryption.

1. Core Concept & Formal Definition

The Advanced Encryption Standard (AES) (NIST FIPS PUB 197 / Rijndael) is a symmetric block cipher based on a Substitution-Permutation Network (SPN).

2. Architecture & Execution Flowchart

          128-bit Plaintext -> [ AddRoundKey (K_0) ]
                                     |
               +---------------------+---------------------+
               |       STANDARD ROUND (Rounds 1 to Nr-1)   |
               |                                           |
               | 1. [ SubBytes ]     (Non-linear S-box GF) |
               |        v                                  |
               | 2. [ ShiftRows ]    (Row Byte Permutation)|
               |        v                                  |
               | 3. [ MixColumns ]   (Matrix Mult GF(2^8)) |
               |        v                                  |
               | 4. [ AddRoundKey ]  (Bitwise XOR with K_r)|
               +---------------------+---------------------+
                                     |
                                     v
               +-------------------------------------------+
               |        FINAL ROUND (Round Nr)             |
               | [SubBytes] -> [ShiftRows] -> [AddRoundKey]|
               |         (MixColumns is omitted)           |
               +---------------------+---------------------+
                                     |
                                     v
                         128-bit Ciphertext Block

3. Detailed Operational Activities & Processing Phases

4. Summary Comparison & Specification Parameters

Transformation Mathematical Basis Cryptographic Role Inverse Operation
SubBytes Inversion in $GF(2^8)$ + Affine transformation Confusion (Non-linear mapping) InvSubBytes (Inverse S-box)
ShiftRows Cyclical byte shift left by row index ($r$) Intra-column Diffusion InvShiftRows (Shift right)
MixColumns Matrix multiplication modulo $(x^4 + 1)$ in $GF(2^8)$ Inter-byte Diffusion across columns InvMixColumns (Mult by $d(x)$)
AddRoundKey Bitwise XOR ($\oplus$) with 128-bit subkey Key Dependency AddRoundKey (Self-inverse)

Q20. Explain the RSA cryptosystem with key generation, encryption and decryption procedures.

1. Core Concept & Formal Definition

The RSA Cryptosystem (Rivest, Shamir, and Adleman, 1977) is an asymmetric public-key algorithm foundational to modern digital security and e-commerce.

2. Architecture & Execution Flowchart

+-----------------------------------------------------------------+
|                       KEY GENERATION PHASE                      |
|  Select primes p, q ----> Modulus n = p*q,  phi(n) = (p-1)*(q-1)|
|  Select public exponent e: gcd(e, phi(n)) = 1                   |
|  Compute private exponent d: d * e = 1 mod phi(n)               |
|  Public Key: PU = {e, n}               Private Key: PR = {d, n} |
+-------------------------------+---------------------------------+
                                |
             +------------------+------------------+
             |                                     |
             v                                     v
+-------------------------------+   +-----------------------------+
|      ENCRYPTION (Sender)      |   |    DECRYPTION (Receiver)    |
|  Plaintext M (where M < n)    |   |    Ciphertext C             |
|  Public Key {e, n}            |   |    Private Key {d, n}       |
|  Formula: C = M^e mod n       |   |    Formula: M = C^d mod n   |
|               |               |   |              ^              |
|               v               |   |              |              |
|     Ciphertext C -------------+---+--------------+              |
+-------------------------------+   +-----------------------------+

3. Detailed Operational Activities & Processing Phases

4. Summary Comparison & Specification Parameters

Walkthrough: Let p = 7, q = 11 ⇒ n = 77, φ(n) = 60. Select e = 7 (gcd(7, 60) = 1).
Calculate d: 7 × 43 = 301 ≡ 1 (mod 60) ⇒ d = 43. Keys: PU = {7, 77}, PR = {43, 77}.
Encrypt M = 9: C = 9^7 mod 77 = 4,782,969 mod 77 = 37.
Decrypt C = 37: M = 37^43 mod 77 = 9 (Original plaintext restored).
Component Notation Mathematical Definition Access
Primes $p, q$ Two large prime numbers Secret
Modulus $n$ $n = p \times q$ Public
Euler Totient $\phi(n)$ $\phi(n) = (p - 1)(q - 1)$ Secret
Public Key $PU$ $\{e, n\}$ where $\gcd(e, \phi(n)) = 1$ Public
Private Key $PR$ $\{d, n\}$ where $d \equiv e^{-1} \pmod{\phi(n)}$ Secret

Q21. Explain the Merkle–Damgård scheme with a neat diagram.

1. Core Concept & Formal Definition

The Merkle–Damgård construction (Ralph Merkle and Ivan Damgård, 1979/1989) is an iterative framework for building collision-resistant cryptographic hash functions from fixed-size compression functions.

2. Architecture & Execution Flowchart

        Arbitrary-Length Input Message M (Length L bits)
                               |
                               v
            [ Padding & Length Append (MD-Strengthening) ]
                               |
                               v
              Padded: M_1 || M_2 || ... || M_t (b bits each)
                               |
       +-----------------------+-----------------------+
       |                       |                       |
       v                       v                       v
   +-------+               +-------+               +-------+
   |  M_1  |               |  M_2  |               |  M_t  |
   +---+---+               +---+---+               +---+---+
       |                       |                       |
       v                       v                       v
     +---+                   +---+                   +---+
IV ->| f |---- H_1 --------->| f |---- H_2 ...------>| f |---- H_t
     +---+                   +---+                   +---+      |
                                                                v
                                                       [ Final Map g ]
                                                                |
                                                                v
                                                        n-bit Digest

3. Detailed Operational Activities & Processing Phases

4. Summary Comparison & Specification Parameters

Merkle-Damgård Recurrence: H_0 = IV,   H_i = f(H_{i-1}, M_i)   [1 ≤ i ≤ t],   Digest = g(H_t)
Metric SHA-256 SHA-512 MD5
Block Size ($b$) 512 bits 1024 bits 512 bits
Digest Size ($n$) 256 bits 512 bits 128 bits
Length Field 64-bit integer 128-bit integer 64-bit integer
Compression Logic 64 rounds of non-linear logic 80 rounds of non-linear logic 64 rounds of modular logic
Collision Resistance Secure (No collisions) Secure (No collisions) Broken (Collisions found)

Q22. Explain the digital signature process using a message digest with a neat diagram.

1. Core Concept & Formal Definition

A Digital Signature (NIST FIPS PUB 186-4 / RFC 4949) is a cryptographic primitive that provides data authenticity, integrity verification, and non-repudiation.

2. Architecture & Execution Flowchart

[SENDER: Alice]
 Message M --------------+------------------------------------+
                         |                                    |
                         v                                    |
                [ Hash Function H ]                           |
                         |                                    |
                         v                                    |
                  Digest h = H(M)                             |
                         |                                    |
                         v                                    |
           [ Encrypt with Private Key PR_A ]                  |
                         |                                    |
                         v                                    |
                  Signature S                                 |
                         |                                    |
                         +=================> (M, S) =========+
                                               |
                                               v
[RECEIVER: Bob]
 Message M ------------------> [ Hash H ] -------------> Digest h'
                                                           |
 Signature S -> [ Decrypt with Public Key PU_A ] ------> Digest h''
                                                           |
                                                           v
                                            [ Match h' == h''? ]
                                            /                  \
                                      YES  v                    v  NO
                                [ Valid Signature ]       [ Invalid ]

3. Detailed Operational Activities & Processing Phases

4. Summary Comparison & Specification Parameters

Signing: S = (H(M))^d mod n,   where d ∈ PR_A (Private Key)
Verification: h' = H(M),   h'' = S^e mod n,   where e ∈ PU_A (Public Key)
Rule: Signature is VALID if and only if h' == h''.
Service Cryptographic Enforcement Mitigated Attack
Data Integrity Hash comparison ($h' \stackrel{?}{=} h''$) reveals bit changes Tampering and alteration in transit
Authentication Sender's public key $PU_A$ validates private key origin Impersonation and spoofing
Non-Repudiation Private key $PR_A$ is unique to the sender False denial of document authorship
Efficiency Asymmetric operations restricted to short hash digest Computational overhead on large files

Q23. Explain the Kerberos authentication protocol with a neat diagram.

1. Core Concept & Formal Definition

Kerberos (RFC 4120 / MIT Athena) is a trusted third-party network authentication protocol that enables mutual authentication across insecure networks using symmetric encryption.

2. Architecture & Execution Flowchart

                    +------------------------------------+
                    |   KEY DISTRIBUTION CENTER (KDC)    |
                    |  +-------------+  +--------------+ |
                    |  | Auth Server |  | Ticket-Grant | |
                    |  |    (AS)     |  | Server (TGS) | |
                    |  +------+------+  +-------+------+ |
                    +---------|-----------------|--------+
                              |                 |
            (1) AS_REQ        |                 |
         +--------------------+                 |
         |                                      |
         v (2) AS_REP: K_{c,tgs} + TGT          |
+------------------+                            |
|                  | (3) TGS_REQ: TGT + Auth_c  |
|                  +----------------------------+
|                  |
|                  |<---------------------------+
|    CLIENT (C)    | (4) TGS_REP: K_{c,v} + ST
|                  |
|                  | (5) AP_REQ: ST + Auth_c
|                  +----------------------------+
|                  |                            |
|                  |<---------------------------+
|                  | (6) AP_REP: Mutual Auth    |
+------------------+                            v
                                  +---------------------------+
                                  |   APPLICATION SERVER (V)  |
                                  +---------------------------+

3. Detailed Operational Activities & Processing Phases

4. Summary Comparison & Specification Parameters

Token Encrypted Under Contents Security Role
Ticket-Granting Ticket (TGT) $K_{tgs}$ (TGS Secret Key) Client ID, $K_{c,tgs}$, IP, Lifetime Authorizes client to request service tickets without re-prompting password
Service Ticket (ST) $K_v$ (Server Secret Key) Client ID, $K_{c,v}$, IP, Lifetime Authorizes client access to designated network application server $V$
Authenticator Session Key ($K_{c,tgs}$ or $K_{c,v}$) Client ID, Current Timestamp Proves ticket bearer possesses session key; defeats replay attacks
Mutual Auth Reply $K_{c,v}$ (Service Session Key) Timestamp + 1 Proves to client that server legitimately decrypted the Service Ticket

Model Question Paper – 2

Q17. Use the Extended Euclidean Algorithm to express gcd(81, 57) as a linear combination of 81 and 57.

1. Mathematical Foundations & Bézout's Identity

The Extended Euclidean Algorithm is an extension of the classical Euclidean division algorithm. In addition to calculating the Greatest Common Divisor (gcd(a, b)) of two positive integers a and b, it computes integers x and y satisfying Bézout's Identity: a × x + b × y = gcd(a, b). In modern asymmetric cryptography, this algorithm is fundamental for computing modular multiplicative inverses during key generation (such as calculating the RSA private key exponent d ≡ e-1 (mod φ(n))).

2. Forward Euclidean Division Sequence

Forward Division Steps:
Step 1:  81 = 57 * 1 + 24    ==>  Quotient q1 = 1, Remainder r1 = 24
Step 2:  57 = 24 * 2 + 9     ==>  Quotient q2 = 2, Remainder r2 = 9
Step 3:  24 =  9 * 2 + 6     ==>  Quotient q3 = 2, Remainder r3 = 6
Step 4:   9 =  6 * 1 + 3     ==>  Quotient q4 = 1, Remainder r4 = 3
Step 5:   6 =  3 * 2 + 0     ==>  Quotient q5 = 2, Remainder r5 = 0

Last non-zero remainder: r4 = 3  ==>  gcd(81, 57) = 3

3. Backtracking & Back-Substitution Derivation

To express gcd(81, 57) = 3 as a linear combination of 81 and 57, we perform systematic back-substitution starting from Step 4:

Rearranging into standard linear combination form gives:

gcd(81, 57) = 3 = 81(-7) + 57(10)

Thus, the Bézout coefficients are x = -7 and y = 10.

4. Extended Euclidean Tableau & Verification

Index (i) Quotient (qi) Remainder (ri) Coefficient (si) Coefficient (ti) Linear Combination: 81si + 57ti
0 — 81 1 0 81(1) + 57(0) = 81
1 — 57 0 1 81(0) + 57(1) = 57
2 1 24 1 -1 81(1) + 57(-1) = 24
3 2 9 -2 3 81(-2) + 57(3) = 9
4 2 6 5 -7 81(5) + 57(-7) = 6
5 1 3 -7 10 81(-7) + 57(10) = 3
6 2 0 19 -27 81(19) + 57(-27) = 0

Verification Check: 81(-7) + 57(10) = -567 + 570 = 3. The linear combination holds with exact mathematical equality.


Q18. Explain the five major security services defined in the X.800 Security Architecture.

1. Core Concept & Architectural Model

The ITU-T Recommendation X.800 (Security Architecture for OSI) defines a systematic, international framework for identifying security requirements and selecting protocols in networked environments. Under X.800, a security service is a processing or communication capability provided by a protocol layer of an open system to ensure adequate security of systems and data transfers. X.800 formally defines five essential categories of security services.

2. X.800 Security Services Taxonomy Diagram

+-----------------------------------------------------------------------+
|                 ITU-T X.800 OSI SECURITY SERVICES TAXONOMY            |
+-----------------------------------------------------------------------+
                                    |
          +-------------------------+-------------------------+
          |                         |                         |
+---------v---------+     +---------v---------+     +---------v---------+
| 1. AUTHENTICATION |     | 2. ACCESS CONTROL |     | 3. CONFIDENTIALITY|
| - Peer Entity     |     | - Prevent         |     | - Connection      |
| - Data Origin     |     |   Unauthorized    |     | - Connectionless  |
+---------+---------+     |   Resource Use    |     | - Selective Field |
          |               +---------+---------+     | - Traffic Flow    |
          |                         |               +---------+---------+
+---------v---------+     +---------v---------+               |
| 4. DATA INTEGRITY |     | 5. NON-REPUDIATION|               |
| - With Recovery   |     | - Proof of Origin |               |
| - Without Recov.  |     | - Proof of Deliv. |<--------------+
+-------------------+     +-------------------+

3. Detailed Analysis of the Five Security Services

4. Summary Specification & Mapping Table

Security Service Primary Objective Enabling Cryptographic Mechanism Representative Protocol
Authentication Confirm entity and message identity Digital signatures, authentication exchanges, nonces TLS Handshake, Kerberos
Access Control Prevent unauthorized resource access Access control lists, tokens, firewalls RADIUS, IEEE 802.1X
Data Confidentiality Prevent passive eavesdropping Symmetric / asymmetric encipherment, padding AES in TLS 1.3, IPsec ESP
Data Integrity Detect unauthorized data modification Cryptographic hash functions, HMACs IPsec AH, SHA-256
Non-Repudiation Prevent denial of transmission/receipt Digital signatures, trusted timestamping/notarization X.509 PKI, PGP / S/MIME

Q19. Explain the Playfair Cipher and encrypt the plaintext BALLOON using the given key matrix.

1. Core Concept & Operating Principles

Invented by Charles Wheatstone in 1854 and popularized by Lyon Playfair, the Playfair Cipher is a classical polygraphic digraphic substitution cipher. Unlike monoalphabetic ciphers that substitute single letters individually, Playfair encrypts pairs of letters (digraphs) simultaneously using a 5×5 grid formed by a keyword. This digraphic substitution expands the alphabet space from 26 letters to 26 × 26 = 676 possible pairs, greatly flattening single-letter frequency distribution. By convention, I and J share a single cell.

2. Key Matrix Layout & Digraph Preparation

The given 5×5 key matrix constructed with keyword MONARCHY is:

       Col 1   Col 2   Col 3   Col 4   Col 5
Row 1:   M       O       N       A       R
Row 2:   C       H       Y       B       D
Row 3:   E       F       G      I/J      K
Row 4:   L       P       Q       S       T
Row 5:   U       V       W       X       Z

Digraph Preparation Rules:

3. Step-by-Step Digraph Encryption Walkthrough

Applying the standard Playfair transformation rules to each digraph:

Concatenating the ciphertext digraphs:

Ciphertext: IB + US + MP + NA = IBUSMPNA

4. Decryption Procedure & Summary Mapping Table

Decryption reverses each transformation: shift upward for same column, shift leftward for same row, and reverse corner coordinates for rectangles:

Reconstructed text: BALXLOON. Dropping the filler letter X between identical letters recovers the original plaintext: BALLOON.

Digraph Pair Geometric Rule Coordinates (Row, Col) Ciphertext Output
BA Same Column (Col 4) (2,4) and (1,4) → shift down IB
LX Rectangle Rule (4,1) and (5,4) → opposite corners US
LO Rectangle Rule (4,1) and (1,2) → opposite corners MP
ON Same Row (Row 1) (1,2) and (1,3) → shift right NA

Q20. Explain the working procedure of the Miller–Rabin Primality Test.

1. Core Concept & Mathematical Basis

The Miller–Rabin Primality Test is a randomized, probabilistic primality testing algorithm essential for generating large prime numbers in public-key cryptosystems (such as RSA and Diffie–Hellman). It relies on two foundational number-theoretic principles: Fermat's Little Theorem (an-1 ≡ 1 (mod n) for prime n) and the fact that in a prime field ℤn, the only square roots of 1 modulo n are 1 and -1 ≡ n - 1. If any non-trivial square root of 1 is discovered, n is unconditionally composite.

2. Algorithmic Logic & Verification Flowchart

                      +-----------------------------+
                      |   Input: Odd integer n > 2  |
                      |   Decompose: n - 1 = 2^k * m|
                      +--------------+--------------+
                                     |
                                     v
                      +-----------------------------+
                      | Pick random base a in [2,n-2|
                      | Compute x = a^m mod n       |
                      +--------------+--------------+
                                     |
                         +-----------+-----------+
                         | x == 1 or x == n - 1 ?|
                         +-----+-----------+-----+
                            YES|           |NO
                               v           v
                     +-------------+  +-------------------------+
                     | Round PASS  |  | Loop r = 1 to k-1:      |
                     | (Probably   |  |   x = x^2 mod n         |
                     |    Prime)   |  |   if x == n - 1 -> PASS |
                     +-------------+  |   if x == 1   -> COMPOS.
                                      +------------+------------+
                                                   |
                                      +------------v------------+
                                      | Reached end without n-1 |
                                      | Return: DEFINITELY      |
                                      |         COMPOSITE       |
                                      +-------------------------+

3. Detailed Algorithmic Steps & Working Procedure

4. Numerical Example & Comparative Summary Table

Example: Test n = 61 with base a = 2:
Decompose: 61 - 1 = 60 = 22 × 15 &implies; k = 2, m = 15.
Compute: x = 215 (mod 61). Since 26 = 64 ≡ 3, 212 ≡ 9, 215 = 9 × 8 = 72 ≡ 11 (mod 61).
Next square: x = 112 = 121 ≡ 60 ≡ -1 ≡ n - 1 (mod 61).
Since x ≡ n - 1, n = 61 passes the test and is certified probably prime.

Evaluation Metric Miller–Rabin Primality Test Fermat Primality Test
Core Foundation Fermat's Theorem + Non-trivial square roots of 1 Fermat's Little Theorem alone (an-1 ≡ 1)
Carmichael Numbers Immune: reliably detects all Carmichael composites Fails completely: Carmichael numbers pass all coprime bases
Worst-Case Error Bound At most (1/4)t for t rounds Can approach 1 for Carmichael numbers
Time Complexity O(t × log3 n) bit operations O(t × log3 n) bit operations

Q21. Explain the ElGamal cryptosystem with its key generation, encryption and decryption procedures.

1. Core Concept & Mathematical Security Basis

Formulated by Taher Elgamal in 1985, the ElGamal Cryptosystem is an asymmetric public-key encryption scheme based on the Diffie–Hellman key exchange principle. Its mathematical security relies on the intractability of the Discrete Logarithm Problem (DLP) in finite cyclic groups: given a large prime p, a generator α, and y ≡ αx (mod p), it is computationally infeasible to compute private key x = logα y. ElGamal is a probabilistic cryptosystem: encrypting identical plaintexts produces completely different ciphertexts due to an ephemeral random key k.

2. ElGamal Architectural Flowchart

      Alice (Receiver)                                Bob (Sender)
   +--------------------+                          +--------------------+
   | 1. Key Generation  |                          | 2. Encryption      |
   | - Prime p, gen α   |                          | - Plaintext M < p  |
   | - Private key: x   |                          | - Ephemeral key: k |
   | - Public: y=α^x%p  |                          | - c1 = α^k mod p   |
   | - Publish (p, α, y)|---------(p, α, y)------->| - K  = y^k mod p   |
   +--------------------+                          | - c2 = (M * K) % p |
                                                   +---------+----------+
                                                             |
   +--------------------+                                    |
   | 3. Decryption      |<------- Ciphertext (c1, c2)--------+
   | - K = (c1)^x mod p |
   | - K^-1 mod p       |
   | - M = (c2*K^-1)%p  |
   +--------------------+

3. Formal Mathematical Procedures

4. Numerical Example & Cryptographic Characteristics Table

Example: Let p = 11, α = 2. Private key x = 3 &implies; y = 23 (mod 11) = 8. Public key is (11, 2, 8).
• Encrypt: Plaintext M = 5, choose ephemeral k = 4.
c1 = 24 (mod 11) = 16 ≡ 5 (mod 11).
K = 84 (mod 11) = 4096 ≡ 4 (mod 11).
c2 = (5 × 4) (mod 11) = 20 ≡ 9 (mod 11). Ciphertext is (c1, c2) = (5, 9).
• Decrypt: K = 53 (mod 11) = 125 ≡ 4 (mod 11). Inverse 4-1 (mod 11) = 3 (since 4 × 3 = 12 ≡ 1).
M = (9 × 3) (mod 11) = 27 ≡ 5 (mod 11). Plaintext 5 is recovered exactly.

Characteristic ElGamal Cryptosystem RSA Cryptosystem
Hardness Problem Discrete Logarithm Problem (DLP) Integer Factorization Problem (IFP)
Ciphertext Expansion 2× Expansion: 2 ciphertext integers (c1, c2) per block 1× Expansion: 1 ciphertext integer per block
Cipher Nature Randomized / Probabilistic (ephemeral k) Deterministic (requires OAEP padding)
Ephemeral Key Hazard Reusing k completely compromises plaintext No ephemeral key in standard RSA

Q22. Explain the RSA Digital Signature Scheme with signing and verification procedures.

1. Core Concept & Dual Trapdoor Architecture

The RSA Digital Signature Scheme is an asymmetric cryptographic mechanism providing authenticity, data integrity, and non-repudiation. Built on the mathematical foundations of the RSA algorithm, it inverts the traditional encryption paradigm: only the private key holder can create a signature, whereas any party holding the signer's public key can verify its validity. Under the modern Hash-then-Sign paradigm, the signer signs a fixed-length cryptographic hash digest h = H(M) rather than the raw message, eliminating existential forgery and ensuring computational efficiency.

2. RSA Signature Signing & Verification Flowchart

Signer (Alice)                                        Verifier (Bob)
+-------------------------+                           +-------------------------+
| Message M               |                           | Received (M, S)         |
+------------+------------+                           +----+---------------+----+
             |                                             |               |
             v                                             v               v
    [ Cryptographic Hash ]                         [ Same Hash H ]  [ RSA Verification ]
        h = H(M)                                       h' = H(M)    h_rec = S^e mod n
             |                                             |               |
             v                                             |               |
    [ RSA Signing Op ]                                     |               |
    S = h^d mod n                                          v               v
             |                                     +-------------------------------+
             v                                     | Compare: h' == h_rec ?        |
    Transmit (M, S) ------------------------------>|  YES: Signature ACCEPTED      |
                                                   |  NO:  Signature REJECTED      |
                                                   +-------------------------------+

3. Formal Mathematical Procedures

4. Security Dimensions & Standards Comparison Table

Raw ("textbook") RSA signatures are vulnerable to mathematical attacks such as multiplicative forgery (where S1 × S2 = (M1 × M2)d). Modern implementations mandate RSA-PSS (Probabilistic Signature Scheme, PKCS#1 v2.2), which adds randomized salt and masking to achieve provable cryptographic security.

Security Dimension Textbook RSA Signature Standard RSA-PSS (RFC 8017)
Input Formulation Raw unpadded message / digest Cryptographic hash with randomized salt & mask
Homomorphic Attack Vulnerable to algebraic manipulation Provably secure: immune to chosen-message forgery
Verification Speed Fast (small public exponent e = 65537) Fast (small public exponent e = 65537)
Standard Deployment Insecure / Deprecated Industry standard in TLS 1.3, S/MIME, X.509 PKI

Q23. Explain the TLS Handshake Protocol with a neat diagram.

1. Core Concept & Architectural Role

The Transport Layer Security (TLS) Handshake Protocol (RFC 5246 / RFC 8446) is the primary control protocol in the TLS framework, executing above TCP before any application data is transferred. It is responsible for three core security objectives: algorithm negotiation (agreeing on protocol version and Cipher Suite), mutual or server authentication (validating X.509 public-key certificates), and secure key establishment (generating shared session secrets while resisting eavesdropping and man-in-the-middle attacks).

2. TLS Handshake Protocol Message Flow Diagram

Client                                                              Server
  |                                                                   |
  | --------------------- 1. ClientHello ---------------------------> | Phase 1:
  |                                                                   | Capabilities
  | <-------------------- 2. ServerHello ---------------------------- | Negotiation
  | <-------------------- 3. Certificate ---------------------------- |
  | <-------------------- 4. ServerKeyExchange (Optional) ----------- | Phase 2:
  | <-------------------- 5. CertificateRequest (Optional) ---------- | Server Auth &
  | <-------------------- 6. ServerHelloDone ------------------------ | Key Exchange
  |                                                                   |
  | --------------------- 7. Certificate (Optional) ----------------> |
  | --------------------- 8. ClientKeyExchange ---------------------> | Phase 3:
  | --------------------- 9. CertificateVerify (Optional) ----------> | Client Auth &
  | -------------------- 10. ChangeCipherSpec ----------------------> | Pre-Master Secret
  | -------------------- 11. Finished (Encrypted) ------------------> |
  |                                                                   |
  | <------------------- 12. ChangeCipherSpec ----------------------- | Phase 4:
  | <------------------- 13. Finished (Encrypted) ------------------- | Switch to Encrypted
  |                                                                   | Session
  |<=================== Secure Application Data Flow ================>|

3. Four-Phase Detailed Handshake Activities

4. Summary Specification & Parameter Mapping Table

Handshake Phase Primary Messages Exchanged Cryptographic Objective Generated Parameter
Phase 1: Capabilities ClientHello, ServerHello Cipher suite & protocol version negotiation ClientRandom, ServerRandom
Phase 2: Server Auth Certificate, ServerKeyExchange, ServerHelloDone Authenticate server identity & provide DH parameters Server public key, Server DH parameters
Phase 3: Client Key ClientKeyExchange, ChangeCipherSpec, Finished Deliver Pre-Master Secret (PMS) & verify key derivation Pre-Master Secret (PMS), Client Handshake Hash
Phase 4: Completion ChangeCipherSpec, Finished Switch to symmetric authenticated encryption Master Secret (MS), Symmetric Session Keys

Model Question Paper – 3

Q17. Find the inverse of the matrix [[3, 3], [2, 5]] modulo 26. (8 Marks)

1. Core Concept & Invertibility Criterion

In modular matrix arithmetic and polygraphic ciphers (such as the Hill Cipher), computing the modular inverse of a key matrix M modulo 26 is required to decrypt ciphertext blocks into plaintext (P = C · M-1 mod 26).

For a 2 × 2 matrix M = [[a, b], [c, d]], the modular inverse M-1 exists if and only if:

The matrix inverse formula is: M-1 = det(M)-1 · adj(M) mod 26, where adj(M) = [[d, −b], [−c, a]] mod 26.

2. Systematic Inversion & Verification Workflow
Given Matrix M = [[3, 3], [2, 5]]
                 |
                 v
[Step 1: Compute Determinant] -----> det(M) = (3*5) - (3*2) = 15 - 6 = 9
                 |
                 v
[Step 2: Test Invertibility] ------> gcd(9, 26) = 1 (Coprime, Inverse Exists)
                 |
                 v
[Step 3: Multiplicative Inverse] --> 9 * d = 1 (mod 26)  ==>  det(M)^-1 = 3
                 |
                 v
[Step 4: Formulate Adjugate] ------> adj(M) = [[5, -3], [-2, 3]] = [[5, 23], [24, 3]] (mod 26)
                 |
                 v
[Step 5: Scalar Modulo Product] ---> M^-1 = 3 * adj(M) = [[15, 69], [72, 9]] = [[15, 17], [20, 9]] (mod 26)
                 |
                 v
[Step 6: Mathematical Proof] ------> M * M^-1 = [[105, 78], [130, 79]] = [[1, 0], [0, 1]] = I (mod 26)
3. Step-by-Step Computational Execution
4. Summary of Computational Stages
Calculation Stage Mathematical Formula Intermediate Value Modulo 26 Result Cryptographic Role
Determinant det(M) ad − bc = (3)(5) − (3)(2) 15 − 6 = 9 9 Validates non-singularity
Coprimality Test gcd(det(M), 26) gcd(9, 26) 1 Confirms matrix is invertible in ℤ26
Modular Inverse det-1 9 · x ≡ 1 mod 26 Extended Euclid 3 Scalar factor for adjugate matrix
Adjugate Matrix adj(M) [[d, −b], [−c, a]] [[5, −3], [−2, 3]] [[5, 23], [24, 3]] Transpose of cofactor matrix
Inverse Matrix M-1 det-1 · adj(M) [[15, 69], [72, 9]] [[15, 17], [20, 9]] Decryption key for Hill cipher blocks
Identity Verification M · M-1 mod 26 [[105, 78], [130, 79]] [[1, 0], [0, 1]] Confirms exact decipherability

Q18. Explain the different types of active attacks with suitable examples. (8 Marks)

1. Core Threat Concept & Taxonomy

In network security architecture (formalized under ITU-T Recommendation X.800 and RFC 4949), security threats are categorized into Passive Attacks and Active Attacks based on their interaction with communications channels and system resources:

2. Architecture & Modus Operandi of Active Attacks
+-----------------------------------------------------------------------------------+
|                        Taxonomy of Active Network Attacks                         |
+-----------------------------------------------------------------------------------+
|  1. Masquerade (Identity Spoofing)                                                |
|     [Attacker Eve] ======(Forged Credentials / IP)======> [Target Server]         |
|     (Eve fraudulently adopts Alice's privileged identity to gain unauthorized access) |
|                                                                                   |
|  2. Replay Attack                                                                 |
|     [Alice] ---(Auth Token)---> [Eve Intercepts & Stores]                         |
|                                       |                                           |
|                                       +====(Retransmit Token Later)===> [Bank]    |
|                                                                                   |
|  3. Modification of Messages                                                      |
|     [Alice] ----("Pay $100 to Bob")----> [Eve Alters]                            |
|                                                |                                  |
|                                                +----("Pay $10,000 to Eve")--> [Bank]
|                                                                                   |
|  4. Denial of Service (DoS / DDoS)                                                |
|     [Botnet Zombies] ======(SYN Flood / Volumetric Traffic)======> [Target Host]  |
|     (Target server buffers saturate; legitimate service requests are dropped)     |
+-----------------------------------------------------------------------------------+
3. Detailed Dimensions & Practical Real-World Examples
4. Active Attack Classification & Mitigation Matrix
Attack Category Compromised Goal Modus Operandi Real-World Scenario Primary Countermeasure
Masquerade Authenticity & Access Control Faking credentials, ARP/IP headers, or tokens IP spoofing to bypass perimeter firewall access lists Multi-Factor Authentication (MFA), Mutual TLS, 802.1X
Replay Attack Integrity & Freshness Sniffing valid auth packets and retransmitting later Retransmitting captured e-banking fund transfer packets Cryptographic Nonces, Session Timestamps, Sequence Numbers
Modification Data Integrity & Authenticity Splicing, altering, or delaying payload data Man-in-the-Middle alteration of transaction values Hash-based Message Authentication Codes (HMAC), Digital Signatures
Denial of Service System Availability Flooding system resources, buffers, or bandwidth TCP SYN Flooding or DNS Amplification DDoS attack SYN Cookies, Rate Limiting, Anycast Scrubbing Centers, WAF

Q19. Explain the Vigenère Cipher. Encrypt the plaintext DATASECURE using the keyword MATH and decrypt the resulting ciphertext. (8 Marks)

1. Core Concept & Theoretical Foundations

The Vigenère Cipher, formulated by Giovan Battista Bellaso in 1553 and later attributed to Blaise de Vigenère, is a classic polyalphabetic substitution cipher:

2. Keystream Expansion & Architectural Flow
Plaintext Block (L = 10)  :  D   A   T   A   S   E   C   U   R   E
Plaintext Numeric (0..25) :  3   0  19   0  18   4   2  20  17   4
                             +   +   +   +   +   +   +   +   +   +
Repeating Key "MATH"      :  M   A   T   H   M   A   T   H   M   A
Key Numeric (0..25)       : 12   0  19   7  12   0  19   7  12   0
                             =   =   =   =   =   =   =   =   =   =
Sum Modulo 26             : 15   0  12   7   4   4  21   1   3   4
Ciphertext Letters        :  P   A   M   H   E   E   V   B   D   E
3. Step-by-Step Computational Encryption & Decryption

Given Plaintext P = DATASECURE (length N = 10), Keyword K = MATH (length m = 4). Repeating keyword generates keystream: MATHMATHMA.

Encryption Process (Ci = (Pi + Ki) mod 26):

Generated Ciphertext: PAMHEEVBDE

Decryption Process (Pi = (Ci − Ki + 26) mod 26):

Recovered Plaintext: DATASECURE

4. Cryptographic Execution & Verification Table
Index i Plaintext Pi Pi Val Key Ki Ki Val Encryption (Pi + Ki) mod 26 Ciphertext Ci Decryption (Ci − Ki + 26) mod 26 Recovered Pi
0 D 3 M 12 (3 + 12) = 15 P (15 − 12) = 3 D
1 A 0 A 0 (0 + 0) = 0 A (0 − 0) = 0 A
2 T 19 T 19 (19 + 19) mod 26 = 12 M (12 − 19 + 26) = 19 T
3 A 0 H 7 (0 + 7) = 7 H (7 − 7) = 0 A
4 S 18 M 12 (18 + 12) mod 26 = 4 E (4 − 12 + 26) = 18 S
5 E 4 A 0 (4 + 0) = 4 E (4 − 0) = 4 E
6 C 2 T 19 (2 + 19) = 21 V (21 − 19) = 2 C
7 U 20 H 7 (20 + 7) mod 26 = 1 B (1 − 7 + 26) = 20 U
8 R 17 M 12 (17 + 12) mod 26 = 3 D (3 − 12 + 26) = 17 R
9 E 4 A 0 (4 + 0) = 4 E (4 − 0) = 4 E

Cryptanalytic Note: Although historically considered unbreakable (le chiffre indéchiffrable), Charles Babbage and Friedrich Kasiski (1863) cracked Vigenère by identifying repeated ciphertext n-grams to deduce keyword length m, reducing it to m monoalphabetic Caesar ciphers solved via frequency analysis. William Friedman later formalized key-length deduction using the Index of Coincidence (IC).


Q20. Explain the Feistel Cipher Structure with a neat diagram. Perform one Feistel round for input block 1010 0110, round key 0011 and function F(R, K) = R XOR K. (8 Marks)

1. Core Concept & Design Principles

The Feistel Cipher Structure, designed by IBM cryptographer Horst Feistel in the early 1970s (originating in Lucifer and standardized in DES), is an architectural framework for designing symmetric block ciphers:

2. Architecture & Feistel Round Diagram
                     Input Block (2w bits)
                               |
                      +--------+--------+
                      |                 |
                      v                 v
               Left Half L_{i-1}   Right Half R_{i-1}
                      |                 |
                      |                 |--------+
                      |                 |        |
                      |                 v        v
                      |              +--------------+
                      |              | Round Fxn F  | <--- Round Key K_i
                      |              |   F(R, K)    |
                      |              +--------------+
                      |                     |
                      v                     |
                    ( + ) <-----------------+  (Bitwise XOR)
                      |
                      |                     |
                      +----------+----------+
                                 | (Cross Swap)
                                 x
                      +----------+----------+
                      |                     |
                      v                     v
                   L_i = R_{i-1}         R_i = L_{i-1} XOR F(R_{i-1}, K_i)
3. Execution of One Feistel Round

Input Parameters: Input Block = 1010 0110 (8 bits total); Left Half L0 = 1010, Right Half R0 = 0110; Round Subkey K1 = 0011; Round Function F(R, K) = R ⊕ K.

Step-by-Step Computational Round Execution:

4. Feistel Structural Parameters & Design Trade-offs Table
Design Parameter Cryptographic Significance Standard Practical Value (e.g., DES) Impact on Security and Performance
Block Size (2w) Granularity of data processed per cycle 64 bits (DES), 128 bits (Twofish) Larger block sizes prevent codebook and birthday attacks, slightly slowing execution.
Key Size Cryptographic strength against brute force 56 bits (DES), 128/256 bits (Modern) Larger key size increases work factor (2k) to prevent exhaustive search attacks.
Number of Rounds (n) Multiplicity of confusion/diffusion iterations 16 rounds (DES), 16–32 rounds (Blowfish) More rounds resist differential and linear cryptanalysis; 16 rounds is standard.
Subkey Generation Key scheduling complexity 48-bit subkeys generated per round Highly complex key schedules increase resistance against slide and related-key attacks.
Round Function F Engine of non-linearity and bit permutation S-boxes + P-boxes Greater complexity and avalanche properties yield higher cryptanalytic resistance.
Symmetric HW/SW Execution efficiency across hardware/software Identical encryption/decryption logic Minimizes gate count on VLSI chips and instruction footprint in software.

Q21. Explain the basic working of Elliptic Curve Cryptography (ECC) with a neat diagram. (8 Marks)

1. Core Concept & Mathematical Basis

Elliptic Curve Cryptography (ECC), proposed independently by Neal Koblitz and Victor S. Miller in 1985, is an advanced public-key cryptosystem based on the algebraic structure of elliptic curves defined over finite fields:

2. Geometric Point Arithmetic & Curve Diagram
                     y ^
                       |          .---.
                       |         /     \   Curve: y^2 = x^3 + ax + b
                       |        /       \
                     P *-------/---------\------------------ Secant Line through P, Q
                       | \    /           \
                       |  \  /             \
                       |   \/               * Q
     ------------------+----+----------------\------------------> x
                       |     \                \
                       |      \                * -R (Third intersection point)
                       |       \               |
                       |        \              | (Vertical Reflection across x-axis)
                       |         \             v
                       |          \            * R = P + Q
                       |           '---'
3. Cryptographic Operations: Key Generation & ECDH Key Exchange
4. Security & Performance Comparison: ECC vs RSA
Feature Dimension Elliptic Curve Cryptography (ECC) Rivest-Shamir-Adleman (RSA) Architectural Advantage of ECC
Mathematical Problem Elliptic Curve Discrete Logarithm (ECDLP) Integer Factorization Problem (IFP) ECDLP has no sub-exponential attack algorithms
NIST Equivalent Key Size 256 bits 3072 bits 12x reduction in key length for identical security
High Security Key Size 384 bits 7680 bits 20x key size savings at ultra-high security levels
Computational Overhead Low processing power; fast scalar ops High processing power; large modular exp Ideal for constrained IoT, smartcards, and mobile
Bandwidth & Storage Extremely compact signatures and keys Large certificates, signatures, and keys Reduces network payload and handshake latency
Power Consumption Minimal battery drain Significant battery and CPU utilization Essential for battery-operated wireless devices

Q22. Explain the working and organisation of PGP Key Rings. (8 Marks)

1. Core Concept of PGP & Decentralized Key Management

Pretty Good Privacy (PGP), created by Phil Zimmermann in 1991 and standardized by the IETF under RFC 4880 (OpenPGP), is a hybrid cryptosystem providing end-to-end confidentiality, data integrity, non-repudiation, and authentication for email and file storage:

2. Structural Schema & Organisation of PGP Key Rings
+---------------------------------------------------------------------------------------------------+
|                                     PGP PRIVATE KEY RING                                          |
+---------------------+-------------+------------------+-----------------------------+--------------+
| Timestamp           | Key ID      | Public Key       | Encrypted Private Key       | User ID      |
| (Creation Date/Time)| (Low 64-bit)| (RSA/DSA/ECDSA)  | (Symmetric Encrypted via PW)| (Name & Mail)|
+---------------------+-------------+------------------+-----------------------------+--------------+

+---------------------------------------------------------------------------------------------------+
|                                      PGP PUBLIC KEY RING                                          |
+-------------+--------+------------+-------------+---------+---------------+-------------+---------+
| Timestamp   | Key ID | Public Key | Owner Trust | User ID | Key Signatures| Sig Trust   | Key Leg |
| (Entry date)| (64-bit|(Public Key | (Assigned by|(Email & | (Certifying   | (Trust in   | (Trust  |
|             | of Pub)| parameters)| local user) | Name)   | signatures)   | signer)     | Score)  |
+-------------+--------+------------+-------------+---------+---------------+-------------+---------+
3. Field Specifications & Internal Working Mechanics
4. Operational Message Workflow & Key Ring Comparison
Architectural Dimension PGP Private Key Ring PGP Public Key Ring
Purpose Stores local user's own key pairs Stores public keys of communicating associates
Confidentiality Level High sensitivity; private keys are passphrase-encrypted Public data; keys are unencrypted and shareable
Trust Evaluation Not applicable (local owner is implicitly trusted) Dynamic calculation of Key Legitimacy via Web of Trust
Lookup Mechanism Indexed by 64-bit Key ID to decrypt incoming session keys Indexed by User ID or Key ID to encrypt and verify
Database Operations Rare additions (only when generating new key pairs) Frequent additions (importing contacts' public keys)

Q23. Explain IPSec Transport Mode and Tunnel Mode with neat diagrams. (8 Marks)

1. Core Concept & IPsec Architectural Framework

Standardized by the IETF in RFC 4301, Internet Protocol Security (IPsec) is a comprehensive suite of cryptographic protocols operating at the Network Layer (OSI Layer 3) of the TCP/IP protocol stack:

2. Transport Mode Architecture & Packet Format
Original IP Packet:
+-------------------+----------------------+---------------------------+
| Original IP Header| Transport Header     | Application Data Payload  |
| (Src: A, Dst: B)  | (TCP / UDP)          |                           |
+-------------------+----------------------+---------------------------+

ESP Transport Mode Packet:
+-------------------+------------+-------------------+-----------------+-------------+-----------+
| Original IP Header| ESP Header | TCP / UDP Header  | Application Data| ESP Trailer | ESP Auth  |
+-------------------+------------+-------------------+-----------------+-------------+-----------+
                    |<- SPI, Seq |<------------- ENCRYPTED ----------->| Pad, NextHdr|<-- MAC ---|
                    |<---------------------- AUTHENTICATED ------------------------->|
3. Tunnel Mode Architecture & Packet Format
ESP Tunnel Mode Packet:
+---------------+------------+-------------------+------------+-----------------+-------------+-----------+
| New IP Header | ESP Header | Original IP Header| TCP Header | Application Data| ESP Trailer | ESP Auth  |
| (GateA->GateB)| (SPI, Seq) | (HostA -> HostB)  | (Port)     | (Payload)       |             | (MAC/ICV) |
+---------------+------------+-------------------+------------+-----------------+-------------+-----------+
                             |<---------------------- ENCRYPTED ---------------->|
                |<------------------------------- AUTHENTICATED ---------------->|
4. Comprehensive Architectural Comparison Matrix
Evaluation Dimension IPsec Transport Mode IPsec Tunnel Mode
Typical Deployment End-to-end host-to-host communications Site-to-site VPNs & Remote access client-to-gateway
Protected Portion Upper-layer payload only (TCP/UDP + Data) Entire original IP packet (Header + Payload)
IP Header Handling Preserves original IP header intact Encapsulates original header; adds New Outer IP Header
IP Address Privacy None; source & destination IPs exposed to routers High; internal IP addresses hidden behind gateway IPs
Packet Overhead Minimal (only ESP header, trailer, and ICV added) Higher (adds 20-byte New IP Header plus ESP fields)
Host Configuration Every participating host must run IPsec software Executed entirely by boundary security gateways
NAT Traversal (NAT-T) Challenging; original TCP/IP checksums break Handled seamlessly via UDP encapsulation (port 4500)
Processing Overhead Lower CPU overhead on endpoints Centralized cryptographic processing on VPN gateways

Model Question Paper – 4

Q17. Find the particular solution and general solution of the linear Diophantine equation: 21x + 14y = 35.

1. Solvability Criterion

A linear Diophantine equation ax + by = c with integer coefficients has integer solutions if and only if d = gcd(a, b) divides c (d | c).

For 21x + 14y = 35, we compute gcd(21, 14) via Euclidean algorithm:

21 = 1 × 14 + 7
14 = 2 × 7 + 0  ⇒  d = gcd(21, 14) = 7

Since 35 / 7 = 5, 7 | 35 holds true. Thus, the equation possesses infinitely many integer solutions.

2. Particular Solution Derivation

Dividing by d = 7 yields coprime equation 3x + 2y = 5, where gcd(3, 2) = 1. Extended Euclidean Algorithm gives: 3(1) + 2(-1) = 1. Multiplying by 5 gives 3(5) + 2(-5) = 5. By inspection, setting x = 1 yields 3(1) + 2(1) = 5.

3. General Solution Formulation

For 3x + 2y = 5 and base solution (1, 1), the general solution for parameter t ∈ ℤ is:

Proof: 21(1 + 2t) + 14(1 - 3t) = 21 + 42t + 14 - 42t = 35. Parameter t cancels identically, confirming all integer pairs are valid solutions.

4. Solution Space Matrix
Parameter x = 1 + 2t y = 1 - 3t Evaluation: 21x + 14y
t = -1 -1 4 21(-1) + 14(4) = 35
t = 0 1 1 21(1) + 14(1) = 35 (Base Solution)
t = 1 3 -2 21(3) + 14(-2) = 35
t = 2 5 -5 21(5) + 14(-5) = 35

Q18. Find the inverse of the matrix A = [[2, 1], [1, 1]] and verify the result.

1. Invertibility Criterion

A square matrix A has a multiplicative inverse A-1 if and only if its determinant is non-zero (det(A) ≠ 0). When det(A) = 1, the matrix is unimodular, ensuring its inverse contains purely integer entries without modular fraction division.

A = [ [2, 1],
      [1, 1] ]

Determinant Calculation: det(A) = (ad - bc) = (2 × 1) - (1 × 1) = 2 - 1 = 1. Since det(A) = 1 ≠ 0, matrix A is non-singular and strictly invertible across ℝ, ℤ, and ℤ26.

2. Inverse Matrix Derivation

By classical matrix inversion theory: A-1 = (1 / det(A)) × adj(A). For a 2×2 matrix, the adjugate matrix swaps main diagonal elements and negates off-diagonal elements:

adj(A) = [ [ d, -b],
           [-c,  a] ] = [ [ 1, -1],
                          [-1,  2] ]

Substituting det(A) = 1: A-1 = (1 / 1) × [[1, -1], [-1, 2]] = [[1, -1], [-1, 2]].

3. Two-Sided Matrix Verification

Correctness requires confirming that both products yield identity matrix I2:

Both products strictly evaluate to I2, validating the calculated inverse.

4. Cryptographic Significance Matrix
Property Value Cryptographic Role
Determinant det(A) = 1 Unit determinant avoids fraction reduction; preserves discrete lattice volume.
Inverse Matrix [[1, -1], [-1, 2]] Acts as the exact decryption transformation in polygraphic block ciphers.
Modulo 26 Role gcd(1, 26) = 1 Invertible in Z26; enables Hill cipher decipherment without scaling factors.

Q19. Explain Two-Key and Three-Key Triple DES with neat diagrams.

1. Core Concept & Motivation

Triple DES (TDEA / 3DES, ANSI X9.52, NIST SP 800-67) was developed to remediate standard DES vulnerabilities caused by its 56-bit key space. Double DES was rejected because Diffie and Hellman proved it vulnerable to Meet-in-the-Middle (MitM) attacks, reducing security from 2112 to 257 operations.

To defeat MitM attacks while maintaining backward compatibility, 3DES uses an Encrypt-Decrypt-Encrypt (EDE) sequence:

2. Triple DES Architecture Diagrams
Two-Key Triple DES (EDE2 - 112 bits, Keys: K1, K2, K1):
P ──▶ [DES Encrypt K1] ──▶ [DES Decrypt K2] ──▶ [DES Encrypt K1] ──▶ C
C ──▶ [DES Decrypt K1] ──▶ [DES Encrypt K2] ──▶ [DES Decrypt K1] ──▶ P

Three-Key Triple DES (EDE3 - 168 bits, Keys: K1, K2, K3):
P ──▶ [DES Encrypt K1] ──▶ [DES Decrypt K2] ──▶ [DES Encrypt K3] ──▶ C
C ──▶ [DES Decrypt K3] ──▶ [DES Encrypt K2] ──▶ [DES Decrypt K1] ──▶ P
3. Keying Options & Security Characteristics
4. Specification Comparison Matrix
Parameter Single DES Two-Key 3DES (EDE2) Three-Key 3DES (EDE3) AES-128
Key Length 56 bits 112 bits 168 bits 128 bits
Effective Security 56 bits (Insecure) ~80 bits (Deprecated) 112 bits (Legacy) 128 bits (Secure)
Block Size 64 bits 64 bits 64 bits 128 bits
Internal Rounds 16 Feistel rounds 48 Feistel rounds 48 Feistel rounds 10 SPN rounds
NIST Status Withdrawn (1999) Deprecated (2015) Retired (2023) Active Standard

Q20. Explain the Hill Cipher. Encrypt the plaintext HI using key matrix [[3, 3], [2, 5]] and decrypt the resulting ciphertext.

1. Core Concept & Mathematical Formulation

Invented by Lester S. Hill in 1929, the Hill Cipher is a polygraphic substitution cipher that encrypts blocks of letters simultaneously using modular linear algebra over ℤ26. Letters are mapped using standard indexing: A = 0, B = 1, C = 2, …, Z = 25.

2. Key Matrix Inversion Modulo 26

Given key matrix K = [[3, 3], [2, 5]]. Evaluating determinant: det(K) = (3 × 5) - (3 × 2) = 15 - 6 = 9. Since gcd(9, 26) = 1, K is invertible in ℤ26. Finding modular multiplicative inverse of 9 modulo 26: 9d ≡ 1 (mod 26) ⇒ 9 × 3 = 27 = (1 × 26) + 1 ≡ 1 (mod 26) ⇒ det(K)-1 = 3 (mod 26).

adj(K) = [ [ 5, -3],
           [-2,  3] ] ≡ [ [ 5, 23],
                          [24,  3] ] (mod 26)

K^-1 = 3 × [ [ 5, 23],
              [24,  3] ] = [ [15, 69],
                             [72,  9] ] ≡ [ [15, 17],
                                            [20,  9] ] (mod 26)

Verification: K × K-1 = [[3, 3], [2, 5]] × [[15, 17], [20, 9]] = [[105, 78], [130, 79]] ≡ [[1, 0], [0, 1]] (mod 26).

3. Step-by-Step Encryption of Plaintext "HI"

Numerical mapping: H → 7, I → 8 ⇒ P = [[7], [8]].

C = (K × P) mod 26 = [ [3, 3],  ×  [ [7],
                       [2, 5] ]       [8] ] (mod 26)

c1 = (3 × 7) + (3 × 8) = 21 + 24 = 45 ≡ 45 - 26 = 19 (mod 26) → T
c2 = (2 × 7) + (5 × 8) = 14 + 40 = 54 ≡ 54 - 52 = 2  (mod 26) → C

Ciphertext Output: "TC".

4. Step-by-Step Decryption & Verification

Numerical mapping: T → 19, C → 2 ⇒ C = [[19], [2]].

P = (K^-1 × C) mod 26 = [ [15, 17],  ×  [ [19],
                          [20,  9] ]       [ 2] ] (mod 26)

p1 = (15 × 19) + (17 × 2) = 285 + 34 = 319 ≡ 319 - 312 = 7 (mod 26) → H
p2 = (20 × 19) + (9 × 2)  = 380 + 18 = 398 ≡ 398 - 390 = 8 (mod 26) → I

Recovered Plaintext: "HI" (exact polygraphic reconstruction verified).


Q21. Explain the Rabin cryptosystem with its key generation, encryption and decryption procedures.

1. Core Concept & Provable Security

Introduced by Michael O. Rabin in 1979, the Rabin cryptosystem is an asymmetric scheme based on modular squaring (quadratic residues). It is provably equivalent to integer factorization: solving c ≡ m2 (mod n) without prime factors is computationally identical to factoring n = pq. Unlike RSA, Rabin's factoring equivalence is mathematically proven. Encryption requires a single modular squaring, but decryption produces four ambiguous roots requiring disambiguation.

2. Architecture & Operational Flow
KeyGen: Primes p, q ≡ 3 (mod 4) ──▶ Public: n = pq, Private: (p, q)
Encryption: Message m (with redundancy) ──▶ c = m^2 mod n ──▶ Ciphertext c
Decryption: c ──▶ Roots mod p, q ──▶ Chinese Remainder Theorem ──▶ 4 Roots ──▶ Plaintext m
3. Cryptographic Procedures
4. Cryptosystem Comparison Matrix
Feature Rabin RSA ElGamal
Hard Problem Quadratic Residues / Factoring RSA Problem Discrete Logarithm
Factoring Equivalence Provably equivalent Not proven Unrelated
Encryption Speed Ultrafast (1 squaring) Fast (e = 65537) Slow (2 exponentiations)
Decryption Mapping 4-to-1 (requires padding) 1-to-1 bijection 1-to-1 bijection

Q22. Explain the SHA family of hash functions: SHA-0, SHA-1, SHA-2 and SHA-3.

1. Core Concept & Hash Principles

The Secure Hash Algorithm (SHA) family includes cryptographic hash standards developed by NIST under FIPS PUB 180 and FIPS PUB 202. Hash functions compress arbitrary-length inputs into fixed-length digests, satisfying three properties:

2. Architecture Comparison (Merkle-Damgård vs. Sponge)
Merkle-Damgård (SHA-0, SHA-1, SHA-2):
Message ──▶ [Pad & Split Blocks] ──▶ [Compression f (IV)] ──▶ [f] ──▶ Fixed Digest

Sponge Construction (SHA-3 / Keccak):
Message ──▶ [Pad & Split Blocks] ──▶ [XOR with Rate r] ──▶ [Keccak-f] ──▶ [Extract Digest]
3. Evolution of SHA Generations
4. Specification Comparison Matrix
Algorithm Digest Block Size Word Size Rounds Collision Status
SHA-0 160 bits 512 bits 32 bits 80 Broken (Withdrawn 1995)
SHA-1 160 bits 512 bits 32 bits 80 Broken (Collided 2017)
SHA-256 256 bits 512 bits 32 bits 64 Fully Secure (Standard)
SHA-512 512 bits 1024 bits 64 bits 80 Fully Secure (High Assurance)
SHA3-256 256 bits 1088 bits (rate) 64 bits 24 Fully Secure (Sponge)

Q23. Explain the major components and working of Public-Key Infrastructure (PKI) with a neat diagram.

1. Core Concept & Identity Binding

Public-Key Infrastructure (PKI), defined under ITU-T Recommendation X.509 and RFC 5280, is an integrated system of hardware, software, policies, and cryptographic protocols that creates, manages, distributes, and revokes digital certificates. Asymmetric cryptography lacks inherent ownership proof, risking man-in-the-middle impersonation. PKI solves this by binding public keys to verified entities (users, servers, organizations) through digitally signed X.509 certificates.

2. Major Components of PKI
3. PKI Architecture & Trust Hierarchy Diagram
                     ┌───────────────────────────┐
                     │          Root CA          │ (Self-signed Trust Anchor)
                     └─────────────┬─────────────┘
                                   │ Issues Intermediate Cert
                                   ▼
                     ┌───────────────────────────┐
                     │      Intermediate CA      │ (Operational Signer)
                     └──────┬─────────────┬──────┘
       1. CSR Request       │             │ Issues Cert
            ┌───────────────┘             ▼
            ▼                       ┌───────────┐
     ┌─────────────┐                │ Repository│ ◀── CRL / OCSP Updates
     │     RA      │                │(LDAP/HTTP)│
     └──────┬──────┘                └─────┬─────┘
            │ 2. Verify Identity          │ 5. Validate Path
            ▼                             ▼
    [End Entity / Server] ────────▶ [Relying Party / Browser]
         (Subscriber)      4. Present Cert (TLS)
4. PKI Operational Lifecycle & Security Matrix
Lifecycle Stage Responsible Entity Core Procedure Security Control
1. Key Generation Subscriber Generates asymmetric key pair; creates CSR (PKCS#10). Private key never leaves secure local storage (HSM/TPM).
2. Identity Vetting Registration Authority Vets applicant identity and domain control. Prevents unauthorized spoofing and fraudulent issuance.
3. Certificate Signing Certificate Authority Binds identity with public key and signs with CA private key. CA signature guarantees tamper-proof authenticity.
4. Chain Validation Relying Party Validates hierarchical signatures recursively up to Root CA. Cryptographic signature chain establishes trust.
5. Revocation Check Relying Party / OCSP Queries OCSP or checks CRL for revoked status. Immediate termination of trust for compromised keys.

Model Question Paper – 5

Q17. Solve the system of linear congruences using the elimination method: x + y = 1 (mod 5), 2x + y = 4 (mod 5).

1. Mathematical Foundations & Solvability Criteria

A system of linear congruences comprises simultaneous modular equations over a shared residue ring ℤm. When the modulus is prime (here p = 5), ℤ5 forms a Galois Field GF(5), ensuring every non-zero element has a unique multiplicative inverse.

2. Algorithmic Elimination Workflow

[Given: (1) x + y = 1 (mod 5)  and  (2) 2x + y = 4 (mod 5)]
                           |
                           v
[Subtract Eq (1) from Eq (2)] ----> (2x + y) - (x + y) = 4 - 1 mod 5
                           |
                           v
              [Eliminates y] ------> x = 3 mod 5  ===>  x ≡ 3 (mod 5)
                           |
                           v
[Back-Substitute x=3 in Eq (1)] --> 3 + y = 1 mod 5
                           |
                           v
    [Solve for Residue y] --------> y = -2 = 3 mod 5  ===>  y ≡ 3 (mod 5)
                           |
                           v
[Verification in System] ---------> 3 + 3 = 6 ≡ 1 (mod 5)  [TRUE]
                                    2(3) + 3 = 9 ≡ 4 (mod 5)  [TRUE]

3. Step-by-Step Algebraic Elimination & Calculation

4. Summary Verification & Parametric Solution Set

The complete integer solution family across ℤ is given parametrically by x = 3 + 5k1 and y = 3 + 5k2 for all k1, k2 ∈ ℤ.

Equation Substitution (x = 3, y = 3) Modular Evaluation Target Value Status
(1) x + y ≡ 1 (mod 5) 3 + 3 = 6 6 mod 5 = 1 ⇒ 6 ≡ 1 1 Verified
(2) 2x + y ≡ 4 (mod 5) 2(3) + 3 = 9 9 mod 5 = 4 ⇒ 9 ≡ 4 4 Verified
Inverse Check: A−1b [4, 1; 2, 4] × [1; 4] mod 5 [8; 18] mod 5 = [3; 3] [3; 3] Unique

Q18. Explain the Affine Cipher. Encrypt the plaintext DATA using multiplicative key K1 = 5 and additive key K2 = 8. Decrypt the resulting ciphertext.

1. Mathematical Principles & Solvability Criteria

The Affine Cipher is a monoalphabetic substitution cryptosystem combining modular multiplication and addition over ℤ26. Numerical character assignments follow A = 0, B = 1, ..., Z = 25.

2. Encryption & Decryption Workflow Architecture

Plaintext:            D(3)          A(0)         T(19)         A(0)
                        |             |            |             |
Multiply (x 5):        15             0           95             0
Add Shift (+ 8):       23             8          103             8
Modulo 26:             23             8           25             8
Ciphertext:           X(23)         I(8)         Z(25)         I(8)  ===> "XIZI"
                        ===========================================
Inverse Key Derivation: 5^-1 = 21 mod 26  (since 5 * 21 = 105 = 4*26 + 1 ≡ 1)
Subtract Shift (- 8):  15             0           17             0
Multiply (x 21):      315             0          357             0
Modulo 26:              3             0           19             0
Decrypted Plaintext:  D(3)          A(0)         T(19)         A(0)  ===> "DATA"

3. Step-by-Step Encryption and Decryption Procedures

4. Transformation Trace & Cipher Evaluation Table

Plaintext P (5P + 8) C = Mod 26 Ciphertext (C − 8) 21(C − 8) Mod 26 Decrypted
D 3 23 23 X 15 315 3 D
A 0 8 8 I 0 0 0 A
T 19 103 25 Z 17 357 19 T
A 0 8 8 I 0 0 0 A

Q19. Explain the AES Key Expansion (Key Schedule) procedure.

1. Core Concept and Architectural Principles

The AES Key Expansion (NIST FIPS 197) converts a master key of Nk 32-bit words (128, 192, or 256 bits) into an expanded array of 4(Nr + 1) 32-bit words denoted W[0 ... 4(Nr + 1) − 1].

2. AES Word Expansion Architecture

Initial Key:  W[0]         W[1]         W[2]         W[3]   (Round 0 Key)
               |            |            |            |
               v            v            v            v
           +-------+    +-------+    +-------+    +-------+
           | W[i-4]|    | W[i-3]|    | W[i-2]|    | W[i-1]|
           +---+---+    +---+---+    +---+---+    +---+---+
               |                                      |
               |                     For i % 4 == 0:  v
               |                                 +---------+
               |                                 | RotWord | [b0,b1,b2,b3] -> [b1,b2,b3,b0]
               |                                 +----+----+
               |                                      v
               |                                 +---------+
               |                                 | SubWord | S-Box Substitution
               |                                 +----+----+
               |                                      v
               |                                 +---------+
               |                                 | XOR Rcon| Rcon[i/4] = [RC[j], 0, 0, 0]
               |                                 +----+----+
               |                                      |
               v                                      v
             (XOR) <------------------------------ g(W[i-1])
               |
               v
             W[i] (For i % 4 != 0: W[i] = W[i-4] XOR W[i-1])

3. Step-by-Step Expansion Routine & Function g(W)

4. AES Key Schedule Parameters Comparison Table

AES Cipher Variant Key Size (Bits / Words) Rounds (Nr) Expanded Words / Bytes Words per Subkey Rcon Consumed
AES-128 128 bits / 4 words 10 rounds 44 words / 176 bytes 4 words (128 bits) 10 constants (RC[1..10])
AES-192 192 bits / 6 words 12 rounds 52 words / 208 bytes 4 words (128 bits) 8 constants (RC[1..8])
AES-256 256 bits / 8 words 14 rounds 60 words / 240 bytes 4 words (128 bits) 7 constants (RC[1..7])

Q20. Explain the major types of attacks on the RSA cryptosystem.

1. Core Concept and Theoretical Vulnerability Surface

The RSA cryptosystem (Rivest-Shamir-Adleman) relies on the intractability of factoring large composite moduli n = p × q and computing modular e-th roots.

2. RSA Attack Vector Taxonomy

                          +-----------------------------------+
                          |      RSA Attack Vector Taxonomy   |
                          +-----------------+-----------------+
                                            |
      +--------------------+----------------+-------------------+--------------------+
      |                    |                                    |                    |
      v                    v                                    v                    v
[Factorization Attacks] [Low Exponent Attacks]         [Protocol Attacks]       [Side-Channel Attacks]
 - General Number Field  - Hastad's Broadcast (e=3)     - Homomorphic CCA Multi- - Timing Analysis
   Sieve (GNFS)          - Wiener's Attack (d < n^0.25)   plicative Attack       - Power Analysis (DPA)
 - Fermat's (|p-q| small)- Boneh-Durfee (d < n^0.292)   - Bleichenbacher Oracle  - Bellcore CRT Faults

3. Detailed Breakdown of Major Attack Classes

4. Attack Mitigation & Countermeasure Matrix Table

Attack Class Exploit Mechanism Vulnerability Root Cause Standard Countermeasure
Factorization GNFS / Fermat Modulus < 2048 bits; |p − q| too small 2048/4096-bit keys; strong prime spacing
Small Public Exponent Hastad's Broadcast / CRT e = 3 across multiple recipients Set e = 65537 (216 + 1); OAEP padding
Small Private Exponent Wiener's / Boneh-Durfee d < n0.292 chosen for speed Enforce full-length private exponents (d > n0.5)
Chosen-Ciphertext Bleichenbacher / Malleability Deterministic or PKCS#1 v1.5 padding Enforce RSA-OAEP (RFC 8017)
Side-Channel / Fault Timing / Bellcore CRT fault Data-dependent runtime; unverified CRT Cryptographic blinding; constant-time ALUs

Q21. Explain the main stages of the SHA-512 algorithm with a neat diagram.

1. Core Concept & Cryptographic Foundations

SHA-512 (NIST FIPS 180-4) is an iterative cryptographic hash function based on the Merkle-Damgård framework with a Davies-Meyer compression core.

2. Architectural Block Diagram & Compression Round

[Input Message M] ---> [Padding & Length Append] ---> 1024-bit Blocks M_1, M_2...
                                                         |
Initial Hash H0 (512-bit)                                v
         |                                    +--------------------+
         +----------------------------------->| 80-Round Engine    |<-- Wt, Kt
                                              +---------+----------+
                                                        |
                                                        v
                                          Hash H1 = H0 + Regs (mod 2^64)
-------------------------------------------------------------------------------
Single Round Logic:
  T1 = h + Sigma1(e) + Ch(e, f, g) + Kt + Wt (mod 2^64)
  T2 = Sigma0(a) + Maj(a, b, c) (mod 2^64)
  New Regs: a = T1 + T2,  b = a,  c = b,  d = c,  e = d + T1,  f = e,  g = f,  h = g

3. Step-by-Step Operational Stages of SHA-512

4. SHA-512 Operational Specification Table

Parameter Specification Value Cryptographic Role
Input Message Size < 2128 bits Arbitrary length payload capacity
Block Size 1024 bits (16 × 64-bit words) Iterative compression processing unit
Word Size 64 bits Native 64-bit register arithmetic operations
Rounds per Block 80 rounds Diffusion and confusion iterations
Output Digest Size 512 bits (64 bytes) 256-bit collision security bound

Q22. Explain the ElGamal Digital Signature Scheme with signing and verification procedures.

1. Core Concept & Mathematical Foundations

The ElGamal Digital Signature Scheme (1985) is an asymmetric, probabilistic digital signature algorithm based on the Discrete Logarithm Problem (DLP) over ℤp*.

2. Architectural Protocol Flow Diagram

KEY GENERATION:
  Select prime p, primitive root g mod p, private key x in [2, p-2]
  Compute public key y = g^x mod p  ---> Public: (p, g, y), Private: x
                 |
SIGNING (Alice): |                        VERIFICATION (Bob):
  Input: Hash m = H(M), Private Key x       Input: m = H(M), Signature (r, s), (p, g, y)
  1. Pick random secret nonce k:            1. Verify bounds:
     gcd(k, p-1) = 1                           0 < r < p  AND  0 < s < p-1
  2. Compute r = g^k mod p                  2. Compute test values:
  3. Compute k^-1 mod (p-1)                    v1 = g^m mod p
  4. Compute signature s:                      v2 = (y^r * r^s) mod p
     s = k^-1 * (m - x*r) mod (p-1)         3. Accept if v1 ≡ v2 (mod p),
  Output Signature: (r, s)                     Else Reject

3. Detailed Algorithmic Procedures & Correctness Proof

4. Comparative Evaluation: ElGamal vs. RSA Digital Signatures

Metric ElGamal Digital Signature RSA Digital Signature
Hardness Problem Discrete Logarithm Problem (DLP) over ℤp* Integer Factorization Problem (n = p × q)
Signature Output Pair (r, s), 2 × modulus size Single integer s = md mod n, 1 × modulus size
Nature Probabilistic (randomized via nonce k) Deterministic (requires randomized PSS padding)
Nonce Vulnerability Catastrophic: nonce reuse reveals private key x Not applicable (no per-message nonce used)
Successor Standard NIST DSA and ECDSA (FIPS 186) RSA-PSS (RFC 8017)

Q23. Explain the Authentication Header (AH) and Encapsulating Security Payload (ESP) protocols in IPSec.

1. Core Concept & IPSec Architecture

Internet Protocol Security (IPSec) (RFC 4301) operates at the Network Layer (OSI Layer 3) to deliver transparent security services for all IPv4 and IPv6 upper-layer protocols.

2. Protocol Header Formats & Packet Structures

AH Header Format (RFC 4302 - IP Protocol 51):
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Header(8)| Payload Len(8)|           RESERVED(16)        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Security Parameters Index (SPI) (32)          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Sequence Number (Anti-Replay) (32)            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Integrity Check Value (ICV) (Variable length)       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

ESP Packet Format (RFC 4303 - IP Protocol 50):
[ESP Header:  SPI (32) | Sequence Number (32)]            (Plaintext)
[Payload Data (TCP + App Data)]               --- ENCRYPTED
[Padding (0-255B) | Pad Len (8) | Next Hdr (8)] --- SCOPE (ESP Trailer)
[Integrity Check Value (ICV)]                 --- AUTHENTICATED SCOPE (Header to Trailer)

3. Detailed Technical Analysis: AH vs. ESP Mechanisms

4. Comprehensive Technical Comparison Table: AH vs. ESP

Feature Authentication Header (AH) Encapsulating Security Payload (ESP)
RFC Standard RFC 4302 RFC 4303
IP Protocol Number 51 50
Confidentiality (Encryption) No (Plaintext payload) Yes (AES-GCM, AES-CBC, ChaCha20)
Data Origin Authentication Yes (HMAC over payload + immutable IP header) Yes (HMAC over ESP Header, Payload, Trailer)
Anti-Replay Protection Yes (Sliding window sequence numbers) Yes (Sliding window sequence numbers)
Outer IP Header Protection Yes (Authenticates immutable fields) No (Outer IP header unprotected)
NAT Traversal Incompatible (NAT breaks ICV) Compatible (NAT-T over UDP 4500)
Primary Use Case Legacy router integrity checks Modern IPsec VPNs, Remote Access