0% found this document useful (0 votes)
6 views30 pages

Untitled Document

The document provides an overview of cybersecurity, including types of security attacks, security services, and cryptography techniques such as symmetric and asymmetric key cryptography. It discusses various encryption methods, digital signatures, and steganography, as well as transport-level security protocols like TLS. Key objectives of cybersecurity include confidentiality, integrity, and availability, with common threats like malware and phishing highlighted.

Uploaded by

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

Untitled Document

The document provides an overview of cybersecurity, including types of security attacks, security services, and cryptography techniques such as symmetric and asymmetric key cryptography. It discusses various encryption methods, digital signatures, and steganography, as well as transport-level security protocols like TLS. Key objectives of cybersecurity include confidentiality, integrity, and availability, with common threats like malware and phishing highlighted.

Uploaded by

Unnati Goel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 30

UNIT 1

Security refers to measures taken to protect data, systems, and networks from
unauthorized access, misuse, or harm. With the rapid digitization and growth of the
internet, securing sensitive information has become critical in ensuring privacy,
confidentiality, integrity, and availability.
Cybersecurity is the practice of protecting computers, servers, mobile devices,
electronic systems, networks, and data from malicious attacks, unauthorized access,
or damage. It encompasses technologies, processes, and practices designed to
safeguard digital assets in an increasingly interconnected world.
. Types of Security Attacks
* Passive Attacks: Eavesdropping or monitoring communication without altering it
(e.g., traffic analysis, sniffing).
* Active Attacks: Altering or disrupting communication (e.g., man-in-the-middle
attacks, replay attacks).
* Insider Attacks: Attacks initiated by trusted individuals within an organization.
* External Attacks: Attacks from outside the organization.
* Social Engineering: Manipulating people into divulging sensitive information.
Security Services
* Authentication: Verifying identities.
* Access Control: Restricting access to resources.
* Data Confidentiality: Protecting data from unauthorized access.
* Data Integrity: Ensuring data is accurate and unmodified.
* Non-repudiation: Preventing denial of actions by entities.
Cryptography is the practice of securing information through encryption, ensuring
confidentiality, integrity, and authenticity of data. It involves converting data
into unreadable formats and requires keys to decrypt it back to its original form.
Key Points:
1. Encryption & Decryption: Converts data into an unreadable form and then back to
readable form using keys.
2. Digital Signatures: Verifies the authenticity of messages and ensures integrity.

Digital certificate
is an electronic document used to prove the ownership of a public key. It acts as a
form of digital ID for individuals, websites, or organizations, ensuring secure
communication over the internet.
Contains:
* Owner's public key.
* Owner's details (e.g., name, domain name).
* CA's digital signature.
* Expiry date.

Digital Signatures
Definition: A digital signature is a cryptographic technique that provides a way to
verify the authenticity and integrity of a message, document, or software. It
serves as a virtual fingerprint that confirms the identity of the sender and
ensures that the content has not been altered in transit.

Key Objectives of Cybersecurity


1. Confidentiality: Ensuring that sensitive information is accessible only to
authorized users.
2. Integrity: Preventing unauthorized modifications or tampering of data.
3. Availability: Ensuring that systems, data, and services are available when
needed.
4. Authentication: Verifying the identity of users or systems.
5. Non-Repudiation: Ensuring actions and transactions cannot be denied by the
initiator.
Common Cyber Threats
1. Malware: Malicious software, such as viruses, ransomware, and spyware.
2. Phishing: Deceptive attempts to steal sensitive information by impersonating
trusted entities.
3. Denial-of-Service (DoS) Attacks: Overloading systems to make them unavailable to
users.
4. Man-in-the-Middle (MitM) Attacks: Intercepting communications to steal or alter
data.
5. SQL Injection: Exploiting vulnerabilities in databases to gain unauthorized
access.
6. Zero-Day Exploits: Attacks targeting undisclosed vulnerabilities in software.
Message Integrity: Ensures that the message has not been tampered with during
transmission.
Non-repudiation: Prevents the sender from denying the origin of the message.
Encryption techniques
Substitution Techniques
Substitution techniques replace characters or bits of the plain text with other
characters, numbers, or symbols based on a fixed system.
Examples:
1. Caesar Cipher:
* Shifts each letter by a fixed number of positions in the alphabet.
* Example: Shift by 3
Plain Text: "HELLO" → Cipher Text: "KHOOR"
2. Monoalphabetic Cipher:
* Replaces each letter of the alphabet with another letter using a fixed
substitution table.
Plain Text: "ATTACK" → Cipher Text: "QZZQKZ"
3. Polyalphabetic Cipher:
* Uses multiple substitution alphabets. Vigenère Cipher is a popular example.

Vigenère Cipher
* How It Works: Uses a keyword to determine the shift for each letter. The
keyword is repeated to match the length of the plaintext.
* Example: Keyword "KEY", Plaintext "HELLO"
* H (shifted by K) -> R
* E (shifted by E) -> I
* L (shifted by Y) -> J
* L (shifted by K) -> V
* O (shifted by E) -> S
* Ciphertext: "RIJVS"
It is based on a keyword's letters. It is an example of a polyalphabetic
substitution cipher. When the vigenere table is not given, the encryption and
decryption are done by Vigenar algebraically formula in this method (convert the
letters (A-Z) into the numbers (0-25)).
Formula of encryption is,
Ei = (Pi + Ki) mod 26
Formula of decryption is,
Di = (Ei - Ki) mod 26
If any case (Di) value becomes negative (-ve), in this case, we will add 26 in the
negative value.
Hill Cipher
The Hill Cipher is a polygraphic substitution cipher, which means it encrypts
multiple letters at once, uses linear algebra to encrypt and decrypt messages. The
Hill cipher is based on matrix multiplication and involves using a square matrix as
the key.
A block cipher is a type of cipher that encrypts data in fixed-size blocks,
typically encrypting multiple plaintext symbols at once. The Hill cipher encrypts
multiple characters simultaneously (in a block) rather than one character at a
time, which is a characteristic of block ciphers.

How the Hill Cipher Works


1. Plaintext Representation: The first step in Hill cipher encryption is to
represent the plaintext in numerical form. Each letter of the alphabet is assigned
a number:
* A = 0, B = 1, C = 2, ..., Z = 25.
2. Key Matrix: Choose a square matrix (usually 2x2, 3x3, or larger) as the
key.. This matrix is then used for the encryption and decryption processes.
3. Encryption:
* Divide the plaintext into blocks of letters (each block has the same size
as the matrix). For example, if the key matrix is 2x2, you break the plaintext into
pairs of letters.
* Convert each letter to its corresponding number.
* Multiply the key matrix by the vector (numerical representation of the
plaintext block).
* Perform matrix multiplication modulo 26 to get the ciphertext.
4. Decryption:
* To decrypt, the receiver needs to know the inverse of the key matrix (this
inverse must also exist and be computed modulo 26).
* The ciphertext is divided into blocks, and each block is multiplied by the
inverse of the key matrix (again modulo 26) to recover the original plaintext.
Transposition Techniques
Transposition ciphers work by rearranging the positions of the characters in the
plaintext according to a specific system, but without changing the actual
characters. The order of the letters is altered to make the original message
unreadable.
Types of Transposition Ciphers
1. Rail Fence Cipher:
* In this technique, the plaintext is written in a zigzag pattern (across
multiple "rails") and then read off horizontally.
* The number of rails is key to the cipher.
2. Example (with 3 rails):
* Plaintext: "HELLO WORLD"
* Write it in a zigzag pattern:
mathematica
Copy code
H . . . O . . . R . . .
. E . L . W . L . D .
. . L . . . O . . . .
3. * Read off horizontally: "HOLEL WRLOLD" (ciphertext)
4. Columnar Transposition Cipher:
* The plaintext is written into a grid of columns, and then the columns are
rearranged based on a key.
* The key usually consists of numbers, and the columns are ordered based on
the numerical order of the key.
5. Example (with a key of "31524"):
* Plaintext: "HELLO WORLD"
* Write the plaintext into a grid:
mathematica
Copy code
3 1 5 2 4
-------------
H E L L O
W O R L D

