Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
4 views13 pages

Unit-1 Notes

OU notes

Uploaded by

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

Unit-1 Notes

OU notes

Uploaded by

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

Unit-1

Syllabus: Basic Principles, Security Goals, Cryptographic Attacks, Services and Mechanisms,
Mathematics of Cryptography

1.1. Basic Principles

Introduction to Information Security:

We are living in the information age. We are generating information at every stage of our lives daily
and we need to protect that information. In other words, information is an asset that has a value
like any other asset. As an asset information needs to be secured from attacks.

To protect information, information needs to be hidden from unauthorized access


(confidentiality), protected from unauthorized change (integrity), and available to an authorized
entity when it is needed (availability).

Until a few decades ago, the information collected by an organization was stored on physical files.
The confidentiality of the file was achieved by restricting the access to a few authorized and
trusted people in the organization. In the same way, only a few authorized people were allowed
to change the contents of the files. Availability was achieved by designating atleast one person
who would always have access to the files.

With the advent of computers, information storage became electronic. Instead of being stored on
physical media, it was stored in computers. The three security requirements, however, did not
change. The files stored in computers require confidentiality, integrity and availability. The
implementation of these requirements, however, is different and more challenging.

1.2. Security Goals

There are three primary goals in any security service. These are confidentially, integrity and
availability.

Confidentiality: The principle of confidentiality is that only the sender and the intended recipient
should be able to access the contents of a message. Confidentiality gets compromised if an
unauthorized person is able to access the message. Example of this could be a confidential email
message sent by user A to user B, which is accessed by user C without the permission or
knowledge of A and B. This type of attack is called interception.

Integrity: When the contents of a message are changed after the sender sends it, but before it
reaches the intended recipient, we say that the integrity of the message is lost. For example,
consider that user A sends message to user B. User C tampers with a message originally sent by
user A, which is actually destined for user B. User C somehow manages to access it, change its
contents and send the changed message to user B. User B has no way of knowing that the
contents of the message changed after user A had sent it. User A also does not know about this
change. This type of attack is called modification.

Availability: The principle of availability is that resources should be available to authorized


parties at all times. For example, due to the intentional actions of an unauthorized user C, an
authorized user A may not be able to contact a server B. This would defeat the principle of
availability. Such an attack is called interruption.
Fig-1.1: Taxonomy of Security Goals

1.3. Security Attacks

Security Attack: Any action that compromises the security of information owned by an
organization.

Vulnerability: A vulnerability is an identified weakness in a controlled system, where controls are


not present or are no longer effective.

Threat: A potential for violation of security, which exists when there is a circumstance, capability,
action, or event that could breach security and cause harm. That is, a threat is a possible danger
that might exploit a vulnerability.

Attack: An attack is a deliberate act that takes advantage of a vulnerability to compromise a


controlled system. It is accomplished by a threat agent that damages or steals an organization’s
information or physical asset.

Attacks are classified as passive and active. A passive attack is an attempt to learn or make use
of information from the system without affecting system resources, whereas an active attack is
an attempt to alter system resources or affect their operation.

Passive Attacks

Passive attacks are in the nature of eavesdropping on or monitoring the transmissions. The goal
of the opponent is to obtain information that is being transmitted.

Two types of passive attacks are “release of message contents (Snooping)” and “traffic analysis”.

The release of message contents is easily understood. A telephone conversation, an electronic


mail message, and a transferred file may contain sensitive or confidential information. We would
like to prevent an opponent from learning the contents of these transmissions.

A second type of passive attack, traffic analysis, is subtler.

To protect information from passive attack, we must mask the contents of messages or other
information traffic so that opponents, even if they captured the message, could not extract the
information from the message. The common technique for masking contents is encryption. If we
had encryption protection in place, an opponent might still be able to observe the pattern of these
messages. The opponent could determine the location and identity of communicating hosts and
could observe the frequency and length of messages being exchanged. This information might be
useful in guessing the nature of the communication that was taking place.

Passive attacks are very difficult to detect because they do not involve any alteration of the data.
Active Attacks

Active attacks involve some modification of the data stream or the creation of a false stream and
can be subdivided into five categories: masquerade, replay, modification of messages,
Repudiation and denial of service.

Taxonomy of Attacks

Three goals of security, confidentiality, integrity, and availability can be threatened by security
attacks. Attacks are divided into three groups related to the security goals.
Fig-1.2: Taxonomy of Attacks

