CNS
CNS
Module 1
INTRODUCTION
Computer security concepts - OSI security architecture - security attacks service mechanism -
model for network security – classical encryption techniques.
Computer security refers to protecting and securing computers and their related data, networks, software,
hardware from unauthorised access, misuse, theft, information loss, and other security issues.
1.Confidentiality: Confidentiality means protecting information so that only authorised people can access it. If
someone who is not allowed sees the information, that's a loss of confidentiality.
A loss of confidentiality is the unauthorised disclosure of information.
• Data confidentiality: Ensures that sensitive or private data is not seen by unauthorised people.
• Privacy: Gives individuals control over their personal data—like who can collect, store, and share it.
2.Integrity: Integrity means making sure that information is accurate and hasn’t been changed in an
unauthorised way. If someone alters or deletes information without permission, that’s a loss of integrity.
• Data integrity: Ensures that information and programs are only changed in allowed and authorised manner.
• System integrity: Ensures the system functions correctly, without being damaged or tampered with.
3.Availability: Availability means that authorised users should be able to access information and systems when
they need to. A loss of availability means users can’t access what they need, possibly due to attacks or technical
failures. Assures that systems work promptly and service is not denied to authorised users.
1. Cyber Security: Cyber security means securing our computers, electronic devices, networks , programs,
systems from cyber attacks. Cyber attacks are those attacks that happen when our system is connected to the
Internet.
2. Information Security: Information security means protecting our system’s information from theft, illegal
use and piracy from unauthorized use. Information security has mainly three objectives: confidentiality,
integrity, and availability of information.
3. Application Security: Application security means securing our applications and data so that they don’t get
hacked and also the databases of the applications remain safe and private to the owner itself so that user’s data
remains confidential.
4. Network Security: Network security means securing a network and protecting the user’s information who
is connected through that network. Over the network, hackers steal the packets of data through sniffing and
spoofing attacks, man in the middle attack, war driving, etc, and misuse the data for their benefits.
1

1. Denial of service attack or DOS: A denial of service attack is a kind of cyber attack in which the attackers
disrupt the services of the particular network by sending infinite requests and temporary or permanently making
the network or machine resources unavailable to the intended audience.
2. Backdoor: In a backdoor attack, malware or virus gets installed in our system and start affecting it’s security
along with the main file. Consider an example: suppose you are installing free software from a certain website
on the Internet. Now, unknowingly, along with this software, a malicious file also gets installed, and as soon as
you execute the installed software, it starts affecting your computer security. This is known as a backdoor.
3.Eavesdropping: Eavesdropping refers to secretly listening to someone’s talk without their permission or
knowledge. Attackers try to steal, manipulate, modify, hack information or systems by passively listening to
network communication, knowing passwords etc. A physical example would be, suppose if you are talking to
another person of your organization and if a third person listens to your private talks then he/ she is said to
eavesdrop on your conversation. Similarly, your conversation on
the internet maybe eavesdropped by attackers listening to your private conversation by connecting to your
network if it is insecure.
4. Phishing: Phishing is pronounced as “fishing” and is similar to it. While fishing, we catch fish by luring
them with bait. Similarly, in phishing, a user is tricked by the attacker who gains the trust of the user or acts as
if he is a genuine person and then steals the information by ditching. Not only attackers but certain websites
that seem to be genuine, actually are fraud sites. These sites trick the users and they end up giving their personal
information such as login details or bank details or card number etc. Phishing is of many types: Voice phishing,
text phishing etc.
5. Spoofing: Spoofing is the act of masquerading (pretending to be someone else) as a valid entity through
falsification of data(such as an IP address or username), in order to steal information or resources and cause
harm. Spoofing is of several types- email spoofing, IP address spoofing, MAC spoofing , biometric spoofing
etc.
6. Malware: Malware is made up of two terms: Malicious + Software = Malware. Malware enters into the
system and is designed to damage our computers. Different types of malware are adware, spyware,
ransomware, Trojan horse, etc.
7. Social engineering: Social engineering attack involves manipulating users psychologically and
extracting confidential or sensitive data from them by gaining their trust. The attacker generally exploits the
trust of people or users by relying on their cognitive basis.
8. Polymorphic Attacks: Poly means “many” and morph means “form”, polymorphic attacks are those in
which attacker adopts multiple forms and changes them so that they are not recognized easily. These kinds of
attacks are difficult to detect due to their changing forms.
Security Attacks
2