* Rearrange the columns in the order defined by the key (31524):


* Ciphertext: "LOHW EL RDOL"

encryption techniques can generally be categorized into two main types based on how
they process data: block ciphers and stream ciphers. Here’s a brief overview of
each type:
1. Block Ciphers
Definition: Block ciphers encrypt data in fixed-size blocks. The plaintext is
divided into blocks of a specific size (e.g., 64 bits, 128 bits), and each block is
encrypted separately using the same key.
Characteristics:
* Fixed Block Size: Data is processed in blocks of a predetermined size.
* Padding: If the plaintext does not fit perfectly into the block size,
padding is added to fill the last block.
* Deterministic: The same plaintext block encrypted with the same key will
always produce the same ciphertext block.
Examples:
* AES (Advanced Encryption Standard): A widely used block cipher that
operates on 128-bit blocks and supports key sizes of 128, 192, or 256 bits.
* DES (Data Encryption Standard): An older block cipher that operates on 64-
bit blocks with a 56-bit key.
* Blowfish: A block cipher that operates on 64-bit blocks and supports
variable key lengths.
Use Cases: Block ciphers are commonly used in applications where data is stored or
transmitted in fixed-size chunks, such as file encryption, disk encryption, and
secure communications.
2. Stream Ciphers
Definition: Stream ciphers encrypt data one bit or byte at a time, rather than in
fixed-size blocks. They generate a keystream that is combined with the plaintext to
produce ciphertext.
Characteristics:
* Variable Size: Data can be processed in a continuous stream, making it
suitable for real-time applications.
* No Padding: Since data is processed one bit or byte at a time, there is no
need for padding.
* Efficiency: Stream ciphers can be faster and require less memory than block
ciphers, especially for small amounts of data.
Examples:
* RC4: A widely used stream cipher that generates a keystream based on a
variable-length key

Symmetric Key Cryptography

Also known as secret key cryptography, symmetric key cryptography uses the same key
for both encryption (encoding the data) and decryption (decoding the data)
How it works:
1. Encryption: The sender encrypts the plaintext data using a secret key.
2. Transmission: The encrypted data (ciphertext) is transmitted to the
recipient.
3. Decryption: The recipient uses the same secret key to decrypt the
ciphertext and retrieve the original plaintext data
Asymmetric Key Cryptography
Also known as public key cryptography, asymmetric key cryptography uses two keys: a
public key and a private key. The public key is used for encryption, while the
private key is used for decryption. The key pairs are mathematically related but
cannot be derived from one another.
How it works:
1. Public Key: The sender uses the recipient's public key to encrypt the
message.
2. Transmission: The encrypted message is sent to the recipient.
3. Private Key: The recipient uses their private key to decrypt the message
and retrieve the original data.
Advantages:
* Security: Asymmetric encryption does not require the sender and receiver to
share a secret key beforehand. The public key can be freely distributed, and only
the corresponding private key can decrypt the data.
* Digital Signatures: Asymmetric cryptography can be used to verify the
authenticity of messages by using the private key for signing, ensuring that the
message has not been altered and proving the identity of the sender.
Common Algorithms:
* RSA (Rivest-Shamir-Adleman): One of the most widely used asymmetric
algorithms.
* Diffie-Hellman: A key exchange algorithm used to securely exchange keys
over an insecure channel.
Symmetric Key Cryptography Applications:
* Data Encryption: Encrypts large volumes of data quickly (e.g., AES, DES).
* Disk Encryption: Secures data on storage devices (e.g., BitLocker).
* VPNs: Encrypts internet connections (e.g., AES for VPNs).
* Secure Communication: Encrypts real-time communications for speed (e.g.,
phone calls, instant messaging).
* SSL/TLS Handshake: Uses symmetric encryption for data transfer after
asymmetric key exchange.
Asymmetric Key Cryptography Applications:
* Digital Signatures: Verifies document authenticity (e.g., RSA for signing).
* Public Key Infrastructure (PKI): Manages keys for secure communication
(e.g., HTTPS).
* Key Exchange: Securely exchanges encryption keys (e.g., Diffie-Hellman).
* Encryption of Small Data: Encrypts small data like passwords (e.g., RSA).
* Cryptocurrencies: Secures transactions using public-private key pairs
(e.g., Bitcoin).

Steganography
What is Steganography?
Steganography is the practice of hiding secret information within an ordinary, non-
secret file or message to avoid detection. Unlike encryption, which makes the data
unreadable without a key, steganography hides the data in plain sight.
________________
How Does Steganography Work?
* It embeds secret data (like text, images, or audio) into a carrier file
(like an image, audio, video, or document).
* The carrier file appears unchanged to casual observers, making it difficult
to detect the hidden information.
________________

Examples of Steganography:
1. Image Steganography:
* Hiding secret text in the color values (RGB) of pixels in an image.
* The image looks normal but contains hidden information.
2. Audio Steganography:
* Embedding data within the inaudible parts of an audio file.
* The sound remains the same to the human ear.
3. Video Steganography:
* Hiding information in frames of a video file.
* The video plays normally, concealing the secret data.
4. Text Steganography:
* Using invisible characters (like spaces or special formatting) to encode
information.
* For example, a sentence may contain hidden data based on the number of
spaces between words.

Unit 4
Transport-level Security:
Transport Layer Security (TLS):
TLS Overview:
* Standard: Defined by IETF as RFC 2246.
* Purpose: Provides secure communication over a network, succeeding SSL.
* Applications: Used in web browsing (HTTPS), email (SMTP over TLS), and
instant messaging.
Key Features of TLS:
1. Encryption: Ensures that data exchanged between client and server is
private and cannot be intercepted.
2. Authentication: Verifies the identities of the parties involved (e.g.,
using digital certificates).
3. Integrity: Ensures that the transmitted data has not been tampered with
during transit.
How TLS Works:
1. Handshake Protocol:
* Establishes a secure connection by exchanging encryption keys and verifying
identities.
2. Session Key Exchange:
* After the handshake, a symmetric session key is used for fast, encrypted
communication.( diffie hellman)
3. Data Encryption:
* All transmitted data is encrypted using the session key.( rc4,des ect)
TLS is commonly used in HTTPS (HTTP over TLS) to secure web traffic.
________________

Padding in Cryptography
Padding is a technique used in cryptographic protocols to ensure that plaintext
data conforms to the block size requirements of certain encryption algorithms, such
as AES (Advanced Encryption Standard).
Why Padding is Needed:
* Block ciphers encrypt data in fixed-size blocks (e.g., 16 bytes). If the
plaintext is not a multiple of the block size, padding fills the remaining space.
Types of Padding:
1. PKCS#7: Appends bytes where each byte's value indicates the number of
padding bytes added. For example, if 3 bytes are needed, 03 03 03 is added.
2. Zero Padding: Fills the remaining space with zero bytes (used in some
specific contexts).
3. ISO/IEC 7816-4: Adds 0x80 followed by zeros until the block is full.
—----------------------------------------------------------------------------------
--------

Secure Socket Layer (SSL) and Transport Layer Security (TLS)


* SSL: SSL was developed by Netscape in the 1990s to secure communications
over the internet. It encrypts the data exchanged between a client and a server.
* TLS: TLS is the successor to SSL and provides stronger encryption and
better security. While SSL is now considered outdated and insecure, TLS is widely
used for securing web traffic.
* Both SSL and TLS operate by encrypting data to prevent eavesdropping,
ensuring data integrity, and providing authentication between the client and
server.
Secure Socket Layer
➢ World’s most widely used security mechanism on the Internet.
➢ Secures communication between a client and a server.
➢ Located between the Application and Transport Layers of TCP/IP protocol suite.
* SSL is designed to make use of TCP to provide a reliable end-to-end secure
service. SSL is not a single protocol but rather two layers of protocols.
* The SSL Record Protocol provides basic security services to various higher-
layer protocols.
* The HTTP which provides the transfer service for Web client/server
interaction, can operate on top of SSL.

