Untitled Document
Untitled Document
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.
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.
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
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.
—----------------------------------------------------------------------------------
--------
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.
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.
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
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.
________________
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.
________________
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.
________________
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.
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.
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.
________________
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.
________________
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.
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.
________________
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.
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.