Mtech Project Final Document - Sindhuri
Mtech Project Final Document - Sindhuri
ON
Thesis Submitted in partial fulfillment of the Requirements for the Award of the
Degree Of
MASTER OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING
Submitted by
GADE MARY SINDHURI REDDY
Reg.No: 13NF1D5805
CERTIFICATE
This is to certify that the thesis entitled “A SECURE MULTI KEYWORD
RANKED SEARCH SCHEME THAT SUPPORTS DYNAMIC UPDATE
OPERATIONS IN CLOUD ” is being carried by GADE MARY SINDHURI
REDDY, bearing Reg.No. 13NF1D5805, in partial fulfillment of the requirements for
the award of the degree of Master of Technology in Computer Science & Engineering,
in the department of Computer Science & Engineering, UNIVERSAL COLLEGE OF
ENGINEERING & TECHNOLOGY, GUNTUR, AP. to the JNTUK is a bonafide
work carried out by her under my guidance and supervision. The Results embodied in
this thesis have not been submitted to any other University or Institute for the award
of any degree.
EXTERNAL EXAMINER
i!
ACKNOWLEDGEMENT
!ii
DECLARATION
The matter embodied in this project is a genuine work done by me and has not
been submitted earlier to this or any other university for the award of any degree.
i! ii
A SECURE MULTI KEYWORD
RANKED SEARCH SCHEME THAT
SUPPORTS DYNAMIC UPDATE
OPERATIONS IN CLOUD
A SECURE MULTI KEYWORD RANKED SEARCH SCHEME
THAT SUPPORTS DYNAMIC UPDATE OPERATIONS IN CLOUD
Abstract:
Due to the increasing popularity of cloud computing, more and more data
owners are motivated to outsource their data to cloud servers for great convenience
and reduced cost in data management. However, sensitive data should be encrypted
before outsourcing for privacy requirements, which obsoletes data utilisation like
keyword-based document retrieval. In this paper, we present a secure multi-keyword
ranked search scheme over encrypted cloud data, which simultaneously supports
dynamic update operations like deletion and insertion of documents. Specifically, the
vector space model and the widely-used TF_IDF model are combined in the index
construction and query generation.
We construct a special tree-based index structure and propose a “Greedy
Depth-first Search” algorithm to provide efficient multi-keyword ranked search. The
secure KNN algorithm is utilised to encrypt the index and query vectors, and
meanwhile ensure accurate relevance score calculation between encrypted index and
query vectors. In order to resist statistical attacks, phantom terms are added to the
index vector for blinding search results. Due to the use of our special tree-based index
structure, the proposed scheme can achieve sub-linear search time and deal with the
deletion and insertion of documents flexibly. Extensive experiments are conducted to
demonstrate the efficiency of the proposed scheme.
!iv
Table of Contents
Abstract………………………………………………………………………….. iv
v!
6.4 Data Flow Diagram ........................................................................................35
6.5 UML Diagrams ...............................................................................................37
6.5.1 Use Case Diagram ................................................................................38
6.5.2 Class Diagram ......................................................................................41
6.5.3 Sequence Diagram ................................................................................41
6.5.4 Collaboration Diagram .........................................................................45
6.6 Input Design ...................................................................................................49
6.7 Output Design ................................................................................................50
7. SYSTEM IMPLEMENTATION .......................................................................52
7.1 Sample Code ...................................................................................................52
8. SYSTEM TESTING ...........................................................................................72
8.1 Introduction ....................................................................................................72
8.2 Types of Tests .................................................................................................72
8.2.1 Unit Testing ..........................................................................................74
8.2.2 Integration Testing ................................................................................75
8.2.3 Acceptance Testing ...............................................................................75
8.3 Test Cases .......................................................................................................75
9. RESULTS ............................................................................................................77
9.1 ScreenShots ....................................................................................................77
10. CONCLUSION AND FUTURE WORK ........................................................90
11. BIBLIOGRAPHY ............................................................................................91
!vi
LIST OF FIGURES
Page
Name Of Figure No
Fig 1.1 Structure of Cloud Computing 2
Fig 1.2 Structure of Service Models 3
Fig 3.1 Java Interpreter & Compiler Working 10
v! ii
Fig 6.12 Data Owner Collaboration Diagram 46
!viii
CHAPTER 1
INTRODUCTION
1. INTRODUCTION
1.1. Introduction to Cloud Computing
The cloud computing facilitates many straight benefits to clients as on demand
service, location independence, elasticity, network based model, resource pooling and
so on. The cloud storage provisioning is one of the important services of cloud
computing. The cloud storage facilitates massive amount of data storage which
magnetise small and medium scale organisations to utilise remote storage for efficient
and economic storage management. It is a model of data storage where the data is
stored in logical pool, the physical storage spans multiple servers and the physical
environment is actually owned and managed by a hosting entity. The tasks like
keeping the data available and accessible, and the physical environment protected and
running is done by cloud storage providers.
The cloud provides server based applications and all data services to the user,
with output displayed on the client device. Memory allocated to the client system's
web browser is used to make the application data appear on the client system display,
but all computations and changes are recorded by the server, and final results
including files created or altered are permanently stored on the cloud servers.
Performance of the cloud application is dependent upon the network access, speed
and reliability as well as the processing speed of the client device. While Cloud
Computing makes these advantages more appealing than ever, it also brings new and
challenging security threats towards user’s outsourced data. Since cloud service
providers (CSP) are separate administrative entities, data outsourcing is actually
relinquishing user’s ultimate control over the fate of their data. As a result, the
correctness of the data in the cloud is being put at risk due to the following reasons.
First of all, although the infrastructures under the cloud are much more powerful and
reliable than personal computing devices, they are still facing the broad range of both
internal and external threats for data integrity.
Second, for the benefits of their own, there do exist various motivations for
cloud service providers to behave unfaithfully towards the cloud users regarding the
The verifier can check the remote data integrity and retrieve the remote data at
any time. On some cases, the client may delegate the remote data integrity checking
task to the third party. One of benefits of cloud storage is to enable universal data
access within dependent geographical locations. This implies that the end devices may
be mobile and limited in computation and storage. Efficient integrity checking
protocols are more suitable for cloud clients equipped with mobile end devices .The
verifier can check remote data integrity with a high probability. Based on the RSA,
3. Globalize your workforce on the cheap. People worldwide can access the cloud,
provided they have an Internet connection.
4. Streamline processes. Get more work done in less time with less people.
5. Reduce capital costs. There’s no need to spend big money on hardware, software
or licensing fees.
6. Improve accessibility. You have access anytime, anywhere, making your life so
much easier!
7. Monitor projects more effectively. Stay within budget and ahead of completion
cycle times.
9. Minimize licensing new software. Stretch and grow without the need to buy
expensive software licenses or programs.
10. Improve flexibility. You can change direction without serious “people” or
“financial” issues at stake.
Advantages:
We study the problem of searching on data that is encrypted using a public key
system. Consider user Bob who sends email to user Alice encrypted under Alice's
public key. An email gateway wants to test whether the email contains the keyword
"urgent" so that it could route the email accordingly. Alice, on the other hand does not
wish to give the gateway the ability to decrypt all her messages. We define and
construct a mechanism that enables Alice to provide a key to the gateway that enables
the gateway to test whether the word "urgent" is a keyword in the email without
learning anything else about the email. We refer to this mechanism as Public Key
Encryption with keyword Search. As another example, consider a mail server that
stores various messages publicly encrypted for Alice by others. Using our mechanism
Alice can send the mail server a key that will enable the server to identify all
messages containing some specific keyword, but learn nothing else. We define the
concept of public key encryption with keyword search and give several constructions.
Software Requirements:
With most programming languages, you either compile or interpret a program so that
you can run it on your computer. The Java programming language is unusual in that a
program is both compiled and interpreted. With the compiler, first you translate a
program into an intermediate language called Java byte codes —the platform-
independent codes interpreted by the interpreter on the Java platform. The interpreter
parses and runs each Java byte code instruction on the computer. Compilation
happens just once; interpretation occurs each time the program is executed. The
following figure illustrates how this works.
You can think of Java byte codes as the machine code instructions for the Java
Virtual Machine (Java VM). Every Java interpreter, whether it’s a development tool
or a Web browser that can run applets, is an implementation of the Java VM. Java
byte codes help make “write once, run anywhere” possible. You can compile your
program into byte codes on any platform that has a Java compiler. The byte codes can
then be run on any implementation of the Java VM. That means that as long as a
computer has a Java VM, the same program written in the Java programming
language can run on Windows 2000, a Solaris workstation, or on an iMac.
The Java API is a large collection of ready-made software components that provide
many useful capabilities, such as graphical user interface (GUI) widgets. The Java
API is grouped into libraries of related classes and interfaces; these libraries are
known as packages. The next section, What Can Java Technology Do? Highlights
what functionality some of the packages in the Java API provide.
The following figure depicts a program that’s running on the Java platform.
The most common types of programs written in the Java programming language are
applets and applications. If you’ve surfed the Web, you’re probably already familiar
with applets. An applet is a program that adheres to certain conventions that allow it
to run within a Java-enabled browser.
However, the Java programming language is not just for writing cute, entertaining
applets for the Web. The general-purpose, high-level Java programming language is
also a powerful software platform. Using the generous API, you can write many types
of programs.
How does the API support all these kinds of programs? It does so with packages of
software components that provides a wide range of functionality. Every full
implementation of the Java platform gives you the following features:
The essentials: Objects, strings, threads, numbers, input and output, data structures,
system properties, date and time, and so on. Applets: The set of conventions used by
applets.
The Java platform also has APIs for 2D and 3D graphics, accessibility, servers,
collaboration, telephony, speech, animation, and more. The following figure depicts
what is included in the Java 2 SDK.
Get started quickly: Although the Java programming language is a powerful object-
oriented language, it’s easy to learn, especially for programmers already familiar with
Develop programs more quickly: Your development time may be as much as twice
as fast versus writing the same program in C++. Why? You write fewer lines of code
and it is a simpler programming language than C++.
Avoid platform dependencies with 100% Pure Java: You can keep your program
portable by avoiding the use of libraries written in other languages. The 100% Pure
JavaTM Product Certification Program has a repository of historical process manuals,
white papers, brochures, and similar materials online.
Write once, run anywhere: Because 100% Pure Java programs are compiled into
machine-independent byte codes, they run consistently on any Java platform.
Distribute software more easily: You can upgrade applets easily from a central
server. Applets take advantage of the feature of allowing new classes to be loaded “on
the fly,” without recompiling the entire program.
ODBC
Microsoft Open Database Connectivity (ODBC) is a standard programming interface
for application developers and database systems providers. Before ODBC became a
de facto standard for Windows programs to interface with database systems,
programmers had to use proprietary languages for each database they wanted to
connect to. Now, ODBC has made the choice of the database system almost irrelevant
from a coding perspective, which is as it should be. Application developers have
much more important things to worry about than the syntax that is needed to port
their program from one database to another when business needs suddenly change.
Through the ODBC Administrator in Control Panel, you can specify the particular
database that is associated with a data source that an ODBC application program is
written to use. Think of an ODBC data source as a door with a name on it. Each door
will lead you to a particular database. For example, the data source named Sales
The ODBC system files are not installed on your system by Windows 95. Rather, they
are installed when you setup a separate database application, such as SQL Server
Client or Visual Basic 4.0. When the ODBC icon is installed in Control Panel, it uses
a file called ODBCINST.DLL. It is also possible to administer your ODBC data
sources through a stand-alone program called ODBCADM.EXE. There is a 16-bit and
a 32-bit version of this program and each maintains a separate list of ODBC data
sources.
From a programming perspective, the beauty of ODBC is that the application can be
written to use the same set of function calls to interface with any data source,
regardless of the database vendor. The source code of the application doesn’t change
whether it talks to Oracle or SQL Server. We only mention these two as an example.
There are ODBC drivers available for several dozen popular database systems. Even
Excel spreadsheets and plain text files can be turned into data sources. The operating
system uses the Registry information written by ODBC Administrator to determine
which low-level ODBC drivers are needed to talk to the data source (such as the
interface to Oracle or SQL Server). The loading of the ODBC drivers is transparent to
the ODBC application program. In a client/server environment, the ODBC API even
handles many of the network issues for the application programmer.
The advantages of this scheme are so numerous that you are probably thinking there must
be some catch. The only disadvantage of ODBC is that it isn’t as efficient as talking
directly to the native database interface. ODBC has had many detractors make the charge
that it is too slow. Microsoft has always claimed that the critical factor in performance is
the quality of the driver software that is used. In our humble opinion, this is true. The
availability of good ODBC drivers has improved a great deal recently. And anyway, the
criticism about performance is somewhat analogous to those who said that compilers
would never match the speed of pure assembly language. Maybe not, but the compiler (or
ODBC) gives you the opportunity to write cleaner programs, which means you finish
sooner. Meanwhile, computers get faster every year.
JDBC was announced in March of 1996. It was released for a 90 day public review
that ended June 8, 1996. Because of user input, the final JDBC v1.0 specification was
released soon after.
The remainder of this section will cover enough information about JDBC for you to
know what it is about and how to use it effectively. This is by no means a complete
overview of JDBC. That would fill an entire book.
JDBC Goals
Few software packages are designed without goals in mind. JDBC is one that,
because of its many goals, drove the development of the API. These goals, in
conjunction with early reviewer feedback, have finalized the JDBC class library into
a solid framework for building database applications in Java.
The goals that were set for JDBC are important. They will give you some insight as to
why certain classes and functionalities behave the way they do. The eight design
goals for JDBC are as follows:
1. SQL Level API
The designers felt that their main goal was to define a SQL interface for Java.
Although not the lowest database interface level possible, it is at a low enough
level for higher-level tools and APIs to be created. Conversely, it is at a high
enough level for application programmers to use it confidently. Attaining this goal
SQL syntax varies as you move from database vendor to database vendor. In an
effort to support a wide variety of vendors, JDBC will allow any query statement
to be passed through it to the underlying database driver. This allows the
connectivity module to handle non-standard functionality in a manner that is
suitable for its users.
3. JDBC must be implemental on top of common database interfaces
The JDBC SQL API must “sit” on top of other common SQL level APIs. This
goal allows JDBC to use existing ODBC level drivers by the use of a software
interface. This interface would translate JDBC calls to ODBC and vice versa.
4. Provide a Java interface that is consistent with the rest of the Java system
Because of Java’s acceptance in the user community thus far, the designers feel
that they should not stray from the current design of the core Java system.
5. Keep it simple
This goal probably appears in all software design goal listings. JDBC is no
exception. Sun felt that the design of JDBC should be very simple, allowing for
only one method of completing a task per mechanism. Allowing duplicate
functionality only serves to confuse the users of the API.
6. Use strong, static typing wherever possible
Strong typing allows for more error checking to be done at compile time; also,
less error appear at runtime.
7. Keep the common cases simple
Because more often than not, the usual SQL calls used by the programmer are
simple SELECT’s, INSERT’s, DELETE’s and UPDATE’s, these queries should be simple
to perform with JDBC. However, more complex SQL statements should also be
possible.
Java is also unusual in that each Java program is both compiled and
interpreted. With a compile you translate a Java program into an intermediate
language called Java byte codes the platform-independent code instruction is passed
and run on the computer.
Compilation happens just once; interpretation occurs each time the program is
executed. The figure illustrates how this works.
Java Interpreter
Compilers My Program
Interactive HTML:
HTML Tag:-
The first and last tags in a document should always be the HTML tags. These
are the tags that tell a Web browser where the HTML in your document begins and
ends. The absolute most basic of all possible Web documents is:
<Html >
</Html>
5. Metadata Table
before outsourcing.
• This paper proposes a secure tree-based search scheme over the encrypted
cloud data, which supports multi-keyword ranked search and dynamic operation on
the document collection. Specifically, the vector space model and the widely-used
“term frequency (TF) × inverse document frequency (IDF)” model are combined in
the index construction and query generation to provide multi-keyword ranked
• The secure KNN algorithm is utilized to encrypt the index and query vectors,
and meanwhile ensure accurate relevance score calculation between encrypted
index and query vectors.
• Due to the special structure of our tree-based index, the proposed search
scheme can flexibly achieve sub-linear search time and deal with the deletion
and insertion of documents.
• We design a searchable encryption scheme that supports both the accurate
multi-keyword ranked search and flexible dynamic operation on document
collection.
• Due to the special structure of our tree-based index, the search complexity of
the proposed scheme is fundamentally kept to logarithmic. And in practice,
the proposed scheme can achieve higher search efficiency by executing our
“Greedy Depth-first Search” algorithm. Moreover, parallel search can be
flexibly performed to further reduce the time cost of search process.
The feasibility of the project is analyzed in this phase and business proposal
is put forth with a very general plan for the project and some cost estimates. During
system analysis the feasibility study of the proposed system is to be carried out. This
is to ensure that the proposed system is not a burden to the company. For feasibility
analysis, some understanding of the major requirements for the system is essential.
Data owner outsource the encrypted documents to the cloud server. In our
scheme, the data owner initially creates a secure searchable tree index I from
document collection F, and then generates an encrypted document collection C for F.
Then data owner outsource the encrypted document collection C and tree index I to
the cloud server and provides the key information of trapdoor generation and
document decryption details to authorized data users. Data owner generates update
information and send that to the server.
Data users are those who have authorization to access the documents of data
owner. Let t be the query keywords, the authorized user can generate a trapdoor TD
according to search mechanisms to fetch k encrypted documents from cloud server.
Data user can decrypt the documents with shared secret key.
Cloud server stores the encrypted document collection C and the encrypted
searchable tree index I for data owner. After receiving the trapdoor TD from the data
user, the cloud server searches the index tree I, and finally returns the corresponding
collection of top-k ranked encrypted documents. If the data owner updates the
document collection, according to the update information from the data owner, the
server needs to update the index I and document collection C.
i. Known cipher text model:-In this model, the cloud server only knows the
encrypted document collection C, the searchable index tree I, and the search
trapdoor TD submitted by the authorized user. That is to say, the cloud server
can execute cipher text-only attack (COA) in this model.
ii. Known background model:-The model is equipped with more knowledge such
as term frequency statistics.
a. Data Owner
b. Trapdoor
c. Data User
d. Admin
This module helps the owner to register his details and also helps the owner to
upload his file with encryption. This ensures the files to be protected from
unauthorized user. Data owner has a collection of documents F ={f1; f2; :::; fn} that
he wants to outsource to the cloud server in encrypted form while still keeping the
capability to search on them for effective utilization. In our scheme, the data owner
firstly builds a secure searchable tree index I from document collection F, and then
generates an encrypted document collection C for F. Afterwards, the data owner
6.1.2 Trapdoor
This module includes the user registration login details. This module is used to
help the client to search the file using the multiple key words concept and get the
accurate result list based on the user query. The user is going to select the required file
and register the user details and get activation code in mail email before enter the
activation code. After user can download the Zip file and extract that file. Data users
are authorized ones to access the documents of data owner. With t query keywords,
the authorized user can generate a trapdoor TD according to search control
mechanisms to fetch k encrypted documents from cloud server. Then, the data user
can decrypt the documents with the shared secret key.
6.1.4 Admin
Admin is the main authority of this application. He maintains all users means
data users and data owners information. He creates the data owner profiles and he
accepts or rejects the user registration details.
Output: Result r;
Initialization:
Let Collection c;
Keyword k;
c = k.split()
end if
end for
end procedure
Input: Data d.
Output: result r.
Let data d,
Collection c;
tf=( α) / (β);.
IDF(t) = log_e(£/¥);.
End;
• The data flow diagram (DFD) is one of the most important modelling
tools. It is used to model the system components. These components are the
system process, the data used by the process, an external entity that interacts
with the system and the information flows in the system.
• DFD shows how the information moves through the system and how it
is modified by a series of transformations. It is a graphical technique that
depicts information flow and the transformations that are applied as data
moves from input to output.
GOALS:
The Primary goals in the design of the UML are as follows:
1. Provide extendibility and specialization mechanisms to extend the core concepts.
2. Provide Users a ready to use, expressive visual modelling Language so that they
can develop and exchange meaningful models.
3. Be independent of particular programming languages and development process.
4. Provide a formal basis for understanding the modeling language.
5. Encourage the growth of OO tools market.
6. Support higher level development concepts such as collaborations, frameworks,
patterns and components.
7. Integrate best practices.
!
Fig:6.3 Owner Use Case Diagram
!
Fig:6.5 Administrator Use Case Diagram
The input design is the link between the information system and the user. It
comprises the developing specification and procedures for data preparation and those
steps are necessary to put transaction data in to a usable form for processing can be
achieved by inspecting the computer to read data from a written or printed document
or it can occur by having people keying the data directly into the system. The design
of input focuses on controlling the amount of input required, controlling the errors,
avoiding delay, avoiding extra steps and keeping the process simple. The input is
designed in such a way so that it provides security and ease of use with retaining the
privacy. Input Design considered the following things:
6.6.1 OBJECTIVES
3. When the data is entered it will check for its validity. Data can be entered
with the help of screens. Appropriate messages are provided as when needed so that
the user will not be in maize of instant. Thus the objective of input design is to create
an input layout that is easy to follow
A quality output is one, which meets the requirements of the end user and
presents the information clearly. In any system results of processing are
communicated to the users and to other system through outputs. In output design it is
determined how the information is to be displaced for immediate need and also the
hard copy output. It is the most important and direct source information to the user.
Efficient and intelligent output design improves the system’s relationship to help user
decision-making.
Admin.jsp
<div class="about-content">
<div class="container">
<div class="error-404 text-center">
<h1>Admin Page</h1>
</tr>
</table>
</form>
<br><br><br><br><br><br><br><br><br><br><br><br><br>
Alogin.jsp
<%
String pass=null,uid=null;
String a = request.getParameter("uid");
String b= request.getParameter("pwd");
String name=null,u=null,test2=null;
try
{
if(a.equals("admin")&&b.equals("admin"))
{
response.sendRedirect("admin_home.jsp");
}
else
{
response.sendRedirect("admin.jsp?m=fail");
}
}
catch(Exception e1)
{
out.println(e1);
}
%>
aowner.jsp
<%
String id=request.getParameter("id");
if(id!=null )
{
out.println("<h3><font
color='red'><blink>Registration Success !</h2> <br></font>");
<table cellspacing="10">
<tr>
<td><font size="+1" color=#ff0066><strong>Full Name</strong>*</
font><br>
<input type="text" name="name" id = "name" style="width: 250px;"
required></td>
<td><font size="+1" color=#ff0066><strong>Email</
strong>*</font><br>
<input type="text" name="email" id = "lname" style="width: 250px;"
required></td>
</tr>
</TABLE>
<table cellspacing="10">
<tr>
<td><font size="+1" color=#ff0066><strong>Street</strong>*</font><br>
<input type="text" name="street" id = "name" style="width: 250px;"
required></td>
<td><font size="+1" color=#ff0066><strong>City</strong>*</
font><br>
<input type="text" name="city" id = "lname" style="width: 250px;"
required></td>
</tr>
</TABLE> <table cellspacing="10">
</TABLE>
<table cellspacing="10">
<tr>
<td><font size="+1" color=#ff0066><strong>Postal Code</
strong>*</font><br>
<input type="text" name="zip" id = "name" style="width: 135px;"
required></td>
<td><font size="+1" color=#ff0066><strong>Contact No</strong>*</
font><br>
<input type="text" name="ph" id = "name" style="width: 250px;"
required></td>
<td><font size="+1" color=#ff0066><strong>Gender</strong>*</font><br>
<select name="gen">
<option value="Male" selected>Male
<option value="Female">Female
</select>
</tr>
<td>
</tr>
</table>
<br>
</form>
Index.jsp
<%
String m=request.getParameter("id");
if(m!=null && m.equalsIgnoreCase("exp"))
{
out.println("<script type=text/javascript>alert('Sorry, your session expired, login
again '); </script>");
}
%>
<%@ include file="header.jsp"%>
<div class="content">
<div class="container">
<div class="about-section-bottom">
</div>
<div class="col-md-6 feature-accord">
<ul class="topic_grid">
<li class="list1"><h4
class="m_3">Design goals</span></h3></li>
</ul>
<div class="menu_vertical">
<section class="accordation_menu">
<div>
<input id="label-1"
name="lida" type="radio" checked/>
<label for="label-1"
id="item1"><i class="ferme"> </i><span class="m_5">Dynamic: </span><i
class="icon-plus-sign i-right1"></i><i class="icon-minus-sign i-right2"></i></label>
<div class="content1"
id="a1">
<ul
class="news_list">
<p>The
underlying plaintext information, including keywords
in the index and query, TF values of keywords
stored in the index, and IDF values of query
keywords, should be protected from cloud server;</p>
</li>
<div
class="clearfix"> </div>
</ul>
</div>
</div>
<div>
<div
class="clearfix"> </div>
</ul>
</div>
</div>
</section>
</div>
</div>
<div class="clearfix"></div>
delete.jsp
<%@ page import="java.sql.*" import="databaseconnection.*"
import="javax.swing.JOptionPane"%>
<%
String sno=request.getParameter("id");
ResultSet rs=null;
String all="allowed";
try
{
Connection con = databasecon.getconnection();
Statement st = con.createStatement();
System.out.println("qry="+qry);
int d =st.executeUpdate(qry);
qry="delete from meta_data where index_id='"+sno+"' ";
d =st.executeUpdate(qry);
if(d>0)
{
response.sendRedirect("viewdata.jsp?msg1=deleted");
Des1.jsp
<%@ page import="java.sql.*" import="databaseconnection.*"
import="javax.swing.JOptionPane"%>
<%
String pass=null,uid=null;
String id = request.getParameter("id");
try
{
response.sendRedirect("newuser.jsp");
con1=null;
}
catch(Exception e1)
{
out.println(e1);
}
%>
Download1.jsp
<script type="text/javascript">
Download2.jsp
Connection con=databasecon.getconnection();
Statement st=con.createStatement();
Statement st2=con.createStatement();
String sql="select * from data where Index_id='"+fid+"' && s_k ='"+sk+"' ";
System.out.println(sql);
ResultSet rs=st.executeQuery(sql);
if(rs.next())
{
response.sendRedirect("download3.jsp");
}else
{response.sendRedirect("u_home.jsp?id=wrongkey");
}
%>
Download3.jsp
Connection con=databasecon.getconnection();
// out.println(b);
if(file1 != null)
{
String filename =fname;
byte[] ba = file1.getBytes(1, (int)file1.length());
response.setContentType("application/notepad");
response.setHeader("Content-Disposition","attachment;
filename=\""+filename+"\"");
OutputStream os = response.getOutputStream();
os.write(ba);
os.close();
ba = null;
session.removeAttribute("file");
response.sendRedirect("u_home.jsp");
}
}
catch(Exception e)
{
out.println("Exception :"+e);
File_download.jsp
<%@ page import="java.sql.*" import="java.io.*" import="databaseconnection.*"
import="javax.swing.JOptionPane"%>
<%@ include file="oheader.jsp"%>
<body>
<%
String fid=request.getParameter("id");
String fname=null;
Blob file1 =null;
try{
Connection con=databasecon.getconnection();
PreparedStatement ps =con.prepareStatement("select
AES_DECRYPT(file_name,'key'), AES_DECRYPT(file,'key') from data where
index_id ='"+fid+"'");
ResultSet rs = ps.executeQuery();
while(rs.next())
{
file1=rs.getBlob(2);
fname=rs.getString(1);
}
// out.println(b);
if(file1 != null)
{
String filename =fname;
byte[] ba = file1.getBytes(1, (int)file1.length());
%>
</body>
</html>
Upload.jsp
<%@ include file="oheader.jsp"%>
<%
String m=request.getParameter("id");
if(m!=null && m.equalsIgnoreCase("succ"))
{
out.println("<font
color='red'><blink><h3><p><br><br> File Uploaded
Successfully !! </blink></font></h3>");
}
}
%>
<center><br><br><br>
<h2>Select File for uploading</h2><br><br><br>
<form name="f2" action="fileinsert1.jsp" ENCTYPE="multipart/form-data"
method="post" onsubmit="return reg()" required>
<table>
<tr> <td><input type="file" name="file" required>
<br><br><br><br>
<%@ include file="footer.jsp"%>
Upload2.jsp
8.1 INTRODUCTION
The purpose of testing is to discover errors. Testing is the process of trying to
discover every conceivable fault or weakness in a work product. It provides a way to
check the functionality of components, sub assemblies, assemblies and/or a finished
product It is the process of exercising software with the intent of ensuring that the
Software system meets its requirements and user expectations and does not fail in an
unacceptable manner. There are various types of test. Each test type addresses a
specific testing requirement.
Integration testing
Integration tests are designed to test integrated software components to
determine if they actually run as one program. Testing is event driven and is more
concerned with the basic outcome of screens or fields. Integration tests demonstrate
that although the components were individually satisfaction, as shown by successfully
unit testing, the combination of components is correct and consistent. Integration
Functional test
Functional tests provide systematic demonstrations that functions tested
are available as specified by the business and technical requirements, system
documentation, and user manuals.
System Test
System testing ensures that the entire integrated software system meets
requirements. It tests a configuration to ensure known and predictable results. An
example of system testing is the configuration oriented system integration test.
System testing is based on process descriptions and flows, emphasizing pre-driven
process links and integration points.
White Box Testing
White Box Testing is a testing in which in which the software tester has
knowledge of the inner workings, structure and language of the software, or at least
Field testing will be performed manually and functional tests will be written in detail.
Test objectives
Features to be tested
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
ADMIN LOGIN: This is the Admin Login Page where admin enters his
credentials and is logged into his page.
Data Owner Registration: In this page the Admin registers the Data Owner by
providing all the required details.
FILE UPLOAD: Data Owner can upload a file and then a request is generated to
the trapdoor to generate a key. Once the Trapdoor generates SK, the file is uploaded.
!
Fig:9.7 :Trapdoor Login Page
!
Fig: 9.8 : Trapdoor SK Request
[1] K. Ren, C.Wang, Q.Wang et al., “Security challenges for the public cloud,” IEEE
Internet Computing, vol. 16, no. 1, pp. 69–73, 2012.
[8] E.-J. Goh et al., “Secure indexes.” IACR Cryptology ePrint Archive, vol. 2003, p.
216, 2003.
[11] J. Li, Q. Wang, C. Wang, N. Cao, K. Ren, and W. Lou, “Fuzzy keyword search
over encrypted data in cloud computing,” in INFOCOM, 2010 Proceedings IEEE.
IEEE, 2010, pp. 1–5.
[13] C. Wang, K. Ren, S. Yu, and K. M. R. Urs, “Achieving usable and privacy-
assured similarity search over outsourced cloud data,” in INFOCOM, 2012
Proceedings IEEE. IEEE, 2012, pp. 451–459.
[15] P. Golle, J. Staddon, and B. Waters, “Secure conjunctive keyword search over
encrypted data,” in Applied Cryptography and Network Security. Springer, 2004, pp.
31–45.
[16] Y. H. Hwang and P. J. Lee, “Public key encryption with conjunctive keyword
search and its extension to a multi-user system,” in Proceedings of the First
[18] D. Boneh and B. Waters, “Conjunctive, subset, and range queries on encrypted
data,” in Proceedings of the 4th conference on Theory of cryptography. Springer-
Verlag, 2007, pp. 535–554.
[19] B. Zhang and F. Zhang, “An efficient public key encryption with conjunctive-
subset keywords search,” Journal of Network and Computer Applications, vol. 34, no.
1, pp. 262–267, 2011.
[23] A. Swaminathan, Y. Mao, G.-M. Su, H. Gou, A. L. Varna, S. He, M.Wu, and D.W.
Oard, “Confidentiality-preserving rank-ordered search,” in Proceedings of the 2007
ACM workshop on Storage security and survivability. ACM, 2007, pp. 7–12.
[25] C. Wang, N. Cao, K. Ren, and W. Lou, “Enabling secure and efficient ranked
keyword search over outsourced cloud data,” Parallel and Distributed Systems, IEEE
Transactions on, vol. 23, no. 8, pp. 1467–1479, 2012.
Abstract: Because of the expanding fame of distributed servers brings protection concerns. The cloud specialist co-
computing, an ever increasing number of information ops (CSPs) that keep the information for clients may get to
proprietors are persuaded to outsource their information to clients' delicate data without approval. A general way to deal
cloud servers for awesome accommodation and lessened cost with secure the information secrecy is to scramble the
in information administration. Be that as it may, touchy information before outsourcing. Be that as it may, this will
information ought to be encoded before outsourcing for bring about a tremendous cost regarding information ease of
security necessities, which obsoletes information, use like use. For instance, the current systems on catchphrase based
watchword based record recovery. In this paper, we show a data recovery, which are broadly utilized on the plaintext
protected multi-watchword positioned seek conspire over information, can't be straightforwardly connected on the
scrambled cloud information, which at the same time scrambled information.
underpins dynamic refresh operations like erase and addition
of records. In particular, the vector space show and the Downloading every one of the information from the cloud
broadly utilized TF_IDF model are joined in the record and unscramble locally is clearly unfeasible. Keeping in mind
development and inquiry era. We build an extraordinary tree- the end goal to address the above issue, scientists have
based file structure and propose an "Avaricious Depth-first planned some general purpose arrangements with completely
Search" calculation to give effective multi-watchword homomorphic encryption or unmindful RAMs. Be that as it
positioned seek. The safe KNN calculation is used to may, these techniques are not down to earth because of their
scramble the file and inquiry vectors, and in the interim high computational overhead for both the cloud separate and
guarantee exact importance score computation between client. Despite what might be expected, more useful
encoded list and question vectors. With a specific end goal to extraordinary reason arrangements, for example, searchable
oppose factual assaults, apparition terms are added to the file encryption (SE) plans have made particular commitments
vector for binding query items. Because of the utilization of regarding productivity, usefulness and security. Searchable
our unique tree-based list structure, the proposed plan can encryption plans empower the customer to store the
accomplish sub-straight inquiry time and manage the erasure scrambled information to the cloud and execute catchphrase
and addition of archives adaptable. Broad examinations are seek over ciphertext area. Up until now, bottomless works
directed to exhibit the productivity of the proposed plot. have been proposed under various danger models to
accomplish different inquiry usefulness, for example, single
Keywords:Secure Multi-Keyword, Ranked Search, Cloud, watchword hunt, comparability look, multi-catchphrase
Encryption. boolean pursuit, positioned seek, multi-catchphrase positioned
I. INTRODUCTION look, and so forth. Among them, multikeyword positioned
Distributed computing has been considered as another look accomplishes increasingly consideration for its
model of big business IT framework, which can arrange commonsense relevance. As of late, some dynamic plans have
tremendous asset of processing, stockpiling and applications, been proposed to bolster embeddings and erasing operations
and empower clients to appreciate pervasive, advantageous on archive accumulation. These are critical fills in as it is very
and on demand organize access to a mutual pool of conceivable that the information proprietors need to refresh
configurable figuring assets with extraordinary productivity their information on the cloud server. Be that as it may, few
and negligible financial overhead. Pulled in by these engaging of the dynamic plans bolster effective multikeyword
components, both people and ventures are spurred to positioned seeks.
outsource their information to the cloud, rather than obtaining II. RELATED WORK
programming and equipment to deal with the information The encoded information to the cloud and execute watchword
them. Regardless of the different focal points of cloud seek over ciphertext area. Because of various cryptography
administrations, outsourcing delicate data, (for example, Primitives, searchable encryption plans can be developed
messages, individual wellbeing records, organization back utilizing open key based cryptography or then again
information, government reports, and so on.) to remote symmetric key based cryptography. Melody et al. proposed
A. Privacy-saving:
The plan is intended to keep the cloud server from taking
in extra data about the report accumulation, the file tree, and
the inquiry. The particular protection necessities are
Information proprietor has a gathering of reports F = {f1; condensed as takes after,
f2; :::; fn} that he needs to outsource to the cloud server in
scrambled frame while as yet keeping the capacity to scan on B. List Confidentiality and Query Confidentiality:
them for successful use. The fundamental plaintext data, incorporating watchwords
in the record and inquiry, TF estimations of catchphrases put
away in the file, and IDF estimations of question watchwords,
ought to be shielded from cloud server;
D. Catchphrase Privacy:
The cloud server couldn't distinguish the particular
watchword in inquiry, list or record accumulation by
investigating the measurable data like term recurrence. Take
note of that our proposed plan is not intended to secure get to
In our plan, the information proprietor right off the bat design, i.e., the grouping of returned records.
fabricates a protected searchable tree file I from report
accumulation F, and after that produces a scrambled do
International Journal of Innovative Technologies
Volume.05, Issue No.06, June-2017, Pages: 1053-1056
GADE MARY SINDHURI REDDY, SRIDHAR KODALI
VI. CONCLUSION [4] M. Kuzu, M. S. Islam, and M. Kantarcioglu, “Efficient
In this paper, a protected, productive and dynamic inquiry similarity search over encrypted data,” in Data Engineering
plan is proposed, which underpins the precise multi- (ICDE), 2012 IEEE 28th International Conference on. IEEE,
catchphrase positioned seek as well as the dynamic 2012, pp. 1156– 1167.
cancellation and addition of archives. We build an uncommon [5] K. Ren, C. Wang, Q. Wang et al., “Security challenges for
watchword adjusted parallel tree as the list, and propose an the public cloud,” IEEE Internet Computing, vol. 16, no. 1,
"Eager Depth-first Search" calculation to get preferable pp. 69–73, 2012.
proficiency over straight pursuit. What's more, the parallel [6] S. Kamara and K. Lauter, “Cryptographic cloud storage,”
inquiry process can be completed to additionally lessen the in Financial Cryptography and Data Security. Springer, 2010,
time cost. The security of the plan is ensured against two pp. 136–149.
danger models by utilizing the protected kNN calculation. [7] C. Gentry, “A fully homomorphic encryption scheme,”
Exploratory outcomes exhibit the proficiency of our proposed Ph.D. dissertation, Stanford University, 2009.
conspires. There are as yet many test issues in symmetric SE [8] O. Goldreich and R. Ostrovsky, “Software protection and
plans. In the proposed conspire; the information proprietor is simulation on oblivious rams,” Journal of the ACM (JACM),
in charge of creating refreshing data and sending them to the vol. 43, no. 3, pp. 431–473, 1996.
cloud server. In this way, the information proprietor needs to [9] D. Boneh, G. Di Crescenzo, R. Ostrovsky, and G.
store the decoded list tree and the data that are important to Persiano, “Public key encryption with keyword search,” in
recalculate the IDF values. Such a dynamic information Advances in Cryptology Eurocrypt 2004. Springer, 2004, pp.
proprietor may not be extremely reasonable for the distributed 506–522.
computing model. It could be an important however [10] D. Boneh, E. Kushilevitz, R. Ostrovsky, and W. E.
troublesome future work to outline an element searchable Skeith III, “Public key encryption that allows pir queries,” in
encryption plot whose refreshing operation can be finished by Advances in Cryptology-CRYPTO 2007. Springer, 2007, pp.
cloud server just, in the mean time holding the capacity to 50–67.
bolster multi-watchword positioned look. Moreover, as the [11] D. X. Song, D. Wagner, and A. Perrig, “Practical
majority of works about searchable encryption, our plan techniques for searches on encrypted data,” in Security and
basically considers the test from the cloud server. Really, Privacy, 2000. S&P 2000 Proceedings. 2000 IEEE
there are many secure difficulties in a multiuser conspire. Symposium on. IEEE, 2000, pp. 44– 55.
Right off the bat, every one of the clients as a rule keeps the [12] E.-J. Goh et al., “Secure indexes.” IACR Cryptology
same secure key for trapdoor era in a symmetric SE plot. For ePrint Archive, vol. 2003, p. 216, 2003.
this situation, the renouncement of the client is enormous test. [13] A. Swaminathan, Y. Mao, G.-M. Su, H. Gou, A. L.
On the off chance that it is expected to deny a client in this Varna, S. He, M. Wu, and D. W. Oard, “Confidentiality-
plan, we have to reconstruct the record and circulate the new preserving rank-ordered search,” in Proc. ACM Workshop
secure keys to all the approved clients. Also, symmetric SE Storage Security Survivability, 2007, pp. 7–12.
conspires for the most part expect that every one of the [14] S. Zerr, D. Olmedilla, W. Nejdl, and W. Siberski,
information clients is reliable. It is not reasonable and an “Zerber+ r: Top-kretrieval from a confidential index,” in
untrustworthy information client will prompt many secure Proc. 12th Int. Conf. Extending Database Technol.: Adv.
issues. For instance, an untrustworthy information client may Database Technol., 2009, pp. 439–449.
look the archives and disseminate the unscrambled records to [15] C. Wang, N. Cao, K. Ren, and W. Lou, “Enabling secure
the unapproved ones. Much more, an unscrupulous and efficient ranked keyword search over outsourced cloud
information client may disseminate his/her safe keys to the data,” IEEE Trans.
unapproved ones. Later on works, we will attempt to enhance
the SE plan to deal with these test issues. Authors Profile:
Gade Mary Sindhuri Reddy is currently pursuing her
VII. REFERENCES M.Tech (CSE) in Computer Science and Engineering
[1] Y.-C. Chang and M. Mitzenmacher, “Privacy preserving Department,Universal College of engineering and technology,
keyword searches on remote encrypted data,” in Proceedings Guntur, A.P. She received her B.Tech in Electronics and
of the Third international conference on Applied Computers EngineeringDepartment from Koneru Lakshmaiah
Cryptography and Network Security. Springer-Verlag, 2005, College of Engineering, Guntur.
pp. 442–455.
[2] R. Curtmola, J. Garay, S. Kamara, and R. Ostrovsky, Sridhar Kodali is currently working as an Assistant
“Searchable symmetric encryption: improved definitions and Professor in Computer Science and Engineering Department,
efficient constructions,” in Proceedings of the 13th ACM Universal College of Engineering and Technology, Guntur,
conference on Computer and communications security. ACM, AP.
2006, pp. 79–88.
[3] J. Li, Q. Wang, C. Wang, N. Cao, K. Ren, and W. Lou,
“Fuzzy keyword search over encrypted data in cloud
computing,” in INFOCOM, 2010 Proceedings IEEE. IEEE,
2010, pp. 1–5.