Introduction to Cyber Security and Need for Security
Overview: A fee portal holds names, balances and receipts.
What is Cyber Security?
- In simple words, Cyber Security is the practice of protecting computers, servers, mobile phones, electronic systems, networks, and digital…
- Just like you put a strong Godrej lock on the front door of your house, install CCTV cameras, and hire a security guard to protect your…
Formal Definition of Cyber Security
- For your DAVV university exam, you can write this clear definition:
- *“Cyber Security (also known as Information Technology Security) is the body of technologies, processes, and practices designed to protect…
- Cyber: Refers to anything related to the internet, computer networks, and digital systems.
- Security: Refers to protection against threats, harm, or theft.
Core Pillars of Security: The CIA Triad
- Every cyber security system in the world is built around three main goals, famously known as the CIA Triad:
- 1. Confidentiality (Keeping Secrets Secret): Meaning: Ensuring that sensitive information is accessed only by authorized people and kept hidden from everyone else.
- Example: Only you can see your PhonePe UPI PIN or your college exam portal password.
- How we achieve it: Encryption, passwords, OTPs, and Fingerprint/Face unlock.
- 2. Integrity (No Unauthorized Changes): Meaning: Ensuring that data is trustworthy, complete, and has not been modified, tampered with, or deleted by an unauthorized…
- Example: If you transfer ₹500 to a friend, a hacker in the middle should not be able to change that number to ₹50,000.
- How we achieve it: Hashing (SHA-256), Digital Signatures, and Checksums.
- 3. Availability (Always Working When Needed): Meaning: Ensuring that authorized users can reliably access the network, website, and data whenever they need it.
View diagram · The CIA Triad — Foundation of Cyber Security
Need for Cyber Security (Why is it Important?)
- Today, everything from ordering food on Zomato to paying college fees happens online.
- Protection of Personal Data & Privacy:
- Securing Financial & Banking Transactions:
- Preventing Business & Corporate Losses:
- Protecting National Security & Critical Infrastructure:
- Rapid Growth of IoT and Smart Devices:
- Legal Compliance and Government Rules:
- Maintaining Customer Trust and Reputation:
Common Categories of Cyber Threats
- Malware: Malicious software (Viruses, Worms, Trojans) that damages files
- Phishing: Fake emails/SMS tricking users into sharing passwords or OTPs
- Ransomware: Locks (encrypts) all your files and demands money to unlock them
- Man-in-the-Middle (MitM): Hacker secretly listens to or alters data between two users
- Denial of Service (DoS): Flooding a website with fake traffic so it crashes for real users
Basics of Cryptography: Plain Text and Cipher Text
Overview: If two students encrypt the same short message with different keys, their ciphertext can differ.
What is Cryptography?
- The word Cryptography comes from two Greek words:
- Kryptos = “Hidden” or “Secret”
- Graphein = “To Write”
- When you send a message on WhatsApp, you see the notice: “Messages and calls are end-to-end encrypted.” This means if you type `“Meet…
Fundamental Terms in Cryptography
- To master Unit 1 and Unit 2, you must know these 6 essential terms:
- 1. Plain Text (or Clear Text): The original, normal, human-readable message before it is locked or after it is unlocked.
- Anyone who sees Plain Text can easily understand it.
- Example:
"TRANSFER 5000 RUPEES"or"MEET AT COLLEGE" - 2. Cipher Text: The scrambled, unreadable, secret message produced as the output of encryption.
- It looks like random garbage characters to anyone who does not have the secret key.
- Example:
"WUDQVIHU 5000 UXSHHV" - 3. Cipher (Cryptographic Algorithm): The mathematical formula, rule, or step-by-step algorithm used to transform Plain Text into Cipher Text and vice versa.
View diagram · How a Cryptographic System (Cryptosystem) Works
Difference Between Plain Text and Cipher Text
- This is one of the most frequently asked short-answer questions in DAVV BCA exams:
- 1. Meaning: Original, normal message written by the sender
- 2. Readability: Easily readable and understandable by humans
- 3. Security: Completely insecure if sent directly over a network
- 4. Stage in Process: Input to Encryption; Output of Decryption
- 5. Symbol Used: Usually denoted by P or M (Message)
- 6. Example:
"INDIA"
Cryptography vs. Cryptanalysis vs. Cryptology
- Students often confuse these three terms.
- Cryptography (Code Making): Designing secure encryption systems to hide messages from attackers (Done by security defenders).
- Cryptanalysis (Code Breaking): The science and art of breaking Cipher Text to recover the Plain Text or Key without knowing the secret key beforehand…
- Cryptology: The parent branch of mathematics that includes both Cryptography and Cryptanalysis.
View diagram · Hierarchy of Cryptology
Classification of Classical Cryptographic Techniques
- In Unit 1, classical encryption techniques are divided into two main families:
- Substitution Techniques:
- Transposition Techniques:
Substitution Techniques: Caesar Cipher and Mono-alphabetic Cipher
Overview: With a Caesar shift of three, A always becomes D and B always becomes E.
What is a Substitution Technique?
- A Substitution Technique is a classical encryption method in which each character (letter) of the Plain Text is systematically…
- 💡 Simple Idea:
- The positions of the letters stay in the same place, but the identity of each letter changes (like wearing a mask!).
Caesar Cipher (Shift Cipher)
- The Caesar Cipher is the oldest and simplest substitution cipher in history.
- How Caesar Cipher Works: In the classic Caesar Cipher, each letter in the Plain Text is replaced by a letter that is 3 positions ahead in the English alphabet.
- The alphabet wraps around at the end: after Z, we start again from A.
AbecomesDBbecomesECbecomesF- …
XbecomesA
View diagram · Caesar Cipher Shift by k = 3
Mono-alphabetic Substitution Cipher
- To fix the tiny key-space problem of the Caesar Cipher, cryptographers created the Mono-alphabetic Cipher.
- What is a Mono-alphabetic Cipher?: Instead of shifting all letters by a fixed number like +3, a Mono-alphabetic Cipher allows any letter to be mapped to…
- Mono = Single.
- Once you decide that
Amaps toQ, then everyAin your message will always becomeQ. - Plain Alphabet:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - Cipher Alphabet:
Q W E R T Y U I O P A S D F G H J K L Z X C V B N M A→QT→Z
Comparison: Caesar Cipher vs. Mono-alphabetic Cipher
- Shift Rule: Uniform fixed shift (+k) for all letters
- Total Possible Keys: Only 25 keys
- Brute-Force Attack: Extremely easy to break
- Main Weakness: Tiny key space
Polygram and Polyalphabetic Substitution Ciphers
Overview: Polygram describes processing groups of letters together.
Polygram Substitution Cipher
- What is a Polygram Cipher?: In a Polygram Substitution Cipher, instead of replacing one single letter at a time, we replace a **block (group) of…
- Poly = Many, Gram = Letters/Characters.
- A group of 2 letters is called a Digram (used in Playfair Cipher).
- A group of 3 letters is called a Trigram (often used in Hill Cipher).
- Why is Polygram Cipher Stronger?: Even though both
"HE"and"HI"start with the letterH, their Cipher Texts ("XY"and"PQ") have nothing in common. - This hides single-letter frequencies and makes cryptanalysis much harder.
- Famous Examples of Polygram Ciphers: Playfair Cipher (encrypts 2 letters at a time) and Hill Cipher (encrypts m letters at a time using matrices).
View diagram · Single-Letter vs. Polygram Substitution
Polyalphabetic Substitution Cipher
- What is a Polyalphabetic Cipher?: A Polyalphabetic Substitution Cipher uses multiple substitution alphabets to encrypt a single message, switching from one…
- 💡 Key Advantage:
- The same Plain Text letter (e.g.,
Lin"HELLO") can be encrypted into two completely different Cipher Text letters depending on its…
Vigenère Cipher (The Most Famous Polyalphabetic Cipher)
- The best-known and simplest Polyalphabetic Cipher is the Vigenère Cipher, published by Blaise de Vigenère in 1586.
- How Vigenère Cipher Works: We choose a secret Keyword (for example,
"KEY"or"DECEPTIVE"). - We repeat the Keyword over and over until it matches the exact length of our Plain Text message.
- Each letter is converted to its number (
A = 0, B = 1, ..., Z = 25). - We add the Plain Text number and the Key letter number modulo 26:
- Encryption Formula:
- Formula: Ci = (Pi + Ki) mod 26
- Decryption Formula:
Mono-alphabetic vs. Polyalphabetic Cipher
- Number of Alphabets: Uses only 1 substitution alphabet
- Same Plain Letter: Always produces the same Cipher letter
- Frequency Analysis: Very easy to break using letter frequency
- Examples: Caesar Cipher, Simple Substitution
Playfair Cipher and Hill Cipher (With Step-by-Step Solved Examples)
Overview: Playfair treats a pair of letters as one unit and uses their positions in a square.
Part 1: Playfair Cipher
- Invented by Charles Wheatstone in 1854 and promoted by Lord Playfair, the Playfair Cipher was the first practical **digram (pair of 2…
- Step 1: Constructing the 5 × 5 Key Matrix: The Playfair Cipher uses a 5 × 5 grid (25 boxes) containing the 26 English letters:
- Choose a Keyword (e.g.,
MONARCHY). - Write the letters of the Keyword into the 5 × 5 grid from left to right, top to bottom, skipping any duplicate letters.
- Fill the remaining boxes of the grid with the rest of the alphabet (
AtoZ) in alphabetical order. - Why 25 boxes for 26 letters? The letters
IandJare combined into a single box (I/J). - M: O
- C: H
View diagram · Three Playfair Cipher Encryption Rules
Part 2: Hill Cipher
- Invented by mathematician **Lester S.
- How Hill Cipher Works: Assign each letter its number:
A = 0, B = 1, C = 2, ..., Z = 25. - To encrypt m letters at a time, use an m × m square Key Matrix (K).
- Encryption Formula:
- Formula: C = (K × P) mod 26
- Decryption Formula:
- Formula: P = (K^-1 × C) mod 26
- 📝 Step-by-Step Solved Example (2 × 2 Hill Cipher): Question: Encrypt the Plain Text
"HI"using the 2 × 2 Hill Cipher Key Matrix:
Transposition Cipher: Rail Fence and Columnar Transposition
Overview: Write ABCDEF on two alternating rails.
What is a Transposition Cipher?
- In all Substitution Ciphers, we replaced Plain Text letters with different letters.
- Think of an Anagram game in newspapers.
Rail Fence Cipher (Zig-Zag Cipher)
- The Rail Fence Cipher is the simplest form of Transposition Cipher.
- How Rail Fence Cipher Works: Choose a Depth (Number of Rails/Rows), say d = 2 or d = 3.
- Write the Plain Text message diagonally up and down in a Zig-Zag pattern across the rails (rows).
- Read the letters row by row (from left to right, top row to bottom row) to form the Cipher Text!
- 📝 Solved Example 1: Rail Fence Cipher (Depth = 2): Question: Encrypt the Plain Text
"MEET ME AFTER THE PARTY"using Rail Fence Cipher with depth = 2. - Row 1:
M E M A T R H P R Y - Row 2:
E T E F E T E A T - Final Cipher Text:
M E M A T R H P R Y E T E F E T E A T
View diagram · 📝 Solved Example 1: Rail Fence Cipher (Depth = 2)
Row / Columnar Transposition Cipher
- The Rail Fence Cipher is very easy to break because there is no complex key.
- How Columnar Transposition Works: Choose a secret Keyword (e.g.,
HACKorZEBRA) and number its letters alphabetically (e.g., inH A C K:Ais 1,Cis… - Write the Plain Text message row by row into a rectangle under those columns.
- If the last row is incomplete, fill the empty spaces with dummy letters like
XorZ. - Read the letters column by column following the numerical order (
1, 2, 3, 4...) of the key! - 📝 Solved Example 2: Columnar Transposition Cipher: Question: Encrypt the Plain Text
"ATTACK POSTPONED"using Columnar Transposition with Keyword"HACK". - Alphabetical order of
H, A, C, K: A= 1
Comparison: Substitution Cipher vs. Transposition Cipher
- This is one of the most important 5-mark comparison questions in DAVV Unit 1:
- Core Principle: Replaces Plain Text characters with other characters
- Character Identity: Changes (e.g.,
AbecomesD) - Character Position: Remains in the original position
- Letter Frequency: Original letters disappear, replaced by new ones
- Examples: Caesar, Mono-alphabetic, Playfair, Hill, Vigenère