Cryptography, Information and Network Security

Table of Contents

  1. Basic Concepts and Terminology
  2. Symmetric Encryption
  3. Asymmetric Encryption
  4. Hash Functions
  5. Digital Signatures and Certificates
  6. PKI (Public Key Infrastructure)
  7. Network Security Protocols
  8. Firewalls
  9. IDS/IPS
  10. VPN
  11. Authentication Methods
  12. Steganography
  13. Cyber Attacks
  14. Security Policies and Standards

Basic Concepts and Terminology

Security Goals (CIA Triad)

Goal Description Threat
Confidentiality Only authorized parties can access data Eavesdropping, data theft
Integrity Data is not altered unauthorizedly Tampering, modification
Availability Systems and data are accessible when needed DoS, DDoS attacks

Additional Security Goals

Cryptography Terminology

Term Definition
Plaintext Original readable message
Ciphertext Encrypted (unreadable) message
Encryption Converting plaintext to ciphertext
Decryption Converting ciphertext back to plaintext
Key Secret value used for encryption/decryption
Cryptanalysis Breaking encryption without knowing the key
Cipher Algorithm for encryption/decryption

Types of Cryptanalytic Attacks

Attack Type Description
Ciphertext Only Attacker has only ciphertext
Known Plaintext Attacker knows some plaintext-ciphertext pairs
Chosen Plaintext Attacker can encrypt chosen plaintexts
Chosen Ciphertext Attacker can decrypt chosen ciphertexts
Brute Force Trying all possible keys (2^n for n-bit key)

Classical Ciphers (For Conceptual Understanding)


Symmetric Encryption

Same key used for both encryption and decryption. Also called secret key cryptography.

Requirements

  1. Strong encryption algorithm
  2. Secure key distribution mechanism
  3. Key secrecy (security depends entirely on key secrecy)

Data Encryption Standard (DES)

Advanced Encryption Standard (AES)

Other Symmetric Ciphers

Blowfish

RC4 (Rivest Cipher 4)

Comparison of Symmetric Ciphers

Cipher Type Block Size Key Size Rounds Status
DES Block 64 56 16 Broken
3DES Block 64 112/168 48 Legacy
AES Block 128 128/192/256 10/12/14 Current standard
Blowfish Block 64 32-448 16 Legacy
RC4 Stream 40-2048 Broken

Asymmetric Encryption

Uses a key pair: public key (shared openly) and private key (kept secret). Also called public key cryptography.

Principles

RSA (Rivest-Shamir-Adleman)

Diffie-Hellman Key Exchange

ElGamal Encryption

Elliptic Curve Cryptography (ECC)

Asymmetric Cipher Comparison

Algorithm Based On Key Size Speed Use Case
RSA Factoring 1024-4096 Slow Encryption, signatures
Diffie-Hellman Discrete log 1024-4096 Slow Key exchange
ElGamal Discrete log 1024-4096 Slow Encryption
ECC EC discrete log 160-521 Fast Mobile, TLS, blockchain

Hash Functions

Properties of Good Hash Functions

  1. Fixed output size regardless of input size
  2. Deterministic: Same input → same output
  3. Efficient computation
  4. Pre-image resistance: Given hash h, hard to find m such that H(m) = h
  5. Second pre-image resistance: Given m₁, hard to find m₂ ≠ m₁ with H(m₁) = H(m₂)
  6. Collision resistance: Hard to find any two messages with same hash

MD5 (Message Digest 5)

SHA Family (Secure Hash Algorithm)

Algorithm Output Size Block Size Rounds Status
SHA-1 160 bits 512 80 Broken (2017 — SHAttered attack)
SHA-224 224 bits 512 64 Secure (SHA-2 family)
SHA-256 256 bits 512 64 Secure
SHA-384 384 bits 1024 80 Secure
SHA-512 512 bits 1024 80 Secure

SHA-3 (Keccak)

HMAC (Hash-based Message Authentication Code)


Digital Signatures and Certificates

Digital Signature Properties

  1. Authentication: Verifies sender identity
  2. Integrity: Detects message modification
  3. Non-repudiation: Sender cannot deny sending

How Digital Signatures Work

  1. Signing: Sender hashes message → encrypts hash with private key
  2. Verification: Receiver has message + signature → decrypts signature with sender's public key → compares with hash of message
  3. Match = Message authentic and unmodified

Digital Signature Standard (DSS)

