0% found this document useful (0 votes)
282 views89 pages

CS8792 CNS Unit 1 - R1

Uploaded by

Loner Vishal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
282 views89 pages

CS8792 CNS Unit 1 - R1

Uploaded by

Loner Vishal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 89

Please read this disclaimer before proceeding:

This document is confidential and intended solely for the educational purpose of
RMK Group of Educational Institutions. If you have received this document
through email in error, please notify the system manager. This document
contains proprietary information and is intended only to the respective group /
learning community as intended. If you are not the addressee you should not
disseminate, distribute or copy through e-mail. Please notify the sender
immediately by e-mail if you have received this document by mistake and delete
this document from your system. If you are not the intended recipient you are
notified that disclosing, copying, distributing or taking any action in reliance on
the contents of this information is strictly prohibited.
CS8792-CRYPTOGRAPHY
AND NETWORK
SECURITY
Unit-I
Department : Computer Science and Engineering

Batch/Year : 2020-2024 / IV

Created By : Dr.G.Uma Maheswari


Ms. R. Saranya

Date : 07.08.2023
Table of Contents
PAGE
S NO CONTENTS
NUMBER

1 Course Objectives 6

2 Pre Requisites 6

3 Syllabus 7

4 Course Outcomes 8

5 CO- PO/PSO Mapping 9

6 Lecture Plan 10

7 Activity based learning 11

8 Lecture Notes 13

9 Assignments 73

10 Part A Q & A 74

11 Part B Questions 82

12 Supportive online Certification courses 83

13 Real time Applications 84

14 Contents beyond the Syllabus 85

15 Assessment Schedule 86

16 Prescribed Text Books & Reference Books 87

17 Mini Project Suggestions 88


CS8792 CRYPTOGRAPHY AND NETWORK SECURITY

COURSE OBJECTIVES
To understand Cryptography Theories, Algorithms and Systems.
To understand necessary Approaches and Techniques to build protection
mechanisms in order to secure computer networks.

PREREQUISITE
CS8792 CRYPTOGRAPHY AND NETWORK SECURITY

SYLLABUS
CS8792CRYPTOGRAPHY AND NETWORK SECURITY 3003

UNIT I INTRODUCTION 9
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.

UNIT II SYMMETRIC KEY CRYPTOGRAPHY 9


MATHEMATICS OF SYMMETRIC KEY CRYPTOGRAPHY: Algebraic structures –
Modular arithmetic-Euclid‟s algorithm- Congruence and matrices -Groups, Rings,
Fields- Finite fields- SYMMETRIC KEY CIPHERS: SDES – Block cipher Principles of
DES – Strength of DES – Differential and linear cryptanalysis – Block cipher design
principles – Block cipher mode of operation – Evaluation criteria for AES –
Advanced Encryption Standard –RC4–Key distribution.

UNIT III PUBLIC KEY CRYPTOGRAPHY 9


MATHEMATICS OF ASYMMETRIC KEY CRYPTOGRAPHY: Primes – Primality Testing
–Factorization – Euler‘s totient function, Fermat‘s and Euler‘s Theorem – Chinese
Remainder Theorem – Exponentiation and logarithm ASYMMETRIC KEY CIPHERS:
RSA cryptosystem – Key distribution – Key management – Diffie Hellman key
exchange - ElGamal cryptosystem – Elliptic curve arithmetic - Elliptic curve
cryptography.

UNIT IV MESSAGE AUTHENTICATION AND INTEGRITY 9


Authentication requirement – Authentication function – MAC – Hash function –
Security of hash function and MAC – SHA –Digital signature and authentication
protocols – DSS- Entity Authentication: Biometrics, Passwords, Challenge
Response protocols- Authentication applications – Kerberos, X.509

UNIT V SECURITY PRACTICE AND SYSTEM SECURITY 9


Electronic Mail security – PGP, S/MIME – IP security – Web Security – SYSTEM
SECURITY: Intruders – Malicious software – viruses – Firewalls.
COURSE OUTCOMES

Course Outcomes

To Understand the fundamentals of networks security,


CO1
security architecture, threats and vulnerabilities

To apply the different cryptographic operations of symmetric


CO2
cryptographic algorithms
CO3 To apply the different cryptographic operations of public key
cryptography
CO4 To Apply the various Authentication schemes to simulate
different applications.

CO5 To understand various Security practices

CO6 To understand System security standards


CO-PO MAPPING

PO’s/PSO’s
COs PO PO PO PO PO PO PO PO PO PO PO PO PSO PSO PSO
1 2 3 4 5 6 7 8 9 10 11 12 1 2 3

CO1 3 3 3 2 - 2 - - - - - - 1 2 1
2
CO2 3 3 3 2 - - - - - - - 1 2 1
2
CO3 3 3 3 2 - - - - - - - 1 2 1
2
CO4 3 3 3 2 - - - - - - - 1 2 1
2
CO5 3 3 3 2 - - - - - - - 1 2 1
2
CO6 3 3 3 2 - - - - - - - 1 2 1

1 – Low, 2 – Medium, 3 – Strong


LECTURE PLAN
Mode
S Actual Taxono
Topics Proposed Pertaining of
No Lecture my
date CO delivery
Date level
Introduction and
1 07.08.2023 K2
Security trends
Legal, Ethical and
2 Professional Aspects 08.08.2023 K2
of Security
Need for Security at
ICT
Multiple levels,
Tools
3 Security Policies, 11.08.2023 K2
Model of network
security
Security attacks,
services and
4 12.08.2023 K2
mechanisms, OSI CO1
security architecture
Substitution
5 14.08.2023 K3 BB
Techniques &
Substitution
6 16.08.2023 K3 ICT
Techniques
Tools
Transposition
7 Techniques, 18.08.2023 K3
Steganography
Perfect security,
8 19.08.2023 K2
Information theory ICT
Product Tools
9 Cryptosystem, 22.08.2023 K2
Cryptanalysis
VIDEO LINKS

Link
S NO TOPICS
https://www.youtube.com/w
atch?v=ZWz8KiJpTEM&t=20
1 PlayFair Cipher 4s&ab_channel=MadhuAmar
nath
https://www.youtube.com/w
2 Cryptographic attacks atch?v=BXq2T3BDLBo

https://www.youtube.com/w
History and Evolution of
3 atch?v=z9Qi5mDSYb8&t=67
Cryptography and Cryptanalysis
s
https://www.youtube.com/w
4 Network Security atch?v=Jt9lxEoWuYs

https://www.youtube.com/w
5 Cybercrime atch?v=87N2GPEIyAE

https://www.youtube.com/w
6 Perfect Secrecy atch?v=vKRMWewGE9A
ACTIVITY BASED LEARNING

1. https://www.cryptool.org/en/cto/caesar

2. https://www.simonsingh.net/The_Black_Chamber/monoalphabetic.html

3. https://www.simonsingh.net/The_Black_Chamber/playfair_cipher.html

4. https://www.cryptool.org/en/cto/vigenere
LEGAL, ETHICAL AND PROFESSIONAL ASPECTS OF
SECURITY
Computer crime, or cybercrime, is a term used broadly to describe criminal
activity in which computers or computer networks are a tool, a target, or a place
of criminal activity.
The term cybercrime has a association of the use of networks specifically,
whereas computer crime may or may not involve networks.

Types of Computer Crime


1. Computers as targets:
This form of crime targets a computer system, to
acquire information stored on that computer system, to control the target system
without authorization or payment (theft of service), or to alter the integrity of
data or

interfere with the availability of the computer or server.


This form of crime involves an attack on data integrity, system integrity, data
confidentiality, privacy, or availability.

2. Computers as storage devices:


Computers can be used to further unlawful activity by using a computer or a
computer device as a passive storage medium.
Example, the computer can be used to store stolen password lists, credit card or
calling card numbers, proprietary corporate information

