0% found this document useful (0 votes)
26 views80 pages

Final DOCUMENT KS

The project report presents a secure backup system using multicloud technology, focusing on the Division and Replication of Data in the Cloud for Optimal Performance and Security (DROPS) to address security concerns in cloud computing. It outlines the proposed system's architecture, advantages, and the importance of data fragmentation and controlled replication to enhance security against unauthorized access. The report includes a literature survey and acknowledges the guidance of faculty members during the project development.

Uploaded by

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

Final DOCUMENT KS

The project report presents a secure backup system using multicloud technology, focusing on the Division and Replication of Data in the Cloud for Optimal Performance and Security (DROPS) to address security concerns in cloud computing. It outlines the proposed system's architecture, advantages, and the importance of data fragmentation and controlled replication to enhance security against unauthorized access. The report includes a literature survey and acknowledges the guidance of faculty members during the project development.

Uploaded by

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

A project report on

A SECURE BACKUP SYSTEM USING


MULTICLOUD

Submitted in partial fulfillment for the award of the degree of

BCA
by

SNEKA M(20BCA0130)

KAVIYA V(20BCA0137)

Under the guidance of

Dr.Thanapal P

SCHOOL OF INFORMATION TECHNOLOGY AND ENGINEERING

1
DECLARATION

We here by declare that the thesis entitled “A SECURE BACKUP SYSTEM USING
MULTICLOUD” submitted by us, for the award of the degree of Bachelor of Computer
Application is a record of bonafide work carried out by us under the supervision of
Dr.Thanapal P.

We further declare that the work reported in this thesis has not been submitted and
will not be submitted, either in part or in full, for the award of any other degree or diploma in
this institute or any other institute or university.

Place: Vellore
Date: 20/04/2023

Signature of the Candidates

SNEKA M (20BCA0130)

KAVIYA V(20BCA0137)

2
3
ABSTRACT

More clients might need to store their data to PCS (open cloud servers) close
by the quick headway of circulated figuring. New security issues must be handled in order to
help more clients process their data with no attempt at being subtle cloud. Right when the
client is limited to get to PCS, he will dole out its delegate to process his data and exchange
them. On the other hand, remote data uprightness checking is also a basic security issue out
in the open circulated stockpiling. It makes the clients check whether their outsourced data is
kept set up without downloading the whole data. From the security issues, we propose a
novel middle person masterminded data exchanging and remote data trustworthiness
checking model in identity based open key cryptography: IDPUIC (character based middle
person orchestrated data exchanging and remote data dependability looking at in the open
cloud). We give the formal definition, structure model and security model. By then, a strong
ID-PUIC tradition is sketched out by using the bilinear pairings. The proposed ID-PUIC
tradition is provably secure in perspective of the hardness of CDH (computational Diffie-
Hellman) issue. Our ID-PUIC tradition is furthermore beneficial and versatile. In
perspective of the special client's endorsement, the proposed ID-PUIC tradition can
comprehend private remote data genuineness checking designated remote data genuineness
checking and open remote data reliability checking.

4
ACKNOWLEDGEMENT

It is my pleasure to express with deep sense of gratitude to Dr. Thanapal.P Associate


Professor Senior, SITE, Vellore Institute of Technology, for his constant guidance, continual
encouragement, understanding, more than all, he taught me patience in my endeavor. My
association with him is not confined to academics only, but it is a great opportunity on my
part of work with an intellectual and expert in the field of cloud computing and IoT.
I would like to express my gratitude to DR.G.VISWANATHAN, Chancellor VELLORE
INSTITUTE OF TECHNOLOGY, VELLORE, MR. SANKAR VISWANATHAN, DR.
SEKAR VISWANATHAN, MR.G V SELVAM, Vice – Presidents VELLORE INSTITUTE
OF TECHNOLOGY, VELLORE, DR. RAMBABU KODALI, Vice – Chancellor,
DR.PARTHA SHARATHI MALLICK, Pro-Vice Chancellor and Dr. S. Sumathy, Dean,
School of Information Technology & Engineering (SITE), for providing with an environment
to work in and for his inspiration during the tenure of the course.
In jubilant mood I express ingeniously my whole-hearted thanks to Dr. Parimala.M
HoD/Professor, all teaching staff and members working as limbs of our university for their
not- self-centered enthusiasm coupled with timely encouragements showered on me with
zeal, which prompted the acquirement of the requisite knowledge to finalize my course study
successfully. I would like to thank my parents for their support.
It is indeed a pleasure to thank my friends who persuaded and encouraged me to take up and
complete this task. At last but not least, I express my gratitude and appreciation to all those
who have helped me directly or indirectly toward the successful completion of this
project.Place: Vellore
Date: 20/04/2023

Name of the students


SNEKA M (20BCA0130)
KAVIYA V (20BCA0137)

5
TABLE OF CONTENTS

LIST OF ABBREVATION............................................................08

CHAPTER 1

INTRODUCTION........................................................................................09
1.1 OBJECTIVES................................................................................................09
1.2 SCOPE OF THE PROJECT..........................................................................10
1.3 EXISTING PROJECT…...............................................................................10
1.4 PROPOSED SYSTEM..................................................................................10
1.5 ADVANTAGES IN PROPOSED THEORY…............................................11

CHAPTER 2

2.1 LITERATURE SURVEY.............................................................................11-20

CHAPTER 3

REQUIREMENTS
3.1 HARDWARE REQUIREMENTS................................................................21

3.2 SOFTWARE REQUIREMENTS..................................................................21

3.3 SYSTEM TECNIQUES................................................................................21

3.4 EXPECTED INPUT AND OUTPUT............................................................22

CHAPTER 4

ANALYSIS & DESIGN

4.1 SYSTEM ARCHITECTURE........................................................................23

4.2 USECASE DIAGRAM.................................................................................24


6
4.3 CLASS DIAGRAM......................................................................................25

4.4 OBJECT DIAGRAM.....................................................................................25

4.5 STSTE DIAGRAM.................................................................................26

4.6 ACTIVITY DIAGRAM..........................................................................26

4.7 SEQUENCE DIAGRAM........................................................................27

4.8 COLLOBORATION DIAGRAM............................................................27

4.9 DATA FLOW DIAGRAM......................................................................28

CHAPTER 5
MODULES

5.1 MODULE EXPLANATION..................................................................29,30


5.2 MODULE DIAGRAM...........................................................................31-35

IMPLEMENTATION & TESTING

5.1 SAMPLE CODE.....................................................................................36-70

5.2 SAMPLE OUTPUT................................................................................71- 76

CONCLUSIONS AND FUTURE WORK..............................77

REFERENCES.........................................................................78

7
LIST OF ABBREVATION

S.NO ABBREVATION EXPANSION

1. DB DataBase

2. JVM Java Virtual Machine

3. JSP Java Server Page

4. CB Collective Behavior

5. SD Social Dimension

6. JRE Java Runtime Environment

7. SSD Sparse Social Dimension

8. LGP Line Graph Partition

8
CHAPTER 1

INTRODUCTION

Cloud computing is characterized by on-demand self-services, ubiquitous network