RSA Digital Signature

  1. Sign: Signature = Hash(m)^d mod n (private key)
  2. Verify: Hash(m) = Signature^e mod n (public key)
  3. Compare computed hash with received hash

Digital Certificates (X.509)


PKI (Public Key Infrastructure)

Components

Component Role
CA (Certificate Authority) Issues and signs certificates
RA (Registration Authority) Verifies identity before CA issues certificate
Certificate Repository Stores and distributes certificates (LDAP)
CRL / OCSP Certificate revocation checking
Certificate Binds public key to identity

Certificate Lifecycle

  1. Registration: User generates key pair → submits CSR (Certificate Signing Request) to RA
  2. Verification: RA verifies identity
  3. Issuance: CA signs and issues certificate
  4. Distribution: Certificate stored in repository
  5. Usage: Used for encryption, authentication, signing
  6. Renewal: Before expiry
  7. Revocation: If compromised → added to CRL or marked via OCSP

Certificate Revocation


Network Security Protocols

SSL/TLS (Secure Sockets Layer / Transport Layer Security)

IPsec (Internet Protocol Security)

SSH (Secure Shell)

PGP (Pretty Good Privacy) / GPG


Firewalls

A firewall is a network security device that monitors and filters incoming/outgoing traffic based on security rules.

Types of Firewalls

Packet Filtering Firewall (Stateless)

Stateful Inspection Firewall

Application-Level Gateway (Proxy Firewall)

Next-Generation Firewall (NGFW)

Circuit-Level Gateway

Firewall Architectures

Screened Host Firewall

Screened Subnet Firewall (DMZ)

Firewall Rules Example

# Rule format: ACTION PROTOCOL SOURCE DESTINATION PORT
ALLOW TCP ANY 10.0.0.0/24 80,443    # Allow HTTP/HTTPS to internal network
DENY TCP ANY ANY 23                  # Block Telnet
ALLOW TCP 10.0.0.0/24 ANY ANY        # Allow all outbound
DENY IP ANY ANY ANY                  # Default deny (implicit)

IDS/IPS

Intrusion Detection System (IDS)

Monitors network/system for malicious activity and alerts.

Types by Deployment

Type Scope Example
NIDS (Network-Based) Monitors entire network segment Snort, Suricata
HIDS (Host-Based) Monitors single host OSSEC, Tripwire

Types by Detection Method

Method Description Pros Cons
Signature-Based Matches known attack patterns Low false positives Cannot detect zero-day
Anomaly-Based Detects deviations from normal behavior Can detect new attacks Higher false positives
Hybrid Combines both Best of both worlds More complex

Intrusion Prevention System (IPS)

Same as IDS but can actively block detected threats.

IDS/IPS Comparison

Feature IDS IPS
Action Alert only Alert + Block
Deployment Passive (port mirror) Inline
Impact on traffic None Adds latency
Risk of false positive Low impact Can block legitimate traffic

VPN

Virtual Private Network creates an encrypted tunnel over public networks.

Types

Type Description Use Case
Site-to-Site VPN Connects entire networks Branch offices
Remote Access VPN Individual user to corporate network Work from home
Client-to-Site VPN Software-based remote access Mobile workers

VPN Protocols

Protocol Encryption Port Notes
IPsec AES 50/4500 Most secure; used in site-to-site
SSL/TLS VPN TLS 443 No client needed (browser-based)
PPTP MPPE 1723 Weak; deprecated
L2TP/IPsec IPsec 1701 No encryption alone; uses IPsec
OpenVPN OpenSSL 1194/443 Open source; very popular
WireGuard ChaCha20 UDP Modern; fast; simple

VPN Tunneling


Authentication Methods

Authentication Factors

  1. Something you know: Password, PIN
  2. Something you have: Smart card, token, phone
  3. Something you are: Biometrics (fingerprint, iris, face)
  4. Somewhere you are: Location-based
  5. Something you do: Behavioral biometrics (typing pattern)

Kerberos

OAuth 2.0

Biometrics

Type Feature Accuracy Cost
Fingerprint Ridge patterns High Low
Iris Recognition Iris patterns Very high High
Face Recognition Facial features Moderate Moderate
Voice Recognition Voice patterns Low-Moderate Low
Retina Scan Blood vessel pattern Very high High

Multi-Factor Authentication (MFA)


Steganography

Concept

Hiding data within other data (carrier) without detection.

Types

Type Method
Image Steganography Modify LSB (Least Significant Bits) of pixel values
Audio Steganography Modify LSB of audio samples
Text Steganography Hidden text in whitespace/spacing
Video Steganography Hide data in video frames
Network Steganography Hide data in protocol headers

