0% found this document useful (0 votes)
12 views55 pages

Information Security Overview and Practices

Information Security (InfoSec) focuses on protecting digital and physical information from unauthorized access and threats, ensuring compliance with regulations and maintaining trust. Key components include understanding security threats like malware and phishing, implementing the CIA Triad (Confidentiality, Integrity, Availability), and utilizing cryptography for secure communication. Risk management strategies are essential for identifying vulnerabilities and applying security controls to mitigate potential risks.

Uploaded by

A7 Roll No 40
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views55 pages

Information Security Overview and Practices

Information Security (InfoSec) focuses on protecting digital and physical information from unauthorized access and threats, ensuring compliance with regulations and maintaining trust. Key components include understanding security threats like malware and phishing, implementing the CIA Triad (Confidentiality, Integrity, Availability), and utilizing cryptography for secure communication. Risk management strategies are essential for identifying vulnerabilities and applying security controls to mitigate potential risks.

Uploaded by

A7 Roll No 40
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

INS

UNIT 1

INFORMATION AND SECURITY


Information Security (InfoSec) is the practice of protecting digital and
physical information from unauthorized access, disclosure, modification,
destruction, or disruption.
It deals with securing data, networks, systems, and people.

Objectives of InfoSec:

1. Protect information assets (data, systems, infrastructure).

2. Prevent unauthorized access.

3. Ensure trust in systems and communication.

4. Comply with regulations like GDPR, HIPAA, PCI-DSS.

Importance:

Financial: Avoids theft of money through fraud or hacking.

Privacy: Protects sensitive user information (like medical records,


personal IDs).

Trust: Customers and partners trust companies that secure their data.

Business Continuity: Prevents downtime due to cyberattacks.

Example: In 2013, the Target data breach exposed 40 million credit card details
because of poor security measures. The company lost millions and its
reputation was damaged.

Security Threats and Vulnerabilities


Threat: Anything that has the potential to cause harm to information assets.

Vulnerability: Weakness in the system that can be exploited by threats.

Common Threats:

INS 1
1. Malware (Malicious Software)

Virus: Attaches to files/programs and spreads when executed.

Worm: Self-replicates over networks without human action.

Trojan Horse: Disguised as legitimate software.

Ransomware: Locks data and demands payment.

Example: WannaCry ransomware attack (2017).

Example: WannaCry (2017) ransomware spread globally, locking


hospital and government files and demanding Bitcoin payment.

2. Phishing

Fake emails, SMS, or websites that trick people into revealing personal
data (passwords, credit card numbers).

Example: An email looking like it’s from a bank, asking you to “verify”
your account by entering your login details.

3. Social Engineering

Psychological manipulation of people to gain confidential info.

Example: An attacker calls pretending to be IT support and asks an


employee to share their login credentials.

4. Insider Threats

Threats from employees, contractors, or partners who misuse access.

Example: Edward Snowden leaked NSA classified documents in 2013.

Security Attacks
It is any action that compromises the confidentiality, integrity, or
availability (CIA Triad) of information or information systems.

Attackers exploit vulnerabilities (weaknesses in systems, networks, or


users) to gain unauthorized access, steal, modify, or disrupt data and
services.

Two main categories:


1. Passive Attacks - The attacker monitors or intercepts communications but
does not alter them. The goal is information gathering.

INS 2
Types of Passive Attacks

Eavesdropping / Snooping: Listening to private communications.

Example: Intercepting unencrypted Wi-Fi traffic to read emails.

Traffic Analysis: Observing communication patterns without reading


content.

Example: Knowing that two executives are frequently exchanging


messages, even without reading them.

Impact: Violates confidentiality.

Defense: Encryption (e.g., HTTPS, VPN).


2. Active Attacks - The attacker modifies, disrupts, or fabricates
communications. These are more dangerous.

Types of Active Attacks

1. Masquerade (Impersonation)

Attacker pretends to be an authorized user.