accesses, resource pooling, elasticity, and measured services. The aforementioned
characteristics of cloud computing make it a striking candidate for businesses,
organizations, and individual users for adoption. However, the benefits of low-cost,
negligible management (from a users perspective), and greater flexibility come with
increased security concerns. Security is one of the most crucial aspects among those
prohibiting the wide-spread adoption of cloudcomputing. The off-site data storage
cloud utility requires users to move data incloud’s virtualized and shared environment
that may result in various security concerns. The data outsourced to a public cloud
must be secured. Unauthorized data access by other users and processes (whether
accidental or deliberate) mustbe prevented. As discussed above, any weak entity can
put the whole cloud at risk. In such a scenario, the security mechanism must
substantially increase an attacker’s effort to retrieve a reasonable amount of data even
after a successful intrusion in the cloud.
.

1.1 OBJECTIVES

In this paper, we propose Division and Replication of Data in the Cloud for Optimal
Performance and Security (DROPS) that collectively approaches the security and
performance issues. Outsourcing data to a third-party administrative control, as is done
in cloud computing, gives rise to security concerns. The data compromise may occur due
to attacks by other users and nodes within the cloud. Therefore, high security measures
are required to protect data within the cloud. However, the employed security strategy
must also take into account the optimization of the data retrieval time. The objective of
the project is to provide the user data’s from the cloud attackers or third party
users. To overcome this we use Division and Replication of Data in the Cloud for Optimal
Performance and Security (DROPS) scheme in the proposed system to provide security

9
1.2 SCOPE OF THE PROJECT

The scope of our project is to provide security to the user data’s in


the cloud storage. For that we introduce Division and Replication of
Data in the Cloud for Optimal Performance and Security (DROPS)
that collectively approaches the security and performance issues.
The proposed schemes fragment the uploaded files and store a
single fragmented data over the cloud nodes. Each of the nodes
stores only a single fragment of a particular data file. So even in
case of a successful attack, no meaningful information is revealed to
the attacker. So attackers can’t do anything with the single
fragmented file.

1.3 EXISTING SYSTEM

The security issue is main thing for the users because data compromise may occur due to
attacks by other users and nodes within the cloud. The data will be loss because of
security issues. Therefore, high security measures are required to protect data within the
cloud. There is no key generation in the existing system. There is no file fragmentation
and also maintaining full file copies in the storage. In this any unauthorized users can
stole the data’s of the users. There is no security in this because any unauthorized users
can stole the data’s in this technique. The data will be loss because of security issues.
Therefore, high security measures are required to protect data within the cloud.

1.4 PROPOSED SYSTEM:

In this paper, our proposed approach consists of Division and Replication of Data in the
Cloud for Optimal Performance and Security (DROPS) that collectively approaches the
security and performance issues. We divide a file into fragments, and replicate the
fragmented data over the cloud nodes. Each of the nodes stores only a single fragment of a
particular data file. The proposed DROPS scheme ensures that even in the case of a
successful attack, no meaningful information is revealed to the attacker. We do not rely on
traditional cryptographic techniques for data security. The non-cryptographic nature of the
proposed scheme makes it faster to perform the required operations (placement and
retrieval) on the data. We ensure a controlled replication of the file fragments, where each
10
of the fragments is replicated only once for the purpose of improved security.

11
1.5 ADVANTAGES IN PROPOSED SYSTEM:

 Data’s will be highly securable.


 Each of the fragments is replicated only once for the purpose of improved security.
 No meaningful information is revealed to the third party user

CHAPTER 2

LITERATURE SURVEY:

1) TITLE : Energy-Efficient Data Replication in Cloud Computing Datacenters


AUTHOR : D. Boru, D. Kliazovich, F. Granelli, P. Bouvry, and A. Y. Zomaya
YEAR : 2013.

DESCRIPTION
Cloud computing is an emerging paradigm that provides computing resources as a
service over a network. Communication resources often become a bottleneck in service
provisioning for many cloud applications. Therefore, data replication, which brings data (e.g.,
databases) closer to data consumers (e.g., cloud applications), is seen as a promising solution.
It allows minimizing network delays and bandwidth usage. In this paper we study data
replication in cloud computing data centers. Unlike other approaches available in the
literature, we consider both energy efficiency and bandwidth consumption of the system, in
addition to the improved Quality of Service (QoS) as a result of the reduced communication
delays. The evaluation results obtained during extensive simulations help to unveil
performance and energy efficiency tradeoffs and guide the design of future data replication
solutions. It offers computing as a utility, sharing resources of scalable data centers. End
users can benefit from the convenience of accessing data and services globally, centrally
managed backups, high computational capacity, and flexible billing strategies. Cloud
computing is also ecologically friendly. It benefits from the efficient utilization of servers,
data center power planning, large scale virtualization, and optimized software stacks.

12
2) TITLE : Dike: Virtualization-aware Access Control for Multitenant Filesystems
AUTHOR : G. Kappes, A. Hatzieleftheriou, and S. V. Anastasiadis
YEAR 2013

DESCRIPTION

In a virtualization environment that serves multiple customers (or tenants), storage


consolidation at the file system level is desirable because it enables data sharing,
administration efficiency, and performance optimization. Today the scalable deployment of
file systems in such environments is challenging due to intermediate translation layers
required for purposes of networked file access or identity management. First we analyze the
security requirements in multitenant file systems. Then we introduce the Dike authorization
architecture, which combines native access control with tenant namespace isolation that is
backwards compatible to object-based file systems. We experimentally evaluate a prototype
implementation that we developed, and show that our solution incurs limited added
performance overhead. Cloud infrastructures are increasingly used for a broad range of
computational needs in private and public organizations. We call tenant an independent
organization that is customer of the networked services offered by a cloud provider. Access
control over the resources of a multitenant environment is a challenging problem because of
the enormous number of end users involved and the required isolation of the security
administration across different organizations.

13
3) TITLE :On the Optimal Placement of Secure Data Objects over
Internet AUTHOR : M. Tu, P. Li, Q. Ma, I-L. Yen, and F. B. Bastani
YEAR 2005

DESCRIPTION

Secret sharing algorithms have been used for intrusion tolerance, which ensure the
confidentiality, integrity and availability of critical information. However, dynamically
changing the number of shares in secret sharing schemes can be costly. To achieve
performance goals in data accesses, secret sharing can be combined with dynamic replication
in a distributed system with varying client access patterns. In this paper, we investigate the
problem of optimal allocation of secure data objects that are secret shared and possibly
replicated. The system topology we consider consists of two layers. In the upper layer,
multiple clusters form a network topology that can be represented by a general graph. The
nodes within each cluster also have a topology represented by a general graph. We
decompose the share replica allocation problem into two sub-problems, the resident set
problem which allocates a subset of shares to clusters, and the -intra-cluster allocation
problem which determines the number of share replicas to be allocated and their placements.
We develop two different heuristic algorithms for the two sub-problems. The algorithm for
the optimal resident set problem has a time complexity of O (n2). An O (n3) algorithm is
presented for the intra-cluster allocation problem.

14
4) TITLE ::Cloud Hooks: Security and Privacy Issues in Cloud Computing
AUTHOR :W. A. Jansen
YEAR :2011.

DESCRIPTION

In meteorology, the most destructive extratropical cyclones evolve with the formation
of a bent-back front and cloud head separated from the main polar-front, creating a hook that
completely encircles a pocket of warm air with colder air. The most damaging winds occur
near the tip of the hook. The cloud hook formation provides a useful analogy for cloud
computing, in which the most acute obstacles with outsourced services (i.e., the cloud hook)
are security and privacy issues. This paper identifies key issues, which are believed to have
long-term significance in cloud computing security and privacy, based on documented
problems and exhibited weaknesses. Cloud computing has been defined by NIST as a model
for enabling convenient, on-demand network access to a shared pool of configurable
computing resources that can be rapidly provisioned and released with minimal management
effort or service provider interaction. Cloud computing can be considered a new computing
paradigm with implications for greater flexibility and availability at lower cost. Because of
this, cloud computing has been receiving a good deal of attention lately.

