CNS - Unit 1
CNS - Unit 1
CNS - Unit 1
INTRODUCTION
Security trends - Legal, Ethical and Professional Aspects of Security, Need for Security
at Multiple levels, Security Policies - Model of network security – Security attacks,
services and mechanisms – OSI security architecture – Classical encryption techniques:
substitution techniques, transposition techniques, steganography- Foundations of
modern cryptography: perfect security – information theory – product cryptosystem –
cryptanalysis.
INTRODUCTION
Computer data often travels from one computer to another, leaving the safety of its protected
physical surroundings. Once the data is out of hand, people with bad intention could modify
or forge your data, either for amusement or for their own benefit.
Cryptography can reformat and transform our data, making it safer on its trip between
computers. The technology is based on the essentials of secret codes, augmented by modern
mathematics that protects our data in powerful ways.
• Computer Security - generic name for the collection of tools designed to protect data and
to thwart hackers
• Internet Security - measures to protect data during their transmission over a collection of
interconnected networks
“Criminal activity in which computers or computer networks are a tool, a target, or a place of
criminal activity”
as target
as storage device
as communications tool
Privacy
No third parties can read your data. Nothing is implied about the identity or
trustworthiness of you or your counterpart. Neither you nor your counterpart can
know that messages are not being altered or replaced in transit.
Authentication
You know with certainty that your counterpart possesses a particular private key.
Nothing is implied about the identity or trustworthiness of your counterpart. The
conversation may not be private, and neither you nor your counterpart can know that
messages are not being altered or replaced in transit.
Identification
You know (somehow) that a particular private key corresponds to a particular
identity. There is no “conversation” involved.
Trust
Due to an endorsement by an already-identified and already-trusted third party, you
know that a particular private key corresponds to a particular identity. There is no
“conversation” involved, but trust can be securely conveyed over insecure computer
networks.
Verification
You know with certainty that messages between you and your counterpart are not
being altered or replaced in transit. The conversation may not be private, and nothing
is implied about the identity or trustworthiness of your counterpart.
When multiple categories or levels of data are defined, the requirement is referred to
as multilevel security (MLS).
The general statement of the requirement for confidentiality-centered multilevel
security is that a subject at a high level may not convey information to a subject at a
lower level unless that flow accurately reflects the will of an authorized user as
revealed by an authorized declassification.
For implementation purposes, this requirement is in two parts and is simply stated.
A multilevel secure system for confidentiality must enforce the following
• No read up: A subject can only read an object of less or equal security level. This is
referred to in the literature as the simple security property (ss-property).
• No write down: A subject can only write into an object of greater or equal security level.
COMPUTER SECURITY
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).
CIA TRIAD
Confidentiality:
A. Data1 confidentiality:
Privacy: Assures that individuals control or influence what information related to them may
be collected and stored and by whom and to whom that information may be disclosed.
B. Integrity:
Data integrity:
Assures that information and programs are changed only in a specified and authorized
manner.
System integrity:
C.Availability:
Assures that systems work promptly and service is not denied to authorized users.
D.Authenticity:
The property of being genuine and being able to be verified and trusted; confidence in
the validity of a transmission, a message, or message originator.
This means verifying that users are who they say they are and that each input arriving
at the system came from a trusted source.
E.Accountability:
The security goal that generates the requirement for actions of an entity to be traced uniquely
to that entity.
SECURITY POLICIES:
A set of rules and practices that specify or regulate how a system or organization provides
security services to protect sensitive and critical system resources.
In developing a security policy, a security manager needs to consider the following factors:
Virtually all security measures involve some penalty in the area of ease of use.
The following are some examples. Access control mechanisms require users to
remember passwords and perhaps perform other access control actions.
Firewalls and other network security measures may reduce available transmission
capacity or slow response time.
Virus-checking software reduces available processing power and introduces the
possibility of system crashes or malfunctions due to improper interaction between the
security software and the operating system.
In addition to ease of use and performance costs, there are direct monetary costs in
implementing and maintaining security measures.
All of these costs must be balanced against the cost of security failure and recovery if
certain security measures are lacking.
The cost of security failure and recovery must take into account not only the value of
the assets being protected and the damages resulting from a security violation, but
also the risk, which is the probability that a particular threat will exploit a particular
vulnerability with a particular harmful result.
Security Architecture for OSI, defines such a systematic approach.The OSI security
architecture is useful to managers as a way of organizing the task of providing
security. Furthermore, because this architecture was developed as an international
standard, computer and communications vendors have developed security features for
their products and services that relate to this structured definition of services and
mechanisms.
The OSI security architecture focuses on security attacks, mechanisms and services.
• Security attack: Any action that compromises the security of information owned by an
organization.
• Security mechanism: A process (or a device incorporating such a process) that is designed
to detect, prevent or recover from a security attack.
• Security service: A processing or communication service that enhances the security of the
data processing systems and the information transfers of an organization.
Threat and Attack mean the same but with a slight difference
Threat
Attack
An assault on system security that derives from an intelligent threat; that is, an
intelligent act that is a deliberate attempt (especially in the sense of a method or technique) to
evade security services and violate the security policy of a system.
SECURITY ATTACKS
The Security attacks are divided into Active Attack and Passive Attack.
Passive Attack:
A passive attack attempts to learn or make use of information from the system but
does not affect system resources.
Passive attacks are in the nature of eavesdropping on,or monitoring of,transmissions.
The goal of the opponent is to obtain information that is being transmitted.
Two types of passive attacks are the release of message contents and traffic analysis.
Traffic analysis
A second type of passive attack, traffic analysis. Suppose that we had a way of
masking 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.
ACTIVE ATTACK
1.Masquerade:
Involves the passive capture of a data unit and its subsequent retransmission to
produce an unauthorized effect .
3.Modification of messages :
Simply means that some portion of a legitimate message is altered or that messages
are delayed or reordered to produce an unauthorized effect .
For example, a message meaning “Allow John Smith to read confidential file
accounts” is modified to mean “Allow Fred Brown to read confidential file accounts.”
SECURITY SERVICES
Authentication
1. Peer Entity Authentication
2. Data Entity Authentication
Data Integrity
1. Connection Integrity with Recovery
2. Connection Integrity without Recovery
3. Selective Field Connection Integrity
4. Connectionless Integrity
5. Selective Field Connectionless Integrity
Access Control
1. Data Confidentiality
2. Connection Confidentiality
3. Connectionless Confidentiality
4. Selective Field Confidentiality
5. Traffic flow confidentiality
SECURITY MECHANISMS
Encipherment :
The use of mathematical algorithms to transform data into a form that is not readily
intelligible.
The transformation and subsequent recovery of the data depend on an algorithm and
zero or more encryption keys.
Data appended to,or a cryptographic transformation of,a data unit that allows a recipient of
the data unit to prove the source and integrity of the data unit and protect against forgery
(e.g.,by the recipient).
Access Control:
Data Integrity :
A variety of mechanisms used to assure the integrity of a data unit or stream of data units.
Authentication Exchange:
Traffic Padding:
The insertion of bits into gaps in a data stream to frustrate traffic analysis attempts.
Routing Control:
Enables selection of particular physically secure routes for certain data and allows routing
changes, especially when a breach of security is suspected.
Notarization:
The use of a trusted third party to assure certain properties of a data exchange.
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.
Security aspects come into play when it is necessary or desirable to protect the
information transmission from an opponent who may present a threat to
confidentiality, authenticity, and so on.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 and the addition of a code based on the contents of
the message, which can be used to verify the identity of the sender.
1.SUBSTITUTION
A substitution technique is one in which the letters of plaintext are replaced by other letters or
by numbers or symbols.1 If the plaintext is viewed as a sequence of bits,then substitution
involves replacing plaintext bit patterns with ciphertext bit patterns.
i.Caesar Cipher:
The Caesar cipher involves replacing each letter of the alphabet with the letter
standing three places further down the alphabet.For example,
plain: meet me after the toga party
cipher: PHHW PH DIWHU WKH WRJD SDUWB
Note that the alphabet is wrapped around,so that the letter following Z is A. We can
define the transformation by listing all possibilities,as follows:
plain: 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
cipher: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
the algorithm can be expressed as follows. For each plaintext letter , substitute the
ciphertext letter :
A shift may be of any amount,so that the general Caesar algorithm is where takes on a
value in the range 1 to 25.
p = D(k, C) = (C - k) mod 26
C = E(k, p) = (p + k) mod 26
C = E(3, p) = (p + 3) mod 26
ii.Monoalphabetic Ciphers
Monoalphabetic cipher is a substitution cipher in which for a given key, the cipher
alphabet for each plain alphabet is fixed throughout the encryption process.
For example, if ‘A’ is encrypted as ‘D’, for any number of occurrence in that
plaintext, ‘A’ will always get encrypted to ‘D’.
plain: 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
cipher: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
iii.Playfair Cipher
The best-known multiple-letter encryption cipher is the Playfair,which treats digrams in the
plaintext as single units and translates these units into ciphertext digrams.
The Playfair algorithm is based on the use of a 5 × 5 matrix of letters constructed using a
keyword.
The matrix is constructed by filling in the letters of the keyword (minus duplicates)
from left to right and from top to bottom, and then filling in the remainder of the
matrix with the remaining letters in alphabetic order.
The letters I and J count as one letter. Plaintext is encrypted two letters at a
time,according to the following rules:
1. Repeating plaintext letters that are in the same pair are separated with a filler letter,such as
x,so that balloon would be treated as ba lx lo on.
2. Two plaintext letters that fall in the same row of the matrix are each replaced by the letter
to the right, with the first element of the row circularly following the last.For example,ar is
encrypted as RM.
3. Two plaintext letters that fall in the same column are each replaced by the letter beneath,
with the top element of the column circularly following the last. For example,mu is encrypted
as CM.
4. Otherwise,each plaintext letter in a pair is replaced by the letter that lies in its own row and
the column occupied by the other plaintext letter. Thus, hs becomes BP and ea becomes IM
(or JM,as the encipherer wishes
iv.Hill Cipher
1.Vignere Cipher
The best known, and one of the simplest, polyalphabetic ciphers is the Vigenère
cipher.In this scheme,the set of related monoalphabetic substitution rules consists of
the 26 Caesar ciphers with shifts of 0 through 25.
key:deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ
2.Vernam Cipher:
To choose a keyword that is as long as the plaintext and has no statistical relationship
to it.
Such a system was introduced by an AT&T engineer named Gilbert Vernam in
1918.His system works on binary data (bits) rather than letters.
The system can be expressed succinctly as follows
Uses a random key that is as long as the message,so that the key need not be repeated.
In addition,the key is to be used to encrypt and decrypt a single message,and then is
discarded.
Each new message requires a new key of the same length as the new message.Such a
scheme,known as a one-time pad,is unbreakable.
It produces random output that bears no statistical relationship to the
plaintext.Because the ciphertext contains no information whatsoever about the
plaintext, there is simply no way to break the code.
ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS
ciphertext: ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS
The one-time pad offers complete security but,in practice,has two fundamental difficulties:
1. There is the practical problem of making large quantities of random keys.Any heavily used
system might require millions of random characters on a regular basis.Supplying truly
random characters in this volume is a significant task.
2. Even more daunting is the problem of key distribution and protection. For every message
to be sent,a key of equal length is needed by both sender and receiver.Thus,a mammoth key
distribution problem exists.
It is another type of cipher where the order of the alphabets in the plaintext is
rearranged to create the ciphertext. The actual plaintext alphabets are not replaced.
An example is a ‘simple columnar transposition’ cipher where the plaintext is written
horizontally with a certain alphabet width. Then the ciphertext is read vertically as
shown.
For example, the plaintext is “golden statue is in eleventh cave” and the secret
random key chosen is “five”. We arrange this text horizontally in table with number
of column equal to key value. The resulting text is shown below.
The ciphertext is obtained by reading column vertically downward from first to last
column.
The ciphertext is ‘gnuneaoseenvltiltedasehetivc’.
To decrypt, the receiver prepares similar table. The number of columns is equal to
key number. The number of rows is obtained by dividing number of total ciphertext
alphabets by key value and rounding of the quotient to next integer value.
The receiver then writes the received ciphertext vertically down and from left to right
column. To obtain the text, he reads horizontally left to right and from top to bottom
row.
mematrhtgpryetefeteoaat
MEMATRHTGPRYETEFETEOAAT
EXAMPLE 2:
Perfect security is the notion that, given an encrypted message (or ciphertext) from a
perfectly secure encryption system (or cipher), absolutely nothing will be revealed
about the unencrypted message (or plaintext) by the ciphertext.
A perfectly secret cipher has a couple of other equivalent properties:
Even if given a choice of two plaintexts, one the real one, for a ciphertext, you cannot
distinguish which plaintext is the real one (perfect message indistinguishability)
There is a key that encrypts every possible plaintext to every possible ciphertext
(perfect key ambiguity) (* this is true only if the keys used are the same size as the
messages)
INFORMATION THEORY
The difficulties arising with perfect secrecy systems, namely the need for transmission
of a large key over a secure channel, raises the following question: What if we use the
same key more than once? The mathematical analysis is again due to Shannon.
He used a concept from information theory, namely entropy. Informally spoken, the
entropy measures the average degree of uncertainty of a statistical quantity.
Shannon gave the following definition along with a mathematical motivation for
using entropy as a measure for information. Definition 4.1 (Entropy, [Sha48]) Let X
be a random variable taking on the values 1,. . . ,n.
Then H(X) = − Xn i=1 P[X = i]log2P[X = i] Example 4.1 If we throw a fair (Laplace)
die, the result is an equiprobably distributed random variable X.
PRODUCT CRYPTOSYSTEM
STEGANOGRAPHY
Steganography is a technique for hiding a secret message within a larger one in such a
way that others cannot discern the presence or contents of the hidden message.
A plaintext message may be hidden in one of two ways. The methods of
steganography conceal the existence of the message,whereas the methods of
cryptography render the message unintelligible to outsiders by various
transformations of the text.
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.
CRYPTANALYSIS
1.CRYPTANALYTIC ATTACK:
Cryptanalytic attacks rely on the nature of the algorithm plus perhaps some
knowledge of the general characteristics of the plaintext or even some sample
plaintext–ciphertext pairs.
This type of attack exploits the characteristics of the algorithm to attempt to deduce a
specific plaintext or to deduce the key being used.
Some of the crypanalytic attacks are
DISADVANTAGES OF STEGANOGRAPHY
It requires a lot of overhead to hide a relatively few bits of information although using
a scheme like that proposed in the preceding paragraph may make it more effective.
Also, once the system is discovered,it becomes virtually worthless.
This problem,too,can be overcome if the insertion method depends on some sort of
key .
Alternatively,a message can be first encrypted and then hidden using steganography.
A brute-force attack involves trying every possible key until an intelligible translation of the
ciphertext into plaintext is obtained.On average,half of all possible keys must be tried to
achieve success.