SSL consists of three higher-layer protocols:


➢ Handshake Protocol
➢ the Change CipherSpec Protocol
➢ Alert Protocol.
SSL consists of one lower-layer protocols: SSL Record Protocol

SSL Record Protocol Operation: The SSL Record Protocol provides two services for
SSL connection
Confidentiality: The original data and the MAC are encrypted using secret key
cryptography to provide confidentiality.
Message Integrity: The Hash function is applied on compressed data to compute a
MAC. This provides integrity.
Fragmentation: each upper layer message is fragmented into block of 214 bytes
(16384bytes) or less.
Compression: must be lossless and may not increase the content length by more than
1024 bytes.
Message Authentication Code: it is compute a code over the compressed data. For
this purpose a shared secret key is used.
Next, the compressed message plus the MAC are encrypted using symmetric encryption.

What is HTTPS?
HTTPS (Hypertext Transfer Protocol Secure) is an extension of HTTP designed to
provide secure communication over the internet. It encrypts data exchanged between
a client (e.g., a browser) and a server, making it safe from eavesdropping and
tampering.
HTTPS is an extension of HTTP that uses SSL/TLS (Secure Sockets Layer/Transport
Layer Security) to secure the communication between a client (browser) and a
server. It ensures that data transmitted is encrypted, authenticated, and remains
untampered.

Combination of http and ssl


belongs to transport layer protocol
Uses two keys - private , public ; Uses Certificate Authority(CA)
Key Features of HTTPS
1. Encryption:
* All data is encrypted using SSL/TLS (Secure Sockets Layer/Transport Layer
Security).
* Ensures that even if data is intercepted, it cannot be read or understood
by attackers.
2. Authentication:
* HTTPS verifies that the server is legitimate using an SSL/TLS certificate
issued by a trusted Certificate Authority (CA).
* Protects users from connecting to malicious websites pretending to be
legitimate ones.
3. Data Integrity:
* Ensures that data sent between the client and server has not been altered
during transmission.
How HTTPS Works
1. SSL/TLS Handshake:
* The client and server exchange encryption keys to establish a secure
connection.
* The server sends its SSL/TLS certificate to the client for verification.
2. Session Key:
* Once verified, a symmetric session key is generated for encrypting and
decrypting data.
3. Secure Communication:
* All data exchanged between the client and server is encrypted and secure
from unauthorized access.
Advantages of HTTPS
1. Security:
* Protects sensitive information like login credentials, credit card details,
and personal data.
2. Trust:
* Displays a padlock symbol in the browser, indicating a secure connection.
* Builds user confidence when browsing or shopping online.
3. SEO Benefits:
* Google and other search engines prioritize HTTPS websites, improving their
search rankings.
Use Cases of HTTPS
* Banking websites and payment gateways.
* E-commerce platforms (e.g., Amazon, Flipkart).
* Login pages for social media and email services.
* Any website handling sensitive or private data.
SSH secure shell
SSH (Secure Shell) is a cryptographic protocol used to securely access and manage
remote devices or servers over a network. It ensures secure communication through
encryption, authentication, and data integrity, commonly used for tasks like remote
login, file transfers, and tunneling. Asymmetric key exchange use karta
1 Establish TCP Connection:
The client and server first create a basic connection over the internet (using the
TCP protocol), which allows them to start communicating.
2 Identification String Exchange:
* Both the client and the server send messages to each other that include
details about the SSH version they are using (e.g., SSH-protocolversion-
softwareversion).
* This helps both sides know +version of SSH is supported by the other.
3 Algorithm Negotiation:
* The client and server exchange messages (SSH_MSG_KEXINIT) to agree on
which cryptographic algorithms will be used for securing the connection.
* They negotiate algorithms for encryption, hashing, and key exchange.
4 Key Exchange:
* Once the algorithms are agreed upon, the client and server perform a
cryptographic key exchange to securely generate a shared secret key.
* This key will be used to encrypt their future communications.
5 End of Key Exchange:
* Both sides confirm the completion of the key exchange by sending
SSH_MSG_NEWKEYS messages.
* From this point forward, the communication is encrypted using the shared
key.
6 Service Request:
* After encryption is established, the client sends a
SSH_MSG_SERVICE_REQUEST message to request a specific service from the server
(e.g., logging into the server or starting a session).

Wireless LAN Security


Wireless Local Area Networks (WLANs) provide network connectivity without the need
for physical cables, using radio waves to transmit data. However, because WLANs are
accessible over the air, they are more vulnerable to security risks compared to
wired networks.
Key Threats to Wireless LANs:
1. Eavesdropping: Since wireless transmissions are broadcast, attackers
can intercept data if encryption is not used.
2. Unauthorized Access: Without proper access control, unauthorized users
can connect to the network and gain access to sensitive resources.
3. Man-in-the-Middle Attacks: Attackers can intercept and alter
communication between devices and access points.
4. Denial of Service (DoS): Attackers can overwhelm the network, making it
unavailable to legitimate users.
5. Malicious Associations: Devices can be tricked into connecting to rogue
access points, allowing attackers to steal sensitive data.
6. MAC Spoofing: Attackers may impersonate legitimate devices by altering
the MAC address to gain unauthorized access.
Security Measures:
1. Encryption: Strong encryption protocols such as WPA2 and WPA3 are
essential to protect data during transmission.
2. Authentication: Using protocols like IEEE 802.1X helps ensure that only
authorized devices can access the network.
3. Signal-Hiding Techniques: Disabling SSID broadcasting and reducing
signal strength can make it harder for attackers to detect the network.
4. Access Control: Limiting access to specific devices based on MAC
addresses or requiring strong passwords enhances security.
5. Regular Updates and Patching: Ensuring that firmware and software on
access points are regularly updated can prevent vulnerabilities from being
exploited.
What are the different types of Mobile device security. Explain each.
Mobile device security is essential to protect sensitive data and ensure safe usage
of devices in an organization. There are different types of mobile device security,
which can be categorized as follows:
1. Device Security
This involves securing the device itself through various measures:
* Password/PIN Protection: Devices require a password or PIN to unlock,
preventing unauthorized access.
* Auto-lock: The device locks itself after a period of inactivity,
requiring re-authentication.
* Remote Wipe: If a device is lost or stolen, IT can remotely erase all
sensitive data from the device.
* Encryption: Data stored on the device is encrypted, ensuring that
even if the device is compromised, the data is not easily accessible.
* Antivirus Software: Installing antivirus programs to detect and
remove malicious software.
* Operating System & App Updates: Keeping software up to date ensures
the device is protected against the latest threats.

2. Traffic Security
Ensures secure communication between the mobile device and the organization's
network:
* Encryption: Data sent over the network should be encrypted to
prevent interception.
* Secure Communication Channels (e.g., SSL or VPN): Virtual private
networks (VPNs) can ensure that traffic is securely routed between the device and
the network.
* Authentication: A strong authentication process to verify both the
device and the user before granting access to network resources.
3. Barrier Security
Focuses on securing the network and controlling access:
* Firewall Policies: Firewalls can limit what data or
applications can be accessed from the mobile device.
* Intrusion Detection Systems (IDS): Detect any unauthorized
attempts to access the network through mobile devices.
* Access Control: Ensures that only authorized users and devices
can access the organization's resources.
These security measures help protect mobile devices from various threats like
theft, malware, and unauthorized access to sensitive data.

Importance of Wireless LAN Security


1. Prevent Unauthorized Access: Wireless networks are vulnerable
to unauthorized access, allowing malicious individuals to connect and potentially
steal or alter sensitive data.
2. Protect Data Confidentiality: Without encryption, data
transmitted over wireless LANs can be intercepted. Security measures ensure that
sensitive information, such as passwords and financial data, remains confidential.
3. Prevent Data Interception: Unsecured wireless networks allow
data interception by anyone within range. Encryption and VPNs protect data during
transmission, ensuring privacy.
4. Prevent Network Attacks: Wireless networks are susceptible to
attacks like man-in-the-middle and denial of service (DoS). Security mechanisms,
such as firewalls and intrusion detection systems, help detect and mitigate these
threats.
5. Ensure Network Availability: Security protocols prevent
disruptions, as unauthorized access can lead to DoS attacks that affect network
availability and productivity.
6. Maintain User Privacy: Secure wireless LANs protect user
activities and browsing habits from exposure, ensuring that private information
remains confidential.