Example: Hacker logs in using stolen credentials.

2. Replay Attack

Capturing and retransmitting valid data to gain unauthorized access.

Example: Resending an online banking transaction message.

3. Modification of Messages

Altering data in transit.

Example: Changing the amount in a money transfer from ₹1000 to


₹10,000.

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

Making a system or service unavailable by overwhelming it with traffic.

Example: Flooding a website with millions of fake requests so real users


can’t access it.

Impact: Violates integrity and availability.


Defense: Firewalls, IDS/IPS, authentication, anti-replay mechanisms.

SECURITY MODELS

INS 3
CIA Triad
The CIA Triad is the foundation of information security.

1. Confidentiality

Ensuring only authorized users can access sensitive information.

Techniques: Encryption, Access Control Lists (ACLs), VPNs.

Example: Online banking encrypts all transactions to prevent hackers


from reading your data.

2. Integrity

Ensuring information is accurate, consistent, and has not been


tampered with.

Techniques: Checksums, Digital Signatures, Hashing.

Example: If you download software from a website, it provides a hash


value (like SHA-256). If your downloaded file hash matches, the file is
intact.

3. Availability

Ensuring systems and data are accessible whenever required.

Techniques: Redundancy, Backup systems, DDoS protection.

Example: E-commerce websites like Amazon use load balancing and


cloud redundancy to stay online during peak sales events (like Black
Friday).

Security Services

INS 4
It is a processing or communication service that enhances the security of
information systems and data transfers.

It ensures protection against security attacks and supports the


enforcement of security policies.

Main Security Services

1. Authentication - Establishing the identity of a user, system, or entity.

Types:

Peer-entity authentication: Verifies that two communicating entities


are who they claim to be.

Data-origin authentication: Confirms the source of a message.

Examples:

Logging into Gmail using username + password (user authentication).

Digital signatures verifying that an email came from Alice, not an


impostor.

2. Access Control - Prevents unauthorized use of resources.

Function: Determines who can access what (enforces permissions after


authentication).

Examples:

In Google Drive, the file owner decides whether another user can view,
comment, or edit.

In a hospital system, doctors can view patient medical history, but


receptionists cannot.

3. Data Confidentiality - Protects data from unauthorized disclosure (keeps


secrets secret).

Types:

Connection confidentiality: Protects data during transmission (e.g.,


VPN).

Connectionless confidentiality: Protects individual messages.

Selective-field confidentiality: Protects specific parts of data (e.g.,


credit card number).

INS 5
Examples:

HTTPS encryption hides your credit card info when buying online.

WhatsApp end-to-end encryption keeps chats private.

4. Data Integrity - Ensures data is not altered, destroyed, or tampered with


during storage or transmission.

Types:

Connection integrity: Ensures complete, correct, ordered delivery.

Connectionless integrity: Ensures individual messages are intact.

Selective-field integrity: Protects critical parts of data.

Examples:

Hash functions (SHA-256) verify downloaded software is unchanged.

Blockchain ensures tamper-resistant records.

5. Non-repudiation - Prevents an entity from denying that it performed an


action (sending a message, making a transaction).

Why needed: Ensures accountability in communication and transactions.

Examples:

Digital signatures: If Alice signs an email, she cannot later deny sending
it.

In online payments, banks use logs and cryptographic receipts to prove


a customer made the transaction.

Risk Management
Security isn’t about eliminating risks completely (impossible), but reducing
risks to acceptable levels.

1. Risk Assessment

Identify assets (data, systems), threats, and vulnerabilities.

Measure impact and likelihood.

Example: A company identifies customer databases as high-value


assets and recognizes phishing as a likely threat.

2. Mitigation Strategies

INS 6
Apply security controls to reduce risks.

Options:

Avoidance (remove risky activity).

Reduction (implement security measures).

Transfer (use insurance or outsourcing).

Acceptance (accept small risk if cost of protection is too high).