15
5) TITLE : On the Characterization of the Structural Robustness of Data Center
Networks AUTHOR : K. Bilal, M. Manzano, S. U. Khan, E. Calle, K. Li, and A.Zomaya
YEAR : 2013.

DESCRIPTION

Data centers being an architectural and functional block of cloud computing are
integral to the Information and Communication Technology (ICT) sector. Cloud computing is
rigorously utilized by various domains, such as agriculture, nuclear science, smart grids,
healthcare, and search engines for research, data storage, and analysis. A Data Center
Network (DCN) constitutes the communicational backbone of a data center, ascertaining the
performance boundaries for cloud infrastructure. The DCN needs to be robust to failures and
uncertainties to deliver the required Quality-of-Service (QoS) level and satisfy service-level
agreement (SLA). In this paper, we analyze robustness of the state-of-the-art DCNs. Our
major contributions are: 1) we present multilayered graph modeling of various DCNs; 2) we
study the classical robustness metrics considering various failure scenarios to perform a
comparative analysis; 3) we present the inadequacy of the classical network robustness
metrics to appropriately evaluate the DCN robustness; and 4) we propose new procedures to
quantify the DCN robustness. Currently, there is no detailed study available centering the
DCN robustness. Therefore, we believe that this study will lay a firm foundation for the
future DCN robustness research.

16
6) TITLE : A User Identity Management Protocol Using Efficient Dynamic Credentials
AUTHOR : Sheetal S. Dharwadkar1, Rashmi M. Jogdand2
YEAR : 2014.

DESCRIPTION

Today mobile devices make use of the services provided by the newly emerging
technology Mobile Cloud Computing (MCC)to overcome the challenges of resource
limitations such as, battery life, storage, computation power and bandwidth. Though this new
technology is very flexible to use but however, the mobile devices are facing many
challenges related to security. The legitimate users prove their identity to cloud using digital
credentials such as passwords and digital certificate. As the technology has become very
transparent adversaries may hack the valuable credentials of the user without the knowledge
of legitimate user. The attackers may draw the services from cloud using the user’s
credentials and fool the cloud. The users will not come to know of this theft until some
disaster has been done by the hacker. This system model proposes an light weight algorithm
which reduces the burden of processing on mobile device as all computation are carried on
trusted entity and it also improves the security of users Credentials by updating it
dynamically based on the user and cloud communication.

17
7) TITLE : Selecting the right data distribution scheme for a survivable storage system
AUTHOR : J. J. Wylie, M. Bakkaloglu, V. Pandurangan, M. W. Bigrigg, S. Oguz, K.
Tew, C. Williams, G. R. Ganger, and P. K. Khosla
YEAR : 2001.

DESCRIPTION

Survivable storage system design has become a popular research topic. This paper
tackles the difficult problem of reasoning about the engineering trade-o_s inherent in data
distribution scheme selection. The choice of an encoding algorithm and its parameters
positions a system at a particular point in a complex trade-o_ space between performance,
availability, and security. We demonstrate that no choice is right for all systems, and we
present an approach to codifying and visualizing this trade-o_ space. Using this approach, we
explore the sensitivity of the space to system characteristics, workload, and desired levels of
security and availability.

18
8) TITLE : Data Security Issues in Cloud Computing
AUTHOR : Neha Rawat*, Ratnesh Srivastava, Binay Kumar Pandey, Poonam Rawat,
Shikha Singh and Awantika Sharma
YEAR : 2014.

DESCRIPTION

Cloud computing is an enticing technology which is a combination of many existing


technologies such as parallel computing, grid computing, distributed computing and others. It
offers services like data storage, computing power, shared resources at low cost to its users
over internet at anytime from anywhere. Costing model on cloud computing is based on pay
as you go method, hence companies are saving millions by adopting this technology. As more
and more individuals and companies are relying on cloud for their data, the question arises
here is how secure cloud environment is? Though cloud computing has many advantages, it
also have some security problems. Data security issue is the major concern in cloud
computing because after shifting clients data to cloud, service provider is responsible for the
security and privacy of data. Hence data security issue is the major challenge which is
hampering the growth of cloud computing and therefore it is needed to be resolved in order to
make it widely acceptable and to accelerate its growth. In this paper data security problems of
cloud are discussed. Here we presented an overview of cloud computing, its benefits and data
security challenges in cloud computing model.

19
9) TITLE : Non-replicated Dynamic Data Allocation in Distributed Database Systems
AUTHOR : Arjan Singh† and K.S. Kahlon
YEAR : 2009.

DESCRIPTION

Allocation of data or fragments in distributed database is a critical design issue and requires
the most effort. It has the greater impact on the quality of the final solution and hence the
operational efficiency of the system. Performance of the distributed database system is
heavily dependent on allocation of data among the different sites over the network. The static
allocation provides only the limited response to the change in workload. So, choosing an
appropriate technique for allocation in the distributed database system is an important design
issue. In this paper, a new dynamic data allocation algorithm for non-replicated distributed
database system has been proposed. The proposed algorithm reallocates data with respect to
the changing data access patterns with time constraint. This algorithm will decrease the
movement of data over the network and also improve the overall performance of the system.

20
10) TITLE : Towards Secure Communication for Highly Scalable Mobile
Applications
in Cloud Computing Systems
AUTHOR : Piotr K. Tysowski and M. Anwarul Hasan
YEAR : 2014.

DESCRIPTION

Cloud computing is a distributed computing model in which clients pay for computing
and data storage resources of a third-party cloud provider. Cloud applications can scale up or
down almost instantly to meet real-time computational demands. Despite the economic
advantages of a pay-on-demand business model, security remains a paramount concern.
Cloud applications by nature must store and retain access to a potentially large volume of
data. Yet, the consensus among IT organizations is that the cloud provider generally cannot
be implicitly trusted, and thus this data should ideally be transmitted and stored in encrypted
form. Major challenges exist concerning the aspects of the generation, distribution, and usage
of encryption keys in cloud systems, such as the safe location of keys, and the presence of
users that tend to connect to contemporary cloud applications using resource-constrained
mobile devices in extremely large numbers simultaneously; these characteristics lead to
difficulties in achieving efficient and highly scalable key management. The underlying
schemes include identity-based encryption, multi-level key management, and data re-
encryption. Each model varies in how user keys are stored, exchanged, re-generated, and
used; each is analyzed and compared in terms of storage and communication requirements,
assessing the impact on tight resource constraints in a mobile device environment; these
constraints include costly wireless data usage, limited mobile processing power, and limited
battery life.

21
CHAPTER 3

REQUIREMENTS

3.1 HARDWARE REQUIREMENTS

• PROCESSOR : PENTIUM IV 2.6 GHz, Intel


Core 2 Duo.
• RAM : 512 MB DD RAM
• MONITOR : 15” COLOR
• HARD DISK : 40 GB

3.2 SOFTWARE REQUIREMENTS

• Front End : J2EE.


• Back End : MY SQL 5.5
• Operating System : Windows 07
• IDE : Eclipse

SYSTEM TECHNIQUES