1. Passive Attack: In passive attacks, a third-party intruder monitors or intercepts data without altering it. The
sender and receiver remain unaware of the breach. Passive attacks are typically focused on gathering
information or intelligence, rather than causing damage or disruption. The message/ data transmitted remains in
its usual form without any deviation from its usual behavior. This makes passive attacks very risky as there is
no information provided about the attack happening in the communication process.
• Eavesdropping: The attacker secretly listens to communications between parties without consent. This can
involve techniques like packet sniffing or man-in-the-middle attacks.
• Traffic analysis: The attacker observes network traffic patterns and metadata to gather information about the
system, network or device, without accessing actual content. Techniques include protocol or flow analysis.
2. Active Attacks: Active attacks involve tampering with or disrupting the system. The data is altered, and
neither the sender nor the receiver may know about it. Active attacks are typically focused on causing damage
or disruption, rather than gathering information or intelligence. The message/ data transmitted doesn’t remain in
its usual form and shows deviation from its usual behavior. This makes active attacks dangerous as there is no
information provided of the attack happening in the
communication process.
• Masquerade: An attacker pretends to be an authorized user to gain access, often by using stolen or
forged credentials.
• Replay: The attacker intercepts a message and fraudulently retransmits it later to deceive the receiver.
• Modification of Message: The attacker alters a message to make it misleading or corrupted before it
reaches the recipient.
• Denial of Service (DoS): Overwhelms a system with excessive traffic, making it unavailable to
legitimate users.
Security Mechanism
Security mechanisms are tools or methods used to detect or prevent breaches and protect systems from threats:
• Encipherment (Encryption): Converts data into a secure format using algorithms. Only users with the
correct decryption key can access the original data.
• Digital Signature: Uses cryptographic methods to verify the authenticity and integrity of digital
documents or messages.
• Traffic Padding: Adds extra data to network traffic to conceal actual content and prevent analysis.
• Routing Control: Chooses secure routes for data transmission and adjusts routing when security threats
are suspected.
Security Services
Security services are designed to prevent, detect, and respond to security threats:
• Data Integrity: Maintains the accuracy and consistency of data during transmission or storage.
• Non-repudiation: Prevents the sender from denying the origin or delivery of a message by providing
verifiable records.
Plaintext: This is the original readable message or data that is kept as a secret, and is fed into the algorithm as
input.
Encryption algorithm: A set of rules or steps used to transform plaintext into cipher text using a key.
It does the actual "scrambling" of the message. performs various substitutions and transformations on the
plaintext.
Secret key: A piece of information shared between sender and receiver that controls the encryption and
decryption process. The same key is used for both processes in symmetric encryption. The key is a value
independent of the plaintext and of the algorithm. The algorithm will produce a different
output depending on the specific key being used at the time. The exact substitutions and
transformations performed by the algorithm depend on the key.
Cipher text: This is the scrambled message produced as output. It looks unreadable and meaningless to anyone
who doesn’t have the key. It depends on the plaintext and the secret key.
Decryption algorithm: A set of steps used to convert cipher text back to plaintext, using the same secret key. It
reverses the encryption process.
1. We need a strong encryption algorithm. At a minimum, we would like the algorithm to be such that an
opponent who knows the algorithm and has access to one or more cipher texts would be unable to decipher the
cipher text or figure out the key. This requirement is usually stated in a stronger form.
2. Sender and receiver must have obtained copies of the secret key in a secure fashion and must keep the key
secure. If someone can discover the key and knows the algorithm, all communication using this key is readable.
CRYPTOGRAPHY
Cryptography is the science of securing information by transforming it into a format that cannot be understood
by unauthorised people. It is the process of converting data into a secret code (called encryption) to protect it,
and then converting it back to its original form (decryption) when needed.
1. The encryption algorithm must be strong and capable of resisting cryptographic attacks.
4