Example: Installing firewalls and antivirus software reduces malware


risks.

3. Security Audits

Independent evaluation of an organization’s security policies and


practices.

Can be internal (done by company security team) or external (done by


third-party experts).

Example: An e-commerce company undergoes a PCI-DSS audit to


ensure credit card data handling is secure.

Cryptography
It is the science of securing information so that only the intended parties
can access and understand it.

It converts data into an unreadable form (encryption) and then back into
readable form (decryption) using keys.

Main Goals of Cryptography:

1. Confidentiality – Only authorized users can read the information.

2. Integrity – Data cannot be altered during transmission.

3. Authentication – Verify the identity of the sender/receiver.

4. Non-repudiation – Sender cannot deny sending the information.

INS 7
Example -

Bhuvan (Sender) → msg (Plain text) → encrypt (using encryption algorithms +


key) → encrypted msg (cipher text) → decrypt (using decryption algorithms +
key) → msg → Sohail (Receiver)

Case (i): If keys are same → Symmetric cryptography


Case (ii): If keys are different → Asymmetric cryptography

Encryption
→ process of transforming information from readable to unreadable format.

→ Encryption algorithms are used to encrypt the information/data.


Decryption
→ process of transforming data/info from unreadable → readable format.

→ Decryption algorithms are used to decrypt the data.


Key

→ String of bits used by cryptographic algorithms to transform plain text →


cipher text or vice versa.
→ It is used for secure communication.

Types of Cryptography
1. Symmetric Cryptography

It is the simplest kind of encryption technique.

It involves only 1 key to encrypt and decrypt (or cipher and decipher)
information.

It is also called secret key cryptography / private key cryptography.

Most popular symmetric key cryptography system is DES (Data Encryption


System).

Plain Text → Encryption (Key1) → Cipher Text → Decryption (Key1) → Plain Text

2. Asymmetric Key Cryptography

INS 8
It is also called public key cryptography.

Popular asymmetric key algo → RSA, DSA, Elliptic curve, etc.

It uses two keys (a pair of keys) for encryption and decryption:

Public key → known to everyone

Private key → known only to that particular person

Plain Text → Encryption (Key1) → Cipher Text → Decryption (Key2) → Plain Text
IMPORTANT - A message that is encrypted using a public key can only be
decrypted using a private key, while also, a message encrypted using private
key can be decrypted using public key.
3. Hash Functions

One-way cryptographic functions that take input data and generate a fixed-
size hash value.

No decryption possible (used for verification, not encryption).

Examples: SHA-256, MD5 (outdated), SHA-3.

Cipher
It is a method (or algorithm) used to perform encryption (convert plaintext
into unreadable ciphertext) and decryption (convert ciphertext back to
plaintext).

Plaintext → (Cipher + Key) → Ciphertext

Ciphertext → (Cipher + Key) → Plaintext


A. Stream Cipher

Encrypts data one bit or one byte at a time, using a pseudorandom key
stream.

Fast and suitable for real-time communication.

Examples: RC4, Salsa20, ChaCha20.

INS 9
B. Block Cipher

Divides plaintext into fixed-size blocks (e.g., 64 or 128 bits) and encrypts
each block using a key.

More secure but slower than stream ciphers.

Examples: AES, DES, Blowfish.

INS 10
Feature Block Cipher Stream Cipher

Plain → cipher text by taking 1 bit or 1 byte of plain text →


Basic operation
plaintext's block at a time. cipher text.

Typical unit size Uses 64 bits or more. Stream cipher uses 8 bits.

Complexity of block cipher is While stream cipher is more


Complexity
simple. complex.

Uses confusion as well as


Concepts used Uses only confusion concept.
diffusion concept.

Reversibility / Reverse encrypted text is


In this, reverse encrypted text is
decryption easy (we have to do XOR
hard.
difficulty again).

ECB (Electronic Code Book), CFB (Cipher Feedback),