Attacks Threatening Confidentiality

In general, two types of attacks threaten the confidentiality of information: snooping and traffic
analysis.

Snooping

Snooping refers to unauthorized access to or interception of data. For example, a file transferred
through the Internet may contain confidential information. An unauthorized entity may intercept
the transmission and use the contents for her own benefit. To prevent snooping, the data can be
made non-intelligible to the interceptor by using encipherment techniques.

Trafic Analysis

Although encipherment of data may make it non-intelligible for the interceptor, she can obtain
some other type information by monitoring online traffic. For example, she can find the electronic
address (such as the e-mail address) of the sender or the receiver. She can collect pairs of
requests and responses to help her guess the nature of transaction.

Attacks Threatening Integrity

The integrity of data can be threatened by several kinds of attacks: modification, masquerading,
replaying, and repudiation.

Modification

After intercepting or accessing information, the attacker modifies the information to make it
beneficial to herself. For example, a customer sends a message to a bank to do some transaction.
The attacker intercepts the message and changes the type of transaction to benefit herself. Note
that sometimes the attacker simply deletes or delays the message to harm the system or to
benefit from it.
Masquerading

Masquerading, or spoofing, happens when the attacker impersonates somebody else. For
example, an attacker might steal the bank card and PIN of a bank customer and pretend that she
is that customer. Sometimes the attacker pretends instead to be the receiver entity. For example,
a user tries to contact a bank, but another site pretends that it is the bank and obtains some
information from the user.

Replaying

Replaying is another attack. The attacker obtains a copy of a message sent by a user and later
tries to replay it. For example, a person sends a request to her bank to ask for payment to the
attacker, who has done a job for her. The attacker intercepts the message and sends it again to
receive another payment from the bank.

Repudiation

This type of attack is different from others because it is performed by one of the two parties in the
communication: the sender or the receiver. The sender of the message might later deny that she
has sent the message; the receiver of the message might later deny that he has received the
message. An example of denial by the sender would be a bank customer asking her bank to send
some money to a third party but later denying that she has made such a request. An example of
denial by the receiver could occur when a person buys a product from a manufacturer and pays
for it electronically, but the manufacturer later denies having received the payment and asks to
be paid.

Attacks Threatening Availability

Denial of Service

Denial of service (DoS) is a very common attack. It may slow down or totally interrupt the service
of a system. The attacker can use several strategies to achieve this. Attacker might send so many
bogus requests to a server that the server crashes because of the heavy load. The attacker might
intercept and delete a server’s response to a client, making the client to believe that the server is
not responding. The attacker may also intercept requests from the clients, causing the clients to
send requests many times and overload the system.

1.4. Services and Mechanisms

The International Telecommunication Union-Telecommunication Standardization Sector


provides some security services and some mechanisms to implement those services. Security
services and mechanisms are closely related because a mechanism or combination of
mechanisms are used to provide a service.

Security Services

ITU-T (X.800) has defined five services related to the security goals and attacks we defined in the
previous sections.
Fig 1.3: Security Services

Data Confidentiality: Data confidentiality is designed to protect data from disclosure attack.
Confidentiality is the protection of transmitted data from passive attacks. The service as defined
by X.800 is very broad and encompasses confidentiality of the whole message or part of a
message and also protection against traffic analysis. That is, it is designed to prevent snooping
and traffic analysis attack.

Data Integrity: Data integrity is designed to protect data from modification, insertion, deletion,
and replaying by an adversary. It may protect the whole message or part of the message. A
connection-oriented integrity service deals with a stream of messages and assures that
messages are received as sent with no duplication, insertion, modification, reordering, or
replays. On the other hand, a connectionless integrity service deals with individual messages
without regard to any larger context, generally provides protection against message modification
only.

Authentication: The authentication service is concerned with assuring that a communication is


authentic. This service provides the authentication of the party at the other end of the line. In
connection-oriented communication, it provides authentication of the sender or receiver during
the connection establishment (peer entity authentication). In connectionless communication, it
authenticates the source of the data (data origin authentication).

Nonrepudiation: Nonrepudiation service protects against repudiation by either the sender or the
receiver from denying message transmission or receipt of message. In nonrepudiation with proof
of the origin, the receiver of the data can later prove the identity of the sender if denied. In
nonrepudiation with proof of delivery, the sender of data can later prove that data were delivered
to the intended recipient.

