Unit 1 CNS
Unit 1 CNS
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
safet y 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.
Cryptograph y 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 b y modern mathematics that protects our data in powerful ways
Data Security is the science and study of methods of protecting data from
unauthorized disclosure and modification.
Data and information security is about enabling collaboration while managing risk
with an approach that balances availability versus the confidentiality of data.
Computer Security: Generic name for the collection of tools designed to protect data
and to thwart hackers.
Network security: Measures to protect data during their transmission.
Internet Security: Measures to protect data during their transmissions over a
collection of interconnected networks.
Basic Concepts
Cryptography The art or science encompassing the principles and methods of
transforming an intelligible message into one that is unintelligible, and then
retransforming that message back to its original form
Plaintext The original message
1
Cipher text The transformed message produced as output ,it depends on the
plaintext and key
Cipher An algorithm for transforming an intelligible message into one that is
unintelligible by transposition and/or substitution methods
Key Some critical information used by the cipher, known only to the sender&
receiver
Encipher (encode) The process of converting plaintext to cipher text using a cipher
and a key
Decipher (decode) the process of converting cipher text back into plaintext using a
cipher and a key
Cryptanalysis The study of principles and methods of transforming an
unintelligible message back into an intelligible message without knowledge of the
key. Also called code breaking
Cryptology Both cryptography and cryptanalysis
Code An algorithm for transforming an intelligible message into an
unintelligible one using code-book.
X.800 divid es these services into five categories and fourteen specific services
They are:
a. Authentication
b. Access control
c. Data confidentiality
d. Data Integrity
e. Non- Repudiation
3
Authentication:
The assurance that the communicating entity is the one that it claims to be so.
There are two types of authentication:
• Peer entity Authentication
• Data origin Authentication
Peer Entity Authentication is used in association with logical connection to provide
confidence in the identity of the entities connected
Access Control:
The prevention of unauthorized use of a resource i.e., this server controls who can have
access to a resource, under what conditions access can occur, and what those accessing the
resources are allowed to do.
Data Confidentiality
It is a protection of data from unauthorized disclosure. It is the protection of
transmitted data from passive attacks.
It can be categorized into four different types
• Connection Confidentiality
• Connectionless Confidentiality
• Selective- Field confidentiality
• Traffic- Flow Confidentiality
Connection Confidentiality – Protection of all user data on a connection Connectionless
Confidentiality- The protection of all user data in a single data block Selective – Field
Confidentiality- 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
It is an assurance that data received are exactly as sent by an authorize entity.
4
There are five categories in Data Integrity
• Connection Integrity with Recovery
• Connection Integrity without Recovery
• Selective – Field Connection Integrity
• Connectionless Integrity
• Selective Field Connectionless Integrity
Connection Integrity with Recovery: provides for 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: It provides the complete integrity but the
detection takes place without recovery.
Selective Field Connection Integrity: provides for the integrity of selected fields within
the user data of a 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.
Selective – Field Connectionless Integrity: provides for the integrity of selected fields
within a single connectionless data block. It takes the form of determination of whether the
selected fields have been modified.
Non – Repudiation
It provides protection against denial by one of the entities involved in communication of
having participated in all or part of the communication
Non – Repudiation, Origin: Proof that the message was sent by the specified party
Non – Repudiation, Destination: Proof that the message was received by the specified
party.
7
Intruder
Sender Receiver
Internet or other
communication facility
Traffic Analysis is a second type of passive attack in which the intruder observes the
pattern of messages in between the sender and the receiver.
Intruder
Observe pattern of
messages from sender to
Sender Receiver
Internet or other
communication facility
b)Traffic Analysis
Active attacks
• It involves some modification of data stream or the creation of false data stream.
• Active attack can be subdivided into four categories:
1. Masquerade
2. Replay
3. Modification of message
4. Denial of service.
Masquerade
• A masquerade takes place when one entity makes believe to be a different entity.
• A masquerade attack usually includes one of the other forms of active attack. For
example, authentication sequences can be captured and replayed after a valid
authentication sequence has taken place, thus enabling an authorized entity with few
privileges to obtain extra privileges by impersonating an entity that has those
privileges.
Intruder
a) Masquerade
Replay
• Replay attack involves the passive capture of a data unit and its subsequent
retransmission to produce an unauthorized effect.
Intruder
Receiver
Sender
Modification of messages
• It simply means that some portion of a legitimate message is altered, or that message
are delayed or reordered, to produce an unauthorized effect.
Intruder
Sender Receiver
Internet or other
communication facility
c) Modification of Messages
Denial of Service
• The denial of service prevents or inhibits the normal use or management of
communications facilities. This attack may have a specific target; for example, an
entity may suppress all messages directed to a particular destination (e.g., the
security audit service).
• Another form of service denial is the disruption of an entire network, either by
disabling the network or by overloading it with messages so as to degrade
performance.
d) Denial of Service
Intruder
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.
Programs can present two kinds of threats:
• Information access threats: Intercept or modify data on behalf of users who should
not have access to that data.
• Service threats: Exploit service flaws in computers to inhibit use by legitimate
users.
o Plain text
o Encryption algorithm
o Secret key
o Cipher text
o Decryption algorithm
Plain text
• An original message is known as the plaintext (Readable format)
• Plaintext is information a sender wishes to transmit to a receiver
Cipher text
• Coded message is called the Cipher Text.(Unreadable format)
• Cipher text (or cypher text) is the result of encryption performed on plaintext using
an algorithm, called a cipher.
Secret key
• The secret key is also input to the encryption algorithm . the key is the value
independent of the plaintext and of the algorithm. The algorithm produces a different
output depending on the specific key used. The substitutions and transformation
performed by the algorithm depend on the key.
• A private or secret key is an encryption/decryption key known only to the party or
parties that exchange secret messages
Encryption algorithm
• The encryption algorithm performs various substitutions and transformations on the
plain text.
Decryption algorithm
• This is essentially the encryption algorithm run in reverse. It takes the cipher text
and the secret key and produces the original plain text.
Basic Terminology
• Cryptography - study of encryption principles/methods.
• Cryptanalysis (code breaking) - the study of principles/ methods of deciphering
ciphertext without knowing key.
• Cryptology - the field of both cryptography and cryptanalysis.
Cryptography
• Cryptographic systems are characterized by:
– Types of encryption operations used substitution / transposition / product
– Numbers of keys used single-key or private / two-key or public
– Ways in which plaintext is processed block / stream
Cryptanalysis
• Cryptanalytic attacks rely on the nature of the algorithm plus perhaps some
knowledge of the characteristics of the plain text or even some sample plain text
–cipher text pairs.
• To deduce a specific plain text or to deduce the key being used.
• The attacker tries every possible key on a piece of cipher text until an intelligible
translation into plaintext is obtained. On average, half of all possible keys must
be tried to achieve success.
• Brute-force attacks are an application of brute-force search, the general problem-
solving technique of enumerating all candidates and checking each one.
0 1 2 3 4 5 6 7 8 9 10 11 1213 14 15 16 17 18 19 20 21 22 23 24 25
• Caesar cipher as: K=Values from 1 to 25
Encryption Algorithm
C = E(3,p) = (p + k) mod (26) (i.e) C=E(k,p)=(p+k) mod 26
Decryption Algorithm
p = D(K,C) = (C – k) mod (26)
Mono alphabetic Cipher
• Each letter in the plaintext is encoded by only one letter from the
cipher alphabet, and each letter in the cipher alphabet represents only one letter
in the plaintext.
• Each letter is replaced by a different letter or symbol.
• Key = permutation (still need to decide on a key and exchange this
information in a secure way)
• Permutation: A permutation of a finite set elements S is an ordered sequence
of all the elements of S.
• 26! Possibilities
Plain: abcdefghijklmnopqrstuvwxyz
Cipher:
DKVQFIBJWPESCXHTMYAUOLRGZN
Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA
Example Cryptanalysis
• Given ciphertext:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZVUEPH
Z
HMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSXEPYEPOPDZSZUFPOMB
Z
WPFUPZHMDJUDTMOHMQ
Hill Cipher
mod 26
Or
C=KP mod 26
where C and P are column vectors of length 3 representing the plaintext and ciphertext,
and K is a 3x3 matrix representing the encryption key.
• Operations are performed mod 26.
• In general terms, the Hill system can be expressed as
Polyalphabetic Ciphers
• Another way to improve on the simple monoalphabetic technique is to use different
monoalphabetic substitutions as one proceeds through the plaintext message. This
approach is known as polyalphabetic substitution cipher.
• Each letter in the plaintext can be encoded by any letter in the cipher alphabet, and
each letter in the cipher alphabet may represent different letters from the plaintext
each time it appears.
• A general equation of the encryption process is
Ci = (pi + ki mod m)mod 26
• Decryption is a generalization of
pi = (Ci - kimod m)mod 26
Vigenère Cipher
• Simplest polyalphabetic substitution cipher is the Vigenère Cipher.
Effectively multiple Caesar ciphers.
• Key is multiple letters long K = k1k2 ... kd. the ith letter specifies ith alphabet
to use.
• Use each alphabet in turn repeat from start after d letters in message
decryption simply works in reverse.
Example
• Using keyword deceptive
Key : deceptivedeceptivedeceptive
Plaintext : wearediscoveredsaveyourself
Ciphertext : ZICVTWQNGRZGVTWAVZHCQYGLMGJ
One-Time Pad
• The key string is chosen at random and at least as long as the message, so it
does not repeat.
• Each new message requires a new key of the same length as the new
message. It produces random output that bears no statistical relationship to
the plaintext.
• If a truly random key as long as the message is used, the cipher will be secure
called a One-Time pad
• It is unbreakable since cipher text bears no statistical relationship to the plain
text since for any plaintext &any cipher text there exists a key mapping one
to other. It can only use the key once though have problem of safe
distribution of key.
c o m e t o d a y
Plaintext :
2 14 12 4 19 14 3 0 24
N C B T Z Q A R X
key
13 2 1 19 25 16 0 17 23
Total 15 16 13 23 44 30 3 17 47
Subtract
26 15 16 13 23 18 04 3 17 21
If> 25
Cipher
P Q N X S E D R V
text
1.4.3 Transposition cipher
1.4.4 Steganography
Hiding the message into some cover media. It conceals the existence of a
message.
Steganography is the art or practice of concealing a message, image, or file
within another message, image, or file.
Techniques of Steganography
Character Marking:
Selected letters are overwritten in pencil.The marks are not visible unless
the paper is held at an angle to bright light.
Invisible Ink:
No.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 sunlight.
Drawbacks
High overhead to hide relatively few info bits
Advantages
Secret communication
1.6 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.
There are three major characteristics that separate modern cryptography from the classical
approach.
Context of Cryptography
• Cryptography
• Cryptanalysis
What is Cryptography?
Cryptography is the art and science of making a cryptosystem that is capable of providing
information security.
Cryptography deals with the actual securing of digital data. It refers to the design of
mechanisms based on mathematical algorithms that provide fundamental information security
services. You can think of cryptography as the establishment of a large toolkit containing
different techniques in security applications.
What is Cryptanalysis?
The art and science of breaking the cipher text is known as cryptanalysis.
Cryptanalysis is the sister branch of cryptography and they both co-exist. The cryptographic
process results in the cipher text for transmission or storage. It involves the study of
cryptographic mechanism with the intention to break them. Cryptanalysis is also used during
the design of the new cryptographic techniques to test their security strengths.
Note − Cryptography concerns with the design of cryptosystems, while cryptanalysis studies
the breaking of cryptosystems.
The primary objective of using cryptography is to provide the following four fundamental
information security services. Let us now see the possible goals intended to be fulfilled by
cryptography.
Confidentiality
Confidentiality can be achieved through numerous means starting from physical securing to
the use of mathematical algorithms for data encryption.
Data Integrity
It is security service that deals with identifying any alteration to the data. The data may get
modified by an unauthorized entity intentionally or accidently. Integrity service confirms that
whether data is intact or not since it was last created, transmitted, or stored by an authorized
user.
Data integrity cannot prevent the alteration of data, but provides a means for detecting whether
data has been manipulated in an unauthorized manner.
Authentication
Authentication provides the identification of the originator. It confirms to the receiver that the
data received has been sent only by an identified and verified sender.
• Message authentication identifies the originator of the message without any regard
router or system that has sent the message.
• Entity authentication is assurance that data has been received from a specific entity, say
a particular website.
Apart from the originator, authentication may also provide assurance about other parameters
related to data such as the date and time of creation/transmission.
Non-repudiation
It is a security service that ensures that an entity cannot refuse the ownership of a previous
commitment or an action. It is an assurance that the original creator of the data cannot deny the
creation or transmission of the said data to a recipient or third party.
Non-repudiation is a property that is most desirable in situations where there are chances of a
dispute over the exchange of data. For example, once an order is placed electronically, a
purchaser cannot deny the purchase order, if non-repudiation service was enabled in this
transaction.
Cryptography Primitives
Cryptography primitives are nothing but the tools and techniques in Cryptography that can be
selectively used to provide a set of desired security services −
• Encryption
• Hash functions
• Message Authentication codes (MAC)
• Digital Signatures
The following table shows the primitives that can achieve a particular security service on their
own.
Note − Cryptographic primitives are intricately related and they are often combined to achieve
a set of desired security services from a cryptosystem.