2. The secret key must be known only to the sender and the receiver, ensuring it remains confidential.
GENERAL APPROACHES: When attempting to break or weaken encryption, attackers typically follow two
main approaches:
1) CRYPTANALYSIS
Cryptanalysis is the science of analyzing and breaking encryption algorithms by exploiting weaknesses in their
design or implementation. Unlike brute-force attacks, which try all possible keys, cryptanalysis relies on
intelligence and strategy.
Ciphertext-only attack: The attacker has only the encrypted message and tries to deduce the plaintext or key.
Known-plaintext attack: The attacker has access to both some plaintext and its corresponding ciphertext.
Chosen-plaintext attack: The attacker can choose arbitrary plaintexts and obtain the corresponding
ciphertexts.
Chosen-ciphertext attack: The attacker can choose ciphertexts and get them decrypted (used in analyzing
decryption oracles).
2) BRUTE-FORCE ATTACK
It involves guessing the key by trying every possible key, until an intelligible translation of the cipher text into
plaintext is found. Process known as exhaustive key search. This method does not rely on any weaknesses in
the encryption algorithm itself but instead relies on the assumption that the key space is limited and can
eventually be searched completely.
2. TRANSPOSITION TECHNIQUE
The positions of characters in the plaintext are
rearranged according to a specific system, but the actual characters themselves are not altered.
PLAINTEXT: NESO CIPHER TEXT: ESON
A. CAESAR CIPHER: The Caesar cipher involves replacing each letter of the alphabet with the letter
standing three places further down the alphabet.
B. MONOALPHABETIC CIPHER: In substitution ciphers, like the Caesar cipher, each letter is always
substituted for another unique letter. Such ciphers are said to be monoalphabetic.
C. POLY ALPHABETIC CIPHER: Playfair Cipher is a polyalphabetic substitution cipher, meaning that one
letter can be denoted by different letters in its encryption, depending on the keyword used, which is given
to both parties.
5

D. PLAYFAIR CIPHER: A 5x5 matrix is drawn, and letters are filled in each cell, starting with the keyword,
followed by the letters in the alphabet. I/J are filled in the same cell. All repeating letters are removed,
giving us a matrix.
RULE-1: Plaintext sentence: Meet me at the bridge: me et me at th eb ri dg ex (padding with the letter x in
case of an odd number of letters.)
RULE-2: same row; eb would be replaced by sd; ng would be replaced by gi/gj (RIGHT)
RULE-3: same column; dt would be replaced by my; ty would be replaced by yr (BOTTOM)
RULE-4: me would be replaced by gd; et would be replaced by do (CLOCKWISE)
E. HILL CIPHER: The Hill cipher is another polyalphabetic cipher. The plaintext is broken into blocks of
size m. However, the key in the Hill cipher is an in m x m matrix of integers between 0 and 25.
🔄 Confusion
De nition: Confusion makes the relationship between the key and the
ciphertext as complex as possible.
Purpose: To prevent attackers from guring out the encryption key, even
if they know some parts of the plaintext and ciphertext.
How it's done: Confusion is usually achieved using substitution
(replacing pieces of data with something else). In modern ciphers, this
happens through S-boxes (substitution boxes).
🔀 Diffusion
Confusion hides the key; Diffusion hides the structure of the message.
6