3. Computers as communications tools:


Many of the crimes falling within this category are simply traditional crimes that
are committed online.
Examples include the illegal sale of prescription drugs, controlled substances, and
guns, fraud, gambling.
Law Enforcement Challenges
The cycle of cybercrime, involving law enforcement agencies, cybercriminals, and
cybercrime victims are depicted in figure below:

Figure : Cycle of Cybercrimes

Difficulties faced by law enforcement agencies:


Proper investigation requires a better grasp of the technology.
Lack of experience in dealing with this kind of crime.
Lack of resources.
Some cybercrime investigations require considerable computer processing power,
communications capacity, and storage capacity, which may be beyond the budget
of individual authority.

The global nature of cybercrime is an additional obstacle


It is difficult to profile cybercriminals in the way that is often done with other
types of repeat offenders.
The cybercriminal tends to be young and very computer-savvy, but the range of
behavioral characteristics is wide.
There exist no cybercriminal databases that can point investigators to likely
suspects.
The success of cybercriminals, and the relative lack of success of law enforcement,
influence the behavior of cybercrime victims.
No much investment in technical, physical, and human-factor resources to prevent
attacks.
Reporting rates tend to be low because of a lack of confidence in law
enforcement.

INTELLECTUAL PROPERTY
The U.S. legal system, and legal systems generally, distinguish three primary
types of property:
Real property: Land and things permanently attached to the land, such as trees,
buildings, and stationary mobile homes.
Personal property: Personal effects, moveable property and goods, such as
cars, bank accounts, wages, securities, a small business, furniture, insurance
policies, jewelry, patents, pets.
Intellectual property: Any intangible asset that consists of human knowledge
and ideas. Examples include software, data, novels, sound recordings, the design
of a new type of mousetrap, or a cure for a disease.

Types of Intellectual Property


Copyrights
Trademarks
Patents
COPYRIGHTS
Copyright law protects the tangible or fixed expression of an idea, not the idea
itself. A creator can claim copyright, and file for the copyright at a national
government copyright office, if the following conditions are fulfilled:

The proposed work is original.


The creator has put this original idea into a concrete form, such as hard copy
software, or multimedia form.
Examples: Literary works, Musical works, Dramatic works, choreographic works,
Architectural works, Software-related works.

The copyright owner has the following exclusive rights, protected against
infringement:

Reproduction right: Lets the owner make copies of a work


Modification right: Also known as the derivative-works right, concerns
modifying a work to create a new or derivative work
Distribution right: Lets the owner publicly sell, rent, lease, or lend copies of the
work.
Public-performance right: Applies mainly to live performances
Public-display right: Lets the owner publicly show a copy of the work directly
or by means of a film, slide, or television image

PATENTS
A patent for an invention is the grant of a property right to the inventor. There
are three types of patents:

Utility patents: May be granted to anyone who invents or discovers any new
and useful process, machine, article of manufacture, or composition of matter, or
any new and useful improvement thereof;
Design patents: May be granted to anyone who invents a new, original, and
ornamental design for an article of manufacture;
Plant patents: May be granted to anyone who invents or discovers and
reproduces any distinct and new variety of plant.

TRADEMARKS
A trademark is a word, name, symbol, or device that is used in trade with goods
to indicate the source of the goods and to distinguish them from the goods of
others.

Intellectual Property Relevant to Network and Computer


Security
A number of forms of intellectual property are relevant in the context of network
and computer security. Here are some of the most prominent:
Software: This includes programs produced by vendors of commercial software
(e.g., operating systems, utility programs, applications) as well as shareware,
proprietary software created by an organization for internal use, and software
produced by individuals. For all such software, copyright protection is available if
desired. In some cases, a patent protection may also be appropriate.
Databases: A database may consist of data that is collected and organized in
such a fashion that it has potential commercial value. An example is an economic
forecasting database. Such databases may be protected by copyright.
Digital content: This category includes audio files, video files, multimedia,
courseware, Web site content, and any other original digital work that can be
presented in some fashion using computers or other digital devices.
Algorithms: An example of a patentable algorithm, previously cited, is the RSA
public-key cryptosystem.
ETHICAL ISSUES
Ethics refers to a system of moral principles that relates to the benefits and harms
of particular actions, and to the rightness and wrongness of motives and ends of
those actions

ETHICAL ISSUES RELATED TO COMPUTERS AND


INFORMATION SYSTEMS
Ethical issues arise as the result of the roles of computers, such as the following:
Repositories and processors of information: Unauthorized use of otherwise
unused computer services or of information stored in computers raises questions
of appropriateness or fairness.
Producers of new forms and types of assets: For example, computer
programs are entirely new types of assets, possibly not subject to the same
concepts of ownership as other assets.
Instruments of acts: To what degree must computer services and users of
computers, data, and programs be responsible for the integrity and
appropriateness of computer output?
Symbols of intimidation and deception: The images of computers as thinking
machines, absolute truth producers, infallible, subject to blame, and as
anthropomorphic replacements of humans who err should be carefully considered.
Potential Ethical Dilemmas for Information Systems
Balancing professional responsibilities with ethical or moral responsibilities
come under the following issues:

Technology Intrusion Privacy internal to the firm


Privacy external to the firm
Computer surveillance
Employee monitoring
Hacking

Ownership Issues Moonlighting


Proprietary rights
Conflicts of interest
Software copyrights
Use of company assets for personal
benefit
Theft of data, software, or hardware

Legal Issues and Social Embezzlement, fraud and abuse, such


Responsibilities as through EFTs or ATMs
Accuracy and timeliness of data
Over-rated system capabilities and
“smart” computers
Monopoly of data

Personnel Issues Employee sabotage


Ergonomics and human factors
Training to avoid job obsolescence
Digital Rights Management (DRM)
Digital Rights Management refers to systems and procedures that ensurethat
holders of digital rights are clearly identified and receive the stipulated payment
for their works. The systems and procedures may also impose further restrictions
on the use of digital objects, such as inhibiting printing or prohibiting further
distribution.

Objectives of DRM systems


Provide persistent content protection against unauthorized access to the digital
content, limiting access to only those with the proper authorization.
Support a variety of digital content types (e.g., music files, video streams, digital
books, images).
Support content use on a variety of platforms, (e.g., PCs, PDAs, iPods, mobile
phones).
Support content distribution on a variety of media, including CD-ROMs, DVDs, and
flash memory.

DRM Components
Content provider: Holds the digital rights of the content and wants to protect
these rights
Distributor: Provides distribution channels, such as an online shop or a Web
retailer.
Consumer: Uses the system to access the digital content by retrieving
downloadable or streaming content through the distribution channel and then
paying for the digital license
Clearinghouse: Handles the financial transaction for issuing the digital license to
the consumer and pays royalty fees to the content provider and distribution fees
to the distributor accordingly
The DRM components is depicted in the figure below.

Figure: DRM Components

DRM System Architecture


The system is accessed by parties in three roles.
Rights holders are the content providers, who either created the content or
have acquired rights to the content.

Service providers include distributors and clearing houses.


Consumers are those who purchase the right to access to content for specific
uses

The system interface to the services provided by the DRM system are
Identity management: Mechanisms to uniquely identify entities, such as
parties and content
Content management: Processes and functions needed to manage the content
lifestyle
Rights management: Processes and functions needed to manage rights, rights
holders, and associated requirements
The DRM system architecture is shown in figure below.

Figure : DRM System Architechture

The common functions include


security/encryption module provides functions to encrypt content and to sign
license agreements.
authentication and authorization functions identify all parties in the
relationship and is used by identity management service .
Billing/payments functions deal with the collection of usage fees from
consumers and the distribution of payments to rights holders and distributors.
Delivery functions deal with the delivery of content to consumers.
Multi-Level Security Domains
A Security Domain can have a multi-level policy for one or more security services;
Example: A Domain Security Policy may allow supporting low & moderate
confidentiality services and moderate & high integrity services;
Two entities from a multi-level domain must be assured that an appropriate level
protection is provided for the keys and metadata by the CKMS (Crypto Key
Management System) in accordance with the multi-level policy.