IEEE 802.11i Services:


IEEE 802.11i is an amendment to the IEEE 802.11 standard, which enhances wireless
LAN security. It defines mechanisms to provide stronger security for wireless
networks, primarily focusing on encryption, authentication, and integrity. Key
services of IEEE 802.11i include:
1. Authentication:
* Ensures that only authorized devices can connect to the
network.
* It uses protocols like EAP (Extensible Authentication Protocol)
for mutual authentication between the device and the network, which ensures that
both the device and the network are legitimate.
2. Encryption:
* Protects data transmitted over the wireless network by
encrypting it, making it unreadable to unauthorized users.
* Advanced Encryption Standard (AES) is used for encryption,
offering stronger security compared to older methods like WEP and TKIP.
3. Integrity:
* Ensures that the data sent over the wireless network is not
altered or tampered with during transmission.
* It uses Message Integrity Check (MIC), which verifies that the
data remains unchanged.
4. Key Management:
* Manages keys used for encryption to ensure that the
communication remains secure.
* Temporal Key Integrity Protocol (TKIP) and AES are used for
dynamic key generation and updating, reducing the risk of key reuse.5
5.Access Control:
* IEEE 802.11i includes mechanisms to control access to the
network based on security policies. It ensures that only authorized users and
devices can connect, which helps prevent unauthorized access and protects sensitive
network resources
IEEE 802.11 i Phases of operation
The IEEE 802.11i Robust Security Network (RSN) defines five distinct phases of
operation to ensure secure communication within wireless LANs. Each phase has
specific tasks to establish and maintain a secure connection between a wireless
station (STA) and an access point (AP). Here's a breakdown of each phase
AP (Access Point): A device that enables wireless devices to connect to a wired
network and manages communication between them and the network.
STA (Station): A wireless device (like a laptop or smartphone) that connects to the
network via the access point.
AS (Authentication Server): A server that verifies the identity of the wireless
device (STA) to ensure secure access to the network.
An End Station is a device, such as a computer or server, that communicates with a
wireless station (STA) through an access point (AP) and is the final destination
for data in the network.

The IEEE 802.11i security process involves five phases to ensure secure
communication in wireless networks:
1. Discovery: The AP (Access Point) broadcasts its security
details (like encryption methods) through Beacons and Probe Responses. The STA
(Station) chooses an AP to connect to based on this information.
2. Authentication: The STA and the Authentication Server (AS)
prove their identities to each other. The AP only forwards traffic but doesn’t
participate in the authentication process.
3. Key Generation and Distribution: The STA and AP generate and
share cryptographic keys to secure their communication. These keys are used for
encryption and ensuring data integrity.
4. Protected Data Transfer: Once the keys are established,
encrypted data is exchanged between the STA and the AP. Security is provided only
between the STA and AP.
5. Connection Termination: The secure connection is closed when
the communication is finished, and the devices return to their original state.
These phases ensure that communication is secure, with encryption and identity
verification, but security is only applied between the STA and AP.

Session key:
The session key's role is to encrypt and decrypt the actual data exchanged between
the client and server during their secure communication. Unlike the public-private
key pair used in the handshake (which is slow for large data), the session key
enables fast and efficient symmetric encryption, ensuring data confidentiality and
integrity throughout the session.
How does mobile device security work

Mobile device security is a combination of technologies, practices, and features


designed to protect mobile devices (like smartphones and tablets) and the data
stored on or transmitted by them. Here's a step-by-step explanation of how it
works:
________________

1. Device Access Control


* PINs, Passwords, Biometric Authentication: Users must
authenticate using secure methods like passwords, patterns, fingerprints, or facial
recognition.
* Lock Screen: Prevents unauthorized access when the device is
idle.
________________

2. Data Encryption
* Full-Disk Encryption: All data stored on the device is
encrypted to prevent unauthorized access, even if the device is stolen.
* Encrypted Communication: Data transmitted over networks is
encrypted using protocols like TLS or VPNs to protect against interception.
________________

3. Secure Operating System (OS)


* Mobile OS (e.g., Android, iOS) implements security features
like sandboxing, which isolates apps from each other to prevent malicious apps from
accessing sensitive data.
* Regular updates and patches fix security vulnerabilities.
________________

4. Application Security
* App Permissions: Apps must request explicit permissions to
access sensitive resources like cameras, contacts, or location.
* App Store Screening: Platforms like Google Play and Apple App
Store screen apps for malware and other threats.
* Sandboxing: Apps are run in isolated environments to prevent
them from affecting the device's core system.
________________

5. Network Security
* Secure Wi-Fi: Devices alert users about insecure networks and
support WPA3 for Wi-Fi encryption.
* Virtual Private Networks (VPNs): Encrypts internet traffic,
especially on public Wi-Fi.
* Firewall and Intrusion Detection: Protects devices from
unauthorized network access.
________________

6. Mobile Device Management (MDM)


* Used by organizations to enforce security policies, such as
requiring strong passwords or wiping devices remotely in case of loss.
* Enables centralized control over app installations and access
to corporate data.
________________

7. Antivirus and Malware Protection


* Scans for and blocks malicious software.
* Some apps actively monitor device activity for suspicious
behavior.
________________

8. Data Backup and Recovery


* Regular backups to secure cloud services ensure data can be
restored in case of theft, loss, or damage.
* Encrypted backups protect against unauthorized access to stored
data.
________________

9. Two-Factor Authentication (2FA)


* Adds an additional layer of security for accessing apps and
services, requiring both a password and a secondary authentication method like a
code sent to the device.
________________

10. Remote Management and Wiping


* Devices can be tracked and remotely locked or wiped if lost or
stolen to prevent unauthorized access to data.

Two Characteristics of Wired LAN Not Inherent in Wireless


* Physical Security: Wired LANs are less prone to interception as
they require physical access to the network.
* Higher Bandwidth and Stability: Wired networks generally offer
faster and more reliable data transmission.

UNIT 3

Message Authentication
Message Authentication ensures the integrity and authenticity of a message during
communication. It verifies that the message was sent by the claimed sender and has
not been altered during transit.
________________

Goals of Message Authentication


1. Integrity: Ensure the message is not tampered with.
2. Authentication: Confirm the sender’s identity.
3. Non-repudiation: Prevent the sender from denying sending the
message.
Illustrate the steps involved in SHA -512 algorithm for encrypting a message?

SHA-512 (Secure Hash Algorithm 512) is a cryptographic hash function that produces
a fixed-size output of 512 bits (64 bytes) from an input of any size. It is part of
the SHA-2 family of hash functions, which was designed by the National Security
Agency (NSA) and published by the National Institute of Standards and Technology
(NIST) in 2001. It is designed to securely encode data into a fixed-size hash
value, ensuring data integrity and security.

Step 1: Padding the Message


Padding ensures that the message length is congruent to 896 modulo 1024. This is
necessary for the algorithm to work efficiently with 1024-bit blocks.
Example : "HELLO"
The length of the message is 5 characters, which is 40 bits (since each character
is 8 bits long).
* Add a 1 bit:
o The first step is to append a 1 bit to the end of the message.
* "HELLO" + 1 → "HELLO1" (Length = 41 bits)

* Pad with 0 bits:


* After the 1 bit, add 0 bits until the length of the message (in
bits) is 128 bits less than a multiple of 1024. (message length is congruent to 896
modulo 1024.)
* "HELLO1" + 0s → "HELLO1" padded to 896 bits.
* After the padding, the length of the message is guaranteed to
be a multiple of 1024 bits minus 128 bits
Step 2: Append Length
The length of the original message (before padding) is added to the message as a
128-bit block. This helps ensure the message's integrity and prevents length
extension attacks.
* A 128-bit value representing the original message's length is
appended to the padded message.
* This value is stored as an unsigned 128-bit integer (most
significant byte first).
* After appending this length block, the total length of the
message is now a multiple of 1024 bits.
* The length of the original message ("HELLO") is 40 bits. This
will be added as length block ( 128 bits at the end ) . "HELLO1" + 0s + length
block → 1024 bits multiple
Step 3: Divide the Message into 1024-bit Blocks
The padded message is divided into blocks of 1024 bits each. Each block will be
processed separately. 1024-bit blocks, are the units that the SHA-512 algorithm
processes one at a time.

Step 4: Initialize Chaining Variables


Purpose: SHA-512 uses a set of chaining variables that will hold the intermediate
and final hash results. These are initialized at the beginning of the algorithm.
* SHA-512 has eight 64-bit variables (denoted a to h), which are
initialized to specific constant values (These constants are based on the square
roots of the first eight prime numbers..)
These variables store the intermediate results as the algorithm processes each
block.
Step 5: Process Each 1024-bit
* For each 1024-bit block:
* Break it into 16 smaller 64-bit sub-blocks.
* Apply 80 rounds of bitwise operations to mix the message block
and the chaining variables, using a combination of the block's sub-blocks and
constants.
* Update the chaining variables after each round.
Step6. Finalizing the Block
· After completing all 80 rounds for the block, update the chaining
variables (a, b, c, d, e, f, g, h) with the results from this block.
· If there are more blocks, repeat Steps 5 and 6 for each block.
Step 7. Generate the Final Hash
· Once all blocks have been processed, the final hash value is obtained by
concatenating the final values of the chaining variables.
This 512-bit output is the secure hash of the original message, ensuring that even
a small change in the input message would result in a completely different hash.
Types OF Attack - MA requirements

1. Disclosure:This is when someone who isn't supposed to see the message can access
it. Imagine sending a secret message, but someone intercepts it because the message
wasn't well-protected. Only people with the correct key (like a password or code)
should be able to read the message.
2. Traffic Analysis:Even if the attacker can't read the message itself, they might
still figure out some things just by looking at the patterns. For example, they
might notice how often you're sending messages, how long they take, or how much
data is being sent. This information can still tell them a lot about you or the
conversation, even without knowing the actual message content.
3. Masquerade:This is when someone pretends to be someone else. An attacker might
send a message that looks like it's from a trusted person or system, but it's
actually from them. This can trick the recipient into believing the message is
legitimate. For example, they might pretend to be your bank and ask for personal
information.
4. Content Modification:This happens when someone changes the actual content of a
message during transmission. They might add something new, remove parts of it, or
change the meaning of the message in some way. For example, if you're sending money
instructions, they might change the amount or the bank account details.
5. Sequence Modification:This is when someone changes the order of messages. If
messages are supposed to happen in a certain sequence, the attacker could mess with
the order. For instance, they might make the recipient receive a message out of
order, which could cause confusion or incorrect actions to be taken.
6. Timing Modification:This involves delaying or replaying messages. For example,
the attacker might delay a message, making it arrive at the wrong time, or replay
an old message to make it seem like it was sent again. This could confuse the
recipient or trick them into thinking something new is happening when it’s not.
7. Source Repudiation:This is when the sender of a message denies sending it. If
you send an important message, and the recipient later claims you didn’t send it,
that’s source repudiation. This can be a big problem if the message is something
like a legal agreement or financial transaction.
8. Destination Repudiation:This is when the recipient denies receiving a message.
If you send a message, and later the receiver claims they never got it (even though
they did), that’s destination repudiation. It can be a problem when proof of
receipt is important, like in legal or business situations.

Message Authentication Codes (MACs):


* Authentication Requirements: Ensures that the message has not
been altered and is sent by an authorized sender. MACs use a secret key for
verification.
* HMAC (Hash-based Message Authentication Code): Uses a
cryptographic hash function (like SHA-512) and a secret key to generate a MAC.
* CMAC (Cipher-based Message Authentication Code): Similar to
HMAC but uses a block cipher like AES instead of a hash function.
HMAC (Hash-based Message Authentication Code)
HMAC is a type of Message Authentication Code (MAC) that uses a cryptographic hash
function and a secret key to ensure both the integrity and authenticity of a
message. It combines the benefits of hashing and a secret key to provide secure
message verification.
How HMAC Works:
1. A cryptographic hash function (like SHA-256 or MD5) is used.
2. A secret key (K) is shared between the sender and the
receiver.
3. The HMAC process involves two hashing steps, using an inner
padding (ipad) and outer padding (opad) to add extra security.
The diagram represents the HMAC (Hash-Based Message Authentication Code) process,
which uses a secret key KKK and a hash function to verify a message MMM. The
process is divided into two stages: Inner Hashing and Outer Hashing.

CMAC
Digital Signature
A digital signature is a cryptographic technique used to ensure the authenticity,
integrity, and non-repudiation of digital messages or documents. It acts like a
digital fingerprint, uniquely identifying the sender and proving that the message
hasn't been altered.
1. Key Pair:
* Uses a pair of keys:
* Private key: To create the digital signature.
* Public key: To verify the digital signature.
Purpose of Digital Signature
A digital signature serves as a cryptographic method used to verify the
authenticity and integrity of digital messages or documents. It provides a way to
ensure that:
1. The message has not been altered (integrity).
2. The sender is who they claim to be (authentication).
3. The sender cannot deny having signed the message (non-
repudiation).
Digital signatures are widely used in applications such as email, software
distribution, legal documents, and financial transactions.
________________

Properties of Digital Signature


1. Authentication:
* A digital signature proves the identity of the signer.
* It ensures that the message was signed by a legitimate user, as
only the owner of the private key can generate the correct signature.
2. Integrity:
* It ensures that the message or document has not been altered
since it was signed.
* If even a single bit of the message changes after signing, the
digital signature will become invalid.
3. Non-Repudiation:
* Non-repudiation ensures that the sender cannot later deny
having signed the message or document.
* This is crucial in legal, financial, or contractual contexts
where proof of action is necessary.
4. Confidentiality:
* Though not directly part of a digital signature,
confidentiality can be achieved when a signed message is also encrypted.
* This ensures that the content of the message is protected from
unauthorized access.

Process of Digital Signature


1. Message Hashing:
* The sender applies a hash function (e.g. sha-1, sha2, SHA-256)
to the message.
* This creates a fixed-size hash value (message digest) that
represents the content of the message.

2. Signing the Hash:


* The sender encrypts the hash using their private key.(rsa , dsa
, aes etc)
* This encrypted hash is the digital signature.
* The private key ensures that only the sender can create the
signature.
3. Attaching the Signature:
* The sender sends the message along with the digital signature
to the receiver.
4. Verification by Receiver:
* The receiver uses the sender’s public key to decrypt the
digital signature, obtaining the hash value created by the sender.
* The receiver hashes the received message using the same hash
function.
* The two hash values (decrypted hash and freshly computed hash)
are compared.
5. Result of Verification:
* If the hash values match:
* The message is authentic (from the claimed sender).
* The message has not been tampered with.
* If the hash values do not match:
* The message is either tampered with or not from the claimed
sender.
Requirements for Digital Signatures
For a digital signature to be effective, several conditions must be met:
1. Public Key Infrastructure (PKI): A PKI provides the
framework for generating, distributing, and managing public and private key pairs.
The public key is available to anyone, while the private key is kept secure by the
signer. This infrastructure ensures that digital signatures can be used reliably
and securely
2. Public and Private Key Pair:
* The signer needs to have a private key (kept secret) and a
corresponding public key (shared with recipients).
* The private key is used to sign the message, and the public key
is used by others to verify the signature.
3. Hash Function:
* A hash function is applied to the message to create a fixed-
size digest. The signature is generated from this digest.
* The hash function ensures that any modification to the message
alters its hash, which in turn invalidates the signature.
4. Signing Algorithm:
* A signing algorithm (e.g., RSA, DSA, or ECDSA) is used to
encrypt the hash of the message with the private key to generate the digital
signature.
5. Verification Process:
* The recipient uses the sender's public key to verify the
signature.
* The recipient hashes the message and compares the resulting
hash with the decrypted signature (which should match). If the hashes match, the
message is verified as authentic and unchanged.
6. Certificate Authority (CA):
* Digital Certificates are often used to bind the public key to
the identity of the signer.
* A trusted Certificate Authority (CA) certifies the public key,
adding a layer of trust and security to the process.
7. Message Digest:
* A message digest is a cryptographic representation (hash) of
the original message, which is signed.
* This ensures the integrity of the message and that the
signature is tied to a specific message.
________________

