CNS UNIT-1
CNS UNIT-1
UNIT – I
SECURITY CONCEPTS
Introduction
The need for security
Security approaches
Principles of security
Types of Security attacks
Security services
Security Mechanisms
A model for Network Security
CRYPTOGRAPHY CONCEPTS AND TECHNIQUES
Introduction
plain text and cipher text
substitution techniques
transposition techniques
encryption and decryption
symmetric and asymmetric key cryptography
steganography
key range and key size, possible types of attacks
INTRODUCTION
This is the age of universal electronic connectivity, where the
activities like hacking, viruses, electronic fraud are very
common. Unless security measures are taken, a network
conversation or a distributed application can be compromised
easily.
Some simple examples are:
Online purchases using a credit/debit card.
A customer unknowingly being directed to a false website.
A hacker sending a message to a person pretending to be
someone else.
Network Security has been affected by two major
developments over the last several decades.
First one is introduction of computers into organizations
and the second one being introduction of distributed systems
and the use of networks and communication facilities for
carrying data between users & computers.
These two developments lead to ‘computer security’ and
‘network security’, where the computer security deals with
collection of tools designed to protect data and to thwart
hackers.
Network security measures are needed to protect data
during transmission. But keep in mind that, it is the information
and our ability to access that information that we are really
trying to protect and not the computers and networks.
PRINCIPLES OF SECURITY
The basic tenets of information security are confidentiality,
integrity and availability. Every element of the information
security program must be designed to implement one or more
of these principles. Together they are called the CIA Triad.
SECURITY ATTACKS
any action that compromises the security of information owned
by an organization
information security is about how to prevent attacks, or failing
that, to detect attacks on information-based systems
often threat & attack used to mean same thing
have a wide range of attacks
can focus of generic types of attacks
Passive Attacks Active Attacks
PASSIVE ATTACKS
Passive attacks are in the nature of eaves dropping on, or
monitoring of, transmissions. The goal of the opponent is to
obtain information that is being transmitted. Passive
attacks are of two types:
Release of message contents: 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: If we had encryption protection in place, an
opponent might still be able to observe the pattern of the
message. The opponent could determine the location and
identity of communication hosts and could observe the
frequency and length of messages being exchanged.
Passive attacks are very difficult to detect because they do not
involve any alteration of data. However, it is feasible to prevent
the success of these attacks.
Read contents of
message from Bob
to Alice
Observe pattern of
messages from Bob
to Alice
Traffic analysis
ACTIVE ATTACKS
These attacks involve some modification of the data stream or
the creation of a false stream. These attacks can be classified in
to four categories:
Masquerade – One entity pretends to be a different entity.
Replay – involves passive capture of a data unit and its
subsequent transmission to produce an unauthorized effect.
Modification of messages – Some portion of message is
altered or the messages are delayed or recorded, to produce an
unauthorized effect.
Denial of service – Prevents or inhibits the normal use or
management of communication facilities. Another form of
service denial is the disruption of an entire network, either by
disabling the network or 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.
Bob
Masquerade
Capture message from
Bob to Alice; later replay
message to Alice
Replay
Darth modifies
message from Bobto
Alice
Modification of messages
Darth disrupts service
provided by server
Bob Server
Denial of service
SECURITY SERVICES
A processing or communication service that enhances the
security of the data processing systems and the information
transfers of an organization.
The services are intended to counter security attacks, and they
make use of one or more security mechanisms to provide the
service.
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.
X.800 divides these services into five categories.
Confidentiality: Ensures that the information in a computer
system and transmitted information are accessible only for
reading by authorized parties.
Eg., printing, displaying and other forms of disclosure.
Authentication: Ensures that the origin of a message or
electronic document is correctly identified, with an assurance
that the identity is not false.
Integrity: Ensures that only authorized parties are able to
modify computer system assets and transmitted information.
Modification includes writing, changing status, deleting,
creating and delaying or replaying of transmitted messages.
Non repudiation: Requires that neither the sender nor the
receiver of a message be able to deny the transmission.
Access control: Requires that access to information resources
may be controlled by or the target system.
Availability: Requires that computer system assets be
available to authorized parties when needed.
AUTHENTICATION
The authentication service is concerned with assuring that a
communication is Authentic, the function of the authentication
service is to assure the recipient that the message is from the
source that it claims to be from. In the case of an ongoing
interaction, such as the connection of a terminal to a host, two
aspects are involved. Two specific authentication services are
defined in X.800:
Peer Entity Authentication
Used in association with a logical connection to provide
confidence in the identity of the entities connected.
Data Origin Authentication
In a connectionless transfer, provides assurance that the source
of received data is as claimed.
ACCESS CONTROL
The prevention of unauthorized use of a resource (i.e., this
service controls who can have access to a resource, under what
conditions access can occur, and what those accessing the
resource is allowed to do).
CONFIDENTIALITY
The protection of data from unauthorized disclosure.
Confidentiality is the protection of transmitted data from
passive attacks. With respect to the content of a data
transmission, several levels of protection can be identified.
Connection Confidentiality: The protection of all user data
on a connection.
Connectionless Confidentiality: The protection of all user
data in a single data block authentication.
The confidentiality of selected fields within the user data on a
connection or in a single data block.
Traffic Flow Confidentiality: The protection of the
information that might be derived from observation of traffic
flows.
DATA INTEGRITY
The assurance that data received are exactly as sent by an
authorized entity (i.e., contain no modification, insertion,
deletion, or replay).
Connection Integrity with Recovery
Provides for the integrity of all user data on a connection and
detects any modification, insertion, deletion, or replay of any
data within an entire data sequence, with recovery attempted.
Connection Integrity without Recovery: As above, but
provides only detection without recovery.
Selective-Field Connection Integrity: Provides for the
integrity of selected fields within the user data of a data block
transferred over a connection and takes the form of
determination of whether the selected fields have been
modified, inserted, deleted, or replayed.
Connectionless Integrity: Provides for the integrity of a single
connectionless data block and may take the form of detection of
data modification. Additionally, a limited form of replay
detection may be provided.
Selective-Field Connectionless Integrity: Provides for the
integrity of selected fields within a single connectionless data
block; takes the form of determination of whether the selected
fields have been modified.
NONREPUDIATION
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.
AVAILABILITY
It is defined to be the property of a system or a system resource
being accessible and usable upon demand by an authorized
system entity. The availability can significantly be affected by a
variety of attacks, some amenable to automated counter
measures.
SECURITY MECHANISMS
According to X.800, the security mechanisms are divided into
those implemented in a specific protocol layer and those that are
not specific to any particular protocol layer or security service.
X.800 also differentiates reversible & irreversible
encipherment mechanisms.
A reversible encipherment mechanism is simply an encryption
algorithm that allows data to be encrypted and subsequently
decrypted, whereas irreversible encipherment include hash
algorithms and message authentication codes used in digital
signature and message authentication applications
Specific Security Mechanisms
Incorporated into the appropriate protocol layer in order to
provide some of the OSI security services,
Encipherment: It refers to the process of applying
mathematical algorithms for converting data into a form that is
not intelligible. This depends on algorithm used and encryption
keys.
Digital Signature: The appended data or a cryptographic
transformation applied to any data unit allowing to prove the
source and integrity of the data unit and protect against forgery.
Access Control: A variety of techniques used for enforcing
access permissions to the system resources.
Data Integrity: A variety of mechanisms used to assure the
integrity of a data unit or stream of data units.
Authentication Exchange: A mechanism intended to ensure
the identity of an entity by means of information 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 once a
breach of security is suspected.
Notarization: The use of a trusted third party to assure certain
properties of a data exchange
Pervasive Security Mechanisms
These are not specific to any particular OSI security service or
protocol layer.
Trusted Functionality: That which is perceived to b correct
with respect to some criteria Security Level: The marking
bound to a resource (which may be a data unit) that names or
designates the security attributes of that resource.
Event Detection: It is the process of detecting all the events
related to network security. 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: It deals with requests from mechanisms,
such as event handling and management functions, and takes
recovery actions.
Peer Entity Y Y Y
Authentication
Data Origin Y Y
Authentication
Access Control Y
Confidentiality Y Y
Traffic Flow Y Y Y
Confidentiality
Data Integrity Y Y Y
Nonrepudiation Y Y Y
Availability Y Y
TYPES OF KEYS
Symmetric Key:
Symmetric-key encryption are algorithms which use the same
cryptographic keys for both encryptions of plaintext and
decryption of ciphertext.
Asymmetric Key:
Asymmetric encryption uses 2 pairs of key for encryption.
Public key is available to anyone while the secret key is only
made available to the receiver of the message. This boots
security.
Public Key:Public key cryptography is an encryption system
which is based on two pairs of keys. Public keys are used to
encrypt messages for a receiver.
Private Key:
Private key may be part of a public/ private asymmetric key
pair. It can be used in asymmetric encryption as you can use the
same key to encrypt and decrypt data.
Pre-Shared Key:
In cryptography, a pre-shared key (PSK) is a shared secret
which was earlier shared between the two parties using a secure
channel before it is used.
SUBSTITUTION TECHNIQUES
A substitution technique is one in which the letters of plaintext
are replaced by other letters or by numbers or symbols. If the
plaintext is viewed as a sequence of bits, then substitution
involves replacing plaintext bit patterns with cipher text bit
patterns.
1) CAESAR CIPHER
2) MONOALPHABETIC CIPHERS
3) PLAYFAIR CIPHER
4) HILL CIPHER
5) POLYALPHABETIC CIPHERS
6) VERNAM CIPHER
7) ONE TIME PAD CIPHER
1) CAESAR CIPHER
The earliest known use of a substitution cipher and the simplest
was by Julius Caesar. The Caesar cipher involves replacing
each letter of the alphabet with the letter standing 3 places
further down the alphabet. e.g., plain text: pay more money
Cipher text: SDB PRUH PRQHB
Note that the alphabet is wrapped around, so that letter
following „z‟ is „a‟.
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
5) POLYALPHABETIC CIPHERS
In order to make substitution ciphers more secure, more than
one alphabet can be used. Such ciphers are called
polyalphabetic, which means that the same letter of a message
can be represented by different letters when encoded. Such a
one-to-many correspondence makes the use of frequency
analysis much more difficult in order to crack the code. We
describe one such cipher named for Blaise de Vigenere a 16-th
century Frenchman. The Vigenere cipher is a polyalphabetic
cipher based on using successively shifted alphabets, a different
shifted alphabet for each of the 26 English letters. The
procedure is based on the tableau shown below and the use of
a keyword. The letters of the keyword determine the shifted
alphabets used in the encoding process.
For the message COMPUTING GIVES INSIGHT and
keyword LUCKY we proceed by repeating the keyword as
many times as needed above the message, as follows.
TRANSPOSITION TECHNIQUES
All the techniques examined so far involve the substitution of
a cipher text symbol for a plaintext symbol. A very different
kind of mapping is achieved by performing some sort of
permutation on the plaintext letters. This technique is referred
to as a transposition cipher.
Rail fence is simplest of such cipher, in which the plaintext is
written down as a sequence of diagonals and then read off as a
sequence of rows.
Plaintext = meet at the school house
To encipher this message with a rail fence of depth 2,
We write the message as follows: m e a t e c o l o s e t t h s h o
hue
The encrypted message is 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.
e.g., plaintext = meet at the school house
Key = 4 3 1 2 5 6 7
PT = m e e t a t t h e s c h o o l h o u s e
CT = ESOTCUEEHMHLAHSTOETO
A pure transposition cipher is easily recognized because it has
the same letter frequencies as the original plaintext.
The transposition cipher can be made significantly more secure
by performing more than one stage of transposition.
The result is more complex permutation that is not easily
reconstructed.
STEGANOGRAPHY
A plaintext message may be hidden in any one of the 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.
A simple form of steganography, but one that is time
consuming to construct is one in which an arrangement of
words or letters within an apparently innocuous text spells out
the real message.
e.g., (i) the sequence of first letters of each word of the overall
message spells out the real (hidden) message.
(ii) Subset of the words of the overall message is used to convey
the hidden message. Various other techniques have been used
historically, some of them are
Character marking – selected letters of printed or
typewritten text are overwritten in pencil. The marks are
ordinarily not visible unless the paper is held to 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 in front of the
light.
Typewritten correction ribbon – used between the lines
typed with a black ribbon, the results of typing with the
correction tape are visible only under a strong light.
1. Playing an audio track backwards to reveal a secret message
2. Playing a video at a faster frame rate (FPS) to reveal a hidden
image
3. Embedding a message in the red, green, or blue channel of
an RGB image
4. Hiding information within a file header or metadata
5. Embedding an image or message within a photo through the
addition of digital noise.