Common
CBC (Cipher Block Chaining) — OFB (Output Feedback) —
algorithmic modes
algorithmic modes are used. algorithmic modes used.

C. Substitution Cipher -

Each letter (or group of letters) in the plaintext is replaced with another
letter, symbol, or number.

Keeps the order of characters the same.

Changes the identity of characters.

1. Caesar Cipher

INS 11
INS 12
2. Playfair Cipher

It is a digraph cipher → encrypts pairs of letters (instead of single letters


like Caesar).

Makes frequency analysis attacks harder.

a. Generate the 5×5 Key Matrix

Choose a keyword (e.g., "MONARCHY").

Fill the 5×5 matrix with letters of the keyword (no repeats).

INS 13
Fill remaining spaces with other alphabets (I and J are treated as the
same).

Example:

MONAR
CHYBD
EFGIK
LPQST
UVWXZ

b. Preprocess the Plaintext

Break message into pairs of two letters (digraphs).

If a pair has the same letters (e.g., "MEET" → "ME" "ET", but "EE" is not
allowed):

Insert filler letter (usually "X").

If message length is odd, add "Z" at the end.

Example:
Plaintext: "HELLO" → HE LX LO
c. Apply Encryption Rules
For each pair of letters in plaintext:

a. Same Row Rule

Replace each letter with the letter to its right (circular wrap if at end).

b. Same Column Rule

Replace each letter with the letter below (circular wrap if at bottom).

c. Rectangle Rule

If letters are at different rows & columns → replace with letters that form
the rectangle corners (same row as original letter).

3. Hills Cipher

Basic Idea

Convert plaintext letters into numbers (A = 0, B = 1, …, Z = 25).

INS 14
Group them into vectors (block size depends on key matrix dimension).

Multiply by a key matrix (mod 26).

Resulting numbers → converted back into ciphertext letters.

Encryption

INS 15
Decryption

INS 16
INS 17
4. Vigenere Cipher

INS 18
INS 19
INS 20
5. Vernam Cipher

Encryption and Decryption

INS 21
D. Transposition Cipher -

letters remain the same, but their positions are rearranged according to a
rule.

Changes the order of characters.

Does not change the identity of characters.

1. Rail and Fence

2. Row Transposition

INS 22
3. Double Transposition

INS 23
Fiestel Cipher

INS 24
Diffusion & Confusion – Claude Shannon

INS 25
1. Terms confusion and diffusion were introduced by Claude Shannon.

2. Shannon’s concern was to prevent cryptanalysis based on statistical


analysis. The reason is as follows:

Assume attacker has some knowledge of the statistical characteristics of


the plaintext (e.g., in a message, the frequency distribution of the various
letters may be known).

If these statistics are in any way reflected in the ciphertext, the cryptanalyst
(attacker) may be able to deduce the encryption key.

Thus, Shannon suggested two methods for frustrating the attackers:

1. Confusion

2. Diffusion

Diffusion
If a symbol in the plaintext is changed, several or all symbols in the
ciphertext will also change.

The idea of diffusion is to hide the relationship between the ciphertext


and plaintext.

According to Wikipedia:

Diffusion means that if we change a single bit of the plaintext, then


(statistically) half of the bits in the ciphertext should change, and similarly,
if we change 1 bit of ciphertext, then at least one half of the plaintext bits
should change.

Diffusion implies that each symbol in the ciphertext is dependent on some


or all the symbols in the plaintext.

Confusion
It hides the relationship between ciphertext and the key.

If a single bit in the key is changed, then most/all bits of the ciphertext
will also be changed.

According to Wikipedia:

Confusion means that each bit of the ciphertext should depend on several
parts of the key, obscuring the connection between the two.

INS 26
(→ make unclear or difficult to understand).

Symmetric Key Cryptography

Block Modes of Operation


For different types of messages, we need different modes of operations.
5 modes of operation are:

1. ECB (electronic codebook mode)

simplest mode of operation