Access control: Access control provides protection against unauthorized access to data. In the
context of network security, access control is the ability to limit and control the access to host
systems and applications via communications links. To achieve this, each entity trying to gain
access must first be identified, or authenticated, so that access rights can be tailored to the
individual.

Security Mechanism

ITU-T (X.800) also recommends some security mechanisms to provide the security services.
Fig 1.4: Security Mechanisms

Encipherment: This is the process of using mathematical algorithms to transform data into a
form that is not readable. Encipherment, hiding or covering data, can provide confidentiality. It
can also be used to complement other mechanisms to provide other services. cryptography and
steganography are used to hide data.

Data Integrity: A variety of mechanisms may be used to assure the integrity of a data unit or
stream of data units. The data integrity mechanism appends to the data a short checkvalue that
has been created by a specific process from the data itself. The receiver receives the data and the
checkvalue. He creates a new checkvalue from the received data and compares the newly
created checkvalue with the one received. If the two checkvalues are the same, the integrity of
data has been preserved.

Digital Signature: A digital signature is a means by which the sender can electronically sign the
data and the receiver can electronically verify the signature. The sender uses a process that
involves showing that she owns a private key related to the public key that she has announced
publicly. The receiver uses the sender’s public key to prove that the message is indeed signed by
the sender who claims to have sent the message.

Authentication Exchange: This mechanism is intended to ensure the identity of an entity by


means of information exchange. In authentication exchange, two entities exchange some
messages to prove their identity to each other. For example, one entity can prove that she knows
a secret that only she is supposed to know.

Trafic Padding: Traffic padding means inserting some bogus/dummy data into the data traffic to
thwart the adversary’s attempt to use the traffic analysis.

Routing Control: Routing control means selecting and continuously changing different available
routes between the sender and the receiver to prevent the opponent from eavesdropping on a
particular route.

Notarization: This is the use of a trusted third party to assure certain properties of a data
exchange. Notarization means selecting a third trusted party to control the communication
between two entities. This can be done, for example, to prevent repudiation. The receiver can
involve a trusted party to store the sender request in order to prevent the sender from later
denying that she has made such a request.

Access Control: Access control uses methods to prove that a user has access right to the data
or resources owned by a system. A variety of mechanisms are available that enforce access rights
to resources.

Relationship between services and mechanisms

The following table shows the relationship between the security services and the security
mechanisms. It shows that three mechanisms (encipherment, digital signature, and
authentication exchange) can be used to provide authentication and encipherment mechanism
may be involved in three services (data confidentiality, data integrity, and authentication)

Security Services Security Mechanisms


Data confidentiality Encipherment and routing control
Data integrity Encipherment, digital signature, data integrity
Authentication Encipherment, digital signature, authentication exchanges
Nonrepudiation Digital signature, data integrity, and notarization
Access control Access control mechanism
2. Mathematics of Cryptography

2.1 Integer Arithmetic


The set of integers includes positive and negative whole numbers and zero. Basic
operations such as addition, subtraction, and multiplication are closed in integers.

The Division Algorithm states: For any integer a and any positive integer n, there exist
unique integers q and r such that:
a = q × n + r, where 0 ≤ r < n.

Example: Divide 101 by 11.


101 = 9 × 11 + 2 ⇒ q = 9, r = 2

2.2 Divisibility and Primes


If integer a is divisible by integer n (n | a), then there exists an integer k such that a = n × k.

Prime numbers are integers greater than 1 that have no positive divisors other than 1 and
themselves.

Example:
7 is prime → divisors: 1, 7
9 is not prime → divisors: 1, 3, 9

2.3 Greatest Common Divisor (GCD)


The GCD of two integers a and b is the largest number that divides both without leaving a
remainder.

Euclidean Algorithm:
Example: gcd(544, 119)
544 = 4×119 + 68
119 = 1×68 + 51
68 = 1×51 + 17
51 = 3×17 + 0 → gcd = 17

2.4 Extended Euclidean Algorithm


This algorithm finds integers x and y such that: ax + by = gcd(a, b)
Example: Find x and y for a = 99 and b = 78
99 = 1×78 + 21
78 = 3×21 + 15
21 = 1×15 + 6
15 = 2×6 + 3
6 = 2×3 + 0 → gcd = 3
Now we back-substitute to find x and y such that 99x + 78y = 3

2.5 Modular Arithmetic


