Security As The Protection Afforded To An Automated Information System in Order
Security As The Protection Afforded To An Automated Information System in Order
Security As The Protection Afforded To An Automated Information System in Order
INTRODUCTION TO SECURITY
UNIT I INTRODUCTION TO SECURITY
Computer Security Concepts – The OSI Security Architecture – Security
Attacks – Security Services and Mechanisms – A Model for Network Security –
Classical encryption techniques: Substitution techniques, Transposition
techniques, Steganography – Foundations of modern cryptography: Perfect
security – Information Theory – Product Cryptosystem – Cryptanalysis.
1.1 Computer Security Concepts
The NIST Computer Security Handbook [NIST95] defines the term computer
security as the protection afforded to an automated information system in order
to attain the applicable objectives of preserving the integrity, availability and
confidentiality of information system resources (includes hardware, software,
firmware, information/data, and telecommunications).
This definition introduces three key objectives that are at the heart of computer
security.
Key Security Concepts
These three concepts form what is often referred to as the CIA triad.
Confidentiality (covers both data confidentiality and privacy): preserving
authorized restrictions on information access and disclosure
Integrity (covers both data and system integrity): Guarding against improper
information modification or destruction
1
Availability: Ensuring timely and reliable access to and use of information.
Although the use of the CIA triad to define security objectives is well
established, some in the security field feel that additional concepts are needed to
present a complete picture. Two of the most commonly mentioned are:
Authenticity: The property of being genuine and being able to be verified and
trusted
Accountability: The security goal that generates the requirement for actions of
an entity to be traced uniquely to that entity.
Example Applications
We can define three levels of impact
Low: The loss could be expected to have a limited adverse effect on
organizational operations, organizational assets, or individuals.
For example, the loss might
result in minor damage to organizational assets;
result in minor financial loss;
Moderate: The loss could be expected to have a serious adverse effect on
organizational operations, organizational assets, or individuals. \
For example, the loss might
result in significant damage to organizational assets;
result in significant financial loss
High: The loss could be expected to have a severe or catastrophic adverse effect
on organizational operations, organizational assets, or individuals.
For example, the loss might
result in major damage to organizational assets;
result in major financial loss;
We now provide some examples of applications that illustrate the requirements
just enumerated.
Confidentiality - Student grade information is an asset whose
confidentiality is considered to be highly important by students.
2
Integrity – Consider a hospital patient's allergy information stored in a
database. The doctor should be able to trust that the information is correct
and current.
Availability - 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.
Challenges
1. not simple – easy to get it wrong
2. must consider potential attacks
3. procedures used counter-intuitive
4. involve algorithms and secret info
5. must decide where to deploy mechanisms
6. battle of wits between attacker / admin
7. not perceived to be of benefit until it fails
8. requires regular monitoring
Important Terminologies
Plain text: An original message is known as the plaintext.
Cipher text: The coded message is called the cipher text.
Encryption: The process of converting from plaintext to cipher text is known
as enciphering or encryption.
Decryption: The process of converting from cipher text in to plain text is
known as deciphering or decryption.
Cryptography The many schemes used for encryption constitute the area of
study known as cryptography. Such a scheme is known as a cryptographic
system or a cipher.
Cryptanalysis: Techniques used for deciphering a message without any
knowledge of the enciphering details fall into the area of cryptanalysis.
Cryptanalysis is what the layperson calls “breaking the code.”
3
Cryptology: The areas of cryptography and cryptanalysis together are called
cryptology.
4
Passive attacks are of two types
Release of message contents
Traffic analysis:
Release of message contents: The opponent would learn the contents of the
transmission. A telephone conversation, an e-mail message and a transferred file
may contain sensitive or confidential information. We would like to prevent the
opponent from learning the contents of these transmissions.
Traffic analysis: 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. However, it is feasible to
prevent the success of these attacks.
Active attacks
These attacks involve some modification of the data stream or the creation of a
false stream.
5
Replay – The attacker captures the message and retransmits the message
without modification to produce unauthorized effect.
6
entire network, either by disabling the network or by overloading it with
messages so as to degrade performance.
It is quite difficult to prevent active attacks absolutely, because to do so
would require physical protection of all communication facilities and paths at
all times. Instead, the goal is to detect them and to recover from any disruption
or delays caused by them.
SECURITY SERVICES
X.800 defines a security service as a service that is provided by a protocol layer
of communicating open systems and that ensures adequate security of the
systems or of data transfers.
The classification of security services are as follows:
8
(v)Non repudiation: Provides protection against denial by one of the entities
involved in a communication of having participated in all or part of the
communication.
Nonrepudiation, Origin
Proof that the message was sent by the specified party
Nonrepudiation, Destination
Proof that the message was received by the specified party
SECURITY MECHANISMS
Specific security mechanisms: May be incorporated into the appropriate
protocol layer in order to provide some of the OSI security services.
Encipherment:
It uses mathematical algorithm
to transform data into a form that is not readily intelligible. It depends
upon encryption algorithm and key
Digital signature:
Data appended to or a cryptographic transformation of a data unit that is
to prove integrity of data unit and prevents from forgery
Access control
A variety of mechanisms that enforce access rights to resources.
Data integrity
A variety of mechanism are used to ensure integrity of data unit
Traffic padding
The insertion of bits into gaps in a data stream to frustrate traffic analysis
attempts.
Notarization
The use of a trusted third party to assure certain properties of a data
exchange
Pervasive Security Mechanisms:
Mechanisms that are not specific to any particular OSI security service or
protocol layer.
9
Trusted Functionality That which is perceived to be correct with respect
to some criteria (e.g., as established by a security policy).
Security Label The marking bound to a resource (which may be a data
unit) that names or designates the security attributes of that resource.
Event Detection Detection of security-relevant events.
Security Audit Trail Data collected and potentially used to facilitate a
security audit, which is an independent review and examination of system
records and activities.
Security Recovery Deals with requests from mechanisms, such as event
handling and management functions, and takes recovery actions.
In symmetric key algorithms, the encryption and decryption keys are known
both to sender and receiver. The encryption key is shared and the decryption
key is easily calculated from it.
In many cases, the encryption and decryption keys are the same. In public key
cryptography, encryption key is made public, but it is computationally
infeasible to find the decryption key without the information known to the
receiver.
10
A message is to be transferred from one party to another across some sort of
internet. The two parties, who are the principals in this transaction, must
cooperate for the exchange to take place. A logical information channel is
established by defining a route through the internet from source to destination
and by the cooperative use of communication protocols (e.g., TCP/IP) by the
two principals.
All the techniques for providing security have two components:
A security-related transformation on the information to be sent. Examples
include the encryption of the message, which scrambles the message so
that it is unreadable by the opponent.
Some secret information shared by the two principals and, it is hoped,
unknown to the opponent. An example is an encryption key used in
conjunction with the transformation to scramble the message before
transmission
11
This general model shows that there are four basic tasks in designing a
particular security service:
1. Design an algorithm for performing the security-related transformation. The
algorithm should be such that an opponent cannot defeat its purpose.
2. Generate the secret information to be used with the algorithm.
3. Develop methods for the distribution and sharing of the secret information.
4. Specify a protocol to be used by the two principals that makes use of the
security algorithm and the secret information to achieve a particular security
service.
Network Access Security Model
1. Hacker: The one who is only interested in penetrating into your system.
They do not cause any harm to your system they only get satisfied by getting
access to your system.
There are two ways to secure your system from attacker of which the first
is to introduce the gatekeeper function.
Introducing gatekeeper function means introducing login-
id and passwords, which would keep away the unwanted access.
In case the unwanted user gets access to the system the second way to
secure your system is introducing internal control which would detect
the unwanted user trying to access the system by analyzing system
activities.
This second method we call as antivirus, which we install on our system
to prevent the unwanted user from accessing your computer system
through the internet.
13
• Asymmetric encryption: if the sender and receiver use different keys,
the system is referred to as Asymmetric encryption (two-key, or public-key
encryption)
3. The way in which the plaintext is processed:
• A block cipher: takes a fixed length plaintext block and produces a
cipher text block of the same length.
• A stream cipher: encrypt data stream one bit or one byte at a time.
Symmetric Encryption
• It is the oldest and best-known encryption technique.
• In Symmetric encryption, both sender and receiver use the same key.
• It is also known as single-key encryption, secret-key or conventional
encryption.
Symmetric Cipher Model
15
(i)CAESAR CIPHER (OR) SHIFT CIPHER
Caeser cipher was proposed by Julius Caesar. The Caesar cipher involves
replacing each letter of the alphabet with the letter standing 3 places further
down the alphabet.
Note that the alphabet is wrapped around, so that letter following ‘z’ is ‘a’.
For each plaintext letter p, substitute the cipher text letter c such that
c = E(3, p) = (p+3) mod 26
Decryption is
p=D(3,c)=(c-3) mod 26
16
Cryptanalysis of Caesar Cipher
1. The encryption and decryption algorithms are known
2. There are only 25 possible keys. Hence brute force attack takes place
3. The language of the plaintext is known and easily recognizable
(ii) MONOALPHABETIC CIPHER
Each plaintext letter maps to a different random cipher text letter
Here, 26! Possible keys are used to eliminate brute force attack
There is, however, another line of attack. If the cryptanalyst knows the nature of
the plaintext (e.g., non-compressed English text), then the analyst can exploit
the regularities of the language.
As a first step, the relative frequency of the letters can be determined and
compared to a standard frequency distribution for English
Continued analysis of frequencies plus trial and error should easily yield a
solution.
17
Filling in the letters of the keyword from left to right and from top
to bottom
Duplicates are removed
Remaining unfilled cells of the matrix is filled with remaining
alphabets in alphabetical order.
The matrix is 5x5. It can accommodate 25 alphabets. To accommodate the 26 th
alphabet I and J are counted as one character.
18
onNA
C=KP mod 26
C and P are column vectors of length 3 representing the cipher and plain text
respectively.
Consider the message 'ACT', and
Decryption
20
A key determines which particular rule is chosen for a given
transformation.
Example: Vigenere Cipher
Each of the 26 ciphers is laid out horizontally, with the key letter for each
cipher to its left. A normal alphabet for the plaintext runs across the top. The
process of encryption is simple: Given a key letter x and a plaintext letter y, the
cipher text is at the intersection of the row labelled x and the column labelled y;
in this case, the cipher text is V. To encrypt a message, a key is needed that is as
long as the message.
Key=deceptive
e.g., key = d e c e p t i v e d e c e p t i v e d e c e p t i v e
PT = w e a r e d i s c o v e r e d s a v e y o u r s e l f
CT = ZICVTWQNGRZGVTWAVZHCQYGLMGJ
Decryption is equally simple. The key letter again identifies the row. The
position of the cipher text letter in that row determines the column, and the
plaintext letter is at the top of that column.
21
Strength of Vigenere cipher
There are multiple ciphertext letters for each plaintext letter.
Letter frequency information is obscured
(vi) VERNAM CIPHER or ONE-TIME PAD
It is an unbreakable cryptosystem. It represents the message as a sequence
of 0s and 1s. This can be accomplished by writing all numbers in binary, for
example, or by using ASCII. The key is a random sequence of 0‟s and 1‟s of
same length as the message. Once a key is used, it is discarded and never used
again.
The system can be expressed as follows:
Ci = Pi Ki
Ci - ith binary digit of cipher text Pi - ith binary digit of plaintext Ki - ith binary
digit of key
– exclusive OR operation
Thus the cipher text is generated by performing the bitwise XOR of the
plaintext and the key. Decryption uses the same key. Because of the properties
of XOR, decryption simply involves the same bitwise operation:
Pi = Ci Ki
22
Advantages
It is unbreakable since cipher text bears no statistical relationship to the
plaintext
Not easy to break
Drawbacks
Practically impossible to generate a random key as to the length of the
message
The second problem is that of key distribution and key protection.
Due to the above two drawbacks, one time pad is of limited use and is used for
low band width channel which needs high security.
m e a t e c o l o s
e t t h s h o h u e
The encrypted message Cipher text MEATECOLOSETTHSHOHUE
ROW TRANSPOSITION CIPHERS-
A more complex scheme is to write the message in a rectangle, row by row, and
read the message off, column by column, but permute the order of the columns.
The order of columns then becomes the key of the algorithm.
23
e.g., plaintext = meet at the school house
Key = 4 3 1 2 5 6 7
PT = m e e t a t t
hes choo
l hous e
CT = ESOTCUEEHMHLAHSTOETO
Demerits
Easily recognized because the frequency is same in both plain text and
cipher text.
Can be made secure by performing more number of transpositions.
1.7 STEGANOGRAPHY
In Steganography, the plaintext is hidden. The existence of the message is
concealed. For example, the sequence of first letters of each word of the overall
message spells out the hidden message.
Various other techniques have been used historically; some examples are the
following:
• Character marking: Selected letters of printed or typewritten text are
overwritten in pencil. The marks are ordinarily not visible unless the paper is
held at an angle to bright light.
• Invisible ink: A number of substances can be used for writing but leave no
visible trace until heat or some chemical is applied to the paper.
• Pin punctures: Small pin punctures on selected letters are ordinarily not
visible unless the paper is held up in front of a light.
• Typewriter correction ribbon: Used between lines typed with a black ribbon,
the results of typing with the correction tape are visible only under a strong light.
Drawback
It requires a lot of overhead to hide a relatively few bits of information.
Once the system is discovered, it becomes virtually worthless
24
1.8 Foundations of modern cryptography
Modern cryptography is the cornerstone of computer and
communications security.
Its foundation is based on various concepts of mathematics such as
number theory, computational-complexity theory, and probability theory.
Characteristics of Modern Cryptography
There are three major characteristics that separate modern cryptography from
the classical approach.
Classic Cryptography Modern Cryptography
It manipulates traditional It operates on binary bit sequences.
characters, i.e., letters and
digits directly.
It is mainly based on It relies on publicly known mathematical
‘security through algorithms for coding the information.
obscurity’. Secrecy is obtained through a secrete key
which is used as the seed for the
algorithms. The computational difficulty of
algorithms, absence of secret key, etc.,
It requires the entire Modern cryptography requires parties
cryptosystem for interested in secure communication to
communicating possess the secret key only.
confidentially.
25
The first definition of security we saw was Shannon’s ”perfect security”: when
transmitting a message, any 3rd party eavesdropper will learn nothing about the
message (except its length) just from intercepting the cipher text.
Perfect Security
An encryption scheme π is perfectly secure if ∀m1, m2 ∈ M {k ← Gen c1 =
Enc(k,m1) :c1} = {k ← Gen c2 = Enc(k,m) : c2} (The first formula refers to the
distribution of all cipher texts c1 reached by randomly choosing k and
encrypting message m1, the second is the same but for m2)
So any two messages need to lead to the same distribution of cipher texts when
encrypted, or in other words ∀ cipher texts c, Pr(c1 = c) = Pr(c2 = c).
Another way of looking at this is that if you’re given a cipher text c and told
that it was either encrypted from m1 or m2, you shouldn’t be able to tell which
one.
Perfectly Secure Encryption Schemes
One time pad
M = K = {0, 1}n
Gen is chosen uniformly at random from the key space
E(m, k) = m ⊕ k
D(c, k) = c ⊕ k
One time pad is perfectly secure.
26
One detail that makes communicating difficult is noise. Noise introduces
uncertainty. Suppose I wish to transmit one bit of information what are all of
the possibilities
tx 0, rx 0 - good
tx 0, rx 1 - error
tx 1, rx 0 - error
tx 1, rx 1 - good
Two of the cases above have errors – this is where probability fits into the
picture In the case of steganography, the noise may be due to attacks on the
hiding algorithm.
Claude Shannon introduced the idea of self-information.
27
1. Secret sharing schemes such as Shamir's are information-theoretically secure
(and also perfectly secure) in that having less than the requisite number of
shares of the secret provides no information about the secret.
2. More generally, secure multiparty computation protocols often have
information theoretic security.
3. Private information retrieval with multiple databases can be achieved with
information theoretic privacy for the user's query.
4. Symmetric encryption can be constructed under an information-theoretic
notion of security called entropic security, which assumes that the adversary
knows almost nothing about the message being sent. The goal here is to hide all
functions of the plaintext rather than all information about it.
5. Quantum cryptography is largely part of information-theoretic cryptography.
CRYPTOSYSTEMS
A cryptosystem is an implementation of cryptographic techniques and their
accompanying infrastructure to provide information security services. A
cryptosystem is also referred to as a cipher system.
1.11 Product Cryptosystem
Two of the first kinds of cryptosystems that we considered were simple
substitution ciphers and permutation ciphers. Each of them quickly proved
vulnerable to attack. We now consider a new kind of cryptosystem that is based
on them but which is considerably more difficult to attack; so difficult, in fact,
that most modern cryptosystems are of the type we now consider.
28
nature of the encryption scheme and the information available to the
cryptanalyst.
There are various types of cryptanalytic attacks based on the amount of
information known to the cryptanalyst.
Cipher text only – A copy of cipher text alone is known to the cryptanalyst.
Known plaintext – The cryptanalyst has a copy of the cipher text and
the corresponding plaintext.
29
Chosen cipher text – The cryptanalyst obtains temporary access to the
decryption machine, uses it to decrypt several string of symbols, and tries to use
the results to deduce the key.
30