We develop a scheme for outsourced data that takes into account both the security and
performance. The proposed scheme fragments and replicates the data file over cloud nodes.
The division of a file into fragments is performed based on a given user criteria such that the
individual fragments do not contain any meaningful information. Once the file is split into
fragments, the DROPS methodology selects the cloud nodes for fragment placement. The
selection is made by keeping an equal focus on both security and performance in terms of the
access time. We choose the nodes that are most central to the cloud network to provide better
access time. The DROPS methodology uses the concept of centrality to reduce access time.
The proposed DROPS scheme ensures that even in the case of a successful attack, no
meaningful information is revealed to the attacker.

22
INPUT EXPECTED OUTPUT:

 User Interface Design

• Input : Cloud User Login name and Password

• Output : If Valid cloud user Open the user window otherwise error
page.

 User Upload

• Input : After login valid cloud user selecting constrains.

• Output : Send to Cloud Data base Successfully.

 Fragmentation

• Input : Given file is uploaded to server

• Output : Splitted into fragments

 T-Coloring

• Input : Splitted fragments stored in cloud node

• Output : Using T-coloring the nodes are placed in distance

 Replication

• Input : Replicated file is stored in new VM with key generation.

• Output : Using key user can download the data’s

23
CHAPTER 4

ANALYSIS & DESIGN


4.2 SYSTEM ARCHITECTURE

EXPLANATION:

We develop a scheme for outsourced data that takes into account both
the security and performance. The proposed scheme fragments and
replicates the data file over cloud nodes. The division of a file into
fragments is performed based on a given user criteria such that the
individual fragments do not contain any meaningful information.
Once the file is split into fragments, the DROPS methodology selects
the cloud nodes for fragment placement. The selection is made by
keeping an equal focus on both security and performance in terms of
the access time. We choose the nodes that aremost central to the
cloud network to provide better access time. The DROPS
methodology uses the concept of centrality to reduce access time.
The proposed DROPS scheme ensures that even in the case of a
successful attack, no meaningful information is revealed to the
24
attacker.

25
USECASE DIAGRAM

26
CLASS DIAGRAM

OBJECT DIAGRAM

27
STATE DIAGRAM

ACTIVITY DIAGRAM

28
SWQUENCE DIAGRAM

COLLABORATION DIAGRAM

4.10

29
DATA FLOW DIAGRAM

LEVEL 0

LEVEL 1

30
2.2.1 MODULES

1. USER INTERFACE DESIGN


2. USER UPLOAD
3. FRAGMENTATION
4. T-COLORING
5. REPLICATION

6. User Interface Design:

This is the first module of our project. The important role for the cloud user is to move
login window to cloud user window. This module has created for the security purpose. In this
login page we have to enter login user id and password. It will check username and password
is match or not (valid user id and valid password). If we enter any invalid username or
password we can’t enter into login window to user window it will shows error message. So
we are preventing from unauthorized user entering into the login window to user window. It
will provide a good security for our project. So server contain user id and password server
also check the authentication of the user. It well improves the security and preventing from
unauthorized user enters into the network. In our project we are using JSP for creating design.
Here we validate the login user and server authentication.

 User Upload:

This is the module for uploading consumer’s files or documents into the virtual machines.
These constraints serve a dual purpose as they can introduce high-level policies which are the
flexible file access policies and assist in administration tasks. Reduce Dist enforces the high-
level policy of clustering VMs of the same user on hosts that may not be far apart in terms of
network hops. In this we are using fast recovery algorithm for uploading documents or files.
When using this algorithm we can upload and retrieve the files fastly. So when consumer
uploads any file of particular size the file will be uploaded into first virtual machine of that
login user.

31
 Fragmentation:

This is the third module of our project, in this we have to fragments user files into
pieces and replicates them at strategic locations within the cloud. How we fragment the file
means after uploading any data or files the files are splitted into fragments. The division of a
file into fragments is performed based on a given user criteria such that the individual
fragments do not contain any Meaningful information. Each of the cloud nodes (we use the
term node to represent computing, storage, physical, and virtual machines) contains a distinct
fragment to increase the data security. Only a single fragment is stored in the cloud nodes. So
successful attack on a single node must not reveal the locations of other fragments within the
cloud.

 T-Coloring:

In this module to keep an attacker uncertain about the locations of the file fragments
and to further improve the security, we select the nodes in a manner that they are not adjacent
and are at certain distance from each other. The node separation is ensured by the means of
the T-coloring. The nodes storing the fragments are separated with certain distance by means
of graph T-coloring to prohibit an attacker of guessing the locations of the fragments. T-
coloring prohibits storing the fragment in neighborhood of a node storing a fragment,
resulting in the elimination of a number of nodes to be used for storage. In such a case, only
for the remaining fragments, the nodes that are not holding any fragment are selected for
storage randomly. To improve data retrieval time, the nodes are selected based on the
centrality measures in which shortest paths from the nodes that ensure an improved access
time. We choose the nodes that are most central to the cloud network to provide better access
time. The DROPS methodology uses the concept of centrality to reduce access time.

 Replication:
In this module we have to replicate the data’s over the cloud nodes for the users. In
this the replicated data’s are stored in virtual machines that are created at the time of file
uploading and a secret key is generated for the files that are stored in that virtual machines.
So users can download the files by using the particular key that is generated at the time of
replication. To handle the download request from user, the cloud manager collects all the
fragments from the Nodes and re-assemble them into a single file. Afterwards, the file is sent
to the user.
32
MODULE DIAGRAMS:

 User Interface Design

Welcome
Page
Cloud
Appplicat
valid
username
Request Validate
Login Database
password Server

Invalid
Registrat
ion
Page

Cloud
User Random Key Generation Server

33
 User Upload

Admin Login

Server

Admin Window Cloud User


Details

Cloud User Login

Data’s for uploading

Cloud
Uploaded files storage

34
 Fragmentation

Cloud User Login

Cloud
Data’s for uploading
storage

File Upload

Splitting of data’s

Fragmented Files

35
 T-Coloring

Splitting
Users
Upload Fragment files
files
Secret Key Generation for
each file

Cloud Storage Nodes

Single
Fragmented data
In cloud nodes

T-Coloring

36
 Replication

Cloud Storage Nodes Merge file

Original file

Give secret key

Download data

37
CHAPTER 5

IMPLEMENTATION & TESTING

5.1 SAMPLE CODE

Register:

register.jsp:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Designed by w w w . t e m p l a t e m o . c o m -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<form name="myForm" action="Register" method="post">
<table>
<tr><td style="color: aqua;">User name</td><td><input type="text" id="fname"
name="user" onblur="return ValidateFirstName()"></input></td></tr>
<tr><td style="color: aqua;">Password</td><td><input type="password"
id="pass" name="pass" onblur="return Validatepass()"></input></td></tr>
<tr><td style="color: aqua;">Confirm Password</td><td><input type="password"
id="cpass" name="cpass" onblur="return Validatecpass()"></input></td></tr>
<tr><td style="color: aqua;">Mail Id</td><td><input type="text" name="mail"
id="" onblur="return ValidateEmail()"></input></td></tr>
<tr><td style="color: aqua;">Gender</td><td>male<input type="radio"
name="sex" value="male"></input>female<input type="radio" name="sex"
value="female"></input></td></tr>
<tr><td style="color: aqua;">DOB</td><td><select name="date">
<option value="Day">Day</option>
<%for(int i=1;i<=31;i++){ %>
<option value="<%=i%>"><%=i%></option>
<%} %>
</select>
<select name="month">
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
38
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
<select name="year">
<option value="Year">Year</option>
<%for(int i=1970;i<=2015;i++){ %>
<option value="<%=i%>"><%=i%></option>
<%} %>
</select></td></tr>
<tr><td style="color: aqua;">Phone No</td><td><input type="text" name="no"
id="con" onblur="return ValidateContact()"></input></td></tr>
<tr><td style="color: aqua;;">Address</td><td><textarea rows="5" cols="15"
name="address" id="addr" onblur="return ValidateAddress()"></textarea>
<tr><td align="right"><input type="submit" value="Register"></input></td><td
align="center"><input type="reset" value="Reset"></input></td></tr>
</table>
</form>
</body>
</html>