In modular arithmetic, calculations are done within a finite range from 0 to n−1. This is the
basis for many cryptographic functions.

If a ≡ b mod n, then (a − b) is divisible by n.

Example:
17 ≡ 5 mod 12 because 17 − 5 = 12 which is divisible by 12.

Modular Addition:
(7 + 11) mod 12 = 18 mod 12 = 6

Modular Multiplication:
(3 × 4) mod 5 = 12 mod 5 = 2

2.6 Modular Inverse


An integer a has a modular inverse mod n if gcd(a, n) = 1.
The modular inverse is an integer x such that (a × x) mod n = 1

Example: Find 3⁻¹ mod 11


Try x = 4 → 3×4 = 12 mod 11 = 1 ⇒ 3⁻¹ mod 11 = 4

2.7 Linear Congruence


A linear congruence equation is of the form: ax ≡ b mod n

Example: Solve 4x ≡ 8 mod 12


First, gcd(4, 12) = 4, which divides 8 → solution exists
Divide entire equation by 4:
x ≡ 2 mod 3 → solutions: x = 2, 5, 8, 11 mod 12
2.8 Matrices and Modular Arithmetic
Matrices with modular arithmetic are used in block ciphers like Hill cipher.

Example:
Matrix A = [[2, 3], [1, 4]]
Vector X = [[5], [6]]
Compute A·X mod 7:
[ (2×5 + 3×6) % 7 = (10+18)%7 = 28%7 = 0
(1×5 + 4×6) % 7 = (5+24)%7 = 29%7 = 1 ] ⇒ Result = [[0], [1]]

2.9 Solving Linear Systems in Modular Arithmetic


Solving a modular system using matrix inverse (if it exists).

Example:
Matrix A = [[1, 2], [3, 4]], mod 5
Compute determinant: (1×4 - 2×3) = 4 - 6 = -2 ≡ 3 mod 5
Check inverse exists: gcd(3, 5) = 1 ⇒ invertible

Applications in Cryptography
- RSA: Depends on modular exponentiation and modular inverses
- Hill Cipher: Uses matrix operations mod 26
- Diffie-Hellman: Based on exponentiation in finite groups

2.10 Security Implementation Techniques


1. Steganography
2. Cryptography

Steganography is the art and science of hiding a message within another message or
physical object, making the hidden message undetectable to the casual observer. It differs
from cryptography, which hides the content of a message, as steganography conceals the
very existence of the message itself. This can involve hiding text within images, audio files,
or other digital media.

Key Concepts:

 Covert Communication:

Steganography allows for secret communication where the existence of a message is hidden,
unlike cryptography where the message content is scrambled.
 Imperceptibility:

The goal is for the embedded message to be undetectable, meaning the "carrier" (the file or
object containing the hidden message) should appear unchanged or only slightly altered.

 Digital Steganography:

Involves hiding information within digital files like images, audio, video, or even within the
structure of network packets.

 Physical Steganography:

Involves hiding messages in physical objects, such as writing on shaved heads, using
invisible inks, or hiding microdots.

How it Works (Digital Image Steganography Example):

1. 1. Selection of a Carrier:

A digital image (or other file) is chosen as the "carrier" or container for the secret message.

2. 2. Embedding the Message:

The secret message is encoded and embedded into the carrier file. This might involve
modifying the least significant bits of the pixel data in an image, or other subtle changes.

3. 3. Retrieval:

At the receiving end, the embedded message is extracted from the carrier using a
corresponding steganography tool or method.

Steganography vs. Cryptography:

 Cryptography: Focuses on scrambling the content of a message so it's unreadable


without the key.

 Steganography: Focuses on hiding the very existence of the message itself.

 Combined Approach: Steganography can be combined with cryptography to add


an extra layer of security. The message can be encrypted first and then hidden using
steganography.

Applications:

 Covert Communication:

Enables secret communication where the sender and recipient want to avoid detection.

 Data Hiding:
Hiding information within seemingly ordinary files, making it less likely to be noticed.

 Digital Watermarking:

Steganography techniques can be used to embed watermarks in images or other media for
copyright protection.

 Steganalysis:

The art and science of detecting hidden messages in steganographic systems.

Example:

One well-known example of digital steganography is hiding a text message within an image
file. The message is encoded and embedded in the image data, making it virtually invisible
to the naked eye. The recipient can then use a steganography tool to extract the hidden text
from the image.

You might also like