Book Information+Security UNIT+1
Book Information+Security UNIT+1
UNIT I
Introduction
Computer Security
Computer security basically is the protection of computer systems and information from harm, theft, and
unauthorized use. It is the process of preventing and detecting unauthorized use of your computer
system.
Information Security
Information security is securing information from unauthorized access, modification & deletion.
Security Attacks
An attack is an information security that involves an attempt to obtain, alter, destroy, remove, implant or reveal
information without authorized access or permission.
i) Vulnerabilities
A vulnerability is a weakness in the security system, for example, in procedures,
design, or implementation, that might be exploited to cause loss or harm. For
instance, a particular system may be vulnerable to unauthorized data manipulation
because the system does not verify a user's identity before allowing data access.
ii) Threats
Threat can be anything that can take advantage of a vulnerability to breach security and negatively alter,
erase, harm object or objects of interest.
A human who exploits a vulnerability perpetrates an attack on the system. An attack can also be
launched by another system, as when one system sends an overwhelming set of messages to
another, virtually shutting down the second system's ability to function.
iv) Control
To describe the relationship among threats, controls, and vulnerabilities in this way:
• If an unauthorized party not only accesses but tampers with an asset, the
threat is a modification. For example, someone might change the values in a
database, alter a program so that it performs an additional computation, or
modify data being transmitted electronically. It is even possible to modify
hardware. Some cases of modification can be detected with simple measures,
but other, more subtle, changes may be almost impossible to detect.
• method: the skills, knowledge, tools, and other things with which to be able to
pull off the attack
Computer Criminals
For the purposes of studying computer security, we say computer crime is any
crime involving a computer or aided by the use of one. Although this definition
is admittedly broad, it allows us to consider ways to protect ourselves, our
businesses, and our communities against those who use computers maliciously.
One approach to prevention or moderation is to understand who commits these
crimes and why. Many studies have attempted to determine the characteristics
of computer criminals. By studying those who have already used computers to
commit crimes, we may be able in the future to spot likely criminals and
prevent the crimes from occurring. In this section, we examine some of these
characteristics.
Amateurs
Amateurs have committed most of the computer crimes reported to date. In the same
sense, most computer criminals are ordinary computer professionals or users who,
while doing their jobs, discover they have access to something valuable.
When no one objects, the amateur may start using the computer at work to write
letters, maintain soccer league team standings, or do accounting. This apparently
innocent time-stealing may expand until the employee is pursuing a business in
accounting, stock portfolio management, or desktop publishing on the side, using
the employer's computing facilities.
Others attack for curiosity, personal gain, or self-satisfaction. And still others enjoy
causing chaos, loss, or harm.
Terrorists
The link between computers and terrorism is quite evident. We see terrorists using
computers in three ways:
• propaganda vehicles: web sites, web logs, and e-mail lists are effective, fast,
and inexpensive ways to get a message to many people.
Methods of Defense
Harm occurs when a threat is realized against a vulnerability. To protect against
harm, then, we can neutralize the threat, close the vulnerability, or both. The
possibility for harm to occur is called risk. To deal with harm in several ways.
• deflect it, by making another target more attractive (or this one less so)
Controls
• Crenellations to allow inhabitants to lean out from the roof and pour hot or
vile liquids on attackers
• Gatekeepers to verify that only authorized people and goods could enter
Encryption
Encryption is the formal name for the scrambling process. We take data in
their normal, unscrambled state, called cleartext, and transform them so that
they are unintelligible to the outside observer; the transformed data are
called enciphered text or ciphertext. Using encryption, security
professionals can virtually nullify the value of an interception and the
possibility of effective modification or fabrication.
Encryption does not solve all computer security problems, and other tools
must complement its use. Furthermore, if encryption is not used properly, it
may have no effect on security or could even degrade the performance of
the entire system. Weak encryption can actually be worse than no
encryption at all, because it gives users an unwarranted sense of protection.
Software Controls
If encryption is the primary way of protecting valuables, programs themselves are the
second facet of computer security. Programs must be secure enough to prevent
outside attack.
Hardware Controls
Numerous hardware devices have been created to assist in providing computer
security. These devices include a variety of means, such as
• firewalls
We must not forget the value of community standards and expectations when
we consider how to enforce security.
There are many acts that most thoughtful people would consider harmful, and
we can leverage this commonality of belief in our policies.
For this reason, legal and ethical controls are an important part of computer
security. However, the law is slow to evolve, and the technology involving
computers has emerged relatively suddenly.
Physical Controls
Some of the easiest, most effective, and least expensive controls are physical
controls. Physical controls include locks on doors, guards at entry points, backup
copies of important software and data, and physical site planning that reduces the risk
of natural disasters. Often the simple physical controls are overlooked while we seek
more sophisticated approaches.
Elementary Cryptography
Terminology and Background
Cryptography
Cryptography is associated with the process of converting ordinary plain text into
unintelligible text and vice-versa.
It is a method of storing and transmitting data in a particular form so that only those for whom
it is intended can read and process it.
Cryptography not only protects data from theft or alteration, but can also be used for user
authentication.
If an outsider, O, wants to access the message (to read, change, or even destroy it), we
call O an interceptor or intruder.
Any time after S transmits it via T, the message is vulnerable to exploitation, and O
might try to access the message in any of the following ways:
• Block it, by preventing its reaching R, thereby affecting the availability of the
message.
• Modify it, by seizing the message and changing it in some way, affecting the
message's integrity.
Terminology
Alternatively, the terms encode and decode or encipher and decipher are used
instead of encrypt and decrypt.
That is, we say that we encode, encrypt, or encipher the original message to
hide its meaning. Then, we decode, decrypt, or decipher it to reveal the
original message.
The original form of a message is known as plaintext, and the encrypted form is
called ciphertext.
In the figure, we denote a plaintext message P as a sequence of individual characters
P = <p1, p2, …, pn>. Similarly, ciphertext is written as C = <c1, c2, …, cm>. For
instance, the plaintext message "I want cookies" can be denoted as the message
string <I, ,w,a,n,t, , c,o,o,k,i,e,s>. It can be transformed into ciphertext <c1, c2, …,
c14>, and the encryption algorithm tells us how the transformation is done.
Plaintext vs. Ciphertext
Basic operations
Encryption Algorithms
The cryptosystem involves a set of rules for how to encrypt the plaintext and how to
decrypt the ciphertext.
The encryption and decryption rules, called algorithms, often use a device called a
key, denoted by K, so that the resulting ciphertext depends on the original plaintext
message, the algorithm, and the key value. We write this dependence as C = E(K,
P). Essentially, E is a set of encryption algorithms, and the key K selects one specific
algorithm from the set. We see later in this chapter that a cryptosystem, such as the
Caesar cipher, is keyless but that keyed encryptions are more difficult to break.
Sometimes the encryption and decryption keys are the same, so P = D(K, E(K,P)). This
form is called symmetric encryption because D and E are mirror-image processes. At
other times, encryption and decryption keys come in pairs.
Then, a decryption key, KD, inverts the encryption of key KE so that P = D(KD,
E(KE,P)). Encryption algorithms of this form are called asymmetric because
converting C back to P involves a series of steps and a key that are different from the
steps and key of E. The difference between symmetric and asymmetric encryption is
shown in Figure.
A key gives us flexibility in using an encryption scheme. We can create different
encryptions of one plaintext message just by changing the key. Moreover, using a key
provides additional security. If the encryption algorithm should fall into the
interceptor's hands, future messages can still be kept secret because the interceptor
will not know the key value. An encryption scheme that does not require the use of a
key is called a keyless cipher.
Encryption has been used for centuries to protect diplomatic and military
communications, sometimes without full success. The word cryptography means
hidden writing, and it refers to the practice of using encryption to conceal text. A
cryptanalyst studies encryption and encrypted messages, hoping to find the hidden
meanings.
Cryptanalysis
A cryptanalyst's chore is to break an encryption. That is, the cryptanalyst
attempts to deduce the original meaning of a ciphertext message. Better yet, he or
she hopes to determine which decrypting algorithm matches the encrypting
algorithm so that other messages encoded in the same way can be broken. For
instance, suppose two countries are at war and the first country has intercepted
encrypted messages of the second.
Cryptanalysts of the first country want to decipher a particular message so
that the first country can anticipate the movements and resources of the second. But
it is even better to discover the actual decryption algorithm; then the first country
can easily break the encryption of all messages sent by the second country.
• Infer some meaning without even breaking the encryption, such as noticing an
unusual
Breakable Encryption
An encryption algorithm is called breakable when, given enough time and data,
an analyst can determine the algorithm. However, an algorithm that is theoretically
breakable may in fact be impractical to try to break. To see why, consider a 25-
character message that is expressed in just uppercase letters. A given cipher scheme
may have 26 25 (approximately 1035) possible decipherments, so the task is to select the
right one out of the 2625.
If your computer could perform on the order of 10 10 operations per second,
finding this decipherment would require on the order of 10 16 seconds, or roughly 10 11
years. In this case, although we know that theoretically we could generate the
solution, determining the deciphering algorithm by examining all possibilities can be
ignored as infeasible with current technology.
Two other important issues must be addressed when considering the breakability
of encryption algorithms. First, the cryptanalyst cannot be expected to try only the
hard, long way. In the example just presented, the obvious decryption might require
2625 machine operations, but a more ingenious approach might require only 10 15
operations.
Representing Characters
Substitution Ciphers
To substitute a character or symbol for each character of the original message. This
technique is called a monoalphabetic cipher or simple substitution.
Monoalphabetic cipher Substitute one letter for another
Creates “confusion”
There are two type of substitution ciphers
Caesar Cipher
i) The Caesar Cipher
The Caesar cipher has an important place in history. Julius Caesar is said to have
been the first to use this scheme, in which each letter is translated to the letter a
fixed number of places after it in the alphabet. Caesar used a shift of 3, so plaintext
letter pi was enciphered as ciphertext letter ci by the rule
ci = E(pi) = pi + 3
Plaintext :A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Ciphertext :d e f g h i j k l m no p q r s t u v wx y z a b c
TREATY IMPOSSIBLE
would be encoded as
T R E A T Y I M P O S S I B LE
w uhd w b l p s r v v l e o h
Let us take a closer look at the result of applying Caesar's encryption technique to
"TREATY IMPOSSIBLE." If we did not know the plaintext and were trying to
guess it, we would have many clues from the ciphertext. For example, the break
between the two words is preserved in the ciphertext, and double letters are
preserved: The SS is translated to vv. We might also notice that when a letter is
repeated, it maps again to the same ciphertext as it did previously. So the letters T,
I, and E always translate to w, l, and h. These clues make this cipher easy to break.
Suppose you are given the following ciphertext message, and you want to try to
determine the original plaintext.
Look again at the ciphertext you are decrypting. There is a strong clue in the
repeated r of the word wrr. You might use this text to guess at three-letter words that
you know. For instance, two very common three-letter words having the pattern xyy
are see and too; other less common possibilities are add, odd, and off. (Of course, there
are also obscure possibilities like woo or gee, but it makes more sense to try the
common cases first.) Moreover, the combination wr appears in the ciphertext, too, so
you can determine whether the first two letters of the three-letter word also form a
two-letter word.
For instance, if wrr is SEE, wr would have to be SE, which is unlikely. However, if wrr is
TOO, wr would be TO, which is quite reasonable. Substituting T for w and O for r, the
message becomes
The OT could be cot, dot, got, hot, lot, not, pot, rot, or tot; a likely choice is not.
Unfortunately, q = N does not give any more clues because q appears only once in
this sample.
One-Time Pads
A one-time pad is sometimes considered the perfect cipher. The name comes
from an encryption method in which a large, nonrepeating set of keys is written
on sheets of paper, glued together into a pad. For example, if the keys are 20
characters long and a sender must transmit a message 300 characters in length,
the sender would tear off the next 15 pages of keys.
The sender would write the keys one at a time above the letters of the plaintext
and encipher the plaintext with a prearranged chart (called a Vigenère tableau)
that has all 26 letters in each column, in some scrambled order. The sender would
then destroy the used keys.
For the encryption to work, the receiver needs a pad identical to that of the
sender. Upon receiving a message, the receiver takes the appropriate number of
keys and deciphers the message as if it were a plain substitution with a long
key. Essentially, this algorithm gives the effect of a key as long as the number
of characters in the pad.
The one-time pad method has two problems: the need for absolute
synchronization between sender and receiver, and the need for an unlimited
number of keys. Although generating a large number of random keys is no
problem, printing, distributing, storing, and accounting for such keys are
problems.
Vernam cipher
The Vernam cipher is a type of one-time pad devised by Gilbert Vernam for AT&T.
Encryption Algorithm:
1. Assign a number to each character of the plain-text and the key according to alphabetical order.
2. Add both the number (Corresponding plain-text character number and Key character number).
3. Subtract the number from 26 if the added number is grater than 26. otherwise left it.
Example
VERNAM CIPHER
the letters would first be converted to their numeric equivalents, as shown here.
V E R N A M C I P H E R
21 4 17 13 0 12 2 8 15 7 4 17
Next, we generate random numbers to combine with the letter codes. Suppose the
following series of random two-digit numbers is generated.
76 48 16 82 44 03 58 11 60 05 48 88
The encoded form of the message is the sum mod 26 of each coded letter with the
corresponding random number. The result is then encoded in the usual base-26 alphabet
representation.
PALINTEXT: V E R N A M C I P H E R
Numeric
Eqivalent 21 4 17 13 0 12 2 8 15 7 4 17
+ Random 76 48 16 82 44 3 58 1 60 5 48 88
Number
Sum 97 52 33 95 44 15 60 19 75 12 52 105
Mod 26 19 0 7 17 18 15 8 19 23 12 0 1
Cipher text t a h r s p I t x m a b
is encoded as
tahrsp itxmab
Book Cipher
Basically, the Book cipher algorithm uses letters of subsequent words in some text or book as a
key to encode a message. Figure 1 is the simplest form, usually called the "running key cipher."
In this case, text (usually from a book) is used to provide a very long key stream.
The book used is agreed upon in advance, while the passage used is chosen randomly for each
message and secretly indicated somewhere in a previous message.
Few ways in which the encryption is done using a book cipher are as follows:
We are encoding a message "DRDOBBS" using the same passage from Harry Potter and the
Order of the Phoenix.
To code the letter "D," we look for the first word in the passage starting with "D" (it's the 6th
word, "did"). Then we look for the first word starting with "R" (the 11th word, "rang"), then for
the next word starting with "D" (the 16th word, "down"), and so on. The final ciphertext is 6, 11,
16, 17, 2, 10, 15.
Transpositions (Permutations)
an encryption in which the letters of the message are rearranged
A transposition is a cryptography that rearrangement of the symbols of a message
With transposition, the cryptography aims for diffusion, widely spreading the
information from the message or the key across the ciphertext.
For instance, suppose you want to write the plaintext message THIS IS A MESSAGE TO
SHOW HOW A COLUMNAR TRANSPOSITION WORKS. We arrange the letters in five
columns as T H I S I
S A M E S
S A G E T
O S H O W
H O W A C
O L U M N
A R T R A
N S P O S
I T I O N
W O R K S
In this example, the length of this message happens to be a multiple of five, so all
columns are the same length. However, if the message length is not a multiple of the
length of a row, the last columns will be one or more letters short. When this happens,
we sometimes use an infrequent letter, such as X, to fill in any short columns.
Encipherment/Decipherment Complexity
Suppose we want to decrypt a message that has used a columnar transposition for its encryption
algorithm. The basic attack on columnar transpositions is not as precise as the attack on
substitution ciphers. Even though transpositions look less secure than substitutions, they can in
fact be more secure. Transpositions leave the plaintext letters intact, so the work for the
cryptanalyst is more exhausting; more relies on a human's judgment of what "looks right."
The first step in analyzing the transposition is computing the letter frequencies. If we find that in
fact all letters appear with their normal frequencies, we can infer that a transposition has been
performed. Given a string of text, the trick then is to break it into columns.
Two different strings of letters from a transposition ciphertext can represent pairs of adjacent
letters from the plaintext. The problem is to find where in the ciphertext a pair of adjacent
columns lies and where the ends of the columns are.
We must do an exhaustive comparison of strings of ciphertext. The process compares a block of
ciphertext characters against characters successively farther away in the ciphertext. To see how
this works, imagine a moving window that locates a block of characters for checking.
Assume the block being compared is seven characters. The first comparison is c1 to c8, c2 to c 9,
…, c7 to c14. Then, we try a distance of eight characters, and so the window of comparison shifts
and c1 is compared to c9, c2 to c10, and continuing. For a block of nine characters, the
window shifts again to c1 against c10, and so forth.
frequency of communication or determining something by whether the
communication was short or long deduce the key, to break subsequent messages
easily find weaknesses in the implementation or environment of use of
encryption find general weaknesses in an encryption algorithm, without
necessarily having intercepted any messages
Moving Comparisons(Diagram)