RegistrationServlet.java

package com.drops.servlet;

import java.io.File;

import java.io.IOException;

import java.util.Random;

import javax.servlet.ServletException;

import javax.servlet.annotation.WebServlet;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import javax.servlet.http.HttpSession;

import com.drops.beanclass.RegisterBean;
39
import com.drops.interfaces.SqlMethodImplementation;

@WebServlet("/Register")

public class Register extends HttpServlet {

private static final long serialVersionUID = 1L;

public Register() {

super();

protected void doGet(HttpServletRequest request, HttpServletResponse


response) throws ServletException, IOException {

protected void doPost(HttpServletRequest request,


HttpServletResponse response) throws ServletException, IOException {

String user=request.getParameter("user");

String pass=request.getParameter("pass");

String cpass=request.getParameter("cpass");

String mail=request.getParameter("mail");

String sex=request.getParameter("sex");

String date=request.getParameter("date");

String month=request.getParameter("month");

String year=request.getParameter("year");

String phone=request.getParameter("no");

String add=request.getParameter("address");

String dateofbirth=date+"/"+month+"/"+year;

Random r=new Random();

int secret=r.nextInt(100000);

40
String skey=""+secret;

RegisterBean rb=new RegisterBean();

rb.setUsername(user);

rb.setPass(pass);

rb.setCpass(cpass);

rb.setId(mail);

rb.setGender(sex);

rb.setDob(dateofbirth);

rb.setPhone(phone);

rb.setAddress(add);

rb.setSkey(skey);

String drive=request.getRealPath("/");

drive=drive.substring(0,drive.indexOf("."));

String path=drive+"drops\\WebContent\\userfile\\"+user;

File file = new File(path);

file=new File("D:\\workspace\\new1\\sample\\WebContent\\
CloudServerDatas\\ Resource_Broker1\\"+user);

System.out.println("file path and user\t"+file);

if(file.mkdir()){

System.out.println("Folder created");

SqlMethodImplementation
implementation=SqlMethodImplementation.getImplementation();

int status=implementation.register(rb);

41
if(status>0){

HttpSession session=request.getSession();

session.setAttribute("secret", skey);

request.getRequestDispatcher("secretkeydisplay.jsp").forward(request,
response);

else{

request.getRequestDispatcher("error.jsp").forward(request, response);

} }

user-login.jsp:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"


pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Metamorphosis Design Free Css Templates</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="styles.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="Login_Fields_Validation.js">

function validateForm()

42
var x=document.forms["myForm"]["username"].value;

if(x==null || x==""){

alert("first name is missed out");

return false;

}
}
</script>

</head>
<body>
<div id="right">
<h1 style="color: yellow;">LOGIN</h1>
<form name="myForm" action="Login" method="post">
<table>
<tr><td style="color: aqua;">User Name</td><td><input type="text"
name="name" id="user" onblur="return validatelogin()"></input></td></tr>
<tr><td style="color: aqua;">Password</td><td><input type="password"
name="pass" id="passw" onblur="return validatepass()"></input></td></tr>
<tr><td style="color: aqua;">Secret Key</td><td><input type="password"
name="skey" id="key" onblur="return validatekey()"></input></td></tr>
<tr align="center"><td ></td><td><input type="submit" value="Login"
align="middle"></input></td></tr>
<tr align="right"><td align="right"><a style="color: yellow;"
href="register.jsp">New User Click Here</a></td></tr>
</table>
</form>
</div>
</body>
</html>

Login.java:

package com.drops.servlet;

import java.io.IOException;

43
import javax.servlet.ServletException;

import javax.servlet.annotation.WebServlet;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import javax.servlet.http.HttpSession;

import com.drops.beanclass.RegisterBean;

import com.drops.interfaces.SqlMethodImplementation;

@WebServlet("/Login")

public class Login extends HttpServlet {

private static final long serialVersionUID = 1L;

public static String user;

public Login() {

super();

protected void doGet(HttpServletRequest request, HttpServletResponse


response) throws ServletException, IOException {

// TODO Auto-generated method stub

//response.getWriter().append("Served at:
").append(request.getContextPath());

protected void doPost(HttpServletRequest request, HttpServletResponse


response) throws ServletException, IOException {

String user=request.getParameter("name");

String pass=request.getParameter("pass");

44
String keyValue=request.getParameter("skey");

System.out.println(keyValue);

RegisterBean rb=new RegisterBean();

rb.setUsername(user);

rb.setPass(pass);

rb.setSkey(keyValue);

SqlMethodImplementation
implementation=SqlMethodImplementation.getImplementation();

boolean b=implementation.login(rb);

if(b==true){

HttpSession session=request.getSession();

session.setAttribute("username", user);

request.getRequestDispatcher("Joinus.jsp").forward(request, response);

else{ request.getRequestDispatcher("error.jsp").forward(reque

st, response);

upload.jsp:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
45
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Metamorphosis Design Free Css Templates</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<%
String username=(String)session.getAttribute("username");
%>

<h2 style="color: yellow;" align="center">Welcome,<%=username%></h2>


<body>

<div id="main">
<!-- header begins -->
<div id="header">
<div id="logo"><a href="#">metamorph_nightsky</a><h2><a
href="http://www.metamorphozis.com/" id="metamorph">Design by Metamorphosis
Design</a></h2></div>
<div id="buttons">
<div ><a href="index.jsp" class="but_1" title="">Home</a></div>
<div ><a href="upload.jsp" class="but_2" title="">upload</a></div>
<div><a href="#" class="but_3" title="">Gallery</a></div>
<div><a href="#" class="but_4" title="">Contact Us</a></div>
<div ><a href="logout.jsp" class="but_5" title="">LogOut</a></div>
</div>
</div>
<!-- header ends -->
<!-- content begins -->
<div id="content">
<div id="right">
<h1 style="color: yellow;">UPLOAD FILE</h1>
46
<form action="UploadFile" method="post" enctype="multipart/form-data">
<table>
<tr><td style="color: aqua;">Uplaod your file</td><td><input type="file"
name="name"></input></td></tr>

<tr><td><input type="submit" value="Upload"></input></td></tr>


</table>
</form>
</div>
<div id="left">
<div class="left_top"></div>
<div class="left_s">
<h2>Metamorphosis Design</h2>
<div class="col_l">
<img src="images/img1.jpg" width="124" height="94" class="img" alt="" />
<span>Aenean tincidunt magna tortor.</span><br />
Donec lectus sem, sagittis in volutpat eu, vulputate adipiscing sapien. Praesent
et libero turpis. Donec consectetur est dui. Nulla facilisi. Fusce ac arcu porta eros tempor
sodales id ut est. Quisque nec eros vel enim laoreet adipiscing sed nec massa. Aliquam metus
nisi, mattis non tincidunt et, facilisis vel dolor. Donec venenatis dictum adipiscing. Curabitur
accumsan elit vel... <br />
<div class="read"><a href="#">read more</a></div>
</div><br />
<div class="col_l">
<img src="images/img2.jpg" width="124" height="95" class="img" alt="" />
<span>Sed sit amet augue nisi. </span><br />
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac
turpis egestas. Maecenas id mauris eget mauris consectetur hendrerit. Mauris tempus risus
nec eros porttitor at gravida magna dignissim. Praesent lobortis sodales dapibus. Sed et lacus
fermentum augue imperdiet egestas. Suspendisse faucibus elementum tortor sed malesuada.
Nulla laoreet...<br />
<div class="read"><a href="#">read more</a></div>
</div>

47
<div style="clear: both"><img src="images/spaser.gif" alt="" width="1"
height="1" /></div><br />
<h2>Free Website Templates</h2>
<div class="text">
<span>Fusce ac arcu porta eros tempor sodales id ut est. </span><br />
Quisque nec eros vel enim laoreet adipiscing sed nec massa. Aliquam metus nisi,
mattis non tincidunt et, facilisis vel dolor. Donec venenatis dictum adipiscing. Curabitur
accumsan elit vel metus rutrum quis euismod leo vehicula. Suspendisse vel ligula ut felis
adipiscing molestie. Suspendisse facilisis scelerisque sagittis. Proin nulla nibh, gravida
suscipit <br />
<div class="read"><a href="#">read more</a></div>
</div>
</div>
<div class="left_bot"></div>
</div>
<div style="clear: both"><img src="images/spaser.gif" alt="" width="1" height="1"
/></div>
</div>
<!-- content ends -->
<!-- footer begins -->
<div id="footer">
Copyright 2009. Designed by <a href="http://www.metamorphozis.com/" title="Website
Templates">Website Templates</a><br />
<a href="#">Privacy Policy</a> | <a href="#">Terms of Use</a> | <a
href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0
Transitional"><abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a> |
<a href="http://jigsaw.w3.org/css-validator/check/referer" title="This page validates as
CSS"><abbr title="Cascading Style Sheets">CSS</abbr></a></div>
<!-- footer ends -->
</div>
</body>
</html>

48
UploadFile.java:

package com.drops.servlet;

import java.io.File;

import java.io.FileInputStream;

import java.io.IOException;

import java.io.InputStream;

import java.util.ArrayList;

import java.util.Date;

import java.util.Random;

import javax.servlet.ServletException;

import javax.servlet.annotation.WebServlet;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import javax.servlet.http.HttpSession;

import com.drops.beanclass.UploadBean;

import com.drops.interfaces.SqlMethodImplementation;

import com.oreilly.servlet.multipart.FilePart;

import com.oreilly.servlet.multipart.MultipartParser;

import com.oreilly.servlet.multipart.ParamPart;

import com.oreilly.servlet.multipart.Part;

@WebServlet("/UploadFile")

public class UploadFile extends HttpServlet {

49
private static final long serialVersionUID = 1L;

public UploadFile() {

super();

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws


ServletException, IOException {

protected void doPost(HttpServletRequest request, HttpServletResponse response)


throws ServletException, IOException {

Part part=null;

ParamPart paramPart=null;

FilePart filePart=null;

String fileName=null;

String filePath=null;

String fileType=null;

File file=null;

double fileSize = 0;

HttpSession session=request.getSession();

String userName=(String) session.getAttribute("username");

System.out.println("user\t"+userName);

MultipartParser parser=new MultipartParser(request, 99999999);

String StoringPath=request.getSession().getServletContext().getRealPath("/");

int a=StoringPath.indexOf('.');

String path=StoringPath.substring(0, a); filePath=path+"drops\\WebContent\\

userfile\\"+userName+"\\";

50
UploadBean ub=new UploadBean();

while((part=parser.readNextPart())!=null)

{ if(part.isFile()){

filePart=(FilePart) part;

fileName=filePart.getFileName();

fileType=filePart.getContentType();

filePath=filePath+fileName;

System.out.println("file path\t"+filePath);

file=new File(filePath);

fileSize=filePart.writeTo(file);

System.out.println("file size\t"+fileSize);

FileInputStream fis=new FileInputStream(file);

ub.setUploadContent(fis);

else if (part.isParam()) {

paramPart=(ParamPart) part;

String tagname=paramPart.getName();

System.out.println(tagname+"tagname");

String tagValue=paramPart.getStringValue();

System.out.println("tag value"+tagValue);

Date d= new Date();

String date=d.toString();

51
Random r=new Random();

int fileKey=r.nextInt(100000);

String displayKey=""+fileKey;

ArrayList<Object> al=new

ArrayList<>(); System.out.println(date);

al.add(userName);

al.add(fileName);

al.add(fileType);

al.add(fileSize);

al.add(filePath);

al.add(date);

al.add(displayKey);

SqlMethodImplementation
implementation=SqlMethodImplementation.getImplementation();

int status=implementation.upload(al);

if(status>0){

HttpSession session2=request.getSession();

session2.setAttribute("filename", fileName);

HttpSession hs=request.getSession();

hs.setAttribute("filekey", displayKey);

request.getRequestDispatcher("split.jsp").forward(request, response);

else{

request.getRequestDispatcher("error.jsp").forward(request, response);
}

52
}

Split.jsp:

<%@page import="java.io.IOException"%>

<%@page import="java.io.FileInputStream"%>

<%@page import="java.io.File"%>

<%@page import="java.io.FileOutputStream"%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"

pageEncoding="ISO-8859-1"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<title>Metamorphosis Design Free Css Templates</title>

<meta name="keywords" content="" />

<meta name="description" content="" />

<link href="styles.css" rel="stylesheet" type="text/css" />

</head>
<%
String username=(String)session.getAttribute("username");
%>

<h2 style="color: yellow;" align="center">Welcome,<%=username%></h2>


<body>
<%

String AbsolutePath = new File("").getAbsolutePath();


53
String path=request.getSession().getServletContext().getRealPath("/");

int a=path.indexOf('.');

String filepath=path.substring(0,a);

String filename=(String)session.getAttribute("filename");

username=(String)session.getAttribute("username");

String storingPath=filepath+"drops\\WebContent\\userfile\\"+username+"\\"+filename;

String splitPath=filepath+"drops\\WebContent\\splitfile\\"+filename;

String splitPath1=filepath+"drops\\WebContent\\splitfile\\Node1\\"+filename;

String splitPath2=filepath+"drops\\WebContent\\splitfile\\Node2\\"+filename;

String splitPath3=filepath+"drops\\WebContent\\splitfile\\Node3\\"+filename;

String splitPath4=filepath+"drops\\WebContent\\splitfile\\Node4\\"+filename;

String splitPath5=filepath+"drops\\WebContent\\splitfile\\Node5\\"+filename;

String splitPath6=filepath+"drops\\WebContent\\splitfile\\Node6\\"+filename;

String splitPath7=filepath+"drops\\WebContent\\splitfile\\Node7\\"+filename;

String splitPath8=filepath+"drops\\WebContent\\splitfile\\Node8\\"+filename;

String splitPath9=filepath+"drops\\WebContent\\splitfile\\Node9\\"+filename;

String splitPath10=filepath+"drops\\WebContent\\splitfile\\Node10\\"+filename;

System.out.print("pathh in split"+storingPath);

long numSplits = 10;

long sourceSize = splitPath.length();

long bytesPerSplit = sourceSize/numSplits ;

long remainingBytes = sourceSize % numSplits;

int PART_SIZE = 100*1024;

54
File inputFile = new File(storingPath);

long size = 0;

if(inputFile.exists())

double len=inputFile.length();

size=(long) (len/1024);

String filesize=""+size;

System.out.println("file size is : "+size+ " KB");

FileInputStream inputStream;

String newFileName4;

String newFileName1;

String newFileName2;

String newFileName3;

String newFileName5;

String newFileName6;

String newFileName7;

String newFileName8;

String newFileName9;

String newFileName10;

FileOutputStream filePart;

int fileSize = (int) inputFile.length();

System.out.println("file size"+fileSize);

int nChunks = 1, read = 0, readLength = PART_SIZE;

55
byte[] byteChunkPart;

try {

inputStream = new FileInputStream(inputFile);

while (fileSize > 0) {

if (fileSize <= 5)

{ readLength = fileSize;

byteChunkPart = new byte[readLength];

read = inputStream.read(byteChunkPart, 0, readLength);

fileSize -= read;

assert (read == byteChunkPart.length);

nChunks++;

for(int destIx=1; destIx <= numSplits; destIx++)

{ newFileName1 = splitPath1 + ".part"

+ destIx;

newFileName2 = splitPath2 + ".part"

+ destIx;

newFileName3 = splitPath3 + ".part"

+ destIx;

newFileName4 = splitPath4 + ".part"

+ destIx;

newFileName5 = splitPath5 + ".part"

+ destIx;

newFileName6 = splitPath6 + ".part"

56
+ destIx;

newFileName7 = splitPath7 + ".part"

+ destIx;

newFileName8 = splitPath8 + ".part"

+ destIx;

newFileName9 = splitPath9 + ".part"

+ destIx;

newFileName10 = splitPath10 + ".part"

+ destIx;

if(destIx==1){

filePart = new FileOutputStream(new File(newFileName1));

filePart.write(byteChunkPart);

filePart.flush();

filePart.close();

if(destIx==2){

filePart = new FileOutputStream(new File(newFileName2));

filePart.write(byteChunkPart);

filePart.flush();

filePart.close();

if(destIx==3){

57
filePart = new FileOutputStream(new File(newFileName3));

filePart.write(byteChunkPart);

filePart.flush();

filePart.close();

if(destIx==4){

filePart = new FileOutputStream(new File(newFileName4));

filePart.write(byteChunkPart);

filePart.flush();

filePart.close();

if(destIx==5){

filePart = new FileOutputStream(new File(newFileName5));

filePart.write(byteChunkPart);

filePart.flush();

filePart.close();

if(destIx==6){

filePart = new FileOutputStream(new File(newFileName6));

filePart.write(byteChunkPart);

filePart.flush();

filePart.close();

58
}

if(destIx==7){

filePart = new FileOutputStream(new File(newFileName7));

filePart.write(byteChunkPart);

filePart.flush();

filePart.close();

if(destIx==8){

filePart = new FileOutputStream(new File(newFileName8));

filePart.write(byteChunkPart);

filePart.flush();

filePart.close();

if(destIx==9){

filePart = new FileOutputStream(new File(newFileName9));

filePart.write(byteChunkPart);

filePart.flush();

filePart.close();

if(destIx==10){

filePart = new FileOutputStream(new File(newFileName10));

filePart.write(byteChunkPart);

filePart.flush();

filePart.close();

59
}

byteChunkPart = null;

filePart = null;

//out.print("Splitted");

System.out.println("splitted"+storingPath);

inputStream.close();

} catch (IOException exception) {

exception.printStackTrace();

%>

<div id="main">

<!-- header begins -->

<div id="header">

<div id="logo"><a href="#">metamorph_nightsky</a><h2><a


href="http://www.metamorphozis.com/" id="metamorph">Design by Metamorphosis
Design</a></h2></div>

<div id="buttons">

<div ><a href="index.jsp" class="but_1" title="">Home</a></div>

<div ><a href="upload.jsp" class="but_2" title="">upload</a></div>

<div><a href="fragment.jsp" class="but_3" title="">Fragment</a></div>

<div><a href="searchfile.jsp" class="but_4" title="">SearchFile</a></div>

<div ><a href="logout.jsp" class="but_5" title="">LogOut</a></div>

</div>

60
</div>

<!-- header ends -->

<!-- content begins -->

<div id="content">

<div id="right">

<h1 style="color: green;">File is Successfully Uploaded</h1>

<%

String filekey=(String)session.getAttribute("filekey");

%>

<h1 style="color: yellow;">Your key for file use is <%=filekey %></h1>

</div>

<div id="left">

<div class="left_top"></div>

<div class="left_s">

</div>

</body>

</html>

Fragment.jsp:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"


pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Metamorphosis Design Free Css Templates</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="styles.css" rel="stylesheet" type="text/css" />
61
</head>
<body>

<div id="main">
<!-- header begins -->
<div id="header">
<div id="logo"><a href="#">metamorph_nightsky</a><h2><a
href="http://www.metamorphozis.com/" id="metamorph">Design by Metamorphosis
Design</a></h2></div>
<div id="buttons">
<div ><a href="index.jsp" class="but_1" title="">Home</a></div>
<div ><a href="upload.jsp" class="but_2" title="">upload</a></div>
<div><a href="downloadoredit.jsp" class="but_3" title="">Download</a></div>
<div><a href="searchfile.jsp" class="but_4" title="">SearchFile</a></div>
<div ><a href="logout.jsp" class="but_5" title="">LogOut</a></div>
</div>
</div>
<!-- header ends -->
<!-- content begins -->
<div id="content">
<div id="right">
<h1 style="color: yellow;">Fragment the files</h1>
<form action="fragmentsuccess.jsp" method="" >

<%
String backColor = request.getParameter("COLOR");
if (backColor == null)
backColor = "skyblue";
%>
<BODY BGCOLOR="<%= backColor %>" >

</div>
</body>
</html>

admin.jsp:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"


pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

62
<title>Metamorphosis Design Free Css Templates</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="main">
<!-- header begins -->
<div id="header">
<div id="logo"><a href="#">metamorph_nightsky</a><h2><a
href="http://www.metamorphozis.com/" id="metamorph">Design by Metamorphosis
Design</a></h2></div>
<div id="buttons">
<div ><a href="index.jsp" class="but_1" title="">Home</a></div>
<div ><a href="login.jsp" class="but_2" title="">Login</a></div>s
<div><a href="#" class="but_3" title="">Gallery</a></div>
<div><a href="#" class="but_4" title="">About us</a></div>
<div ><a href="#" class="but_5" title="">Contact us</a></div>
</div>
</div>
<!-- header ends -->
<!-- content begins -->
<div id="content">
<div id="right">
<h1 style="color: yellow;">Admin LOGIN</h1>
<form action="Admin" method="post">
<table>
<tr><td style="color: aqua;">Admin Name</td><td><input type="text"
name="name"></input></td></tr>
<tr><td style="color: aqua;">Password</td><td><input type="password"
name="pass"></input></td></tr>
<tr><td><input type="submit" value="Login"></input></td></tr>
</table>
</form>
63
</div>
</div>
</body>
</html>

Admin.java:

package com.drops.servlet;

import java.io.IOException;

import javax.servlet.ServletException;

import javax.servlet.annotation.WebServlet;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

@WebServlet("/Admin")

public class Admin extends HttpServlet {

private static final long serialVersionUID = 1L;

public Admin() {

super();

protected void doGet(HttpServletRequest request, HttpServletResponse


response) throws ServletException, IOException {
response.getWriter().append("Served at: ").append(request.getContextPath());

protected void doPost(HttpServletRequest request, HttpServletResponse


response) throws ServletException, IOException {

doGet(request, response);

String name=request.getParameter("name");

64
String pass=request.getParameter("pass");

System.out.println(name);

System.out.println(pass);

if(name.equals("admin")&&pass.equals("admin")){

request.getRequestDispatcher("viewuser.jsp").forward(request,
response);

else{ request.getRequestDispatcher("error.jsp").forward

(request, response);

adminsearch.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"


pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/jquery.nivo.slider.js" type="text/javascript"></script>
<script type="text/javascript">

function userdetails(){

//alert("hi");
65
var user=document.getElementById("username").value;

if(user==""){

alert("type user name");


}

var xmlhttp;

var urls="search.jsp?ok="+user;

if(window.XMLHttpRequest){

xmlhttp=new XMLHttpRequest();
//alert("hello")
}
else{

xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}

xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4)
{
var some=xmlhttp.responseText;
//alert(some+"::::::::");
document.getElementById("avail").innerHTML=some;
}
}
xmlhttp.open("POST",urls,true);
xmlhttp.send();

66
}

</script>

</head>
<body>
<!-- <form action=""> -->
<table>
<tr><td>User Name</td><td><input type="text" name="user"
id="username"></input></td></tr>
<tr><td><input type="submit" value="submit" onclick="return
userdetails(this.value)"></input></td></tr>
</table>
<span id="avail"></span>
<!-- </form> -->
</body>
</html>

Search.jsp:

<%@page import="java.util.List"%>
<%@page import="java.util.Iterator"%>
<%@page import="com.drops.interfaces.SqlMethodImplementation"%>
<table border="10">
<tr align="right"><td align="center" style="color: black;">UserName </td><td
align="center" style="color: black;"> FileName </td><td align="center" style="color:
black;">FileType </td><td align="center" style="color: black;">FileSize</td></tr>
<%
String user=request.getParameter("ok");
SqlMethodImplementation implementation=SqlMethodImplementation.getImplementation();
List status=implementation.getUserDetails(user);
System.out.println("stst"+status);
if(!status.isEmpty()){

67
Iterator it=status.iterator();
while(it.hasNext()){
String username=(String)it.next();
String filename=(String)it.next();
String type=(String)it.next();
String size=(String)it.next();
%>
<tr><td style="color: black;" ><%=username %></td><td style="color: black;"><
%=filename %></td><td style="color: black;"><%=type %></td><td style="color: black;"><
%=size %></td>
<%
}
}
%>
</table>
</body>
</html>

Downloadfile.jsp
<%@page import="java.util.Iterator"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
68
ArrayList arrayList=(ArrayList)request.getSession().getAttribute("arrayvaleu");
System.out.println("^%%%%%%%%%%%%%"+arrayList);
Iterator iterator=arrayList.iterator();
while(iterator.hasNext())
{
String
username=iterator.next().toString();
String Filename=iterator.next().toString();
String type=iterator.next().toString();
}
%>
</body>
</html>

Download.java
package com.drops.servlet;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

@WebServlet("/download")
public class download extends HttpServlet {
private static final long serialVersionUID = 1L;

69
public download() {

70
super();
// TODO Auto-generated constructor stub
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
// TODO Auto-generated method stub

String s=request.getParameter("fname");
System.out.println(""+s);
// doPost(request, response);
doPost(request, response);
}
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// TODO Auto-generated method stub

try{

HttpSession session=request.getSession();
String user=(String)session.getAttribute("username");
String filename=request.getParameter("fname");
String filepath=request.getParameter("fpath");
System.out.println(filename+"filenamedhdghdghdg@#@@#@"+filepath);
String folder=request.getRealPath("/");
folder=folder.substring(0, folder.indexOf("."));
System.out.println("folder"+folder); folder=folder+"drops\\
WebContent\\userfile\\"+user+"\\"; File file=new
File(folder,filename);
int length = 0;
ServletOutputStream outStream = response.getOutputStream();
ServletContext context=getServletConfig().getServletContext();

String mimietype=context.getMimeType(filepath);
if(mimietype==null)
{
71
mimietype = "application/octet-stream";
}
response.setContentType(mimietype);
response.setContentLength((int)file.length());
response.setHeader("Content-Disposition", "attachement; filename=\""+
filename+"\"");
//BUFSIZE
byte[] bytebuffer=new byte[(int)file.length()];
DataInputStream dis = new DataInputStream(new FileInputStream(file));
while((dis != null) && ((length = dis.read(bytebuffer)) != -1 ))
{
outStream.write(bytebuffer, 0, length);
}
dis.close();
outStream.close();
}
catch(Exception e)
{
e.printStackTrace();
}
}

72
SNAPSHOTS

Register.jsp

Login.jsp

73
package.jsp

Upload.jsp

74
Fragment.jsp

Fragmentfiles.jsp

75
Split.jsp

76
Admin.jsp

Adminmonitoring.jsp

77
Adminsearch.jsp

downloadoredit.jsp

78
CONCLUSIONS AND FUTURE WORK

CONCLUSION:

• We proposed the DROPS methodology, cloud storage security


scheme that collectively deals with the security and performance in
terms of retrieval time. The data file was fragmented and the
fragments are dispersed over multiple nodes. The nodes were
separated by means of T-coloring. The fragmentation and dispersal
ensured that no significant information was obtainable by an
adversary in case of a successful attack. No node in the cloud, stored
more than a single fragment of the same file. The performance of the
DROPS methodology was compared with full- scale replication
techniques. The results of the simulations revealed that the
simultaneous focus on the security and performance resulted in
increased security level of data accompanied by a slight performance
drop.

FUTURE WORK:

•In future, it will save the time and resources utilized in


downloading, updating, and uploading the file again. Moreover,
the implications of TCP in cast over the DROPS methodology
need to be studied that is relevant to distributed data storage
and access.

79
REFERENCES

[1].N. Bitouzé and L. Dolecek, “Synchronization from insertions and deletions under a non-
binary, non-uniform source,” in Proc.
[2] N. Bitouzé, F. Sala, S. M. S. Tabatabaei Yazdi, and L. Dolecek, “A practical framework
for efficient file synchronization,” in Proc..
[3] M. Mitzenmacher and G. Varghese, “The complexity of object reconciliation, and open
problems related to set difference and coding,”
[4] R. L. Dobrushin, “Shannon’s theorems for channels with synchronization errors,”
Problems Inf. Transmiss.,
[5] V. I. Levenshtein, “Binary codes capable of correcting deletions, insertions and reversals,”
Sov. Phys.—Dokl
[6] G. Tenengolts, “Nonbinary codes, correcting single deletion or insertion (Corresp.
[7] A. S. J. Helberg and H. C. Ferreira, “On multiple insertion/deletion correcting codes.
[8] K. A. S. Abdel-Ghaffar, F. Paluncic, H. C. Ferreira, and W. A. Clarke, “On Helberg’s
generalization of the Levenshtein code for multiple deletion/insertion error correction.
[9] L. Dolecek and V. Anantharam, “Repetition error correcting sets: Explicit constructions
and prefixing methods.
[10] M. Mitzenmacher, “A survey of results for deletion channels and related
synchronization channels.

80

You might also like