Cns U1
Cns U1
INTRODUCTION
We are living in an information age. We need to keep information about every aspect of our
lives. In other words, information is an asset that has a value like any other asset. As an asset
information need to be secured from attacks. We store our information in a computer
system, we can call it as our information system.
Our Information system contains the hardware, software, and information in it. The act of
providing security to our information system is called information security.
SECURITY GOALS
There are three goals of security.
1. Protect the confidentiality of data.
2. Preserve the integrity of data.
3. Promote the availability of data for authorized users.
These goals form the confidentiality, integrity, availability (CIA) triad.
CONFIDENTIALITY
The first component of information security is confidentiality. This term covers two related
concepts:
Data confidentiality: Assures that private or confidential information is not made available
or disclosed to unauthorized individuals.
For example, suppose Alice want to send some data to Bob through internet, such that
during the transmission the intruder/attacker Trudy can not understand this data.
1
Privacy: The stored information about an individual need not be disclosed. For example, in
my laptop I have stored some important data, this data needs to be private means other than
me nobody should be able to access it.
INTEGRITY
This is the second component of information security. This term covers two related concepts:
Data integrity: It means that the data stored in an information system or the data during
transit in internet, can only be changed by authorized users and through authorized
mechanisms. For example, my account balance in by bank account can only be changed by
me or by the banker when I perform a transaction. It cannot be changed by the attacker.
System integrity: It means that the system should perform its set of predefined activities
without being modified by the intruder.
AVAILABILITY
The third component of information security is availability. The information created and
stored by an organization needs to be available to authorized entities. Information is useless if
it is not available. Information needs to be available to authorized users. Attackers may try to
stop the availability of information by lau nching various attacks.
A loss of availability is the disruption of access to or use of information or an information
system.
SECURITY RISKS
IF we cannot protect the confidentiality, integrity, and availability of our information system,
there may be low, moderate or high risks.
Low Risks: The loss could be expected to have a limited bad effect on organizational
operations, organizational assets, or individuals. A limited adverse effect means that, (i) cause
a degradation of the effectiveness of the functions; (ii) result in minor damage to
organizational assets; (iii) result in minor financial loss; or (iv) result in minor harm to
individuals.
For example: The website is not opening for 5 minutes. The bank account does not open for
1 hour.
2
Moderate Risk: The loss could be expected to have a serious adverse effect on
organizational operations, organizational assets, or individuals. A serious adverse effect
means that, for example, the loss might (i) cause a significant degradation in effectiveness
of the functions; (ii) result in significant damage to organizational assets; (iii) result in
significant financial loss; or (iv) result in significant harm to individuals that does not
involve loss of life or serious, life-threatening injuries.
Example: some body stolen money from my account online.
High: The loss could be expected to have a severe or catastrophic adverse effect on
organizational operations, organizational assets, or individuals. A severe or catastrophic
adverse effect means that, for example, the loss might (i) cause a severe degradation in
primary functions; (ii) result in major damage to organizational assets; (iii) result in major
financial loss; or (iv) result in severe or cata- strophic harm to individuals involving loss of
life or serious, life-threatening injuries.
For example: The satellite launching fails, the weapon mis-directed.
CONFIDENTIALITY
Student grade information is an asset whose confidentiality is considered to be highly
important by students. Grade information should only be available to students, their
parents, and employees that require the information to do their job. Student enrollment
information may have a moderate confidentiality rating. Directory information, such as lists
of students or faculty or departmental lists, may be assigned a low confidentiality rating or
indeed no rating. This information is typically freely available to the public and published
on a school’s Web site.
INTEGRITY
Several aspects of integrity are illustrated by the example of a hospital patient’s allergy
information stored in a database. The doctor should be able to trust that the information is
correct and current. Now suppose that an employee (e.g., a nurse) who is authorized to view
and update this information deliberately falsifies the data to cause harm to the hospital. The
database needs to be restored to a trusted basis quickly, and it should be possible to trace the
error back to the person responsible. Patient allergy information is an example of an asset
with a high requirement for integrity. Inaccurate information could result in serious harm or
death to a patient and expose the hospital to massive liability.
3
An example of an asset that may be assigned a moderate level of integrity requirement is a
Web site that offers a forum to registered users to discuss some specific topic. Either a
registered user or a hacker could falsify some entries or deface the Web site. If the forum
exists only for the enjoyment of the users, brings in little or no advertising revenue, and is not
used for something important such as research, then potential damage is not severe. The
Web master may experience some data, financial, and time loss.
An example of a low integrity requirement is an anonymous online poll. Many Web sites, such
as news organizations, offer these polls to their users with very few safeguards. However, the
inaccuracy and unscientific nature of such polls is well understood.
AVAILABILITY
The more critical a component or service, the higher is the level of availability required.
Consider a system that provides authentication services for critical systems, applications, and
devices. An interruption of service results in the inability for customers to access computing
resources and staff to access the resources they need to perform critical tasks. The loss of
the service translates into a large financial loss in lost employee productivity and potential
customer loss.
An example of an asset that would typically be rated as having a moderate availability
requirement is a public Web site for a university; the Web site provides information for
current and prospective students and donors. Such a site is not a critical component of the
university’s information system, but its unavailability will cause some embarrassment.
An online telephone directory lookup application would be classified as a low availability
requirement. Although the temporary loss of the application may be an annoyance, there are
other ways to access the information, such as a hardcopy directory or the operator.
Unit 1 – Module 2
CRYPTOGRAPHIC ATTACKS
Cryptography attack can be broadly categorized into two distinct types, (1) Cryptanalytic
Attacks, and (2) Non cryptanalytic Attacks.
4
Cryptanalytic Attacks
These attacks are combinations of statistical and algebraic techniques aimed to obtain the
secret key of the cipher. These methods inspect the mathematical properties of the
cryptographic algorithms to identify the keys. If the property is detected, the guess is correct,
otherwise the next guess is tried. However, such attack surely points out a flaw in the design.
Non-cryptanalytic Attacks
The other types of attacks are non-cryptanalytic attacks, which do not exploit the
mathematical weakness of the cryptographic algorithm. However, the goals of the security
namely, confidentiality, integrity, and availability can be very much threatened by this class
of attacks.
Security Attacks
(Threat to integrity)
5
Traffic 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 e-mail address of the sender or receiver. she can collect pair of
request responses to help he guess the nature of transaction.
6
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. For example, a user tries to contact a bank,
but another site pretends that it is the bank, but another site pretends that it is the bank and it
again to receive another payment from the user.
Replaying: 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 as for payment. The attacker intercepts
the message and sends it again to receive another payment from the bank.
7
Repudiation: This type of attack is performed by one of the two parties, i.e. sender or
receiver. The sender of the message might deny that she has sent the message. The receiver of
the message might deny that she has received the message.
For example, suppose want to I purchase gold through bank. Today gold price is Rs 50,000
per 10 grams. I sent a message to bank, saying that Mr banker, kindly purchase 10 grams of
gold, and deduct the amount from my account. Tomorrow gold price comes down to
Rs.45,000 per 10 grams. I will be in loss side. Tomorrow I say to bank that, that message was
not sent by me.
8
In the present era, not only business but almost all the aspects of human life are driven by
information. Hence, it has become imperative to protect useful information from malicious
activities such as attacks. Let us consider the types of attacks to which information is
typically subjected to.
PASSIVE ATTACKS
The main goal of a passive attack is to obtain unauthorized access to the information. For
example, actions such as intercepting and eavesdropping on the communication channel can
be regarded as passive attack.
These actions are passive in nature, as they neither affect information nor disrupt the
communication channel. A passive attack is often seen as stealing information. The only
difference in stealing physical goods and stealing information is that theft of data still leaves
the owner in possession of that data. Passive information attack is thus more dangerous than
stealing of goods, as information theft may go unnoticed by the owner.
Note: Snooping and traffic analysis are passive attacks, threatens the confidentiality.
ACTIVE ATTACKS
An active attack involves changing the information in some way by conducting some
process on the information. For example,
Modifying the information in an unauthorized manner.
9
Initiating unintended or unauthorized transmission of information.
Alteration of authentication data such as originator name or timestamp associated
with information
Unauthorized deletion of data.
Denial of access to information for legitimate users (denial of service).
Note: Modification, masquerading, replaying, and repudiation are active attacks, threatens
the integrity. Denial of service is an active attack, threatens to the Availability.
Unit 1 Module 3
SECURITY SERVICES
The International Telecommunication Union - Telecommunication Standardization Sector
(ITU-T) X.800 has defined five services related security goals and attacks.
Data Confidentiality: It is designed to protect data from disclosure attacks. The service as
defined by X.800 is very broad and encompasses confidentiality of the whole message or part
10
of a message and protection against traffic analysis. That is, it is designed to prevent
snooping and traffic analysis attack.
Data Integrity: It is designed to protect from modification, insertion, deletion and replying
by an adversary may protect from the whole message or part of the message.
Authentication: 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: It provides the services against repudiation by either the sender or the
receiver of the data. In repudiation with proof of origin, the receiver of the data can later
prove the identity of the sender it denied. In nonrepudiation with of delivery, the sender of
data can later prove that data were delivered to the intended recipient.
Access control: It provides protection against unauthorized access to data. The term access
in this definition is very broad and can involve reading, writing, modifying, executing
programs and so on.
SECURITY MECHANISMS
ITU-T(X.800) also recommends some security mechanisms to provide the security services.
11
Encipherment: This technique is hiding or covering data, can provide confidentiality. It
can also be used to complement other mechanisms to provide other services. Generally
using two techniques – Cryptography and steganography are using for enciphering.
Data Integrity:
The data integrity mechanism appends to the data a short check value that has been created
by a specific process from the data itself. The receiver receives the data and check the value.
She creates a new check value from the receive data and compare new related check value
with the one received. If the two values are the same, the integrity of data has been
preserved.
Data 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 person
that she owns a private key related to the public key that she has announced publicly.
12
Traffic Padding: Traffic padding means inserting some bogus data into the data 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 route.
Notarization: Notarization means selecting a third trusted party to content the communication
between two entities. This can be done, for example, to prevent repudiation. The receiver can
involve the 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. Example of proofs are passwords and PINs.
13
Using this model require us to:
Design a suitable algorithm for the security transformation.
Generate the secret information (key) used by algorithm.
Develop method to distribute and share the secret information (key).
Specify the protocol that enabling the sender and receiver to use the transformation
and key for a security service.
Unit 1- Module 4
INTEGER ARITHMETIC
In integer arithmetic we use a set and a few operations. You are familiar with this set and the
corresponding operations. but they are reviewed here to create a background for modular
arithmetic.
Set of Integers: The set of integers, denoted by Z, contains all integral numbers (with no
fraction) from negative infinity to positive infinity.
15
Examples: The following shows the results of the three binary operations on two integers.
Because each input can be either positive or negative, we can have four cases for each
operation.
Integer Division Example: When we use a computer or a calculator, r and q are negative
when a is negative. How can we apply the restriction that r needs to be positive? The
solution is simple, we decrement the value of q by 1 and we add the value of n to r to make it
positive.
16
The Graph of the relation: We can show the above relationwith the two restrictions on n and
r using two graphs below. The first one shows the case when a is positive and the second one
shows when a is negative.
Divisibility
If a is not zero and we let r = 0 in the division relation, we get a = q × n. If the remainder is
Example : The integer 4 divides the integer 32, because 32 = 8 × 4. So, we write
Divisibility Properties
Property 1: if a|1, then a = ±1.
Property 2: if a|b and b|a, then a = ±b.
Property 3: if a|b and b|c, then a|c.
Property 4: if a|b and a|c, then
a|(m × b + n × c), where m and n are arbitrary integers.
Divisibility
Divisibility Example
17
Divisibility
Fact 1: The integer one has only one divisor, itself.
Fact 2: Any positive integer has at least two divisors, 1 and itself. (but it can have more).
GCD of two positive integers is the largest integer that can divide both integers. The GCD of
140 and 12 is 4.
18
When gcd (a, b) = 1, we say that a and b are relatively prime.
19
Unit 1- Module 5
MODULAR ARITHMETIC
The division relationship (a = q × n + r) discussed, in the previous section has two inputs (a
and n) and two outputs (q and r). In modular arithmetic, we are interested in only one of the
outputs, the remainder r.
Modulo Operator: The modulo operator is shown as mod. The second input (n) is called the
modulus. The output r is called the residue.
Figure below shows the relation between division algorithm and modulo operator
SET OF RESIDUES
The modulo operation creates a set, which in modular arithmetic is referred to as the set of
residues Zn. Some Zn sets are given below.
Congruence: To show that two integers are congruent, we use the congruence operator (≡).
For example, we write:
Concept of congruence
Residue Classes: A residue class [a] or [a]n is the set of integers congruent modulo n. In
other words it is the set of all integers x, such that x=a (mod n). For example, if n=5 we have
five sets [0], [1], [2], [3], and [4].
21
CIRCULAR NOTATION COMPARISON OF Z AND ZN
Figure below shows Comparison of Z and Zn using graphs
Example: We use modular arithmetic in our daily life; for example, we use a clock to
measure time. Our clock system uses modulo 12 arithmetic. However, instead of a 0 we use
the number 12.
OPERATION IN ZN
The three binary operations that we discussed for the set Z, can also be defined for the set Zn.
The result may need to be mapped to Zn using the mod operator.
22
Example: Perform the following operations (the inputs come from Zn):
a. Add 7 to 14 in Z15. b. Subtract 11 from 7 in Z13. c. Multiply 11 by 7 in Z20.
Solution
Example:Perform the following operations (the inputs come from either Z or Zn):
a. Add 17 to 27 in Z14 b. Subtract 43 from 12 in Z13 c. Multiply 123 by −10 in Z19.
Solution
Properties of operation in Zn
23
The following shows the application of the above properties:
1. (1,723,345 + 2,124,945) mod 11 = (8 + 9) mod 11 = 6
2. (1,723,345 − 2,124,945) mod 11 = (8 − 9) mod 11 = 10
3. (1,723,345 × 2,124,945) mod 11 = (8 × 9) mod 11 = 6
Unit 1- Module 6
INVERSES
When we are working in modular arithmetic, we often need to find the inverse of a number
relative to an operation. We are normally looking for an additive inverse (relative to an
addition operation) or a multiplicative inverse (relative to a multiplication operation).
Additive Inverse: In Zn, two numbers a and b are additive inverses of each other if
In modular arithmetic, each integer has an additive inverse. The sum of an integer and its
additive inverse is congruent to 0 modulo n.
24
Example: Find all additive inverse pairs in Z10.
Solution: The six pairs of additive inverses are (0, 0), (1, 9), (2, 8), (3, 7), (4, 6), and (5, 5).
Multiplicative Inverse
In Zn, two numbers a and b arethe multiplicative inverse of each other if
In modular arithmetic, an integer may or may not have a multiplicative inverse. When it does,
the product of the integer and its multiplicative inverse is congruent to 1 modulo n.
Example: Find the multiplicative inverse of 8 in Z10.
Solution: There is no multiplicative inverse because gcd (10, 8) = 2 ≠ 1. In other words, we
cannot find any number between 0 and 9 such that when multiplied by 8, the result is
congruent to 1.
Example: Find all multiplicative inverses in Z10.
Solution: There are only three pairs: (1, 1), (3, 7) and (9, 9). The numbers 0, 2, 4, 5, 6, and 8
do not have a multiplicative inverse.
Example: Find all multiplicative inverse pairs in Z11.
Solution: We have seven pairs: (1, 1), (2, 6), (3, 4), (5, 9), (7, 8), (9, 9), and (10, 10).
25
Find the multiplicative inverse of 11 in Z26.
The gcd (26, 11) is 1, which means that the multiplicative inverse of 11 exists. The extended
Euclidean algorithm gives .The multiplicative inverse is (-7) mod 26=19. In other words 11
and 19 are multiplicative inverses in . We can see that (11×19) mod 26=209 mod 26=1.
The gcd (100, 23) is 1, which means that the inverse of 23 exists The extended Euclidean
algorithm gives .The multiplicative inverse is (-13) mod 100=87. In other words 13 and 87
are multiplicative inverses in . We can see that (23×87) mod 100=2001 mod 100=1.
26
The gcd (26, 12) is 2 ≠1; the inverse does not exist.
Different Sets: We need to use Zn when additive inverses are needed; we need to use Zn*
when multiplicative inverses are needed. Figure 2.17 Some Zn and Zn* sets
Two More Sets: Cryptography often uses two more sets: Zp and Zp*. The modulus p in these
two sets is a prime number.
MATRICES
In cryptography we need to handle matrices. Although this topic belongs to a special branch
of algebra called linear algebra, the following brief review of matrices is necessary
preparation for the study of cryptography.
Figure: A matrix of size l x m
27
Figure Examples of matrices
Figure shows the product of a row matrix (1 × 3) by a column matrix (3 × 1).The result is a
matrix of size 1 × 1.
28
Determinant: The determinant of a square matrix A of size m × m denoted as det (A) is a
scalar calculated recursively as shown below:
INVERSES OF MATRICES
Additive inverse of a matrix is another matrix B such that A + B = 0.
Multiplicative inverse of a matrix A is another matrix B such that A × B = B × A = I.
Multiplicative inverses are only defined for square matrices. Multiplicative inverse exists
only if the det(A) has a multiplicative inverse in the corresponding set.
RESIDUE MATRICES
Cryptography uses residue matrices: matrices with all elements in Zn. All operations on
residue matrices are performed the same as for the integer matrices except that the operations
are done in modular arithmetic. One interesting result is that a residue matrix has a
29
multiplicative inverse if the determinant of the matrix has a multiplicative inverse in . In other
words, a residue matrix has a multiplicative inverse if gcd(det(A), n)=1.
Figure: A residue matrix and its multiplicative inverse in Z26
Two matrices are congruent modulo n, written as A≡B (mod n). if they have the same
number of rows columns and all corresponding elements are congruent modulo n. In other
words, A≡B (mod n), if ≡ (mod n) for all i’s and j’s.
LINEAR CONGRUENCE
Cryptography often involves solving an equation or a set of equations of one or more
variables with coefficient in Zn. This section shows how to solve equations when the power of
each variable is 1 (linear equation).
30
Example Solve the equation 14 x ≡ 12 (mod 18). We have exactly two equations, but first we
reduce the equation.
32