Multi-Level Security: Selectable based on requirements and costs (e.g.,


processing time) ;

Scalable Security: Selects acceptable level of protection while minimizing costs;


Selectable Security: CKMS Multi-Domain Policy Enforcement supports selectable
security;

Negotiated Security for Transaction: Based on the policies of two or more


entities participating in a sensitive transaction; Requires creation of a new
temporary or permanent Security Policy for the transaction.

Security Policies
Organizational policies must identify goals, threats, risks;
Information policies must establish data categories, labels, sensitivity levels,
handling restrictions, roles, responsibilities;
Data Security policies must specify human, physical, communications, and
computer protections for data;
CKMS Policies should be configurable and automated to manage keys that protect
sensitive applications and data.
Global secure applications must support various policies.
Goal: Automated security policy specification, negotiation, and enforcement is
desirable for sensitive applications among mutually suspicious but cooperating
organizations. Key Management based on automated dynamic Domain Security
Policy support will help meet this goal.

Security Policy Specifications


A Security Policy should be written so that people can understand and follow it;
A Security Policy should be encoded so that an automated system can enforce it;
A formal specification of a security policy can be understandable to humans and
automatically enforced by a CKMS.

Security-Domain Based Cryptographic Key Management


Goal: Automated negotiation of key management based on the domain security
policies of two or more mutually suspicious participants in a sensitive transaction.
Assumption: Security is proportional to cost, the services used, and the
protection provided.
Approach: Develop an automated Policy Negotiation method using formal syntax
specifications of compatible Security Policies.

Information Management Policy


Highest-Level Organizational Policy for Managing and Protecting Information in all
forms (paper, computer data, electronic storage);

Established by the Organization’s CEO or CIO;


Policy is provided to all the Organization’s employees so they can follow the policy
Based primarily on organization’s goals and objectives;
Based often on industry standards of good practice (e.g., health patient privacy
rules);
Assigns Information Management Roles and Responsibilities to individuals;
Foundation for Information Security Policy

Information Security Policy


Establishes high-level rules for protecting organization’s information independent
of the storage media (e.g., paper, electronic)
Establishes information sensitivity levels
Establishes security labels for information
Protection services are based on threats
Level of protection is based on risks to information that could result in its loss, or
its unauthorized disclosure or modification

Data Security Policy


Based on the Information Security Policy
Rules for protecting electronic information
Governs use of Computers & Applications
Covers use of communication networks
Specifies data security levels, labels, etc.
Basis of Cryptographic Data Protection
Basis of Cryptographic Key Management

CKMS Security Policy


Based on an organization’s Data Security Policy, specifically on data cryptographic
protection;
Protecting a cryptographic key and its associated metadata is required to protect
the information protected by the key;
Often based on CKMS Profiles (e.g., Federal) of organizations using the services of
the CKMS;
CKMS Technical Capabilities must support and be used to enforce the CKMS
Security Policy.
Specifies detailed CKMS requirements for protecting cryptographic keys and their
associated metadata within the CKMS;
Based on, and supports, the sensitive data and applications’ protection
requirements;
Governs key and metadata protection and management throughout the entire
lifecycle of a cryptographic key.

Relationships among Policies


Policy statements should be layered from high to low ranging from high level
goals to details on how to implement and enforce the policy; e.g. Simple high-
level policy: Protect sensitive data;
Simple mid-level policy: Encrypt sensitive data during communication and in
long-term storage;
Simple low-level policy: Encrypt and Label data with AES-128 whenever it is
stored outside a physically secure facility;
Simple CKMS policy: Use a validated FIPS140-2 Cryptographic Module
whenever encrypting the application data and the Key used to encrypt it.

DOC/NIST’s Information and Data Security Policies include all aspects of protecting
information and data. These include:

Confidentiality – Protecting Data from unauthorized disclosure;


Integrity –Protecting Electronic Data from unauthorized, unanticipated, or
unintentional modification;

Availability – Electronic Data must be available on a timely basis.

The potential impact on DOC, NIST, Federal employees, and private individuals is
categorized as:
low (limited),
moderate (serious), or

high (catastrophic or severe)


A MODEL FOR NETWORK SECURITY
A message that needs to be transferred from one party to another across
some sort of internet must cooperate for the exchange of the message. The two
parties i.e., the sender and receiver are also called as principals. For the transfer of
messages,
 A logical information channel needs to be established between the sender and
the receiver.
 communication protocols (e.g., TCP/IP) must be used by the sender and
receiver.

A model for network security is shown in Figure 1.

Figure 1: Model for network security.


All the techniques for providing security have two components:
1. A security-related transformation on the information to be sent.
Examples:
 the encryption of the message, which scrambles the message so that it is
unreadable by the opponent,
 addition of a code based on the contents of the message, which can be used to
verify the identity of the sender
2. Some secret information shared by the two principals (sender and receiver)
Examples:
 An Encryption key used along with the transformation to scramble the message
before its transmission and unscramble it on reception.
A trusted third party may be needed to achieve secure transmission. For
example, a third party may be responsible for distributing the secret information
to the two principals while keeping it from any opponent.

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.
The security mechanisms needed to cope with unwanted access is shown in
Figure 2. The hacker is someone who simply gets satisfaction from breaking
and entering a computer system. Viruses and worms are two examples of software
attacks. Such attacks are introduced into a system by means of a disk that contains the
unwanted logic provided along with useful software
The gatekeeper function includes password-based login procedures that are
designed to allow only authorized users and deny all others. The second level of
security consists of a variety of internal security controls that detects the
presence of unwanted intruders.

Figure 2: Network Access Security Model

Another type of unwanted access is the placement of logic in a computer


system that that can affect application programs as well as utility programs, such as
editors and compilers. 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.
THE OSI SECURITY ARCHITECTURE
To assess the security needs of an organization effectively, the manager
responsible for security needs some systematic way of defining the requirements
for security and characterization of approaches to satisfy those requirements. One
approach is to consider three aspects of information security:
Security attack – Any action that compromises the security of information
owned by an organization.
Security mechanism – A mechanism that is designed to detect, prevent or
recover from a security attack.
Security service – A 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.

SECURITY ATTACK
A useful means of classifying security attacks, used both in X.800 and RFC 2828, is
in terms of passive attacks and active attacks. A passive attack attempts to learn
or make use of information from the system but does not affect system resources.
An active attack attempts to alter system resources or affect their operation.

Security attacks could be broadly categorized as


Passive attacks
Release of message contents
Traffic analysis

Active attacks
Masquerade (Fabrication)
Replay
Modification
Denial of service
Passive attacks:
Passive attacks are in the nature of eavesdropping on, or monitoring of,
transmissions. 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. The goal of the opponent is to obtain information that is being
transmitted.

Passive attacks are of two types:


1) 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.

Figure 3: Release of message contents

2) Traffic analysis: Even though encryption protection exists 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. This information might
be useful in guessing the nature of communication that was taking place
Figure 4: Traffic Analysis

Active attacks:
These attacks involve some modification of the data stream or the creation of a
false stream. 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.
These attacks can be classified in to four categories:
1) Masquerade (Fabrication) – One entity pretends to be a different entity.

Figure 5: Masquerade
2) Replay – involves passive capture of a data unit and its subsequent transmission
to produce an unauthorized effect.

Figure 6: Replay
3) Modification – Some portion of message is altered or the messages are delayed
or recorded, to produce an unauthorized effect.

Figure 7: Modification

4) 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.
Figure 8: Denial of service