Advantages of Digital Signatures


* Security: Digital signatures are based on asymmetric
cryptography, making them highly secure.
* Legally Binding: In many countries, digital signatures are
legally recognized and carry the same weight as handwritten signatures.
* Efficiency: They are easy to use and require only the public
key of the recipient for verification.
* Prevention of Forgery: As the private key used for signing is
known only to the signer, it’s nearly impossible for an attacker to forge a
signature without the key.
________________

Applications of Digital Signatures


* Secure Email: Used to authenticate and verify the integrity of
email messages (e.g., S/MIME).
* Software Distribution: Ensures the integrity and authenticity
of software downloads or updates (e.g., Microsoft Code Signing).
* Legal and Financial Documents: Used in contracts, agreements,
and digital payment systems for non-repudiation and verification.
* Blockchain: In blockchain technology, digital signatures are
used to verify transactions and prevent fraudulent activities.

What is Digital Signature Standard (DSS)?


* The Digital Signature Standard (DSS) is a federal standard
developed by NIST (National Institute of Standards and Technology) in 1994.
* It specifies algorithms for generating and verifying digital
signatures to ensure data authenticity, integrity, and non-repudiation.
* Explain the process of creating digital signature with diagram
bus
How Problems Related to Digital Signature are Addressed by an Arbiter:
In some cases, disputes or issues may arise regarding the authenticity or validity
of a digital signature. An arbiter or third-party authority helps resolve these
problems, ensuring fairness and trust in the process. Here’s how the arbiter
handles common problems related to digital signatures:
1. Disputes about the Authenticity of the Signature:
* If one party challenges the authenticity of a digital
signature, the arbiter can intervene by verifying the public key and ensuring it
was correctly associated with the signer's identity (often through a Certificate
Authority (CA)). If the digital certificate is valid and the public key corresponds
to the signer's identity, the arbiter can confirm the authenticity of the
signature.
2. Key Compromise or Loss:
* If the private key is compromised or lost, the arbiter can help
in the revocation of the affected digital certificate. The Certificate Revocation
List (CRL) or an Online Certificate Status Protocol (OCSP) is used to indicate that
the public key is no longer valid, preventing further use of the compromised key
for signing or verification.
3. Signature Disputes:
* In cases where there is a dispute over whether the signature
was correctly applied, the arbiter can analyze the entire signing process. They can
ensure that the signature was generated using the correct private key and hash of
the message and verify the integrity of the document using the public key. This
helps to establish whether the message has been altered after signing or if the
signature was correctly created.
4. Non-Repudiation:
* The concept of non-repudiation ensures that the signer cannot
deny having signed the message. If the signer later claims they did not sign a
document, the arbiter can prove the signature's validity through the digital
certificate and verify that the signature matches the message. This ensures the
signer cannot later claim they did not participate in the transaction.
5. Revocation and Expiry of Digital Certificates:
* Digital certificates have an expiry date. If the certificate
has expired or has been revoked, the arbiter can help verify its status using
certificate validation mechanisms such as CRLs or OCSP to ensure that expired or
revoked certificates do not cause issues.
6. Handling Misuse or Fraud:
* If a digital signature is misused or if fraudulent claims are
made, the arbiter may investigate the circumstances, including reviewing logs and
verifying if the signing process was tampered with. In cases of fraud, the arbiter
ensures appropriate actions are taken, including invalidating compromised
signatures.
Key Distribution Center (KDC)
A Key Distribution Center (KDC) is a trusted third-party entity in cryptographic
systems that is responsible for securely distributing cryptographic keys among
users or systems. It is a central component of authentication protocols like
Kerberos.
Key Components of a KDC
1. Database: Stores user identities, passwords, and access
permissions.
2. Authentication Service (AS): Handles initial user
authentication and TGT generation.
3. Ticket-Granting Service (TGS): Issues service tickets for
specific resources.
________________

Advantages of KDC
1. Centralized Key Management: Simplifies the distribution and
management of keys.
2. Enhanced Security: Reduces the need for direct key exchanges
between users and services.
3. Scalability: Supports a large number of users and services in
a network.
4. Dynamic Session Keys: Ensures session keys are unique for each
interaction.
Kerberos: An Overview
Kerberos is a network authentication protocol designed to provide secure
authentication over insecure networks, such as the Internet. It uses a trusted
third-party mechanism based on symmetric cryptography to ensure the identity of
users and services.
The protocol was developed at the Massachusetts Institute of Technology (MIT) and
is widely used in client-server environments, particularly in Windows domains and
Unix systems. Kerberos prevents eavesdropping and replay attacks, ensuring secure
communication between entities.
How Kerberos Works:
1. Authentication Server (AS): Validates user credentials.
2. Ticket Granting Server (TGS): Issues service tickets after
initial authentication.
3. Service Server (SS): Provides the requested service after
validating the ticket.
1. Symmetric Key Distribution
* What is it?
In symmetric encryption, both parties (e.g., you and a friend) need the same secret
key to encrypt and decrypt messages.
* How is the key shared?
1. Physically Delivered: Someone hands over the key in person.
2. Trusted Third Party: A trusted person or system gives the
key to both parties.
3. Old Key for a New Key: If you’ve already shared a key, use
it to encrypt and share a new key.
4. Key Distribution Center (KDC): A central system shares keys
securely with both parties.
________________

2. Asymmetric Encryption for Key Distribution


* What is it?
Asymmetric encryption uses two keys: a public key (shared with everyone) and a
private key (kept secret). It’s often used to securely share symmetric keys.
* How it works:
1. One person sends their public key to the other.
2. The other encrypts a symmetric key using that public
key.
3. Only the first person, using their private key, can
decrypt it to get the symmetric key.
* Why use it?
Public-private key pairs ensure only the intended person can access the key.
3. Public Key Distribution
* What is it?
To use public keys, they must be shared securely. Methods include:
* Public Announcements: Publishing keys for everyone,
but this risks forgery.
* Directories: A trusted organization keeps a
database of verified public keys.
* Trusted Authority: A central authority verifies and
distributes public keys.
* Certificates: Digital files verify the key belongs
to someone (explained in X.509 Certificates).
________________

4. X.509 Certificates
* What is it?
An X.509 certificate proves a public key belongs to a specific person,
organization, or device.
* How does it work?
A trusted organization (Certificate Authority or CA):
1. Verifies a person's identity.
2. Signs a certificate containing the public key.
3. Others can trust the certificate because it’s
signed by the CA.
* Example:
Your web browser uses X.509 certificates to ensure a website is secure and
trustworthy (the padlock icon).
________________
5. Public-Key Infrastructure (PKI)
* What is it?
A system that manages digital certificates and public keys to enable secure
communication.
* Key Components:
1. Certification Authority (CA): Issues and
verifies certificates.
2. Registration Authority (RA): Confirms
identity before the CA issues a certificate.
3. Repository: A database where certificates
are stored for users to access.
Public-Key Infrastructure (PKI) in Simple Words
Public-Key Infrastructure (PKI) is a system that helps people and computers
communicate securely over the internet. It uses digital certificates and
public/private key pairs to ensure that the information exchanged is authentic,
private, and untampered.
Think of PKI as a digital trust framework that ensures:
1. The person or website you are
communicating with is who they claim to be.
2. Your messages and data are secure and
cannot be read by others.
Key Components of PKI
1. Certification Authority (CA):
* A CA is like a trusted notary or a stamp
of approval in the digital world.
* It issues digital certificates that prove
the identity of a person, organization, or website.
* For example: When you see a padlock in
your browser (🔒), it means a CA has issued a certificate to that website,
confirming its authenticity.
2. Registration Authority (RA):
* An RA acts like the identity checker.
* It verifies the identity of a person or
organization before they can get a certificate from the CA.
* Example: Before giving you a certificate,
the RA might check your documents or verify your email address.
3. Repository:
* A public database where digital
certificates and their status (valid, expired, or revoked) are stored.
* It allows users and systems to check if a
certificate is still trustworthy.
* Public Key Certificates
1. Digital documents that bind a public key
to an identity.
2. Typically issued by a CA and include:
* User's public key.
* Identifier of the key owner.
* Signature from the CA to verify
authenticity.
* Session Keys
1. Temporary keys are used for a single
session of communication.
2. Enhance security by limiting the amount
of data encrypted with a single key.
* Key Revocation
1. The process of invalidating a certificate
before its expiration.
2. Managed through CRLs, which list revoked
certificates.
* Nonce
1. A unique number used once in a
cryptographic communication to prevent replay attacks.
* Man-in-the-Middle Attack
1. A security threat where an attacker
intercepts and potentially alters communication between two parties.

UNIT 5
Explain in detail about Pretty Good Privacy (PGP) in E-mail security?

Notations of PGP:
1. Message (M): Original data to
encrypt/sign.
2. Hash (H(M)): Hash value for integrity.
3. Public Key (PUa, PUb): Sender's and
receiver's public keys.
4. Private Key (PRa, PRb): Sender's and
receiver's private keys.
5. Symmetric Key (Ks): Temporary session key
for encryption.
6. Encryption (E): Encrypts data (e.g.,
E(PUb, Ks)).
7. Decryption (D): Decrypts data (e.g.,
D(PRb, E(PUb, Ks))).
8. Digital Signature (S): Authenticates
message (e.g., S(PRa, H(M))).
9. Compressed Data (Z(M)): Compressed
message version.
10. Base64 Encoding: Converts binary to text
format.

Pretty Good Privacy (PGP) is a cryptographic protocol that uses both symmetric
encryption (for message confidentiality) and asymmetric encryption (for key
distribution and digital signatures) to ensure secure email communication. PGP was
developed by Phil Zimmermann in 1991 and is now widely used for securing e-mails,
files, and other forms of communication over the internet.
· Message Integrity: Ensures that the message has not been tampered with
during transmission.
· Non-repudiation: Prevents the sender from denying the origin of the
message.

The Working of PGP


1. Digital Signature
* Creating the Message Digest:
The sender first creates a unique summary (called a hash or message digest) of the
email content using a hashing algorithm like SHA-1. Think of it as a fingerprint of
the message.
* Signing with Private Key:
This digest is then encrypted with the sender’s private key to create the digital
signature. This step proves that the email was indeed sent by the sender, and that
it hasn't been altered in transit. Only the sender has access to their private key,
so this confirms authenticity.
2. Compression
* Message Compression:
Before sending, PGP compresses the entire message, including the signature, to
reduce its size. The compression is done using a technique called the Lempel-Ziv
algorithm (or ZIP), which finds repeating patterns in the data and replaces them
with shorter representations (pointers). This makes the data smaller and easier to
transmit.
* Using the Lempel–Ziv algorithm, we
would create two variables, say A and B and replace the words is and name by
pointers to A and B, respectively.
* 3. Encryption
* Symmetric Encryption:
After compression, the data (the email message and its digital signature) is
encrypted using a symmetric encryption algorithm like IDEA (International Data
Encryption Algorithm). Symmetric encryption uses the same key for both encryption
and decryption. This step ensures that only authorized people (who have the key)
can read the email
4. Digital Enveloping
* Encrypting the Symmetric Key:
The symmetric key used for encrypting the message (from Step 3) is then encrypted
with the recipient's public key. This means that only the recipient (who has the
corresponding private key) can decrypt this symmetric key and use it to decrypt the
email.
* This step is called "digital
enveloping" because it creates a secure envelope containing both the encrypted
message and the encrypted symmetric key.
5. Base-64 Encoding
* Encoding for Safe
Transmission:
Finally, the encrypted message and symmetric key (digital envelope) are Base-64
encoded. Base-64 encoding converts the binary data into text that can be safely
transmitted over email systems that may not support binary data. This ensures that
even though the content is encrypted, it can still pass through systems without any
issues.
Summary:
* Step 1: Create a digital
signature using the sender’s private key.
* Step 2: Compress the
message and signature to reduce size.
* Step 3: Encrypt the
compressed data with a symmetric encryption key.
* Step 4: Encrypt the
symmetric key with the recipient's public key to create a digital envelope.
* Step 5: Base-64 encode the
entire data to ensure it can be safely sent over email.
4.Demonstrate the mechanism in IP security Architecture?
The IP Security (IPSec) architecture is a framework for securing Internet Protocol
(IP) communications. It operates at the Network Layer (Layer 3) and provides
encryption, authentication, and integrity to the data transmitted over IP networks.
IPSec Mechanism Overview:
IPSec is composed of protocols, mechanisms, and security services designed to
secure IP communications. It can operate in two modes:
1. Transport Mode: Only the
payload (data) of the IP packet is encrypted and/or authenticated. The IP header
remains intact.
2. Tunnel Mode: The entire IP
packet (including the header) is encrypted and encapsulated within a new IP packet.
This mode is commonly used in Virtual Private Networks (VPNs).
IPSec Architecture includes protocols, algorithms, DOI, and Key Management. All
these components are very important in order to provide the three main services:
* Confidentiality
* Authentication
* Integrity

ESP Protocol (Encapsulating Security Payload):


· A protocol used to provide confidentiality (encryption) and
authentication for data being transmitted over IP networks.
· ESP with Optional Authentication: This version provides encryption but
doesn't require authentication.
· ESP with Authentication: This version provides both encryption
(confidentiality) and authentication (to verify the source and integrity of the
data).
Encryption Algorithm:
· The set of rules and methods used to encrypt and decrypt data to ensure
confidentiality.
· It protects the data being sent by making it unreadable to anyone except
the intended recipient.
· Common Algorithms: AES (Advanced Encryption Standard), DES (Data
Encryption Standard).

AH Protocol (Authentication Header):


o A protocol that ensures data integrity (verifying that data has not been
altered) and authentication (confirming the identity of the sender).
Authentication Algorithm:
o What it is: A method used to ensure that the data has not been altered
(integrity) and that it comes from a trusted sender (authentication).
o How it works: The sender applies a mathematical function (hash) to the
message and signs it. The recipient can use the same function to verify the
message's integrity.
DOI (Domain of Interpretation):
o A reference that defines the rules and values used in both the AH and ESP
protocols.
o It ensures that both sides of the communication (sender and receiver)
interpret the security parameters (like algorithms and keys) in the same way.
o DOI defines the types of security algorithms and protocols that are
available for use in a security association (SA).
o For example, it specifies which encryption algorithm to use (e.g., AES)
and which hashing algorithm for authentication (e.g., SHA-256).
Key Management:
o The process used to securely exchange keys between the sender and
receiver.
o Ensures that both parties use the same keys for encryption and decryption,
without the keys being exposed to attackers.
o A secure exchange process, like the Internet Key Exchange (IKE), ensures
that the right keys are securely shared.

4.Compare and contrast transport mode and tunnel mode authentication in IP?
Describe how ESP is applied to both these modes?

Transport Mode
* What it does:
* Secures only the payload
(actual data) of the IP packet.
* Does not encrypt the
original IP header.
* How it works:
* The original IP packet's
header is retained.
* IPSec protection is applied
to the transport layer payload (e.g., TCP, UDP).
* Use cases:
* Used for end-to-end
communication between two hosts.
* Ideal for protecting
individual device communications, such as secure email or application data.
* Advantages:
* Less overhead since the IP
header is not encrypted.
* Suitable for scenarios
where the routing of packets requires visibility of the original IP header.
* Disadvantages:
* Original IP addresses are
visible, which may reveal sensitive network topology information.
________________