Steganography vs Cryptography

Aspect Steganography Cryptography
Goal Hide existence of message Scramble message content
Visibility Hidden Visible but unreadable
Detection Steganalysis Cryptanalysis
Combined Can encrypt before hiding Can hide encrypted data

Cyber Attacks

Denial of Service (DoS) / Distributed DoS (DDoS)

Phishing

SQL Injection

Cross-Site Scripting (XSS)

Man-in-the-Middle (MitM) Attack

Other Important Attacks

Attack Description
Ransomware Encrypts data, demands ransom (WannaCry, REvil)
Trojan Horse Malware disguised as legitimate software
Worm Self-replicating malware (no host needed)
Virus Attaches to host program, spreads when executed
Keylogger Records keystrokes to steal credentials
Spoofing Faking identity (IP, email, MAC address)
Session Hijacking Taking over active session
Brute Force Trying all password combinations
Dictionary Attack Using common passwords/words
Buffer Overflow Writing beyond buffer boundaries; can execute arbitrary code
Zero-Day Exploiting vulnerability before patch exists

Security Policies and Standards

ISO 27001

ISO 27002

Other Standards

Standard Description
PCI DSS Payment Card Industry Data Security Standard — for credit card data
HIPAA Health Insurance Portability — health information protection (US)
SOX Sarbanes-Oxley — financial reporting integrity
GDPR General Data Protection Regulation — EU data privacy
IT Act 2000 Indian IT Act — cyber laws in India
NIST SP 800-53 US federal security controls framework

Indian Cyber Laws

CERT-In (Indian Computer Emergency Response Team)


Key Formulas and Concepts Summary