fi
fi
fl
fi
Module -2
SYMMETRIC CIPHERS
Traditional Block Cipher structure, Data encryption standard (DES), The AES Cipher
• Symmetric Encryption is the most basic and old method of encryption. It uses only one key for the process of
both the encryption and decryption of data. Thus, it is also known as Single-Key Encryption.
7

Creation of Round Keys
•A Key Schedule algorithm calculates all the round keys from the key.
So the
initial key is used to create many different round keys which will be
used in the
corresponding round of the encryption.
ENCRYPTION
AES considers each block as a 16-byte (4
byte x 4 byte = 128 ) grid in a column-
major arrangement.
Each round comprises of 4 steps :
• SubBytes (Substitution)
• ShiftRows (Permutation)
• MixColumns (Substitution)
• Add Round Key (Substitution)
8

Step2. Shift Rows
• Second transformation function of AES. Also known as
Forward shift row transformation.
• Each row is shifted a particular number of times. The
first row is not shifted. The second row -> 1 byte circular
left shift. Third row -> 2 byte circular left shift. Fourth row -> 3 byte circular shift
DECRYTPION
The stages in the rounds can be easily undone as these stages have an opposite to it which when performed
reverts the changes. Each 128 blocks goes through the 10,12 or 14 rounds depending on the key size.
The stages of each round of decryption are as follows :
• AES inverse Sub bytes (Uses inverse S-box in decryption);
• AES inverse Shift rows (Rows are shifted opposite in decryption);
• AES inverse Mix columns (Different matrix in decryption);
• AES inverse Add Round key (same as in encryption)
The decryption process is the encryption process done in reverse so
Module -3
ASYMMETRIC CIPHERS
9

Principles of Public-Key cryptosystems, The RSA algorithm, Diffie - Hellman Key Exchange,
Elliptic Curve Arithmetic, Elliptic Curve Cryptography.
Two-Key Mechanism: Each user has a public key (shared with others) and a private key (kept secret).
Data encrypted with one key can only be decrypted with the other.
Key Distribution without Shared Secrets: Unlike symmetric systems, no need to pre-share a secret key.
This solves the key distribution problem found in traditional cryptography.
Con dentiality and Authentication: Ensures con dentiality by encrypting data using the recipient’s public
key; Ensures authentication and digital signatures by signing with a private key (veri able with the sender’s
public key).
Mathematical One-Way Functions: Security is based on hard mathematical problems (e.g., factoring large
primes in RSA, discrete logs in ECC), making it computationally infeasible to derive the private key from the
public key.
Applications: Widely used for secure data transmission, digital signatures, and key exchange,
RSA ALGORITHM
Diffie-Hellman Key
10

fi
fi
fi
Exchange Algorithm
mathematics to
generate public and
private key pairs and
calculates a shared
secret key using the
other party’s public
key and one’s own
private key.
11

variables with coefficients, written as y2 = x3 + ax + b, where a and b are constants, cubic equation (degree 3
in x, degree 2 in y)
Symmetric to x axis
For cryptography, the variables and coefficients are restricted to elements in a finite fields (whole numbers).
Must satisfy the non-singularity condition to be useful in ECC i.e., it has no sharp corners.
Consider the equation Q=KP; where Q,P are points on the curve and K< n
Module -4
INTEGRITY CHECKS AND AUTHENTICATION ALGORITHMS
MD5 message digest algorithm , Secure hash algorithm (SHA),Digital Signatures: Digital
Signatures, authentication protocols, digital signature standards (DSS) - proof of digital
signature.
Hashing is the process of scrambling a piece of data or information beyond recognition. We can achieve this
using hash functions which are algorithms that perform mathematical operations on the main plain text. They
are designed to be irreversible, no decryption key can convert a digest back to its original plain text value. We
pass the input through a hash function to calculate the Hash value or Digest.
ORIGINAL DATA + HASH FUNCTION —> HASH VALUE/ DIGEST
MD5
• One way cryptographic hash algorithm - MD5 (Message Digest Method 5)
• Creates 128-bit digest (radically different from the plain text) size for input of any size. (arbitrary length)
• Minor changes to the input string result in considerably different digests. This is needed to reduce the chance
of hash collisions, or the formation of similar hashes.
• Initially designed for digital signatures.
• Designed by Ronald Rivest in1991 to enable the verification of digital signatures.
• INPUT STRING + MD5 FUNCTION —> 128-BIT DIGEST
SHA
12