2. Tunnel Mode
* What it does:
* Secures the entire IP
packet, including the header and payload.
* Adds a new outer IP header.
* How it works:
* The original IP packet is
encapsulated entirely.
* A new IP header is created
to route the packet.
* Use cases:
* Used for communication
between gateways (e.g., routers, firewalls) or between a host and a gateway.
* Commonly used in VPNs
(Virtual Private Networks) to secure communication over the internet.
* Advantages:
* Hides the original IP
addresses and network topology.
* Provides stronger security
by encrypting both the header and payload.
* Disadvantages:
* More overhead due to the
addition of a new IP header and encryption of the entire packet.
________________

How ESP (Encapsulation Security Payload) is Applied to Both Modes


ESP provides confidentiality (encryption), authentication, and data integrity in
both modes, but its application differs:
________________

ESP in Transport Mode:


1. Encryption:
* ESP encrypts only the
payload (transport layer data) of the packet.
* The IP header remains
unencrypted and intact for routing purposes.
2. Authentication:
* If authentication is used,
it covers the payload and certain parts of the IP header.
* The packet's original
source and destination IP addresses remain visible.
3. Structure:
________________

ESP in Tunnel Mode:


1. Encryption:
* ESP encrypts the entire
original IP packet, including the original IP header and payload.
* A new IP header is added
to route the packet.
2. Authentication:
* If authentication is
used, it covers the entire encapsulated packet (original header + payload + ESP
header/trailer).
3. Structure:
* New IP Header + ESP
Header + Encrypted Original IP Packet (Header + Payload) + ESP Trailer + ESP
Authentication (optional)

Combining Security associations


S/MIME

The five important features of the IKE key determination algorithm are:
1. Cookies Mechanism: Used
to thwart clogging attacks. This requires both parties to exchange pseudorandom
cookies in the initial message, ensuring that the system does not waste resources
on unnecessary computations in the event of a forged source address or an attack.
2. Group Negotiation:
Allows the two parties to negotiate a Diffie–Hellman group, specifying the global
parameters needed for the key exchange, including the prime modulus and the
generator.
3. Nonces: Randomly
generated numbers used to ensure protection against replay attacks. These are
included in the exchange and encrypted to secure their integrity.
4. Diffie–Hellman Public
Key Exchange: Facilitates the exchange of Diffie–Hellman public keys between the
parties, allowing them to derive a shared secret key without transmitting the key
itself over the network.
5. Authentication: Ensures
the authenticity of the Diffie–Hellman exchange to prevent man-in-the-middle
attacks. This can be achieved using digital signatures, public-key encryption, or
symmetric-key encryption to validate the identities of the parties involved.What
are the features of IKE Key algorithm.
More points
The Internet Key Exchange (IKE) algorithm is used for establishing secure
communication channels between two parties. It is primarily used in Virtual Private
Networks (VPNs) to facilitate the exchange of keys for securing IPsec
communication. The main features of the IKE key exchange algorithm are:
1. Key Agreement Protocol:
* IKE uses Diffie–Hellman
(DH) for key exchange, allowing both parties to derive a shared secret key without
transmitting it over the network.
* The protocol enables the
secure exchange of cryptographic keys, ensuring that neither side can determine the
key through observation.
2. Authentication:
* IKE supports different
authentication methods, such as digital signatures, pre-shared keys (PSK), and
public-key certificates, to verify the identity of each party in the exchange.
* This helps to protect
against man-in-the-middle attacks by ensuring that the communicating parties are
legitimate.
3. Protection Against Replay Attacks:
* IKE uses nonces (random
numbers) to prevent replay attacks, ensuring that messages cannot be reused
maliciously by an attacker.
* Each message contains a
unique nonce, which is included in the calculation of the key, providing freshness
to the exchange.
4. Negotiation of Security Parameters:
* During the initial
exchange, IKE negotiates the security parameters such as encryption algorithms,
hashing functions, and Diffie–Hellman group parameters.
* This step ensures that
both parties agree on the same cryptographic settings for the communication
session.
5. Two-Phase Key Exchange:
* Phase 1: Establishes a
secure and authenticated communication channel between the parties, known as the
IKE SA (Security Association).
* Phase 2: Uses the secure
channel created in Phase 1 to negotiate and establish a Child SA, which is used for
encrypting actual user data (IPsec SAs).
6. Replay Protection and Sequence Numbers:
* IKE employs sequence
numbers and message integrity codes to ensure that each message is processed in the
correct order, further mitigating the risk of replay and out-of-order attacks.
7. Cookie Mechanism:
* IKE utilizes a cookie
mechanism to prevent clogging attacks (also known as DoS attacks). Each party sends
a pseudorandom cookie during the exchange to ensure resources are not wasted on
false requests or malicious attempts to overwhelm the system.
8. Dynamic Key Exchange:
* IKE allows for the
dynamic negotiation of keys during the session, meaning the key material can be
refreshed periodically, improving security by ensuring that the keys are changed
during the communication.
9. Mutual Authentication:
* Both parties
authenticate each other in IKE, which prevents unauthorized parties from gaining
access to the secured communication channel.
10. Support for NAT Traversal:
* IKE supports NAT
Traversal, allowing secure communication even when the parties are behind Network
Address Translation (NAT) devices. This is especially useful for VPN scenarios
where devices are often behind NAT routers.

Design Goals of a Firewall (One Simple Sentence Each):


1. Access Control:
Controls who can access the network and what they can do.
2. Traffic Filtering:
Allows or blocks traffic based on set rules (e.g., IP, ports).
3. Network Address
Translation (NAT): Hides internal IP addresses behind a single public address.
4. Intrusion
Detection/Prevention: Identifies and blocks malicious activities on the network.
5. Logging & Monitoring:
Tracks network activity and alerts admins about potential threats.
6. DoS/DDoS Protection:
Prevents attacks that try to overwhelm the network or server.
7. Application Layer
Inspection: Inspects and blocks threats in application traffic (e.g., web apps).
8. Policy Enforcement:
Ensures security rules are followed for network access.
9. Performance &
Scalability: Handles growing traffic without slowing down the network.
10. Easy Management:
Provides an easy way to configure and monitor security rules.
________________

Limitations of Firewalls (One Simple Sentence Each):


1. Internal Threats: Can't
stop attacks from users or devices already inside the network.
2. Encrypted Traffic:
Struggles to inspect traffic that is encrypted (e.g., HTTPS).
3. Zero-Day Attacks: Can't
protect against attacks that exploit unknown vulnerabilities.
4. Complex Setup: Can be
difficult to set up and configure correctly.
5. App Layer Attacks: May
miss sophisticated attacks targeting specific applications.
6. Social Engineering:
Can't stop attacks based on tricking people (e.g., phishing).
7. Performance Overhead:
Can slow down network speed if not optimized properly.
8. Obfuscated Traffic:
Can't always detect hidden or disguised traffic (e.g., using VPN).
9. No Endpoint Protection:
Doesn't protect individual devices from malware or attacks.
10. Insider Threats: Can't
easily detect threats from trusted internal users.
*

Unit 2
AES (Advanced Encryption Standard) consists of four main operations, which are
applied in a series of rounds to transform the plaintext into ciphertext. These
operations are designed to provide both confusion and diffusion, which are the two
essential principles for secure encryption.
The Four Operations in AES:
1. SubBytes (Confusion)
2. ShiftRows (Diffusion)
3. MixColumns (Diffusion)
4. AddRoundKey (Neither,
but contributes to security)
Confusion vs. Diffusion:
* Confusion: The goal of
confusion is to make the relationship between the ciphertext and the key as complex
as possible. This helps in making it difficult to deduce the key from the
ciphertext.
* Diffusion: The goal of
diffusion is to spread the influence of each plaintext bit over many ciphertext
bits, making the ciphertext appear random and ensuring that small changes in the
plaintext lead to large changes in the ciphertext.

You might also like