plain text is divided into a no. of (fixed) size block

if message is not a multiple of block size, then padding is done

Take one block at a time and encrypt it

Same key used for encryption and decryption.

Note

Best for short amount of data, such as a key

Not secure for lengthy data

If identical blocks appear, then this mode produces same cipher.

Example - let block size = 5


Plain Text = Hello every one
[ Hello ] [ every ] [ one x x ] -> padding
Plain block 1 -> (encryption algo with key) -> cipher block 1
This will happen for all the [boxes] blocks.

Decryption
[ Cipher Block-1 ] -> ( Decryption Algorithm with key ) -> [ PlainText Block 1 ]
This will happen for every box.

2. CBC (cipher block chaining mode)

To overcome security issues of ECB mode (i.e. in ECB if same blocks


appear then ciphertext produced will be same).

INS 27
In encryption algo we do XOR of the current plaintext block and the
preceding ciphertext block. So, repeating patterns not exposed.

(Same key) for encrypt + decrypt.

Encryption

Decryption

IV must be known to both parties, but should be unpredictable by the 3rd


parties. So, we can use ECB encryption to ensure max. security.

Limitation - If we have 2 identical messages and if we use IV(initial Vector)


cipher will be same.

3. CFB (cipher feedback mode)

INS 28
Encryption

Decryption

4. OFB (output feedback mode)

Encryption

INS 29
Decryption - Cj and Pj will be exchanged

5. CTR (Counter Mode)

Simple and fast

Counter, equal to the plaintext block size, is used.

Counter is initialised to some value and then incremented by 1 for each


subsequent block.

Encryption

Decryption - Change Pi and Ci

DES (Data Encryption System)

INS 30
INS 31
KEY GENERATION

INS 32
INS 33
DOUBLE DES

INS 34
INS 35
1. Drawback of 2DES

2DES means encrypting plaintext with DES twice using two different keys:

C=EK2(EK1(P))C = E_{K2}(E_{K1}(P))C=EK2(EK1(P))

Intention: increase security to 112-bit key strength (56+56).

Drawback:

It is not much more secure than single DES due to a known-plaintext


attack using the Meet-in-the-Middle method.

Effective security is reduced to about 2^57 operations, not 2^112.

Thus, 2DES provides little improvement over single DES.

2. Attack on Double DES

INS 36
The main attack on 2DES is the Meet-in-the-Middle attack.

Steps:

1. Suppose attacker knows a plaintext–ciphertext pair (P, C).

2. Encrypt plaintext P with all possible keys K1K1K1: store intermediate


results.

Compute X=EK1(P)X = E_{K1}(P)X=EK1(P) for all 2562^{56}256


keys.

3. Decrypt ciphertext C with all possible keys K2K2K2:

Compute Y=DK2(C)Y = D_{K2}(C)Y=DK2(C) for all 2562^{56}256


keys.

4. Look for a match between X and Y (the "meeting point").

5. When a match is found, attacker gets candidate (K1, K2).

Complexity:

Time ≈ 256+256=2572^{56} + 2^{56} = 2^{57}256+256=257

Memory ≈ 2562^{56}256

Much less than 21122^{112}2112.

3. Meet-in-the-Middle Attack

General cryptanalytic technique for breaking multiple encryption schemes.

Idea: Instead of brute-forcing both keys independently, "meet in the


middle."

Steps (for double encryption):

1. Compute forward direction: all possible encryptions of plaintext with


first key.

2. Compute backward direction: all possible decryptions of ciphertext


with second key.

3. Store results in a table (hash/map).

4. Compare both sides → find a "meeting value."

Why it works:

INS 37
Reduces complexity from exponential in two keys
(256×256=21122^{56} \times 2^{56} = 2^{112}256×256=2112)

To nearly linear in one key size (2572^{57}257).

TRIPLE DES

AES

INS 38
INS 39
INS 40
Asymmetric Key Cryptography