SHA stands for secure hashing algorithm, is a family of cryptographic hash functions. Data is hashed
using SHA, a modified version of
MD5.
Hashing is one-way, meaning that once data is hashed, a brute force attack is needed to break the
resulting hash digest. This is the primary difference between hashing and encryption.
INPUT STRING + SHA-1 HASH FUNCTION —> 160-BIT DIGEST/ HASH VALUE
To be considered cryptographically secure, the hash function must meet two requirements:
1. Impossible for an attacker to generate a message that matches a specific hash value.
2. Impossible for an attacker to create two messages producing the exact same hash value. Even a single
character changes in the message, SHA is intended to provide a unique hash.
3. Prevents hash collisions which happens when two different plain texts have the same digest
DIGITAL SIGNATURES
• A digital signature is a mathematical technique used to validate the authenticity and integrity of a digital
document, message or software. It's the digital equivalent of a handwritten signature or stamped seal, but it
offers far more security. A digital signature is intended to solve the problem of tampering and impersonation
in digital communications.
• Digital signatures can provide evidence of origin, identity and status of electronic documents, transactions.
• Signers can also use them to acknowledge informed consent. In many countries, including the U.S., digital
signatures are considered legally binding in the same way as traditional handwritten document signatures.
13

How do digital signatures work?
• Digital signatures are based on public key cryptography, also known as asymmetric cryptography. Using a
public key algorithm such as RSA, two keys are generated, one private and one public.
• Signature must use some info unique to the sender, to prevent forgery and denial. Must be easy to produce,
verify and recognise
• For encryption and decryption,
• Private key should be kept a secret. If someone else has access to the private signing key, that party
could create fraudulent digital signatures in the name of the private key holder.
• The Digital Signature Standard (DSS) is a federal standard in the United States that de nes algorithms
used to create and verify digital signatures.
Standardization: It speci es the use of the Digital Signature Algorithm (DSA) for generating and
verifying digital signatures and ensuring the integrity, authenticity and security of electronic documents.
Security: DSS speci es secure cryptographic algorithms like DSA, ensuring that digital signatures are
resistant to tampering and forgery.
Interoperability: DSS ensures that digital signatures can be used and veri ed across different systems.
• Key components of DSS: Digital Signature Algorithm (DSA): DSS speci es the use of DSA for
creating and verifying digital signatures, ensuring secure and reliable document signing • Public and
Private Keys • Hash Function • Veri cation Process
14

fi
fi
fi
fi
fi
fi
fi
Module
5:
NETWORK AND INTERNET SECURITY
Transport level security – web security issues – secure socket layer ( SSL ) – transport layer
security ( TLS ) – HTTPS – Secure shell – pretty good privacy ( PGP ) – firewalls – IP
security.
Bene ts of TLS:
4. Ease of Deployment – Can be easily installed and used with many applications.
Features of TLS
Data Integrity: Prevents data tampering using hash functions (like SHA-256).
Forward Secrecy: Even if the long-term keys are stolen, past communication remains secure.
Transport Layer Security (TLS) is a protocol that provides privacy and data integrity between two
communicating applications. It is widely used to secure communications over the internet, especially in web
browsers.
15

fi
fi
fi
The working of TLS begins when the client connects to the server using the TCP protocol. The client sends a
message called "Client Hello", which includes several speci cations such as the TLS version it supports, the
list of cipher suites (encryption algorithms), and the compression methods it can use.
The server responds with a "Server Hello" message. This message contains the chosen TLS version, one of
the cipher suites selected from the client’s list, and an optional compression method. The server also sends its
digital certi cate, which contains its public key and is used to prove its identity to the client.
The client then veri es the server’s certi cate to ensure that it is issued by a trusted Certi cate Authority
(CA). If the certi cate is valid, the client proceeds with the connection. If the certi cate is invalid or untrusted,
the connection is terminated.
After the server is authenticated, both the client and the server perform a key exchange. This process may
involve the client sending a randomly generated value called a PreMasterSecret, encrypted with the server’s
public key, or using algorithms like Dif e-Hellman to securely agree on a shared key.
Once the key exchange is complete, both parties generate the same session key, which is used for symmetric
encryption during the session. This ensures that the data exchanged is both encrypted and secure from third-
party access.
Finally, the TLS handshake is completed, and the client and server can begin secure communication. At the
end of the session, the TCP connection is properly closed by both sides to prevent data tampering or
unexpected disconnections.
TLS also supports features like forward secrecy, where new keys are generated for each session, and even if
long-term keys are compromised in the future, past sessions remain secure.
Web security threats are attacks that try to damage websites, steal data, or access private information through
the internet. These threats target both users and website owners, and are very common in today’s digital world.
Whenever we enter passwords, credit card numbers, or personal data on websites, web security helps protect
that information.
• Denial of Service • Cross-site scripting (XSS) • SQL Injection • Phishing • Ransomware • Spyware
16

fi
fi
fi
fi
fi
fi
fi
fi
In today’s digital world, people share sensitive information (like passwords and card numbers) online. To
protect this information, we use secure protocols like HTTPS and SSL. These technologies help keep our data
private, safe, and unchangeable during transmission.
SSL
Originally, data on the web was transmitted in plaintext, making it easy for anyone who intercepted the message
to read it. For example, if someone logged into their email account, their username and password would travel
across the Internet unprotected.
SSL was created to solve this problem and protect user privacy. By encrypting data between a user and a web
server, SSL ensures that anyone who intercepts the data sees only a scrambled mess of characters. This keeps
the user’s login credentials safe, visible only to the email service.
🔐 Functions of SSL:
2. Authentication: Con rms the identity of the server using digital certi cates.
3. Data Integrity: Ensures that data is not changed while being transferred.
• Authenticating Web Servers: Ensuring that users are connecting to the legitimate website, not a fake one set
up by attackers.
• Preventing Data Tampering: Acting like a tamper-proof seal, SSL ensures that the data sent and received
hasn’t been altered during transit.
17

fi
fi
HTTPS
• Normal HTTP sends data as plain text (anyone can read it).
You can recognize HTTPS in a browser by the lock symbol and “https://” in the website address bar.
2. Your browser asks the server for its SSL certi cate.
SSL is like the bodyguard, and HTTPS is the VIP using the bodyguard for protection.
SSH (Secure Shell) is a cryptographic network protocol used for securely transferring encrypted data over a
network. It is commonly used for remote access to servers and systems.
• Authentication: SSH allows users to securely connect to servers without repeatedly entering
passwords for each system.
Key Pair Mechanism in SSH: SSH relies on a key pair system for secure communication. The key
pair includes:
18

fi
fi
• Public Key:
◦ Can be shared with anyone; Used for encryption; Does not require protection
• Private Key:
◦ Stays securely on the user's device; Used for decryption; Must be kept con dential
1. User Key: Both the public and private keys are managed by the user.
2. Host Key: The key pair is stored on a remote server or host system.
3. Session Key: Temporarily generated and used for encrypting large volumes of data during a session.
2. Authentication: Uses public-private key pairs for secure authentication, offering stronger protection
than traditional passwords.
3. Data Integrity: Ensures that messages are not altered during transmission, maintaining their original
form.
4. Tunneling: SSH can create secure tunnels for forwarding network connections, protecting data as it
travels through insecure networks.
Functions of SSH
1. Secure Communication: Encrypts all communication between the client and server, ensuring high-
level security.
2. Con dentiality: Protects data from being exposed or intercepted during transmission.
3. Remote Login: Allows users to safely log in to remote systems, serving as a secure alternative to
TELNET.
4. Secure File Transfer: Supports protocols like SCP (Secure Copy) and SFTP (SSH File Transfer
Protocol) to securely transfer les over the internet.
5. Supports Tunneling: Enables secure communication channels by encapsulating data inside encrypted
SSH sessions.
19

fi
fi
fi
fi
fi
fi
Working Principle:
PGP uses a hybrid cryptographic model:
2. Con dentiality – Ensures only the intended recipient can read the message.
At Sender’s End:
2. Encrypt the hash with sender’s private key (KPa) to create a digital signature.
At Receiver’s End:
2. Decrypt the signature using the sender’s public key (PUa) to get the original hash.
At Sender’s End:
2. Encrypt with a random session key (Ks) using symmetric encryption (e.g., CAST-128, IDEA, 3DES).
At Receiver’s End:
20

fi
fi
fi
1. Decrypt the session key with private key (KPb).
Even if intercepted, the session key is unreadable without the private key—ensuring data con dentiality.
Firewall
A rewall is a network security system that monitors and controls incoming and outgoing traf c based on
prede ned security rules.
It acts like a gatekeeper between your computer/network and the outside world (Internet), deciding what data
is safe to let in or out. It acts like a security guard that helps keep your digital
world safe from unwanted visitors and potential threats
Working of Firewall
A rewall functions by comparing network traf c against a set of prede ned rules:
• If a rule matches, the rewall takes a speci c action (e.g., allow, block, log).
• For example:
◦ A rule might block HR department users from accessing the code server.
Rule De nition:
◦ Outgoing traf c (from the internal network) is usually allowed, but can be restricted for added
security.
21


fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
• ICMP (Internet Control Message Protocol)
• Port numbers (TCP/UDP) or type codes (ICMP) to identify the nature and purpose of the
communication.
What is IPSec?
Imagine you are sending a secret message to your friend through a messenger. But you're afraid someone
might read it, change it, or pretend to be your friend.
So you:
Importance of IPSec
• Data Encryption: Protects data by making it unreadable to unauthorized users.
• Used in VPNs: Commonly implemented in Virtual Private Networks to create secure tunnels.
• Protection from Cyber Attacks: Defends against eavesdropping, spoo ng, and man-in-the-middle
attacks.
Features of IPSec
1. Authentication: Veri es the identity of the sender using digital signatures or shared secrets.
22

fi
fi
fi
fi
fi
4. Key Management: Uses Internet Key Exchange (IKE) to generate and manage encryption keys.
5. Tunneling Support: Allows encapsulation of IP packets within other protocols (e.g., GRE, L2TP).
7. Interoperability: As an open standard, IPSec works across various devices and vendors.
• Transport Mode: Encrypts only the data portion of the IP packet. Used for end-to-end communication.
Core Protocols:
• AH (Authentication Header): Ensures the data source is authentic and data is untampered.
Key Exchange:
• IKE (Internet Key Exchange): Establishes a shared secret key between devices to encrypt and decrypt
data.
Working Steps:
The goal of Phase 1 is to create a secure channel (IKE tunnel) for negotiating IPSec parameters.
Modes of Operation:
• Main Mode:
23

fi
◦ Involves six message exchanges.
• Aggressive Mode:
This phase is known as Quick Mode. It uses the secure IKE tunnel to establish IPSec Security Associations
(SAs).
Modes of Operation:
• Tunnel Mode:
• Transport Mode:
◦ Encrypts only the payload (data portion), leaving the IP header intact.
Summary
• Phase 2 builds the IPSec tunnel to securely transmit data using negotiated encryption/authentication
methods.
24