Concept Key Point
DES 56-bit key, 64-bit block, 16 rounds (Feistel)
AES 128-bit block, 10/12/14 rounds, SubBytes-ShiftRows-MixColumns-AddRoundKey
RSA C = M^e mod n; M = C^d mod n; Security based on factoring
Diffie-Hellman Shared secret: g^(ab) mod p; based on discrete log
HMAC H((K⊕opad)
Firewall Default Deny all, allow by exception
Hash SHA-256 current standard; MD5 and SHA-1 broken
TLS 1.3 1-RTT, mandatory PFS, removed weak ciphers

Exam Tips

  1. Symmetric vs Asymmetric: Know key differences and use cases
  2. AES Structure: Understand the 4 operations per round
  3. RSA Algorithm: Be able to perform key generation with small numbers
  4. Diffie-Hellman: Know the process and MitM vulnerability
  5. Hash Functions: MD5 broken, SHA-1 broken, SHA-256 secure
  6. Digital Certificates: Know X.509 structure and CA/RA roles
  7. TLS vs IPsec: Application layer vs network layer security
  8. Firewall Types: Packet filtering vs stateful vs proxy vs NGFW
  9. IDS vs IPS: Detection vs Prevention; signature vs anomaly
  10. Cyber Attacks: SQL injection, XSS, DDoS, phishing — know mechanisms and mitigation
  11. Kerberos: Understand the AS, TGS, and ticket flow
  12. ISO 27001: PDCA cycle and ISMS concept
  13. Indian IT Act: Key sections (43, 65, 66 series) are commonly asked
  14. VPN Protocols: PPTP weak, IPsec/OpenVPN/WireGuard strong

Practice Questions

12 MCQs for Cryptography Information and Network Security with detailed explanations.

Q1. Regarding the following concept: 'Verifying identity of communicating parties

-...', which statement is correct?

- A. Verifying identity of communicating parties

✅ Correct Answer: Option A

Explanation:
The correct answer is Option A — Verifying identity of communicating parties
-.

This concept is covered under Cryptography Information and Network Security in the CBDT Assistant Director Systems syllabus. The answer is established through standard definitions and widely accepted principles in the field.

Why other options are incorrect:
- Option B — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option C — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option D — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.


Q2. Which of the following best describes | Systems and data?

✅ Correct Answer: Option A

Explanation:
The correct answer is Option A — accessible when needed | DoS, DDoS attacks |.

This concept is covered under Cryptography Information and Network Security in the CBDT Assistant Director Systems syllabus. The answer is established through standard definitions and widely accepted principles in the field.

Why other options are incorrect:
- Option B — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option C — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option D — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.


Q3. Regarding the following concept: '- ESP (Encapsulating Security Payload): Provides encryption + authentication + i...', which statement is correct?

✅ Correct Answer: Option C

Explanation:
The correct answer is Option C — - ESP (Encapsulating Security Payload): Provides encryption + authentication + integrity.

This concept is covered under Cryptography Information and Network Security in the CBDT Assistant Director Systems syllabus. The answer is established through standard definitions and widely accepted principles in the field.

Why other options are incorrect:
- Option A — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option B — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option D — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.


Q4. Regarding the following concept: '- OCSP Stapling: Server provides OCSP response during TLS handshake...', which statement is correct?

✅ Correct Answer: Option B

Explanation:
The correct answer is Option B — - OCSP Stapling: Server provides OCSP response during TLS handshake.

This concept is covered under Cryptography Information and Network Security in the CBDT Assistant Director Systems syllabus. The answer is established through standard definitions and widely accepted principles in the field.

Why other options are incorrect:
- Option A — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option C — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option D — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.


Q5. Which of the following best describes | Data?

✅ Correct Answer: Option A

Explanation:
The correct answer is Option A — not altered unauthorizedly | Tampering, modification |.

This concept is covered under Cryptography Information and Network Security in the CBDT Assistant Director Systems syllabus. The answer is established through standard definitions and widely accepted principles in the field.

Why other options are incorrect:
- Option B — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option C — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option D — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.


Q6. Regarding the following concept: 'Sender cannot deny sending a message

-...', which statement is correct?

✅ Correct Answer: Option C

Explanation:
The correct answer is Option C — Sender cannot deny sending a message
-.

This concept is covered under Cryptography Information and Network Security in the CBDT Assistant Director Systems syllabus. The answer is established through standard definitions and widely accepted principles in the field.

Why other options are incorrect:
- Option A — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option B — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option D — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.


Q7. Which of the following best describes firewall?

✅ Correct Answer: Option A

Explanation:
The correct answer is Option A — a network security device that monitors and filters incoming/outgoing traffic based on security rules..

This concept is covered under Cryptography Information and Network Security in the CBDT Assistant Director Systems syllabus. The answer is established through standard definitions and widely accepted principles in the field.

Why other options are incorrect:
- Option B — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option C — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option D — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.


Q8. Regarding the following concept: '| Original readable message |

|...', which statement is correct?

✅ Correct Answer: Option C

Explanation:
The correct answer is Option C — | Original readable message |
|.

This concept is covered under Cryptography Information and Network Security in the CBDT Assistant Director Systems syllabus. The answer is established through standard definitions and widely accepted principles in the field.

Why other options are incorrect:
- Option A — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option B — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option D — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.


Q9. Regarding the following concept: '- AH (Authentication Header): Provides authentication and integrity only (no enc...', which statement is correct?

✅ Correct Answer: Option C

Explanation:
The correct answer is Option C — - AH (Authentication Header): Provides authentication and integrity only (no encryption).

This concept is covered under Cryptography Information and Network Security in the CBDT Assistant Director Systems syllabus. The answer is established through standard definitions and widely accepted principles in the field.

Why other options are incorrect:
- Option A — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option B — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option D — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.


Q10. Regarding the following concept: '- GCM (Galois/Counter Mode): Provides both encryption and authentication...', which statement is correct?

✅ Correct Answer: Option D

Explanation:
The correct answer is Option D — - GCM (Galois/Counter Mode): Provides both encryption and authentication.

This concept is covered under Cryptography Information and Network Security in the CBDT Assistant Director Systems syllabus. The answer is established through standard definitions and widely accepted principles in the field.

Why other options are incorrect:
- Option A — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option B — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option C — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.


Q11. Regarding the following concept: '| Converting plaintext to ciphertext |

|...', which statement is correct?

✅ Correct Answer: Option A

Explanation:
The correct answer is Option A — | Converting plaintext to ciphertext |
|.

This concept is covered under Cryptography Information and Network Security in the CBDT Assistant Director Systems syllabus. The answer is established through standard definitions and widely accepted principles in the field.

Why other options are incorrect:
- Option B — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option C — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option D — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.


Q12. Regarding the following concept: 'Confidentiality...', which statement is correct?

✅ Correct Answer: Option B

Explanation:
The correct answer is Option B — Confidentiality.

This concept is covered under Cryptography Information and Network Security in the CBDT Assistant Director Systems syllabus. The answer is established through standard definitions and widely accepted principles in the field.

Why other options are incorrect:
- Option A — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option C — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.
- Option D — This option is factually incorrect or describes a concept from a different domain, making it an invalid choice for this question.