RSA
The key selection algorithm in RSA involves generating a pair of keys: a public
key (used for encryption) and a private key (used for decryption).
RSA Key Generation Algorithm

INS 41
Example -

INS 42
Digital Signatures
A Digital Signature is like an electronic fingerprint that ensures:

1. Authentication → verifies the sender’s identity.

2. Integrity → ensures the message wasn’t altered.

3. Non-repudiation → sender cannot deny sending the message.

It is widely used in secure communications, e-documents, software


distribution, online banking, etc.

How Digital Signatures Work

1. Sender Side (Signing):

The sender creates a hash of the message using a hash function (e.g.,
SHA-256).

The hash value is encrypted with the sender’s private key → this
becomes the digital signature.

The message + signature are sent to the receiver.

2. Receiver Side (Verification):

Receiver applies the same hash function to the received message.

Receiver decrypts the digital signature using the sender’s public key,
which gives the original hash.

If both hashes match → ✅ message is authentic and unaltered.


INS 43
If not → ❌ message is tampered or not from the claimed sender.
HASH FUNCTIONS
It is a mathematical function that converts any input (message, file, password,
etc.) of arbitrary length into a fixed-size output called a hash value (digest).
Properties of a Good Hash Function

1. Deterministic → same input always gives same output.

2. Fixed Output Size → regardless of input length.

3. Fast Computation → easy to compute for any data.

4. Pre-image Resistance → hard to find the original input from its hash.

5. Collision Resistance → hard for two different inputs to produce same hash.

6. Avalanche Effect → small change in input → large unpredictable change in


output.

Working of Hash Function

1. Take input data of any size.

2. Apply mathematical operations (bit shifts, modular arithmetic, XOR, etc.).

3. Produce a fixed-size unique hash value.

Example: SHA-256 → 256-bit output

Example: MD5 → 128-bit output

Applications of Hash Functions

1. Data Integrity → used in checksums to verify files are not altered (e.g.,
MD5, SHA).

2. Password Storage → passwords are stored as hashes instead of plain text.

3. Digital Signatures → hash of a message is signed to ensure authenticity.

4. Message Authentication Codes (MACs) → hash helps verify


sender/receiver identity.

1. MD5

INS 44
MD5 (Message Digest 5) is a widely used cryptographic hash function
developed by Ronald Rivest in 1991.

It produces a 128-bit hash value (32-digit hexadecimal number).

It is mainly used for data integrity checks, but is not secure for
cryptography today (due to collisions).

Working of MD5 (Step by Step)

1. Input Message - Any length message is taken as input.

2. Padding

Message is padded so its length ≡ 448 mod 512.

Then, the original message length (in 64 bits) is added → total length
becomes a multiple of 512 bits.

3. Divide into Blocks - The padded message is split into 512-bit blocks.

4. Initialize Buffers - Four 32-bit registers (A, B, C, D) are initialized with fixed
constants.

5. Processing Each Block

Each 512-bit block is divided into 16 words (32 bits each).

Then processed in 4 rounds (64 operations) using:

Logical functions (AND, OR, XOR, NOT)

Left circular shifts

Addition modulo 2³²

6. Update Buffers - Results are mixed into A, B, C, D values.

7. Final Hash - After processing all blocks, the concatenated values of A, B, C,


D give the 128-bit hash output.

Features of MD5

Fixed Output → Always 128-bit.

Fast & Simple → Efficient for integrity checking.

Not Secure → Vulnerable to collisions and preimage attacks (e.g., two


different files can have the same MD5 hash).

INS 45
Applications (Today) → Checksums for files, basic data verification (not
cryptography).

2. SHA
SHA (Secure Hash Algorithm) is a family of cryptographic hash functions
designed by NIST (National Institute of Standards and Technology).
It converts any input (message, file, or data) into a fixed-length hash value
(digest).
Examples:

SHA-1 → 160-bit hash

SHA-256 → 256-bit hash

SHA-512 → 512-bit hash

How SHA Works


Let’s take SHA-256 as an example:

1. Input Message

Any length data (text, file, etc.) is taken as input.

2. Preprocessing (Padding & Parsing)

The message is padded so its length becomes a multiple of 512 bits.

It is then divided into 512-bit blocks.

3. Initialize Hash Values

SHA uses a set of initial constant values (derived from prime


numbers).

4. Processing Each Block (Compression Function)

Each 512-bit block is processed in 64 rounds using logical operations


(AND, OR, XOR, bit shifts).

Intermediate results are mixed with constants.

5. Output (Message Digest)

After all rounds, SHA produces a fixed-length hash value (e.g., 256-bit
digest for SHA-256).

Features of SHA

INS 46
Fixed Output Size → regardless of input length.

One-Way Function → cannot retrieve original data from hash.

Collision Resistant → difficult for two different inputs to produce the same
hash.

Used in → digital signatures, password storage, SSL/TLS, blockchain.

CYRPTOGRAPHIC PROTOCOL

SSL
It is a cryptographic protocol developed by Netscape in 1995.

Its purpose: secure communication over an insecure network (Internet).

Provides three main services:

1. Authentication → verifies server (and optionally client).

2. Confidentiality → encrypts data so outsiders can’t read it.

3. Integrity → ensures data isn’t modified in transit.

Architecture of SSL
SSL has two layers:

1. SSL Record Protocol → takes data, fragments it, compresses, adds MAC,
encrypts, and transmits.

2. Handshake Protocol → establishes secure session (chooses cipher suite,


authenticates, exchanges keys).

How SSL Works (Simplified Handshake Process)

1. Client Hello

Client sends supported cipher suites, SSL version, random number.

2. Server Hello

INS 47
Server responds with chosen cipher suite, SSL version, its digital
certificate (containing public key).

3. Authentication

Client verifies server certificate (using CA).

4. Key Exchange

Client generates a pre-master secret, encrypts it with server’s public


key, and sends it.

Both sides derive a session key from this secret.

5. Secure Communication

All further data is encrypted with symmetric session key (faster than
public-key).

Example (HTTPS with SSL)

1. You type [Link] .

2. Browser (client) → Bank server: “Hello, I support TLS/SSL, here are my


cipher suites.”

3. Bank server → Browser: “I choose AES, here is my certificate.”

4. Browser verifies certificate (via CA).

5. Browser sends encrypted pre-master secret → server.

6. Both derive same session key.

7. Now, your login/password and transactions are encrypted end-to-end.

PGP
PGP stands for Pretty Good Privacy.
It is an encryption and decryption program that provides confidentiality,
integrity, and authentication in digital communication (mainly emails, files, and
documents).
PGP combines the features of:

Symmetric encryption (fast for encrypting data)

INS 48
Asymmetric encryption (Public-Key Cryptography) (for secure key
exchange and authentication)

Hashing (to verify message integrity)

Working

Key Generation → Each user creates a public key (shared) and a private
key (secret).

Encryption →

Message is encrypted using a one-time symmetric session key.

The session key is then encrypted with the receiver’s public key.

(Optional) Sender adds a digital signature by encrypting a hash of the


message with their private key.

Decryption →

Receiver uses their private key to decrypt the session key.

The session key decrypts the message.

Receiver verifies the digital signature with the sender’s public key.

PGP Provides

Confidentiality → message is encrypted, only the receiver can read it.

Integrity → hash ensures the message wasn’t altered.

Authentication → digital signature proves the sender is genuine.

Non-repudiation → sender cannot deny sending the message.

TLS(Transport Layer Security)


TLS is the successor of SSL, standardized first in 1999 (RFC 2246).

Provides privacy, integrity, and authentication over a network.

TLS secures most of the internet → used in HTTPS, email, VPNs, VoIP,
instant messaging.

Goals of TLS

1. Confidentiality → Encrypts communication with symmetric cryptography


(AES, ChaCha20).

INS 49
2. Authentication → Uses digital certificates to verify server (and optionally
client).

3. Integrity → Ensures data is not tampered with (HMAC, AEAD).

4. Forward Secrecy → Even if long-term keys are stolen later, past


communication remains secure

TLS has two layers (similar to SSL):

1. Record Protocol → Provides basic security services (encryption + integrity


check).

2. Handshake Protocol → Authenticates and negotiates session keys before


secure communication.

TLS Working (Handshake Process in Simple Points)

1. Client Hello

Browser (client) says “Hello” to server.

Sends: supported TLS version, cipher suites, and a random number.

2. Server Hello

Server replies: chosen TLS version, cipher suite, its own random
number.

Sends digital certificate (with public key).

3. Authentication

Client checks if server’s certificate is valid (using Certificate Authority).

4. Key Exchange

Client and server agree on a shared session key using RSA or Diffie-
Hellman (in TLS 1.3 → ECDHE is used).

5. Session Key Created

Both now have the same secret session key (but no one else knows it).

6. Secure Communication

From now on, data is encrypted with the session key (fast symmetric
encryption like AES).

Integrity is ensured with HMAC/AEAD.

INS 50
Key Exchange Protocol
It is a method by which two parties (e.g., your browser and a website
server) securely agree on a shared secret key over an insecure network.

This shared key is later used for symmetric encryption (fast and efficient).

Why is it Needed?

Symmetric encryption (AES, DES) is fast, but both sides need the same
secret key.

If you send the key directly, an attacker can steal it.

So, we need a secure way to establish the key → that’s what key exchange
protocols do.

DH KEY EXCHANGE ALGORITHM

INS 51
INS 52
Firewall
Security system (hardware, software, or both) that monitors and controls
incoming and outgoing network traffic based on predefined rules.

Its main job: act as a barrier between a trusted network (like your
organization’s LAN) and an untrusted network (like the internet).

In cryptography context, a firewall is part of the defense system ensuring


secure communication, protecting cryptographic services from
unauthorized access.

Types
1. Packet Filtering Firewall

Oldest, simplest type.

Works at Network Layer (Layer 3 of OSI model).

Checks each packet’s IP address, port, and protocol.

Either allows or blocks based on rules.

INS 53
✅ Fast, lightweight
❌ Weak security (does not check payload).
2. Stateful Inspection Firewall (Dynamic Filtering)

Works at Network and Transport Layers.

Keeps track of active connections (state table).

Only allows packets that belong to a valid session.

✅ Stronger than packet filtering.


❌ More resource-heavy.
3. Proxy Firewall (Application-Level Gateway)

Works at Application Layer (Layer 7).

Acts as an intermediary between client and server.

Inspects content of messages (not just headers).

Can filter HTTP, FTP, SMTP traffic.

✅ Very secure (deep inspection).


❌ Slower, adds latency.

Aspect Steganography Cryptography

Hides the existence of the


Converts the message into
message by embedding it
Meaning unreadable form (ciphertext) so that
within another medium (image,
only authorized parties can read it.
audio, video, text).

Conceal communication –
Secure communication – make the
Objective make it look like no secret
message unreadable to outsiders.
message exists.

The message itself is hidden


The message is visible but
Visibility inside another file, so it is
scrambled (encrypted).
invisible.

Method Uses techniques like LSB Uses algorithms like AES, RSA, DES
(Least Significant Bit) for encryption/decryption.

INS 54
Aspect Steganography Cryptography
substitution in images, or
audio/video steganography.

Provides security by obscurity Provides security by encryption


Security type
(hiding). (mathematical strength).

Harder to detect since no one Easy to detect the presence of


Detection suspects the presence of a encrypted data, though hard to
hidden message. decrypt without the key.

Watermarking, covert
Banking transactions, passwords,
Use cases communication, copyright
confidential communications.
protection.

INS 55

You might also like