SECURITY SERVICES
X.800 defines a security service as a service provided by a protocol layer of
communicating open systems, which ensures adequate security of the systems or
of data transfers. As per RFC 2828, the definition is “ a processing or
communication service that is provided by a system to give a specific
kind of protection to system resources; security services implement
security policies and are implemented by security mechanisms”.

The classification of security services are as follows:


1.Confidentiality: Ensures that the information in a computer system and
transmitted information are accessible only for reading by authorized parties.
Example: printing, displaying and other forms of disclosure.
2.Authentication: Ensures that the origin of a message or electronic document
is correctly identified, with an assurance that the identity is not false. the function
of the authentication service is to assure the recipient that the message is from
the source that it claims to be from.
Two specific authentication services are defined in X.800:
Peer entity authentication: Provides for the corroboration of the identity of a
peer entity in an association. It is provided for use at the establishment of, or at
times during the data transfer phase of, a connection. It attempts to provide
confidence that an entity is not performing either a masquerade or an
unauthorized replay of a previous connection.

Data origin authentication: Provides for the corroboration of the source of a


data unit. It does not provide protection against the duplication or modification of
data units. This type of service supports applications like electronic mail where
there are no prior interactions between the communicating entities.
3)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.
4)Non repudiation: Requires that neither the sender nor the receiver of a
message be able to deny the transmission.
5) Access control: Requires that access to information resources may be
controlled by or the target system.
6)Availability: Requires that computer system assets be available to authorized
parties when needed.

X.800 divides the security services into five categories and fourteen specific
services

1) AUTHENTICATION:
The assurance that the communicating entity is the one that it claims to be.
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.

2 ) 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 are allowed to do.

3) DATA CONFIDENTIALITY: The protection of data from unauthorized disclosure.


Connection Confidentiality: The 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.

4) 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.

5) 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.

SECURITY MECHANISMS

The security mechanisms defined by X.800 are divided into those that are implemented
in a specific protocol layer, such as TCP or an application-layer protocol, and those that
are not specific to any particular protocol layer or security service. X.800 distinguishes
between reversible encipherment mechanisms and irreversible encipherment
mechanisms.
A reversible encipherment mechanism is simply an encryption algorithm that allows data
to be encrypted and subsequently decrypted. Irreversible encipherment mechanisms
include hash algorithms and message authentication codes, which are used in digital
signature and message authentication applications.
Specific security mechanisms are encipherment, digital signatures, access
controls, data integrity, authentication exchange, traffic padding, routing control

and notarization.

Pervasive security mechanisms are trusted functionality, security labels,

event detection, security audit trails, security recovery.

SPECIFIC SECURITY MECHANISMS

Encipherment
The use of mathematical algorithms to transformdata into a form that is not

readily intelligible. Thetransformation and subsequent recovery of thedata depend

on an algorithm and zero or moreencryption keys.

Digital Signature
Data appended to, or a cryptographic transformationof, a data unit that allows a

recipient of the data unitto prove the source and integrity of the data unit and

protect against forgery (e.g., by the recipient).

Access Control

A variety of mechanisms that enforce access rights toresources.

Data Integrity
A variety of mechanisms used to assure the integrityof a data unit or stream of

data units.
Authentication Exchange
A mechanism intended to ensure the identity of anentity by means of
information exchange.

Traffic Padding
The insertion of bits into gaps in a data stream tofrustrate traffic analysis
attempts.

Routing Control
Enables selection of particular physically secureroutes 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 certainproperties of a data exchange.

PERVASIVE SECURITY MECHANISMS

Trusted Functionality
That which is perceived to be correct with respectto some criteria (e.g., as
established by a securitypolicy).

Security Label
The marking bound to a resource (which may be adata 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 asecurity audit, which is an
independent review and examination of system records and activities.

Security Recovery
Deals with requests from mechanisms, such as eventhandling and management
functions, and takes recovery actions.

Classical encryption techniques


Cryptographic systems are characterized along three independent dimensions:
1. The type of operations used for transforming plaintext to ciphertext.
All encryption algorithms are based on two general principles:
 Substitution, in which each element in the plaintext (bit, letter, group of bits or
letters) is mapped into another element, and

 Transposition, in which elements in the plaintext are rearranged. The


fundamental requirement is that no information be lost (that is, that all
operations are reversible). Most systems, referred to as po
du
ctsy
sem
s,tr involve
multiple stages of substitutions and transpositions.

2. The number of keys used.


 Symmetric encryption : If both sender and receiver use the same key, the
system is referred to as symmetric, single-key, secret-key, or conventional
encryption.
 Asymmetric encryption: If the sender and receiver use different keys, the
system is referred to as asymmetric, two-key, or public-key encryption.
3. The way in which the plaintext is processed.
 Block cipher processes the input one block of elements at a time, producing an
output block for each input block.
 Stream cipher processes the input elements continuously, producing output one
element at a time, as it goes along.

Some basic concepts are defined below:


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 intelligible message


Cipher text: The transformed message
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
SYMMETRIC CIPHER MODEL
A symmetric encryption scheme has five ingredients :
Plaintext: This is the original intelligible message or data that is fed into the
algorithm as input.
Encryption algorithm: The encryption algorithm performs various substitutions
and transformations on the plaintext.

Secret key: The secret key is also input to the encryption algorithm.The key is a
value independent of the plaintext and of the algorithm. The algorithm will
produce a different output depending on the specific key being used at the time.
The exact substitutions and transformations performed by the algorithm depend
on the key.

Ciphertext: This is the scrambled message produced as output. It depends on


the plaintext and the secret key. For a given message, two different keys will
produce two different ciphertexts. The ciphertext is an apparently random stream
of data and, as it stands, is unintelligible.
Decryption algorithm: This is essentially the encryption algorithm run in
reverse. It takes the ciphertext and the secret key and produces the original
plaintext.

Here the original message, referred to as plaintext, is converted into apparently


random nonsense, referred to as cipher text. The encryption process consists of
an algorithm and a key. The key is a value independent of the plaintext. Changing
the key changes the output of the algorithm. Once the cipher text is produced, it
may be transmitted. Upon reception, the cipher text can be transformed back to
the original plaintext by using a decryption algorithm and the same key that was
used for encryption.
The security depends on several factors. First, the encryption algorithm must be
powerful enough that it is impractical to decrypt a message on the basis of cipher
text alone. Beyond that, the security depends on the secrecy of the key, not the
secrecy of the algorithm.
Two requirements for secure use of symmetric encryption:
a strong encryption algorithm
a secret key known only to sender / receiver
Y = EK(X)
X = DK(Y)
assume encryption algorithm is known
implies a secure channel to distribute key

Figure : Simplified Model of Symmetric Encryption

A source produces a message in plaintext, X = [X1, X2, … , XM] where M are the
number of letters in the message. A key of the form K = [K1, K2, …, KJ] is
generated. If the key is generated at the source, then it must be provided to the
destination by means of some secure channel.
With the message X and the encryption key K as input, the encryption algorithm
forms the cipher text Y = [Y1, Y2, …, YN]. This can be expressed as

Y = EK(X)
The intended receiver, in possession of the key, is able to invert the
transformation:

X = DK(Y)
An opponent, observing Y but not having access to K or X, may attempt to recover
X or K or both. It is assumed that the opponent knows the encryption and
decryption algorithms. If the opponent is interested in only this particular
message, then the focus of effort is to recover X by generating a plaintext
estimate. Often if the opponent is interested in being able to read future
messages as well, in which case an attempt is made to recover K by generating
an estimate. The essential elements of a symmetric encryption scheme is shown
in the figure below:

Figure: Model of Symmetric Cryptosystem


Cryptanalysis
The process of attempting to discover X or K or both is known as cryptanalysis. The
strategy used by the cryptanalysis depends on the 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.

Chosen plaintext – The cryptanalysts gains temporary access to the encryption


machine. They cannot open it to find the key, however; they can encrypt a large number
of suitably chosen plaintexts and try to use the resulting cipher texts to deduce the key.

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.
Chosen text: Plaintext message chosen by cryptanalyst, with its corresponding
ciphertext generated, purported ciphertext chosen by cryptanalyst, with its corresponding
decrypted plaintext.

SUBSTITUTION TECHNIQUES
1. Caesar cipher (or) shift cipher
2. Playfair cipher
3. Hill cipher
4. Polyalphabetic ciphers
1. Vigenere cipher
2. Vernam cipher
3. One Time Pad cipher

TRANSPOSITION TECHNIQUES
1. Rail fence
2. Row Transposition Ciphers
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.

CAESAR CIPHER (OR) SHIFT 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.

Example 1:
Plain text: pay more money
Cipher text: SDB PRUH PRQHB
Example 2:

Plain text : Return to home


Cipher text : UHWXUQ WR KRPH
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(P) = (P+3) mod 26
A shift may be any amount, so that general Caesar algorithm is
C = E(P) = (P+k) mod 26
Where k takes on a value in the range 1 to 25. The decryption algorithm is simply
P = D(C) = (C-k) mod 26

Disadvantages
The encryption and decryption algorithm are known.
There are only 25 keys to try.
The language of the plain text is known
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 cipher text
digrams. The playfair algorithm is based on the use of 5x5 matrix of letters
constructed using a keyword. Let the keyword be ‘monarchy’. 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 alphabetical order. The letter ‘i’ and ‘j’ count as one letter.
Plaintext is encrypted two letters at a time according to the following rules:
Repeating plaintext letters that would fall in the same pair are separated with a
filler letter such as ‘x’.
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 following the last.
Plaintext letters that fall in the same column are replaced by the letter beneath,
with the top element of the column following the last.
Otherwise, each plaintext letter is replaced by the letter that lies in its own row
and the column occupied by the other plaintext letter.

Example:
Plaintext = meet me at the school house
Splitting two letters as a unit =>me et me at th es ch ox ol ho us ex
Corresponding cipher text => CL KL CL RS PD IL HY AV MP HF XL IU
Example 2:
Plain text : Balloon
Repeating plain text letter that fall in the same pair are repeated with the filler
letter ‘X’.
Plain text : ba lx lo on
Cipher text : IB SU PM NA

Strength of playfair cipher


Playfair cipher is a great advance over simple mono alphabetic ciphers.
Since there are 26 letters, 26x26 = 676 diagrams are possible, so identification of
individual digram is more difficult.
Frequency analysis is much more difficult.

Advantage
It is difficult to identify particular diagrams.
Frequency analysis is more difficult.

Disadvantages
It is relatively easy to be broken.
The sufficient number of cipher text letter is very small.

Hill Cipher
Hill cipher is a poly-graphic substitution cipher based on linear algebra.
Hill used matrices and matrix multiplication to mix up the plain text.
Each letter is represented by a number modulo 26.
To encrypt a message, each block of ‘n’ letters is multiplied by an invertible n x n matrix,
again modulus 26.
To decrypt the message, each block is multiplied by the inverse of the matrix used
for encryption.
Example:
POLYALPHABETIC CIPHERS
Another way to improve on the simple monoalphabetic technique is to use
different monoalphabetic substitutions as one proceeds through the plaintext
message. The general name for this approach is polyalphabetic cipher. All the
techniques have the following features in common.

A set of related monoalphabetic substitution rules are used


A key determines which particular rule is chosen for a given transformation.
To encrypt a message, a key is needed that is as long as the message, ignoring
spaces and punctuation.
Example:
Plain text : Good Morning
Key : text
Solution : G o o d M o r n i n g
Texttexttex
Cipher text : z s l w f s o g b r d

To encrypt, pick the letter in the plain text and its corresponding letter in the
keyword. The plain text is considered as row index and the keyword letter as
column index.
Here in the above example letter ‘G’ from row and letter ‘T’ from colum intersects
and produces the letter ‘Z’.
For decryption, pick the letter from the keyword as column index and search for
the cipher text. The intersection of corresponding row gives the plain text.
In our example letter ‘t ’ is considered as column index searching for cipher text
z’. The corresponding row index produces the plain text ‘g’.
Cipher text : zslw fsogbrd
Key : text texttex
Plain text : Good morning

Advantage
Multiple cipher text letters are used for each plain text letters.

VERNAM CIPHER
The ultimate defense against such a cryptanalysis is to choose akeyword that is
as long as the plaintext and has no statistical relationship to it. This cipher works
on binary data (bits) rather than letters. The system can beexpressed succinctly
as follows :

ci= pi ki
where
pi= ith binary digit of plaintext
ki= ith binary digit of key

ci= ith binary digit of ciphertext


= exclusive-or (XOR) operation
Thus, ciphertext is generated by performing the bitwise XOR of the plaintextand
the key. Because of the use of the properties of the XOR, decryption simply
involves the same bitwise operation:

pi= ci ki
Example:
Plaintext =00101001
Key =10101100

Ciphertext =10000101

ONE TIME PAD CIPHER:


An Army Signal Corp officer, Joseph Mauborgne, proposed an improvement to the
Vernam cipher that yields the ultimate in security. Mauborgne suggested using 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.

Suppose that we are using a Vigenère scheme with 27 characters in which the
twenty-seventh character is thespace character, but with a one-time key that is as
long as the message.
Consider the ciphertext
ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS

Two different decryptions using two different keys:


Ciphertext: ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS
Key: pxlmvmsydofuyrvzwctnlebnecvgdupahfzzlmnyih
Plaintext: mr mustard with the candlestick in the hall
Ciphertext: ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS
Key: pftgpmiydgaxgoufhklllmhsqdqogtewbqfgyovuhwt
Plaintext: miss scarlet with the knife in the library.

Advantage
It is a highly source method because it generates random keys

Disadvantages
Sending the key securely is a problem.
Randomness is also a disadvantage.

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:
It 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, the message is written as
follows:

m e a t e c o l o s
e t t h s h o h u e
The encrypted message is
MEATECOLOSETTHSHOHUE
ROW TRANSPOSITION CIPHER:
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.

Example:
Plaintext = meet at the school house
Key = 4 3 1 2 5 6 7
Plaintext = m e e t a t t
h e s c h o o
l h o u s e z
Cipertext = ESOTCUEEHMHLAHSTOETOZ

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.

Drawbacks of Steganography
Requires a lot of overhead to hide a relatively few bits of information.
Once the system is discovered, it becomes virtually worthless.
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.

Classic Cryptography Modern Cryptography

It manipulates traditional It operates on binary bit


characters, i.e., letters and digits sequences.
directly.
It is mainly based on ‘security It relies on publicly known
through obscurity’. mathematical algorithms for
coding the information.
It requires the entire cryptosystem Modern cryptography requires
for communicating confidentially. parties interested in secure
communication to possess the
secret key only.
INFORMATION THEORY

The term information theory refers to a remarkable field of study developed by

Claude Shannon in 1948.

Shannon was concerned with ``messages'' and their transmission, even in the

presence of ``noise''.

Shannon defined a mathematical quantity called entropy which measures the

amount of information in a message, if the message is one of a collection of

possible messages, each with its own probability of occurrence. This entropy is

the average number of bits needed to represent each possible message, using the

best possible encoding. If there are n messages X = {X1, ... , Xn}, with

probabilities of occurrence: p(X1), ... , p(Xn) (with sum equal 1), then

the entropy H(X) of this set of messages is:

H(X) = p(X1) log2(1/p(X1)) + ... + p(Xn) log2(1/p(Xn)).

Intuitively, the entropy is just the weighted average of the number of bits
required to represent each message, where the weights are the probabilities that

each message might occur.

Law ENTROPY1: The entropy of a message is just the number of bits of

information in the message, that is, the number of bits needed for the shortest

possible encoding of the message.

It is possible to list reasonable properties of any entropy function and to prove

that only the above formula gives a function with those properties
For example, if we have two messages X = {male, female}, each having
probability 1/2, then the entropy is

H(X) = (1/2)(log2(1/(1/2)) + (1/2)(log2(1/(1/2)) = 1/2 + 1/2 = 1.


Thus in this case, as we would intuitively expect, there is one bit of information in
such a message.
Suppose p(X1) = 1 and the remaining probabilities are zero. In this case the
entropy works out to be 0 as one would expect, since one is only going to receive
the message X1, so there is no information and no surprise in receiving this
message. The actual message X1 might be complex, with many bits representing
it, but its probability is 1, so only this message can occur, with no information or

``surprise'' on its receipt, even if it is complex.


As another example, suppose n = 3 and p(X1) = 1/2, p(X2) = 1/4,
and p(X3) = 1/4. Then the entropy works out to be 1.5. It is possible to
encode these messages as follows: X1: 0, X2: 10, and X3: 11. In this case
the average code length is the same as the entropy. O
Finally, suppose there are 1000 equally probably messages. Then the entropy is:
H(X) = (1/1000)(log2(1/(1/1000)) + ... + (1/1000)(log2(1/(1/1000))

= (1/1000)log2(1000) + ... + (1/1000)log2(1000)


= 1000 (1/1000) log2(1000)
= log2(1000) = 9.965784285.
Thus the entropy value of these messages means that there are nearly 10 bits of
information in each message. Similarly, if there are n equally likely messages,
then the entropy of a message is log2n. The equal probable case gives the largest
possible value for the entropy of a collection of messages.

Law ENTROPY2: A random message has the most information (the greatest
entropy).
The Three Kinds of Codes.
The terms code and coding refer to ways of representing information. Here the
term binary codes is used, that is, codes that use only the binary bits 0 and 1.
There are three kinds of coding:
Source Coding: This usually involves data compression: representing the data
with as few bits as possible. Notice that one always needs at least as many bits to
encode a message as the entropy of the message. Example: The Huffman Code.
Channel Coding: Here one uses error detection and error correction to improve
the reliability of the channel. This is accomplished by adding extra redundant bits.
The rest of this chapter presents material on channel capacity and error correction
codes. Example: The Hamming Code.
Secrecy Coding. For secrecy, one uses cryptography to scramble the message
so that it may not be intelligible to an eavesdropper.

Law INFORMATION1:
In all coding theory, information transmission is essentially the same as
information storage, since the latter is just transmission from now to then.
It's possible to have a single code that combines two or even all three of these
functions, but the codes are usually kept separate. Normally one would compress
a message (making the message smaller, to save storage or channel bandwidth),
then transform it cryptographically for secrecy (without changing the message
length), and finally add bits to the message to allow for error detection or
correction.

Channel Capacity.
Shannon also introduced the concept of channel capacity, which is the maximum
rate at which bits can be sent over an unreliable (noisy) information channel with
arbitrarily good reliability.
The channel capacity is represented as a fraction or percentage of the total rate
at which bits can be sent physically over the channel. Shannon proved that there
always exist codes that will signal arbitrarily close to the channel capacity with
arbitrarily good reliability.

Thus by choosing a larger and more complicated code, one can reduce the
number of errors to as small a percentage as one would like, while continuing to
signal as close as one wants to 100% of the channel capacity.
In practice the theory does not provide these good codes, though they are known
to exist. It is not possible to signal with arbitrarily good reliability at a rate greater
than the channel capacity.
The simplest example of such a channel is the binary symmetric channel. Here
every time a bit is transmitted, there is a fixed probability p, with 0 <= p <=
1 such that a transmitted 0 is received as a 0 with probability p and received as
a 1 with probability 1 - p. The errors occur at random.

For example, if p = 1 there are no errors at all on the channel, and the channel
capacity is 1 (meaning 100%). If p = 0, the capacity is still 1 as long as you
realize that all bits are reversed. If p = 0.5, then on receipt of a bit,
both 0 and 1 are equally likely as the bit that was sent, so one can never say
anything about the original message. In this case the channel capacity is 0 and no
information can be sent over the channel.
For binary symmetric channels there is a simple formula for the capacity C
C = 1 + p log2(p) + (1 - p) log2(1 - p).
Alternatively, one can write this formula as:
C = 1 - H(X),
where X consists of two messages with probabilities p and 1 - p. This formula
gives the amount of information lost during transmission on this noisy channel.
PRODUCT CRYPTOSYSTEM

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.

Figure: Cryptosystem

Objectives of Cryptosystem
The objective of this simple cryptosystem is that
At the end of the process, only the sender and the receiver will know the
plaintext.
A sender who wants to transfer some sensitive data to a receiver in such a way
that any party intercepting or eavesdropping on the communication channel
cannot extract the data.
Components of a Cryptosystem

Plaintext: It is the data to be protected during transmission.


Encryption Algorithm: It is a mathematical process that produces a ciphertext
for any given plaintext and encryption key. It is a cryptographic algorithm that
takes plaintext and an encryption key as input and produces a ciphertext.
Ciphertext : It is the scrambled version of the plaintext produced by the
encryption algorithm using a specific encryption key. The ciphertext is not
guarded. It flows on public channel. It can be intercepted or compromised by
anyone who has access to the communication channel
Decryption Algorithm: It is a mathematical process, that produces a unique
plaintext for any given ciphertext and decryption key. It is a cryptographic
algorithm that takes a ciphertext and a decryption key as input, and outputs a
plaintext. The decryption algorithm essentially reverses the encryption algorithm .
Encryption Key: It is a value that is known to the sender. The sender inputs the
encryption key into the encryption algorithm along with the plaintext in order to
compute the ciphertext.
Decryption Key: It is a value that is known to the receiver. The decryption key is
related to the encryption key, but is not always identical to it. The receiver inputs
the decryption key into the decryption algorithm along with the ciphertext in order
to compute the plaintext.
Key space : For a given cryptosystem, a collection of all possible decryption keys
is called a key space.
An interceptor (an attacker) is an unauthorized entity who attempts to
determine the plaintext. He can see the ciphertext and may know the decryption
algorithm. The attacker, however, must never know the decryption key.
Product cryptosystem : Product cryptosystem is a block cipher that repeatedly
performs substitutions and permutations, one after the other, to produce
ciphertext.

CRYPTANALYSIS
Cryptanalysis is the science of cracking codes and decoding secrets. It is used to
violate authentication schemes, to break cryptographic protocols, and, to find and
correct weaknesses in encryption algorithms.

It may be used in information warfare applications - for example, forging an


encrypted signal to be accepted as authentic. Competitors who have been able to
discover the key will now want to use it to their advantage, therefore they will
want to send bogus encrypted messages to the source in order to gain
information or gain an advantage. It could also be used to pretend to be the
source in order to send bogus information to others, who now will think that it
came from the official source.

Among the types of attacks are:


Ciphertext only attacks

Known plaintext attacks


Chosen plaintext attacks
Chosen ciphertext attacks
Man-in-the-middle attacks
Side channel attacks
Brute force attacks
Birthday attacks
There are also a number of other technical and non-technical cryptography
attacks to which systems can fall victim. Cryptanalytic attacks can be mounted not
only against encryption algorithms, but also against digital signature algorithms,
MACing algorithms and pseudo-random number generators.

Cipher-text only attack


A ciphertext only attack (COA) is a case in which only the encrypted message is
available for attack, but because the language is known, a frequency analysis
could be attempted. In this situation the attacker does not know anything about
the contents of the message, and must work from ciphertext only
The attacker only has access to one or more encrypted messages but knows
nothing about the

 plaintext data
 the encryption algorithm being used
 any data about the cryptographic key being used
This is the type of challenge that intelligence agencies often face when they have
intercepted encrypted communications from an opponent

Figure: Cipher-text only attack


Known plaintext attack
In a known plaintext attack (KPA) both the plaintext and matching ciphertext are
available for use in discovering the key.
The analyst may have access to some or all of the plaintext of the ciphertext.
The analyst's goal in this case is to discover the key used to encrypt the message
and decrypt the message.
Once the key is discovered, an attacker can decrypt all messages that had been
encrypted using that key.

Figure: Known plaintext attack

Chosen plaintext attack


A chosen plaintext attack (CPA) occurs when the attacker gains access to the
target encryption device - if, for example, it is left unattended. The attacker then
runs various pieces of plaintext though the device for encryption. This is
compared to the plaintext to attempt to derive the key.
The analyst either knows the encryption algorithm or has access to the device
used to do the encryption.
The analyst can encrypt the chosen plaintext with the targeted algorithm to derive
information about the key
Figure: Chosen plaintext attack

Chosen Ciphertext Attack


In a chosen ciphertext attack (CCA), the cryptanalyst can choose different cipher
texts to be decrypted and has access to the decrypted plaintext. This type of
attack is generally applicable to attacks against public key cryptosystems. An
adaptive chosen ciphertext attack involves the attacker selecting certain cipher
texts to be decrypted, then using the results of these decryptions to select
subsequent cipher texts. The modifications in the ciphertext help in deciphering
the key from the decryptions.

Man-in-the-Middle Attack
Cryptographic communications and key exchange protocols are susceptible to an
attack in which the attacker is able to place himself on the communication line
between two parties.
In this "man-in-the-middle attack" the attacker is able to position himself to
intercept the key exchange between two parties. He performs his own key
exchange with each. Then, with both parties thinking they have set up a secure
channel, the attacker decrypts any communications with the proper key, and
encrypts them with the other key for sending to the other party. The parties think
that they are communicating securely, but in fact the adversary is reading
everything.

Figure: man-in-the-middle attack

Preventing a man-in-the-middle attacks is possible if both sides compute a


cryptographic hash function of the key exchange, sign it using a digital signature
algorithm, and send the signature to the other side. The recipient then verifies
that the hash matches the locally computed hash and the signature came from
the desired other party.
Side Channel Attacks
Side channel attacks are a type of attacks based on implementation details such
as timing, power, and radiation emissions. By carefully measuring the amount of
time required to perform private key operations, attackers may be able to find
fixed Diffie-Hellman exponents, factor RSA keys, and break other cryptosystems.

Against a vulnerable system, the attack is computationally inexpensive and often


requires only known ciphertext. Actual systems are potentially at risk, including
cryptographic tokens, network-based cryptosystems, and other applications where

attackers can make reasonably accurate timing measurements.

Differential power analysis (DPA)


Differential power analysis (DPA) describes a new class of attacks against smart
cards and secure cryptographic tokens. Discovered by researchers at
Cryptography Research in San Francisco, DPA attacks exploit characteristic
behaviors of transistor logic gates and software running on today's smart cards
and other cryptographic devices. The attacks are performed by monitoring the
electrical activity of a device, then using advanced statistical methods to
determine secret information (such as secret keys and user PINs) in the device.

Brute force attack


A brute force attack is any type of attack that involves trying every possible
combination of characters or data in order to find the key in order to decrypt an
encrypted message.
A brute force attack is usually used as a last-resort tactic in a cryptanalysis
scenario, as it very much involves extreme amounts of trial and error.
A brute force attack involves trying all possible keys until hitting on the one that
results in plaintext. This can involve significant costs related to the amount of
processing required to try quadrillions (in the case of DES) of keys. The time
required is a factor of how many keys can be tried per unit of time, which is a
factor of how many computers can be assigned to the task in parallel.
The table below shows the times required for a brute force attack on various key
lengths using "Deep Crack" technology.

Deep Crack technology was developed in 1998 by the EFF (Electronic Frontier
Foundation). They built a machine called the Deep Crack capable of trying a
million DES keys per microsecond against a readable ASCII string hours to try all
possible keys. In theory, its success in cracking DES makes DES worthless. In
practice, however, by using cipher block chaining, doing any initial scrambling of
the data and/or doing it three times in a row (triple DES), it can still be fairly
difficult to crack.
Attacks on Symmetric Block Ciphers
Four types of attacks are normally used against symmetric block ciphers such as
DES and RC5:
Differential Cryptanalysis
Linear Cryptanalysis
Differential Linear Cryptanalysis
Algebraic Attacks
Differential cryptanalysis is a chosen plaintext attack that relies on analysis of the
differences between two related plaintexts as they are encrypted with the same
key. The correct key is identified by examining probabilities of each key. Linear
cryptanalysis, a known plaintext attack, uses linear approximation to describe
behavior of the block cipher. Given sufficient pairs of plaintext and corresponding
ciphertext, bits of information about the key can be obtained. Differential linear
cryptanalysis is a combination of differential and linear cryptanalysis. Algebraic
attacks analyze vulnerabilities in the mathematics of the algorithm.

Other Types of Cryptographic Attacks


Other types of cryptographic attacks include analytic, statistical and
implementation.
Analytic attacks use algorithm and algebraic manipulation weakness to reduce
complexity. Two examples are an RSA factoring attack and a Double DES attack.
Statistical attacks involve using statistical weakness in design, such as more 1s
than 0s in the keystream.
Implementation attacks exploit weakness in the implementation of the encryption
protocol. An example is the 1995 attack on the Netscape key, which had deficient
key randomization. Static WEP (wireless equivalent privacy) is similarly subject to
attack because of the relatively short initialization vectors that may be reused.
To protect against such attacks, the algorithm must be very strong (some vendor
algorithms are not), the key needs to be very random without any bias (no
patterns), and the implementation must be in accordance with good cryptographic
concepts.

Non-Technical Cryptographic Attacks


Not all system attacks involve sophisticated cryptanalysis or major computing
power. The people who use and run systems are themselves subject to attack -
and these are often the most successful.

"Purchase key" attack is another term for bribery.


"Rubber hose cryptanalysis" means gaining access to a system through a
physical assault on a user.
Social engineering involves convincing someone, usually through subterfuge, to
divulge their password or other persona or confidential information.
Assignment
1. Using Vigenere cipher, encrypt CRYPTOGRAPHY using the key
SECRET
2. Use the key phrase NETWORK SECURITY to construct the Playfair
key matrix. Using the matrix, encrypt the following quote by
Mark Twain: ALL GENERALIZATIONS ARE FALSE INCLUDING THIS
ONE
3. Write a program that performs encryption/decryption based on
the Caesar cipher

Real life case study

Do you think that necessity of keeping files secure arises more during
COVID lockdown?

Healthcare finds a vital role for cryptography. Justify.


TWO MARKS Q & A

Define cryptography .(CO1,K1)


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.

Define cryptanalysis. (CO2,K1)


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.”

Define security Attack, mechanism and service. (CO1,K1)


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. The services are intended to counter security attacks, and they

make use of one or more security mechanisms to provide the service.


Distinguish Threat and Attack .(CO1,K1)
Threat -A potential for violation of security, which exists when there is a

circumstance, capability, action, or event that could breach security and cause

harm. That is, a threat is a possible danger that might exploit vulnerability.

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.

Differentiate active attacks and passive attacks. (CO1,K1)


A passive attack attempts to learn or make use of information from the system
but does not affect system resources. Two types of passive attacks are the release
of message contents and traffic analysis.
An active attack attempts to alter system resources or affect their operation. It
can be subdivided into four categories: masquerade, replay, modification of
messages, and denial of service.

What is an unconditionally secure cipher? (CO1,K1)


An unconditionally secure cipher is one that does not contain enough information
to determine uniquely the corresponding plaintext, no matter how much
ciphertext is available. That is, no matter how much time an opponent has, it is
impossible for him to decrypt the ciphertext, simply because the required
information is not there. Example: One-time pad
Differentiate block and stream cipher (CO1,K1)
A block cipher processes the input one block of elements at a time, producing an
output block for each input block. A stream cipher processes the input elements
continuously, producing output one element at a time, as it goes along.

What are the essential ingredients of a symmetric cipher?(CO1,K1)


 Plain Text
 Encryption algorithm
 Secret Key
 Decryption algorithm
 Cipher text

Specify four categories of security threats (CO1,K1)


 Interruption
 Interception
 Modification
 Fabrication

What is brute-force attack? (CO1,K1)


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.

List the types of cryptanalysis attack (CO2,K1)


 Cipher text only
 Known plain text
 Chosen plaintext
 Chosen cipher text
 Chosen text
Compare Substitution and Transposition techniques. (CO2,K1)
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 cipher text
bit patterns.

Example: Caesar cipher, monoalphabetic cipher, Playfair cipher,


In transposition technique, 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.

Example: rail fence

Define Steganography. (CO2,K1)


A plaintext message may be hidden . The methods of steganography conceal the
existence of the message
Example Techniques: character marking, invisible ink, pin punctures, type writer
correction ribbon.

What is a computationally secure cipher?(CO1,K1)


A computationally secure cipher is one which satisfies any one of the following
two criteria:
 The cost of breaking the cipher exceeds the value of the encrypted information.
 The time required to break the cipher exceeds the useful lifetime of the
information.

What are the two problems with the one-time pad?(CO2,K1)


 Generating large quantities of random keys.
 Key distribution and protection.
Compare Vernam Cipher and One-time Pad(CO2,K1)
VERNAM CIPHER
 Key is eventually repeated
 It works on binary data rather than letters.
ONE-TIME PAD
 Key never repeated
 It works on letters.

What are the techniques that have been used historically for
steganography?(CO2,K1)
 Character marking
 Invisible ink
 Pin punctures
 Typewriter correction ribbon

What are the two general approaches to attacking a cipher?(CO1,K1)


 Cry
pta
na
lysis: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.
 Brute-forceatack: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.

What are the various types of cryptanalytic attacks?(CO2,K1)


 Ciphertext only
 Known Plaintext
 Chosen plaintext
 Chosen ciphertext
 Chosen text
What is computer crime?(CO1,K1)
Computer crime, or cybercrime, is a term used broadly to describe criminal activity
in which computers or computer networks are a tool, a target, or a place of
criminal activity.

List the types of computer crime. (CO1,K1)


 Computers as targets
 Computers as storage devices
 Computers as communications tools

What is Intellectual property? (CO1,K1)


Any intangible asset that consists of human knowledge and ideas. Examples
include software, data, novels, sound recordings, the design of a new type of
mousetrap, or a cure for a disease.

What are the types of Intellectual property. (CO1,K1)


 Copyright
 Patents
 Trademarks

What are the Intellectual Property that are relevant to Network and
Computer Security? (CO1,K1)

 Software
 Databases
 Digital content
 Algorithms
What are the Ethical issues related to Computers and Information
security? (CO1,K1)

 Repositories and processors of information


 Producers of new forms and types of assets
 Instruments of acts
 Symbols of intimidation and deception

What is Modern cryptography? (CO2,K1)


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.

What are the characteristics of Modern Cryptography? (CO2,K1)


 It operates on binary bit sequences.
 It relies on publicly known mathematical algorithms for coding the information.
 Modern cryptography requires parties interested in secure communication to
possess the secret key only.

What is cryptosystem? (CO1,K1)


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.

What is product cryptosystem? (CO2,K1)


Product cryptosystem is a block cipher that repeatedly performs substitutions and
permutations, one after the other, to produce ciphertext.
What is Symmetric Key Encryption? (CO1,K1)
The encryption process where same keys are used for encrypting and
decrypting the information is known as Symmetric Key Encryption. The study of
symmetric cryptosystems is referred to as symmetric cryptography. Symmetric
cryptosystems are also sometimes referred to as secret key cryptosystems

What is Asymmetric Key Encryption? (CO1,K1)


The encryption process where different keys are used for encrypting and
decrypting the information is known as Asymmetric Key Encryption.
Part B
1. Explain the following: (CO1, K2)
(a) Playfair cipher.
(b) Vernam cipher in detail.
2. Discuss in detail about Steganography (CO1, K2)
3. Compute the ciphertext for the plaintext “SECURE WORLD” using the playfair
cipher with key “CRYPTO. Also verify whether it is feasible to generate back the
plaintext, (CO1, K3)
4. ”Explain the OSI security architecture. (CO1, K2)
5. Explain various transposition ciphers in detail. (CO1, K2)
6. Explain in detail about various types of attacks. (CO1, K2)
7. Illustrate the legal and ethical aspects of security (CO1, K3)
8. Explain in detail (CO1, K2)
9. Product cryptosystem
10. Perfect security
9. Compute the ciphertext using Hill cipher for the plaintext “PAY ORE MONEY”
and key given below. Verify whether your ciphertext reproduces plaintext.
(CO1,K3)

10. Describe a classification of computer crime based on the role that the computer
plays in the criminal activity. (CO1,K2)
11. Explain in detail about copyright. (CO1,K2)
12. Describe the Digital Millennium Copyright Act. (CO1,K2)
13. Describe the principal categories of users of digital rights management
systems. (CO1,K2)
14. Summarize the Law Enforcement of Cybercrimes with the vicious cycle of
cybercrime. (CO1,K2)
15. Explain the role of Information theory in Cryptography. (CO1, K2)
Supportive online Certification courses

NPTEL
Cryptography and Network Security

COURSERA
Cryptography
Applied Cryptography

UDEMY
Advanced Cryptography Concepts

PLURALSIGHT
Cryptography Fundamentals for Developers and Security Professionals
Real time Applications in day to day life and to Industry

Email Clients Encryption (Outlook, Thunderbird - S/MIME, PGP)

Email Providers (Gmail, Zoho, iCloud – TLS)

End to End Web Encryption (https - TLS)

Code Signing (Cryptographic Hash and Digital Signatures)

WhatsApp Security (Signal Protocol)

Credit Card Security (PCI DSS)

Online Payment Security


Contents beyond the Syllabus

Information Technology Act, 2000

Kerckhoffs's principle
ASSESSMENT SCHEDULE

Tentative Dates:

Assessment Tests Dates

Unit 1 MCQ 22-Aug-2023

Unit Test-1 26-Aug-2023

Unit 2 MCQ 10-Sep-2023

IAT-1 11-Sep-2023
PRESCRIBED TEXT BOOKS & REFERENCE BOOKS

Text Books
1. William Stallings, Cryptography and Network Security: Principles and Practice,
PHI 3rd Edition, 2006.

Reference Books
1. C K Shyamala, N Harini and Dr. T R Padmanabhan: Cryptography and Network
Security, Wiley India Pvt.Ltd

2. BehrouzA.Foruzan, Cryptography and Network Security, Tata McGraw Hill 2007.

3. Charlie Kaufman, Radia Perlman, and Mike Speciner, Network Security: PRIVATE
Communication in a PUBLIC World, Prentice Hall, ISBN 0-13-046019-2
MINI PROJECT SUGGESTIONS

Design an interactive web application to perform encryption and


decryption for Caesar Cipher.
Thank you

Disclaimer:

This document is confidential and intended solely for the educational purpose of RMK Group of
Educational Institutions. If you have received this document through email in error, please notify the
system manager. This document contains proprietary information and is intended only to the
respective group / learning community as intended. If you are not the addressee you should not
disseminate, distribute or copy through e-mail. Please notify the sender immediately by e-mail if you
have received this document by mistake and delete this document from your system. If you are not
the intended recipient you are notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this information is strictly prohibited.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy