You are on page 1of 99

AN EFFICIENT AND PRIVACY-PRESERVING BIOMETRIC

IDENTIFICATION SCHEME IN CLOUD COMPUTING

A Project Report
Submitted to Swarnandhra College of Engineering and Technology
in partial fulfillment of the requirements for the award of the degree
MASTER OF COMPUTER APPLICATIONS

by

NETHALA RAJU
(18A25F0012)
Under the guidance of

A.N.L. KUMAR
Professor, Department of MCA

DEPARTMENT OF MASTER OF COMPUTER APPLICATIONS


SWARNANDHRA COLLEGE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
(Approved by AICTE & Permanently Affiliated to JNTUK)
(Accredited by NAAC with “A” Grade)

SEETHARAMPURAM, NARASAPUR-534280
DEPARTMENT OF MASTER OF COMPUTER APPLICATIONS
SWARNANDHRA COLLEGE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
Seetharampuram, Narsapur – 534 280.

CERTIFICATE

This is to certify that this project work entitled “An Efficient and privacy-

preserving Biometric Identification scheme in cloud computing ” is the bonafide


work of Mr. NETHALA RAJU (Regd.No.18A25F0012) who carried out the work under my
supervision, and submitted in partial fulfillment of the requirements for the award of the degree,
Master of Computer Applications, during the academic year 2018-2020.

Project Supervisor Head of Department


A.N.L. Kumar A.N.L. Kumar
Head of the department of MCA Head of the department of MCA

Submitted for the project Thesis/Dissertation Viva-voice held on ……………..


External Examiner
DECLARATION

I certify that

a. The work contained in the project work is original and has been done by me under the
guidance of my supervisor
b. The work has not been submitted to any other University for the award of any degree or
diploma
c. The guidelines of the University are followed in writing this report.

Date : N. Raju

(18A25F0012)
ACKNOWLEDGEMENT

I extend my heartfelt gratitude to the Almighty for giving me strength in proceeding with
this project title “An Efficient and privacy-preserving Biometric Identification scheme in
cloud computing”.

I express my heartfelt gratitude to my parents for supporting me in all the ways in every
walk of my life.

I express my sincere thanks to Honorable Dr. S.Ramesh Babu, Secretary & Correspondent
of our college for making necessary arrangement for doing the project

I wish to express my gratitude to Dr. S. Suresh Kumar, principal of our college, for giving
us permission to carry out this project.

I express my sincere thanks to Mr. A.N.L. Kumar, Head of the Department of M.C.A. for
his learned suggestions and encouragement which made this project a successful one.

I convey my sincere thanks to my project guide Mr. V.D. Ratna Kumar, for his learned
suggestions and encouragement which made this project a success.

I express my sincere thanks of all the faculty members of our Department of MCA for their
valuable support throughout this project work.

I wish to express my thanks to my friends for their enthusiasm, support and encouragement
for the completion of this project.

N. Raju

Regd. No. 18A25F0012.


INDEX

S.NO CONTENTS PAGE NO


ABSTRACT 1

1 INTRODUCTION 2

2 LITERATURE SURVEY 4

3 SYSTEM ANALYSIS 6

3.1 Feasibility Study


3.2 Software Requirement Specification
3.2.1 Functional Requirements
3.2.2 Non Functional Requirements
3.3 Hardware Requirements
3.4 Software Requirements
3.5 Functional Model of the System
3.5.1 Use Case Diagram
4 SYSTEM DESIGN 15

4.1 Architecture Design


4.2 UML Design
4.2.1 Class Diagram
4.2.2 Sequence Diagram
4.2.3 Activity Diagram
4.2.4 State Chart Diagram
4.3 Detailed Description of Tables & Databases
5 SYSTEM IMPLEMENTATION 27

6 SAMPLE CODE 29

7 SYSTEM TESTING 70

7.1 Types of Tests


7.2 Sample Test Cases
8 SCREEN SHOTS 77

9 CONCLUSION 89

References 90
LIST OF FIGURES

S.No Fig No Figure Name Fig Page

1 3.5.1 Use Case Diagram 11

2 4.1 System Architecture 15

3 4.2.1 Class Diagram 18

4 4.2.2 Sequence Diagram 19

5 4.2.3 Activity Diagram 20

6 4.2.4 State chart Diagram 22


An Efficient and privacy-preserving Biometric Identification
scheme in cloud computing

Abstract

Biometric Identification has become most popular in present years. With the
development of cloud computing, database owners are forced to the large size of biometric
data and identification tasks to the cloud to get clear of the expensive storage and estimation
cost. It brings potential threats to user’s privacy.
In this project we proposed an Efficient and privacy-preserving Biometric
identification scheme for cloud data. Specifically, the biometric data is encrypted. To
execute a biometric identification, the database owner encrypts the data and submits it to the
cloud. The cloud performs identification tasks on the encrypted database and submit the
result to the database owner. Compared with previous scheme, The proposed scheme
achieves a better performance for identification procedures.

1
1. INTRODUCTION
BIOMETRIC identification has raised increasingly attention since it provides a promising
way to identify users. Compared with traditional authentication methods based on
passwords and identification cards, biometric identification is considered to be more reliable
and convenient. Additionally, biometric identification has been widely applied in many
fields by using biometric traits such as fingerprint, iris , and facial patterns , which can be
collected from various sensors. In a biometric identification system, the database owner
such as the FBI who is responsible to manage the national fingerprints database, may desire
to outsource the enormous biometric data to the cloud server (e.g., Amazon) to urge obviate
the expensive storage and computation costs. However, to preserve the privacy of biometric
data, the biometric data has to be encrypted before outsourcing. Whenever a FBI’s partner
(e.g., the police station) wants to authenticate an individual’s identity, he turns to the FBI
and generates an identification query by using the individual’s biometric traits (e.g.,
fingerprints, irises, voice patterns, facial patterns etc.). Then, the FBI encrypts the query and
submits it to the cloud to find the close match. Thus, the challenging problem is how to
design a protocol which enables efficient and privacy preserving biometric identification in
the cloud computing.

A number of privacy-preserving biometric identification solutions have been proposed.


However, most of them mainly concentrate on privacy preservation but ignore the
efficiency, such as the schemes based on homomorphic encryption and oblivious transfer in
for fingerprint and face image identification respectively. Suffering from performance
problems of local devices, these schemes are not efficient once the size of the database is
larger than 10MB. Later, Evans presented a biometric identification scheme by utilizing
circuit design and cipher text packing techniques to achieve efficient identification for a
larger data base of upto 1GB.Additionally,Yuan and Yu proposed an efficient privacy
preserving biometric identification scheme. Specifically, they constructed three modules and
designed a concrete protocol to achieve the security of fingerprint trait. To improve the
efficiency, in their scheme, the database owner outsourced identification matching tasks to
the cloud. However, Zhuetal pointed out that Yuan and Yu’s protocol can be broken by a
collusion attack launched by a malicious user and cloud. Wang proposed the scheme Cloud

2
BI-II which use drandom diagonal matrices to realize biometric identification. However,
their work was proven insecure. In this project, we propose an efficient and privacy
preserving biometric identification scheme which can resist the collusion attack launched by
the users and the cloud. Specifically, our main contributions can be summarized as follows:

We examine the biometric identification scheme and show its in sufficiencies and security
weakness under the proposed level-3 attack. Specifically, we demonstrate that the attacker
can recover their secret keys by colluding with the cloud, and then decrypt the biometric
traits of all users. We present a novel efficient and privacy-preserving biometric
identification scheme. The security analysis shows that the proposed scheme can achieve a
required level of privacy protection. Specifically, our scheme is secure under the biometric
identification outsourcing model and can also oppose the attack proposed. compares with
the existing biometric identification schemes, the presentation analysis shows that the
proposed scheme provides a lesser computational cost in both preparation and identification
procedures.

3
2. LITERATURE SURVEY

2.1 FACE RECOGNITION


AUTHOR: WANGAND HATZINAKOS

Wangand Hatzinakos proposed a privacy-preserving face recognition scheme. Facial


images are the common biometric feature used for individual identification. Face recognition
is mainly performed by two approaches, they are eigen face based recognition and 3D face
recognition. The eigen face based identification works by analyzing face images and
computing eigen faces which are faces composed of eigenvectors. The comparison of Eigen
faces is used to recognize the presence of a face and its identity. The Eigen face technique is
simple, efficient, and yields generally good results in controlled circumstance. There are also
some limitations of Eigen faces. There is limited robustness to changes in lighting,
viewpoint, and distance. 2D recognition systems do not capture the real size of the face,
which is a basic problem. These limitations affect the technique’s application with security
camera.
3D face recognition systems make 3D models of faces and compare the 3D faces for
recognition. These systems are more perfect because they capture the actual shape of faces.

2.2 IRIS CODE VERIFICATION


AUTHOR: WONG AND KIM

Wong and Kim proposed a privacy preserving biometric matching protocol for iris
codes verification. In their protocol, it is computationally infeasible for a malicious user to
impersonate as an sincere user. Iris verification consists of five operations; they are image
acquisition, iris segmentation, iris normalization and unwrapping, feature encoding, and
matching algorithm. In image acquisition step the system takes a high-quality image of the
iris, Iris localization takes place to detect the edge of the iris as well as that of the pupil; thus
extracts the iris region, Normalization is used to transform the iris region to have permanent
dimensions, and hence removing the dimensional inconsistencies between eye images, The
normalized iris region is unwrapped into a rectangular region. The feature encoding is used
to extract the most selective feature in the iris pattern so that a comparison between
templates can be done. Lastly a decision can be made in the matching step.

4
2.3 FINGER CODE VERFICATION
AUTHOR: BARNI AND EVANS

Barni presented a Finger Code identification protocol based on the Homomorphic


Encryption technique. However, all distances are computed between the query and sample
Finger codes in the database, which introduces too much burden as the size of fingerprints
increases.

Evans proposed a novel protocol which reduces the identification time. They used an
improved Homomorphic encryption algorithm to compute the Euclidean distance and
designed novel garbled circuits to find the minimum distance. By exploiting a backtracking
protocol, the best match Finger- Code can be found. However, in, the whole encrypted
database has to be transmitted to the user from the database server.

5
3. SYSTEM ANALYSIS
Existing System:
Related works on privacy-preserving biometric identification are provided in this section.
An efficient biometric identification scheme has been exists.

In this scheme presented a finger code identification protocol they used an improved
Homomorphic encryption algorithm to compute the Euclidean distances, these distances are
computed between the query and sample Finger codes in the database, which introduces too
much burden as the number of finger prints increases.

Disadvantages of Existing System

• The system doesn’t implement proper secure for attack launched by the
attackers in Biometric Identification Scheme.
• There is no an affective privacy preserving encryption techniques in this system.

Proposed System:
In our proposed system, presented a Finger Code identification protocol based on the RSA
Encryption technique, In this technique we use Base 64 encoder to encrypts the query data.

The cloud server figures out the best match for the encrypted query and returns the
associated index to the database owner. It generates the digital sign during upload the data.

Advantages of Proposed System:

• It provides more Security than existing system. It generates digital sign and
secret key.
• Digital sign helps to identify if the data stored in the cloud is either attacked or in
safe. If the attacker modified our data then we can able to get the original data.

6
3.1 FEASIBILITY STUDY:
The feasibility of the project is analyzed during this phase and business proposal is
put forth with a really general plan for the project and a few cost estimates. During system
analysis the feasibility study of the proposed system is to be administered. This is to make
sure that the proposed system isn’t a burden to the corporate. For feasibility analysis, some
understanding of the main requirements for the system is important.

Three key considerations involved with in the feasibility analysis are :

• ECONOMICAL FEASIBILITY

• TECHNICAL FEASIBILITY

• SOCIAL FEASIBILITY

ECONOMICAL FEASIBIITY:
This study is administered to see the economic impact that the system will wear the
organization. The amount of fund that the corporate can pour into the research and
development of the system is restricted. The expenditures must be justified. Thus the
developed system as well within the budget and this was achieved because most of the
technologies used are freely accessible. Only the customized products had to be purchased.

TECHNICAL FEASIBILITY:
This study is administered to see the technical feasibility, that is, the technical
requirements of the system. Any system developed mustn’t have a high demand on the
available technical resources. This will cause high demands on the available technical
resources. This will cause high demands being placed on the client. The developed system
must have a modest requirement, as only smallest or null changes are required for
implementing this technique.

SOCIAL FEASIBILITY:

The aspect of study is to see the extent of acceptance of the system by the user. This
includes the method of coaching the user to use the system efficiently.

7
The user mustn’t feel threatened by the system, instead must accept it as a necessity.
The level of acceptance by the users solely depends on the methods that are employed to
teach the user about the system and to form him conversant in it. His level of confidence
must be raised in order that he’s also ready to make some constructive criticism, which is
welcomed, as he’s the ultimate user of the system.
3.2 SOFTWARE REQUIREMENTS SPECIFICATION:
What is SRS?

Software Requirement Specification (SRS) it is a document that entirely describes


what the proposed software should do without describing how software will perform it. The
basic goal of the need phase is to supply the SRS, which describe the entire behavior of the
proposed software. SRS is additionally helping the clients to know their own needs.
Purpose :
This document is to provide more information about biometric identification. The
biometric identification provides more security compared to text based passwords.
Scope :
Biometric identification management systems are multimodal and they generate a lot
of data. Investing within the necessary storage capacity is dear and managing the
information yourself is risky and time consuming. Biometric data such as fingerprints and
iris cannot be stolen or guessed, greater security.

3.2.1 FUNCTIONAL REQUIREMENTS:

In software engineering, a functional requirement defines a function of a software or


its component. A function is described a set of inputs, the behavior, and outputs. Functional
requirements are in the sence of calculations, technical facts, data management and
processing and other specific functionality that outline what a system is meant to
accomplish. Behavioral requirements telling all the cases where the system uses the
functional requirements are captured in use cases.

8
The following are the functional requirements of our project.

❖ Owner registration.

❖ User registration.

❖ Cloud login.

❖ Upload Biometric image.

❖ Upload Files.

❖ Search Files.

❖ Download image.

3.2.2 NON-FUNCTIONAL REQUIREMENTS:

A non-functional requirement may be a requirement that specifies criteria which will


be wont to judge the operation of a system, instead of specific behavior.

Reliability:
The System should be reliable and must not degrade the performance of the
prevailing system and will not cause the hanging of the system.
Accuracy:
The level of accuracy is very high. All the operations would be done well. The
system can perform accuracy in uploading and downloading the files.

Security:

The system provides more security to the users. Only authorized users can access the
system. The authorization can be given by the cloud server to the users and owners. The
system is having a priority role in keeping the privacy of the user. It helps in storing
important files or documents. Nobody can directly access the documents. The user can use
the biometric identification passwords for more security.

9
HARDWARE REQUIREMENTS:
➢ System : PIV 3.5 GHz
➢ Hard Disk : 320 GB.

➢ Monitor : 14 inches Colour Monitor.

➢ Mouse : Optical Mouse.

➢ Ram : 1 GB

SOFTWARE REQUIREMENTS:
➢ Operating System: Windows XP/ Later Version

➢ Coding Language: Java/J2EE

➢ Front End : Java

➢ Database : MySQL.

3.3 Function Model of the System:


USECASE DIAGRAM:
A use case diagram within the Unified Modeling Language may be a sort of
behavioral diagram defined by and created from a use-case analysis. It is suggest to present a
graphical outline of the functionality provided by a system in terms of actors, their goals,
and any dependencies between those use cases. The main purpose of use case diagram is to
point out what system functions are performed that actor. Roles of the actors in the system
can be depicted.
• This is association symbol used for relationship between actor and
use case
• Use case is represented as ellipse.

• Actor is represented as stick man.

10
Fig 3.3.1 : Use Case Diagram

Use Case Descriptions:

1. Owner Register Use Case:

Use case name: Owner Register

Participating Actors: Owner

Pre condition: Owner must have the basic details to register in this page.

Flow of Events:

• Enter all the required details.

• In addition to the details, Owner must select an image.

• Enter into Horne Page.

Post Condition: If the Owner is success fully registered by giving the required details
then he/she enter into the login page.

11
2. User Register Use Case:

Use case name: User Register

Participating Actors: User

Pre condition: User must have the basic details to register in this page.

Flow of Events:

• Enter all the required details.

• In addition to the details, Owner must select an image.

• Enter into Horne Page.

Post Condition: If the user is success fully registered by giving the required details then
he/she enter into the login page.

3. Activate Owner and User Use Case:

Use case name: Activate Owner and User

Participating Actors: Cloud Server

Pre Condition: Cloud Server can activate the registered Owner and user.

Flow of Events:
• Cloud server enter into server page by entering Cloud server id and password.

• Cloud Server activate the registered Owner and user.

Post Condition: If the Cloud Server activate the registered owner and user then both can
upload the files.

4. Owner Login Use Case:

Use case name: Owner Login

Participating Actors: Owner

12
Pre Condition: Owner must have the valid username, password and biometric finger
print to enter into the system.

Flow of Events:
• Verify the username.
• Verify the password.
• Verify the Biometric finger print.
• Login into the Owner page.

Post Condition: If the name, password and biometric finger print is valid then the Owner
enter into the Owner page, otherwise it will ask for the valid username and password.

5. User Login Use Case:

Use case name: User Login

Participating Actors: User

Pre Condition: User must have the valid username, password and biometric finger print
to enter into the system.

Flow of Events:
• Verify the username.
• Verify the password.
• Verify the Biometric finger print.
• Login into the User page.

Post Condition: If the name, password and biometric finger print is valid then the User enter
into the User page, otherwise it will ask for the valid username and password.

6. Upload biometric image with File use case:


Use case name: Upload biometric image with File

Participating Actors: Owner

Pre Condition: The Owner can upload the file.


Flow of Events:

13
• Owner must select the file.
• Upload the file.
Post Condition: Successfully the file will be uploaded.
7. Download Biometric image Use Case:
Use case name: Download Biometric image

Participating Actors: User

Pre Condition: The user can select the downloaded file.


Flow of Events:

• User must select the file.

• Give the valid Coordinates.

• Download the file.


Post Condition: Successfully the file will be downloaded.

8. Delete Biometric image Use case:

Use case name: Delete Biometric image

Participating Actors: Owner

Pre Condition: The Owner can have the right to delete the files.
Flow of Events:
• Owner delete the biometric image.
Post Condition: The files can deleted by the Owner.

14
4. SYSTEM DESIGN
4.1 Architectural Design:
The design of the system can provide the information about the functionalities and
behaviour. It is a blue print of the system. The entire process is shown in this design.

SYSTEM ARCHITECTURE:

Fig: 4.1 System Architecture

15
4.2 UML DESIGN:
UML stands for Unified Modeling Language, UML may be a standardized common
purpose modeling language within the field of object-oriented software engineering. The
standard is managed, and was created by, the thing Management Group. The goal is for
UML to become a standard language for creating models of object oriented computer
software.
In its current form UML is comprised of two main components: a Meta- model and a
notation. In the future, some sort of method or process can also be added to; or related to
UML. The Unified Modeling Language may be a standard language for Specifying,
Visualization, Constructing and documenting the artifacts of software system, as well as for
business modeling and other non-software systems.

The UML is very important part of developing objects oriented software and the
software development process. The UML uses mostly graphical notations to precise the
planning of software projects.
GOALS:

The Primary goals within the design of the UML are as follows:

1. Provide users a ready-to-use, communicative visual modeling language so that they can
develop and exchange meaningful models.
2. Give extendibility and specialization mechanisms to extend the core concepts.

3. Be independent of particular programming languages development process.

4. Give a official basis for understanding the modeling language.

5. Encourage the growth of OO tools market.

Support high level development concepts such as collaborations, Frameworks, Patterns and
Architecture.
4.2.1 CLASS DIAGRAM:

In software engineering, a class diagram within the Unified Modeling Language is a


sort of static structure diagram that tells the structure of a system by presenting the systems
classes, their attributes, operations, and therefore the relationships among the classes.

16
A class notation consists of three parts:

Class Name

• The name of the class appears in the primary partition

Class Attributes

• Attributes are shown in the second partition.

• The attribute category is shown after the colon.

• Attributes map with data members in code.

Class Operations (Methods)

• Operations are shown in the third partition. They are services


the class provides.
• The return type of a method is exposed after the colon at the end of the
method signature.
• Operations map onto class methods in code

Class Name
Class Attributes

Class Operations

17
Fig 4.2.1 : Class Diagram

4.2.2 SEQUENCE DIAGRAM:

A sequence diagram is Unified Modeling Language (UML) is a kind of interaction


diagram that shows how process operates with one another and in what order. It is a
construct of a communication Sequence Chart. Sequence diagrams are also called event
diagrams, event scenarios, and timing diagram.

18
Fig 4.2.2: Sequence Diagram

4.2.3 Activity Diagram

Activity diagram defines the flow of control in a system. The activity diagram consists
of activities and links. The activity diagrams contains different type of activities that are
present in the system. The activities are the functionalities. We have to prepare number of
activity diagrams to identify the How of the system. These are used to visualize the flow of
controls in a system. This is prepared to prossess a thought of how the system will work
when executed.

19
Fig 4.2.3(a): Activity Diagram for Owner

Fig 4.2.3 (b): Activity Diagram for User

20
Fig 4.2.3 (c): Activity Diagram for Cloud

4.2.4 State Chart Diagram:

State charts are used to identify the different states. The diagram look like activity
diagram. A state diagram sometimes called as a state machine diagram or state chart
diagram.
A State diagram look like a flow chart in which the initial state is represented by a large
black dot and subsequent states are represented as box with rounded corners. There are
some some lines between the states to connect the activities. The final state is denoted with
a large black dot with a circle around it.
state chart Diagrams for owner and cloud server are shown below:

21
Fig 4.2.4(a) : state chart diagram for owner

Fig 4.2.4(b): state chart diagram for Cloud server

22
4.3 Detailed description of Tables tables and databases :
Data base design:

Normalization:

Normalization is that the procedure of minimizing redundancy from a relation or set


of relations. Redundancy in relation may occurs insertion, deletion and updation anomalies.
So, it helps to minimize the redundancy in relations. Normal forms are wont to eliminate or
reduce redundancy in database tables.

▪ First Normal Form:


If a relation contain composite or multi-valued attribute, it violates first normal form
or a relation is in first normal form if it doesn’t contain any composite or multi- valued
attribute. A relation is in first normal form if every attribute therein relation is singled
valued attribute.

▪ Second Normal Form:


In second normal form, a relation must be in first normal form and relation mustn’t
contain any partial dependency. A relation is in 2NF if it has No Partial Dependency, i.e., no
non-prime attribute depends on any accurate subset of any candidate key of the table.
Partial Dependency – If the right subset of candidate key determines non-prime
attribute, it’s called partial dependency.
▪ Third Normal Form:
A relation is in third normal form, if there’s no transitive dependency for non- prime
attributes also because it is in second normal form. A relation is in 3NF if a minimum of
one among the subsequent condition holds in every non-trivial function dependency X –>
Y.

• X is a super key.
• Y is a prime attribute.

23
▪ Boyce-Codd Normal Form (BCNF):
A relation R is in BCNF if R is in Third Normal Form and for each FD, LHS is super key.
A relation is in BCNF iff in every non-trivial functional dependency X –> Y, X may be a
super key.

Data dictionary :
It contains all the information about the database tables. The data that can be given
by the user is stored in the database. The data can be searched by the user is displayed on the
screen.
Owner Registration :

S.NO FIELD NAME DATA TYPE SIZE CONSTRAINT


1 User Name Varchar2 20 Primary Key
2 Password Varchar2 20 Not Null
3 Email Varchar2 20 Not Null
4 Mobile Integer 10 Not Null
5 Address Varchar2 30 Not Null
6 DOB date 20 Not Null
7 Gender Varchar2 20 Not Null
8 Pincode Integer 10 Not Null
9 Image Longblob 30 Not Null
10 Biometric Image Longblob 30 Not Null

Owner Login :
Leave lo
S.NO FIELD NAME DATA TYPE SIZE CONSTRAINT
1 User Name Varchar2 20 Primary Key
2 Password Varchar2 20 Not Null
3 Biometric Image Longblob 30 Not Null

24
User Registration :
S.NO FIELD NAME DATA TYPE SIZE CONSTRAINT
1 User Name Varchar2 20 Primary Key
2 Password Varchar2 20 Not Null
3 Email Varchar2 20 Not Null
4 Mobile Integer 10 Not Null
5 Address Varchar2 30 Not Null
6 DOB date 20 Not Null
7 Gender Varchar2 10 Not Null
8 Pincode Integer 10 Not Null
9 Image longblob 30 Not Null
10 Biometric Image Longblob 30 Not Null

User Login :

S.NO FIELD NAME DATA TYPE SIZE CONSTRAINT


1 User Name Varchar2 20 Primary Key
2 Password Varchar2 20 Not Null
3 Biometric Image Longblob 30 Not Null

Cloud Server Login :

S.NO FIELD NAME DATA TYPE SIZE CONSTRAINT


1 User Name Varchar2 20 Primary Key
2 Password Varchar2 20 Not Null

25
Upload Biometric image :

S.NO FIELD NAME DATA TYPE SIZE CONSTRAINT


1 Id Integer 20 Primary Key
2 Title Varchar2 20 Not Null
3 Name Varchar2 20 Not Null
4 Owner Varchar2 20 Not Null
5 Description Varchar2 20 Not Null
6 Degital Sign Varchar2 20 Not Null
7 Secret Key Varchar2 20 Not Null
8 Date date 20 Not Null

Search Biometric Image :

S.NO FIELD NAME DATA TYPE SIZE CONSTRAINT


1 Id Integer 20 Primary Key
2 User Varchar2 20 Not Null
3 KeyWord Varchar2 20 Not Null
4 Date date 20 Not Null

Comment On Biometric Image :

S.NO FIELD NAME DATA TYPE SIZE CONSTRAINT


1 Id Integer 20 Primary Key
2 User Varchar2 20 Not Null
3 Title Varchar2 20 Not Null
4 Name Varchar2 20 Not Null
5 Comment Varchar2 20 Not Null
6 Date date 20 Not Null

26
5. SYSTEM IMPLEMENTATION

Implementation is the phase of the project when the theoretical design is turned out
into a operational system. Thus it can be careful to be the furthermost dangerous stage in
attaining a successful new system and in charitable the user, sureness that the new system
will work and be real. The implementation stage includes careful development, examination
of the existing system and it’s restraints on operation, designing of methods to realize
exchange and evaluation of exchange methods.

MODULAR DESCRIPTION:
MODULES:
• Data Owner
• Cloud Server
• Users.

Data Owner:
In this module, the data owner uploads their Biometric images with their
contents data to the Cloud server. For the security purpose the data owner assigns the
digital sign and then store in the Cloud and also performs the following operations
such as Upload Biometric image with its digital sign based on title, description, List
all uploaded Biometric images, View all comments on the biometric image Verify
Biometric image details, check the biometric image whether the image is attacked or
not and Delete Biometric image details.
Cloud Server:
The Cloud service manages a Cloud to provide data storage service. And
performs the following operations such as Activate the registered Owner and User,
Store all details about the Owner and User, View all Owners and Users Store all
Biometric image files with their signature, View all Biometric image Files with its
details, View all Biometric image comments, View all biometric image transactions,
View all attackers and View all Data owners and Users.

27
Users:
The Cloud User who has a large amount of data to be stored in Cloud Servers
and have the permissions to access and manipulate stored Biometric image and its
data. The consumer will search the data and accessing the Biometric image data if he
is authorized and performs the following operations such as Search Biometric image,
Access Biometric image and its details, Download Biometric image & make
comments.

28
6. CODE

InsertDataAction.java

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package com.biometric.actions;

import com.bio.db.GetDBConnection;

import java.io.IOException;

import java.io.PrintWriter;

import java.sql.Connection;

import java.sql.PreparedStatement;

import javax.servlet.ServletException;

import javax.servlet.annotation.MultipartConfig;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import javax.servlet.http.Part;

/**

29
* @author welcome

*/

@MultipartConfig

public class InsertDataAction extends HttpServlet {

@Override

protected void doPost(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {

PrintWriter out = response.getWriter();

String uname = request.getParameter("userid");

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

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

String mno = request.getParameter("mobile");

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

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

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

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

Part filepart = request.getPart("pic");

Part fileBio = request.getPart("pic2");

try {

Connection con = null;

PreparedStatement ps = null;

30
con = GetDBConnection.getDbConnection();

String status = "Waiting";

ps=con.prepare Statement("insert into consumer (username, password, email, mobile, address,


dob, gender, pincode, status, image,thumbimage,thumbname) values(?,?,?,?,?,?,?,?,?,?,?,?)");
ps.setString(1, uname);

ps.setString(2, pass);

ps.setString(3, email);

ps.setString(4, mno);

ps.setString(5, addr);

ps.setString(6, dob);

ps.setString(7, gender);

ps.setString(8, pincode);

ps.setString(9, status);

ps.setBinaryStream(10, filepart.getInputStream());

ps.setBinaryStream(11, fileBio.getInputStream());

ps.setString(12, fileBio.getSubmittedFileName());

int x = ps.executeUpdate();

if (x > 0) {

out.print("Registered Successfully");

} catch (Exception e) {

e.printStackTrace();

31
}

OBioUdentityAction.java

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package com.biometric.actions;

import com.bio.db.GetDBConnection;

import java.io.IOException;

import java.io.PrintWriter;

import java.sql.Connection;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.servlet.ServletException;

import javax.servlet.annotation.MultipartConfig;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

32
import javax.servlet.http.HttpServletResponse;

import javax.servlet.http.Part;

/**

* @author welcome

*/

@MultipartConfig

public class OBioIdentiryAction extends HttpServlet {

@Override

protected void doPost(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {

PrintWriter out = response.getWriter();

Part filepart = request.getPart("pic2");

String thbname = filepart.getSubmittedFileName();

try {

Connection con = GetDBConnection.getDbConnection();

String sql1 = "SELECT * FROM owner where thumbname='" + thbname + "' ";

Statement stmt1 = con.createStatement();

ResultSet rs1 = stmt1.executeQuery(sql1);

if (rs1.next() == true) {

33
response.sendRedirect("ownerMain.jsp");

}else{

out.println("Finger Print Mismatch, Please Provide Correct Finger Print!!");

} catch (Exception e) {

e.printStackTrace();

}}

UBioIdentityAction.java

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package com.biometric.actions;

import com.bio.db.GetDBConnection;

import java.io.IOException;

import java.io.PrintWriter;

import java.sql.Connection;

import java.sql.ResultSet;

import java.sql.Statement;

34
import javax.servlet.ServletException;

import javax.servlet.annotation.MultipartConfig;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import javax.servlet.http.Part;

/**

* @author welcome

*/

@MultipartConfig

public class UBioIdentiryAction extends HttpServlet {

@Override

protected void doPost(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {

PrintWriter out = response.getWriter();

Part filepart = request.getPart("pic2");

String thbname = filepart.getSubmittedFileName();

try {

Connection con = GetDBConnection.getDbConnection();

String sql1 = "SELECT * FROM consumer where thumbname='" + thbname + "' ";

35
Statement stmt1 = con.createStatement();

ResultSet rs1 = stmt1.executeQuery(sql1);

if (rs1.next() == true) {

response.sendRedirect("consumerMain.jsp");

}else{

out.println("Finger Print Mismatch, Please Provide Correct Finger Print!!");

} catch (Exception e) {

e.printStackTrace();

OImageInsertAction.java

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package com.biometric.actions;

import com.bio.db.GetDBConnection;

import java.io.IOException;

36
import java.io.PrintWriter;

import java.sql.Connection;

import java.sql.PreparedStatement;

import java.text.SimpleDateFormat;

import java.util.Date;

import javax.servlet.ServletException;

import javax.servlet.annotation.MultipartConfig;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import javax.servlet.http.HttpSession;

import javax.servlet.http.Part;

import org.bouncycastle.util.encoders.Base64;

/**

* @author welcome

*/

@MultipartConfig

public class o_InsertImageAction extends HttpServlet {

@Override

37
protected void doPost(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {

PrintWriter out = response.getWriter();

Connection con = null;

PreparedStatement ps = null;

HttpSession session = request.getSession();

String title=null,name=null,desc=null,mac=null,key=null,image=null,bin = "",


paramname=null;

title = new String(Base64.encode(request.getParameter("title").getBytes()));

name = new String(Base64.encode(request.getParameter("name").getBytes()));

desc = request.getParameter("desc");

mac = request.getParameter("mac");

key = request.getParameter("key");

Part filePart = request.getPart("pic");

try {

con = GetDBConnection.getDbConnection();

SimpleDateFormat sdfDate = new SimpleDateFormat("dd/MM/yyyy");

SimpleDateFormat sdfTime = new SimpleDateFormat("HH:mm:ss");

Date now = new Date();

String strDate = sdfDate.format(now);

String strTime = sdfTime.format(now);

38
String dt = strDate + " " + strTime;

int rank = 0;

String task = "Upload";

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

String strQuery2 = "insert into transaction(user,name,sk,task,dt) values('" + owner + "','"


+ name + "','" + key + "','" + task + "','" + dt + "')";

con.createStatement().executeUpdate(strQuery2);

String strQuery3 = "insert into matadata(owner,title,name,digitalsign) values('" + owner


+ "','" + title + "','" + name + "','" + mac + "')";

con.createStatement().executeUpdate(strQuery3);

PreparedStatement ps1 = con.prepareStatement("insert into


ownerimages(title,name,owner,description,digitalsign,sk,dt,image,rank)
values(?,?,?,?,?,?,?,?,?)");

ps1.setString(1, title);

ps1.setString(2, name);

ps1.setString(3, owner);

ps1.setString(4, desc);

ps1.setString(5, mac);

ps1.setString(6, key);

ps1.setString(7, dt);

ps1.setBinaryStream(8, filePart.getInputStream());

ps1.setInt(9, rank);

39
ps1.executeUpdate();

ps = con.prepareStatement("insert into serverimages (title, name, owner, description,


digitalsign, sk, dt,rank) values(?,?,?,?,?,?,?,?)");
ps.setString(1, title);

ps.setString(2, name);

ps.setString(3, owner);

ps.setString(4, desc);

ps.setString(5, mac);

ps.setString(6, key);

ps.setString(7, dt);

ps.setInt(8, rank);

ps.executeUpdate();

out.print("Image Uploaded Successfully");

} catch (Exception e) {

out.println("same image cont upload again");

GetDBConnection.java

/*

40
* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package com.bio.db;

import java.sql.Connection;

import java.sql.DriverManager;

/**

* @author welcome

*/

public class GetDBConnection {

public static Connection con = null;

public static Connection getDbConnection() {

try {

Class.forName("com.mysql.jdbc.Driver");

con = DriverManager.getConnection("jdbc:mysql://localhost:3306/Bio_Indentification",
"root", "root");

} catch (Exception e) {

e.printStackTrace();

41
return con;

A_AllAttackers.jsp

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


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>View All Attackers</title>

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

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

<link rel="stylesheet" type="text/css" href="css/coin-slider.css" />

<script type="text/javascript" src="js/cufon-yui.js"></script>

<script type="text/javascript" src="js/cufon-marketingscript.js"></script>

<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>

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

<script type="text/javascript" src="js/coin-slider.min.js"></script>

<style type="text/css">

<!--

.style1 {font-size: 40px}

.style5 {font-size: 16px}

42
.style10 {font-size: 14px}

.style11 {color: #000000}

.style12 {color: #FFFF00}

-->

</style>

</head>

<body>

<div class="main">

<div class="header">

<div class="header_resize">

<div class="menu_nav">

<ul>

<li><a href="index.html"><span>Home Page</span></a></li>

<li><a href="ownerLogin.jsp"><span>Owner</span></a></li>

<li><a href="consumerLogin.jsp"><span>Users</span></a></li>

<li><a href="webServerLogin.jsp"><span>Cloud Server</span></a></li>

<li class="active"></li>

<li></li>

</ul>

</div>

<div class="clr"></div>

43
<div class="logo">

<h1><a href="index.html" class="style1">An Efficient and Privacy-Preserving Biometric


Identification Scheme in Cloud Computing</a></h1>

</div>

<div class="clr"></div>

<div class="slider">

<div id="coin-slider">

<img src="images/slide1.jpg" width="960" height="360" alt="" />

<img src="images/slide2.jpg" width="960" height="360" alt="" />

<img src="images/slide3.jpg" width="960" height="360" alt="" />

</div>

<div class="clr"></div>

</div>

<div class="clr"></div>

</div>

</div>

<div class="content">

<div class="content_resize">

<div class="mainbar">

<div class="article">

<h2> All Attackers</h2>

44
<p>&nbsp;</p>

<div class="clr"></div>

<p>

<table width="657" border="1" cellpadding="0" cellspacing="0" ">

<tr>

<td width="29" height="34" valign="baseline" bgcolor="#FF0000" style="color:


#2c83b0;"><div align="center" class="style5 style15 style12"><strong>Id</strong></div></td>

<td width="99" height="34" valign="baseline" bgcolor="#FF0000" style="color:


#2c83b0;"><div align="center" class="style5 style15
style12"><strong>Title</strong></div></td>

<td width="88" height="34" valign="baseline" bgcolor="#FF0000" style="color:


#2c83b0;"><div align="center" class="style5 style15
style12"><strong>Name</strong></div></td>

<td width="146" height="34" valign="baseline" bgcolor="#FF0000" style="color:


#2c83b0;"><div align="center" class="style5 style15
style12"><strong>Attacker</strong></div></td>

<td width="95" height="34" valign="baseline" bgcolor="#FF0000" style="color:


#2c83b0;"><div align="center" class="style5 style15 style12"><strong>Attacked
Date</strong></div></td>

<td width="123" height="34" valign="baseline" bgcolor="#FF0000" style="color:


#2c83b0;"><div align="center" class="style5 style12 style15"><strong>Digital
Sign</strong></div></td>

</tr>

<%@ include file="connect.jsp" %>

<%@ page import ="org.bouncycastle.util.encoders.Base64" %>

45
<%

String title,name,mac,date,attacker;

int id=0,i=1;

try

String str1 = "select * from attacker ";


Statement st1 = connection.createStatement();
ResultSet rs1 = st1.executeQuery(str1);
while(rs1.next())

id = rs1.getInt(1);

attacker = rs1.getString(2);

title = rs1.getString(3);

name = rs1.getString(4);

mac = rs1.getString(6);

date = rs1.getString(7);

String decryptedTitle = new String(Base64.decode(title.getBytes()));

String decryptedName = new String(Base64.decode(name.getBytes()));

%>

<tr>

<td valign="baseline" height="30"><p class="style3 style10


style11">&nbsp;</p><div align="center" class="style3 style10
style11"><%out.println(id);%></div></td>

46
<td valign="baseline" height="30"><p class="style3 style10 style11">&nbsp;</p><div
align="center" class="style3 style10 style11"><%out.println(decryptedTitle);%></div></td>

<td valign="baseline" height="30"><p class="style3 style10 style11">&nbsp;</p><div


align="center" class="style3 style10 style11"><%out.println(decryptedName);%></div></td>

<td valign="baseline" height="30"><p class="style3 style10 style11">&nbsp;</p><div


align="center" class="style3 style10 style11"><%out.println(attacker);%></div></td>

<td valign="baseline" height="30"><p class="style3 style10


style11">&nbsp;</p><div align="center" class="style3 style10
style11"><%out.println(date);%></div></td>

<td valign="baseline" height="30"><p class="style3 style10


style11">&nbsp;</p><div align="center" class="style3 style10 style11"><a
href="a_DSign.jsp?mac=<%=mac%>&name=<%=decryptedName%>&type=<%="attack"%>">
View</a></div></td>

</tr>

<%

%>

<tr>

<td valign="baseline" height="20">&nbsp;</td>

<td valign="baseline" height="20">&nbsp;</td>

<td valign="baseline" height="20">&nbsp;</td>

<td valign="baseline" height="20">&nbsp;</td>

<td valign="baseline" height="20">&nbsp;</td>

<td valign="baseline" height="20">&nbsp;</td>

47
</tr>

<p></p>

<%

connection.close();

catch(Exception e)

out.println(e.getMessage());

%>

</table> </p>

<p align="right"><a href="auditorMain.jsp">Back</a></p>

<div class="clr"></div>

</div>

</div>

<div class="sidebar">

<div class="gadget">

<h2 class="star"><span></span> Menu</h2>

<div class="clr"></div>

<ul class="sb_menu"><li><a href="auditorMain.jsp"> Main</a></li>

<li><a href="auditorLogin.jsp">Log Out</a></li>

48
</ul>

</div>

<div class="gadget">

<h2 class="star">&nbsp;</h2>

</div>

</div>

<div class="clr"></div>

</div>

</div>

<div class="fbg"></div>

<div class="footer">

<div class="footer_resize">

<div style="clear:both;"></div>

</div>

</div>

</div>

</body>

</html>

C_searchImage.jsp

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


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

49
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Search Images</title>

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

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

<link rel="stylesheet" type="text/css" href="css/coin-slider.css" />

<script type="text/javascript" src="js/cufon-yui.js"></script>

<script type="text/javascript" src="js/cufon-marketingscript.js"></script>

<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>

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

<script type="text/javascript" src="js/coin-slider.min.js"></script>

<style type="text/css">

<!--

.style1 {font-size: 40px}

.style5 {

font-size: 25px;

color: #333333;

.style10 {font-size: 14px}

.style11 {font-size: 16px}

.style13 {color: #000000}

50
.style14 {

font-size: 14px;

color: #FFFF00;

font-weight: bold;

.style15 {color: #959595}

.style16 {

color: #FF0000;

font-weight: bold;

.style18 {color: #FFFF00; font-weight: bold; }

.style19 {color: #FFFF00}

-->

</style>

</head>

<body>

<div class="main">

<div class="header">

<div class="header_resize">

<div class="menu_nav">

<ul>

51
<li><a href="index.html"><span>Home Page</span></a></li>

<li><a href="ownerLogin.jsp"><span>Owner</span></a></li>

<li class="active"><a href="consumerLogin.jsp"><span>Users</span></a></li>

<li><a href="webServerLogin.jsp"><span>Cloud Server</span></a></li>

<li><a href="auditorLogin.jsp"></a></li>

<li></li>

</ul>

</div>

<div class="clr"></div>

<div class="logo">

<h1><a href="index.html" class="style1">An Efficient and Privacy-Preserving Biometric


Identification Scheme in Cloud Computing</a></h1>

</div>

<div class="clr"></div>

<div class="slider">

<div id="coin-slider">

<img src="images/slide1.jpg" width="960" height="360" alt="" />

<img src="images/slide2.jpg" width="960" height="360" alt="" />

<img src="images/slide3.jpg" width="960" height="360" alt="" />

</div>

<div class="clr"></div>

52
</div>

<div class="clr"></div>

</div>

</div>

<div class="content">

<div class="content_resize">

<div class="mainbar">

<div class="article">

<p class="style5 style16">Search Biometric Image Files Content</p>

<div class="clr"></div>

<p>

<DIV CLASS="article">

<H2>&nbsp;</H2>

<FORM ACTION="c_SearchImages.jsp" METHOD="post">

<DIV STYLE="width:600px;">

<TABLE ALIGN="center" STYLE="margin:0 0 0 30px;">

<TR>

<TD width="174" bgcolor="#FF0000"><P align="center" class="style18"><span


class="style10">Enter Keyword to Search &nbsp;</span>&nbsp;</P></TD>

<TD width="165" bgcolor="#FF0000"><div align="center" class="style18">

<INPUT TYPE="text" name="keyword" />

53
</div></TD>

<TD width="72" bgcolor="#FF0000"><INPUT name="submit" TYPE="submit"


STYLE="width:50px; height:25px;" VALUE="GO"/></TD>

</TR>

<TR>

<TD COLSPAN="3" bgcolor="#FF0000"><P align="center" class="style14">[


searching content Based on Image Description ] </P></TD>

</TR>

</TABLE>

</DIV>

</FORM>

</DIV>

<%@ include file="connect.jsp" %>

<%@ page import ="org.bouncycastle.util.encoders.Base64" %>

<%@ page import ="java.text.SimpleDateFormat,java.util.Date"%>

<%

try{

String strDate,strTime,dt;

String consumer,input,input1;

String status=null;

String title,imgName,desc,desc1,rank;

54
int i=0;
consumer=(String)session.getAttribute("consumer");

input1= request.getParameter("keyword");

input = input1.toLowerCase();

SimpleDateFormat sdfDate = new SimpleDateFormat("dd/MM/yyyy");

SimpleDateFormat sdfTime = new SimpleDateFormat("HH:mm:ss");

Date now = new Date();

strDate = sdfDate.format(now);

strTime = sdfTime.format(now);

dt = strDate + " " + strTime;

if(!input.equalsIgnoreCase(""))

Statement st3 = connection.createStatement();

String query3 ="insert into search(consumer,keyword,dt) values ('"+consumer+"', '"+input1+"',


'"+dt+"')";

st3.executeUpdate (query3);

Statement st4 = connection.createStatement();

String query4 ="select * from consumer where username='"+consumer+"'";

ResultSet rs4 = st4.executeQuery(query4);

if(rs4.next())

55
status=rs4.getString(10);

Statement stmt=connection.createStatement();

String strQuery = "select * from serverimages order by rank desc";

ResultSet rs = stmt.executeQuery(strQuery);

%><table width="552" border="1" align="center" cellpadding="0" cellspacing="0" ">

<tr>

<td width="69" height="34" valign="baseline" bgcolor="#FF0000" style="color:


#2c83b0;"><div align="center" class="style19 style11 style5
style4"><strong>Id</strong></div></td>

<td width="69" height="34" valign="baseline" bgcolor="#FF0000"


style="color: #2c83b0;"><div align="center" class="style19 style11 style5 style4"><strong>Bio
Image</strong></div></td>

<td width="148" height="34" valign="baseline" bgcolor="#FF0000"


style="color: #2c83b0;"><div align="center" class="style19 style11 style5
style4"><strong>Title</strong></div></td>

<td width="183" height="34" valign="baseline" bgcolor="#FF0000" style="color:


#2c83b0;"><div align="center" class="style19 style11 style5
style4"><strong>Name</strong></div></td>

<td width="142" height="34" valign="baseline" bgcolor="#FF0000" style="color:


#2c83b0;"><div align="center" class="style19 style11 style5
style4"><strong>Rank</strong></div></td>

<td width="142" height="34" valign="baseline" bgcolor="#FF0000"


style="color: #2c83b0;"><div align="center" class="style19 style11 style5
style4"><strong>View Comments</strong></div></td>

56
</tr><%

while(rs.next()){

i=rs.getInt(1);

title = rs.getString(2);

imgName = rs.getString(3);

desc1 = rs.getString(5);

rank = rs.getString(9);

String encryptedTitle = new String(Base64.decode(title.getBytes()));

String encryptedName = new String(Base64.decode(imgName.getBytes()));

String encryptedDesc1 = new String(Base64.decode(desc1.getBytes()));

desc = encryptedDesc1.toLowerCase();

String encryptedName1= encryptedName.toLowerCase();

String encryptedTitle1=encryptedTitle.toLowerCase();

if ( desc.contains(input) || encryptedTitle1.contains(input) || encryptedName1.contains(input) ){

%>

</P>

<tr>

<td width="69" valign="baseline" height="31" style="color: #2c83b0;"><p>&nbsp;</p>

<div align="center" class="style15 style4 style5 style10


style13"><%=i%></div></td>

<td width="146" rowspan="1" ><div class="style3 style10"


style="margin:10px 13px 10px 13px;" > <a class="#" id="img1" href="#" >

57
<input name="image" type="image" src = "w_ProfilePic.jsp? id= <%=i%>
&type=<%="serverimages"%>" style="width:110px; height:100px;" /></a></div></td>

<td width="148" valign="baseline" height="31" style="color:


#2c83b0;"><p>&nbsp;</p>

<div align="center" class="style15 style4 style5 style10


style13"><%=encryptedTitle%></div></td>

<td width="183" valign="baseline" height="31" style="color:


#2c83b0;"><p>&nbsp;</p>

<div align="center" class="style15 style4 style5 style10 style13"><a


href="c_SearchImages1.jsp?imgName=<%=encryptedName%>"><%=encryptedName%></a><
/div></td>

<td width="142" valign="baseline" height="31" style="color:


#2c83b0;"><p>&nbsp;</p>

<div align="center" class="style15 style4 style5 style10


style13"><%=rank%></div></td>

<td width="142" valign="baseline" height="31" style="color:


#2c83b0;"><p>&nbsp;</p>

<div align="center" class="style15 style4 style5 style10 style13"><a


href="c_ViewComments.jsp?id=<%=i%>&keyword=<%=input%>"><%="View"%></a></div>
</td>

</tr>

<%

58
}catch(Exception e){

e.printStackTrace();

%>

</table>

</P>

<p align="right"><a href="consumerMain.jsp">Back</a></p>

<div class="clr"></div>

</div>

</div>

<div class="sidebar">

<div class="gadget">

<h2 class="star"><span></span> Users Menu</h2>

<div class="clr"></div>

<ul class="sb_menu">

<li><a href="consumerMain.jsp">User Main</a></li>

<li><a href="consumerLogin.jsp">Log Out </a></li>

</ul>

</div>

</div>

<div class="clr"></div>

59
</div>

</div>

<div class="fbg"></div>

<div class="footer">

<div class="footer_resize">

<div style="clear:both;"></div>

</div>

</div>

</div>

</body>

</html>

O_addImage1.jsp

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


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Upload Imge</title>

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

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

<link rel="stylesheet" type="text/css" href="css/coin-slider.css" />

<script type="text/javascript" src="js/cufon-yui.js"></script>

60
<script type="text/javascript" src="js/cufon-marketingscript.js"></script>

<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>

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

<script type="text/javascript" src="js/coin-slider.min.js"></script>

<style type="text/css">

<!--

.style1 {font-size: 40px}

.style2 {font-size: 14px}

.style3 {color: #FFFF00}

.style4 {color: #FF0000}

-->

</style>

</head>

<body>

<div class="main">

<div class="header">

<div class="header_resize">

<div class="menu_nav">

<ul>

<li><a href="index.html"><span>Home Page</span></a></li>

<li class="active"><a href="ownerLogin.jsp"><span>Owner</span></a></li>

61
<li><a href="consumerLogin.jsp"><span>Users</span></a></li>

<li><a href="webServerLogin.jsp"><span>Cloud Server</span></a></li>

<li></li>

<li></li>

</ul>

</div>

<div class="clr"></div>

<div class="logo">

<h1><a href="index.html" class="style1">An Efficient and Privacy-Preserving Biometric


Identification Scheme in Cloud Computing</a></h1>

</div>

<div class="clr"></div>

<div class="slider">

<div id="coin-slider">

<img src="images/slide1.jpg" width="960" height="360" alt="" />

<img src="images/slide2.jpg" width="960" height="360" alt="" />

</div>

<div class="clr"></div>

</div>

<div class="clr"></div>

</div>

62
</div>

<div class="content">

<div class="content_resize">

<div class="mainbar">

<div class="article">

<h2 class="style4">Biometric Image Upload !!! </h2>

<p>&nbsp;</p>

<div class="clr"></div>

<p>

<%@ include file="connect.jsp" %>

<%@ page import ="java.security.Key" %>

<%@ page import ="javax.crypto.Cipher" %>

<%@ page import ="java.math.BigInteger" %>

<%@ page import ="javax.crypto.spec.SecretKeySpec" %>

<%@ page import ="org.bouncycastle.util.encoders.Base64" %>

<%@ page import ="java.security.MessageDigest,java.security.DigestInputStream" %>

<%@ page import ="java.security.KeyPairGenerator,java.security.KeyPair,java.security.Key"


%>

<%@ page import


="java.io.PrintStream,java.io.FileOutputStream,java.io.FileInputStream,java.io.BufferedInputStr
eam" %>
<%

try

63
{

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

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

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

String forMac = title + name + desc;

String keys = "ef50a0ef2c3e3a5f";

String h1="";

String filename="D:\\biodoc\\filename.txt";

KeyPairGenerator kg = KeyPairGenerator.getInstance("RSA");

Cipher encoder = Cipher.getInstance("RSA");

String encryptedTitle = new String(Base64.encode(title.getBytes()));

String encryptedName = new String(Base64.encode(name.getBytes()));

String encryptedDesc = new String(Base64.encode(desc.getBytes()));

KeyPair kp = kg.generateKeyPair();

Key pubKey = kp.getPublic();

byte[] pub = pubKey.getEncoded();

PrintStream p = new PrintStream(new FileOutputStream(filename));

p.print(new String(forMac));

MessageDigest md = MessageDigest.getInstance("SHA1");

FileInputStream fis11 = new FileInputStream(filename);

DigestInputStream dis1 = new DigestInputStream(fis11, md);

64
BufferedInputStream bis1 = new BufferedInputStream(dis1);

//Read the bis so SHA1 is auto calculated at dis

while (true) {

int b1 = bis1.read();

if (b1 == -1)

break;

BigInteger bi1 = new BigInteger(md.digest());

String spl1 = bi1.toString();

h1 = bi1.toString(16);

String key = String.valueOf(pub);

%>

<!--<form action="o_InsertImage.jsp" method="post" enctype="multipart/form-


data">-->

<form action="o_InsertImageAction" method="post" enctype="multipart/form-data">

<table width="600" border="0" cellpadding="0" cellspacing="0" style="border-collapse:


collapse; display:inline; margin:10px 10px 10px 10px; font-family:Verdana, Arial, Helvetica,
sans-serif; font-size:14px;">

<tr>

<td width="243" height="45" valign="middle" bgcolor="#FF0000" style="color:


#2c83b0;"><div align="left" class="style3 style7" style="margin-left:20px;"><strong> Title
</strong></div></td>

65
<td width="357" valign="middle" height="45" style="color:#000000;"><div align="left"
style="margin-left:20px;"><input type="text" name="title"
value=<%=encryptedTitle%>></div></td>

</tr>

<tr>

<td width="243" height="45" valign="middle" bgcolor="#FF0000" style="color:


#2c83b0;"><div align="left" class="style3 style7" style="margin-left:20px;"><strong>Biometric
Image Name </strong></div></td>

<td width="357" valign="middle" height="45"


style="color:#000000;"><div align="left" style="margin-left:20px;"><input type="text"
name="name" value=<%=encryptedName%>></div></td>

</tr>

<tr>

<td width="243" height="45" valign="middle" bgcolor="#FF0000" style="color:


#2c83b0;"><div align="left" class="style3 style7" style="margin-left:20px;"><strong>
Biometric Image Description <br />

</strong></div></td>

<td width="357" valign="middle" height="45"><div align="left" style="margin-left:20px;">

<textarea name="desc" cols="23" rows="3" readonly><%=encryptedDesc%> </textarea>

</div></td>

</tr>

<tr>

66
<td width="243" height="45" valign="middle" bgcolor="#FF0000" style="color:
#2c83b0;"><div align="left" class="style3 style7" style="margin-left:20px;"><strong>Digital
Sign </strong></div></td>

<td width="357" valign="middle" height="45" style="color:#000000;"><div align="left"


style="margin-left:20px;"><input type="text" name="mac" value=<%=h1%>></div></td>

</tr>

<tr>

<td width="243" height="45" valign="middle" bgcolor="#FF0000" style="color:


#2c83b0;"><div align="left" class="style3 style7" style="margin-left:20px;"><strong>Secret
Key</strong></div></td>

<td width="357" valign="middle" height="45" style="color:#000000;"><div align="left"


style="margin-left:20px;"><input type="text" name="key" value=<%=key%>></div></td>

</tr>

<tr bgcolor="#FF0000"> <span class="style8"><strong>

</tr>

</strong></span>

<tr>

<td width="243" height="74" align="left" valign="middle" bgcolor="#FF0000" style="color:


#2c83b0;"><div align="left" class="style3 style8" style="margin-left:20px;"><strong>Select
Biometric Image </strong></div></td>

<td width="357" align="left" valign="middle" height="74" style="color: #2c83b0;"><div


align="left">

<div align="left" style="margin-left:20px;"><input type="file" name="pic"></div></td>

</tr>

67
<div > <tr><td height="45" colspan="2" id="learn_more" align="center"
style="color:#FFFFFF;"><input type="submit" value="Submit" style="width:100px;
height:35px; background-color:#000000; color:#FFFFFF;"/></td></tr></div>

</table>

</form>

<%

connection.close();

catch(Exception e)

out.println(e.getMessage());

%>

</p>

<p align="right"><span class="style2"><a


href="o_AddImage.jsp">Back</a></span></p>

<div class="clr"></div>

</div>

</div>

<div class="sidebar">

<div class="gadget">

<h2 class="star"><span></span> Menu</h2>

68
<div class="clr"></div>

<ul class="sb_menu">

<li><strong><a href="ownerMain.jsp">Owner Main </a></strong></li>

<li><strong><a href="ownerLogin.jsp">Log Out </a></strong></li>

</ul>

</div>

</div>

<div class="clr"></div>

</div>

</div>

<div class="fbg"></div>

<div class="footer">

<div class="footer_resize">

<div style="clear:both;"></div>

</div>

</div>

</div>

</body> </html>

69
7. SYSTEM TESTING
OBJECTIVE:
The purpose of testing is to discover errors. Testing is that the process of trying to
get every conceivable fault or weakness during a work product. It provides a way to check
the functionality of components, subassemblies, assemblies and/or a finished product. This
is the procedure of exercising software with the objective of ensuring that the software
meets its requirements and user expectations and doesn’t fail in an undesirable manner.
There are various types of test. Each test type addresses a specific testing requirement.
7.1 TYPES OF TESTS:
7.1.1 UNIT TESTING:

Unit testing involves the planning of test cases that validate that the interior
program logic is functioning properly, which program inputs produce valid outputs. every
decision branches and internal code flow must be validated. It is the testing of individual
software units of the appliance. It is done after the completion of a private unit before
integration. This is a structural testing, that relies on facts of its construction and is
enveloping. Unit tests perform basic tests at component level and test a selected business
process, application, and/or system configuration. Unit tests confirm that every single path
of a business process performs perfectly to the documented specifications and contains
clearly defined inputs and expected results.
Unit testing is typically conducted as a part of a combined code and unit test phase
of the software lifecycle, although it’s not uncommon for coding and unit testing to be
conducted as two distinct phases.
Test strategy and approach:

Field testing are going to be performed manually and functional tests are going to be
written in detail.
Test objectives:

• All field entries must work properly.

• Pages should be activated from the recognized link.


The entry screen, messages and responses should not be late.

70
Features to be tested:

• validate that the entries are of the exact format

• No duplicate entries should be allowed

• All links must take the user to the exact page.


7.1.2 INTEGRATION TESTING:
Integration tests are designed to check integrated software components to work out
if they really run together program. Testing is event driven and is more concerned with the
essential outcome of screens or fields. Integration tests express that although the
components were individually fulfillment, as shown by successfully unit testing, the
mixture of components is correct and consistent. Integration testing is specifically aimed
toward exposing the issues that arise from the combination of components.

Software integration testing could also be the incremental integration testing of two
or extra integrated software components on a 1 platform to bring failures caused by
interface defects.

The task of the mixing test is to see that components or software applications, e.g.
components during a software system or – one intensify – software applications at the
corporate level – interact without error.
7.1.3 FUNCTIONAL TESTING:
Functional tests offer efficient demonstrations that functions tested are accessible
specified by the business and technical requirements, system documents and user manuals.
Functional testing is centered on the following items:
Valid Input : identified classes of valid input should be accepted.
Invalid Input: identified classes of invalid input should be rejected.
Functions : identified functions must be exercised.

Output: identified classes of application outputs should be exercised


Systems/Procedures: interfacing systems or actions should be invoked.

71
Organization and preparation of functional tests is concentrated on requirements,
key functions, or special test cases. In addition, systematic reporting regarding to recognize
Business process flows; data fields, predefined processes, and successive processes must
be considered for testing. Before functional testing is complete, additional tests are
identified and therefore the effective value of current tests is decided.
7.1.4 SYSTEM TESTING:
System testing ensures that the whole integrated software meets requirements. It
tests a configuration to make sure known and predictable results. An example of system
testing is that the configuration oriented system integration test. System testing is
predicated on process descriptions and flows, emphasizing pre-driven process links and
integration points.
7.1.5 WHITE BOX TESTING:
White Box Testing it is a testing during which the software tester has knowledge of
the inner workings, structure and language of the software, or a minimum of its purpose. It
is wont to test areas that can’t be reached from a recorder level.
7.1.6 BLACK BOX TESTING:
Black Box Testing is testing the software with none knowledge of the inner
workings, structure or language of the module being tested. Black box tests, as most other
forms of tests, must be written from a perfect source document, like specification or
requirements document. It is a testing during which the software under test is treated, as a
recorder. you cannot “see” into it. The test gives inputs and responds to outputs without
considering how the software works.

72
7.2 TEST CASES:
Test case 1: Registration For Owner Login

Test case 2: Login For Owner Login

73
Test Case 3: Registration for User:

Test Case 4: Login for User:

74
Test Case 5: All Actions Performed the Owner:

Test Case 6: All Actions Performed the User:

75
Test Case 7: All Actions Performed the Cloud Server

76
8. OUTPUTS

Fig 8.1 Home Page

Fig 8.2 Owner Registration page

77
Fig 8.3 Owner login page

Fig 8.4 Owner Biometric identification Page

78
Fig 8.5 Owner Main page

Fig 8.6 Owner Profile Page

79
Fig 8.7 Biometric Image Upload page

Fig 8.8 Image Uploaded Page

80
Fig 8.9: View All Uploaded Biometric Image Files

Fig 8.10: Verify Biometric Image Files

81
Fig 8.11: Comments on Biometric Image Page

Fig 8.12 User Login page

82
Fig 8.13 Login failed page

Fig 8.14 User Main page

83
Fig 8.15 User Profile Page

Fig 8.16 User Search Biometric Image page

84
Fig 8.17 users comments Page

Fig 8.18 User commented successfully page

85
Fig 8.19 Cloud Server Login page

Fig 8.20 Cloud Server Login page

86
Fig 8.21 List of All Owners Page

Fig 8.22 List of all Users Page

87
Fig 8.23 List of attackers Page

Fig 8.24 User searched biometric images page

88
9. CONCLUSION

In this project, we proposed a privacy-preserving biometric identification scheme in


the cloud computing. To realize the efficiency and secure requirements, we are used an
encryption algorithm and cloud authentication certification. The detailed analysis shows it
can resist the potential attacks. Besides, through performance evaluations, we further
demonstrated the proposed scheme meets the efficiency need well.

89
REFERENCES
1. A. Jain, L. Hong and S. Pankanti, “Biometric identification,” Communications of
the ACM, vol. 43, no. 2, pp. 90-98, 2000.

2. R. Allen, P. Sankar and S. Prabhakar, “Fingerprint identification technology,”


Biometric Systems, pp. 22-61, 2005.

3. J. de Mira, H. Neto, E. Neves, et al., “Biometric-oriented Iris Identification Based


on Mathematical Morphology,” Journal of Signal Processing Systems, vol. 80, no. 2,
pp. 181-195, 2015.

4. S. Romdhani, qV. Blanz and T. Vetter, “Face identification by fitting a 3d


morphable model using linear shape and texture error functions,” in European
Conference on Computer Vision, pp. 3-19, 2002.

5. Y. Xiao, V. Rayi, B. Sun, X. Du, F. Hu, and M. Galloway, “A survey of key


management schemes in wireless sensor networks,” Journal of Computer
Communications, vol. 30, no. 11-12, pp. 2314-2341, 2007.

6. X.Du, Y.Xiao, M.Guizani, H.H.Chen, “An effective key management scheme for
heterogeneous sensor networks,” Ad Hoc Networks, vol. 5, no. 1, pp. 24-34, 2007.

7. X. Du and H. H. Chen, “Security in wireless sensor networks,” IEEE Wireless


Communications Magazine, vol. 15, no. 4, pp. 60-66, 2008.

8. X.Hei, andX.Du, “Biometric-based two level secure access control for


implantable medical devices during emergency,” in Proc. of IEEE INFOCOM 2011,
pp. 346-350, 2011.

9. X. Hei, X. Du, J. Wu, and F. Hu, “Defending resource depletion attacks on


implantable medical devices, ”in Proc. Of IEEE GLOBE COM 2010, pp.1-5, 2010.

10. M. Barni, T. Bianchi, D. Catalano, et al., “Privacy-preserving finger code


authentication,” in Proceedings of the 12th ACM workshop on Multimedia and

90
security, pp. 231-240, 2010.
11. M. Osadchy, B. Pinkas, A. Jarrous, et al., “SCiFI-a system for secure face
identification, ”in Security and Privacy(SP),2010IEEESymposiumon,pp. 239-
254,2010
12.D.Evans,Y.Huang,J.Katz,etal.,“Efficientprivacy-preservingbiometric
identification,” in Proceedings of the 17th conference Network and
Distributed System Security Symposium, NDSS, 2011.

13. J.Yuan and S.Yu, “Efficient privacy-preserving biometric identification in cloud


computing, ”in Proc. Of IEEE INF OCOM 2013, pp. 2652-2660, 2013.

14. Q.Wang, S.Hu, K.Rental, “CloudBI: Practical privacy-preserving outsourcing of


biometric identification in the cloud,” in European Symposium on Research in
Computer Security, pp. 186-205, 2015.

15. Y.Zhu, Z.Wangand, J.Wang, “Collusion-resisting secure nearest neighbor query


over encrypted data in cloud,” In Quality of Service (IWQoS), 2016 IEEE/ACM 24th
International Symposium on, pp. 1-6, 2016.

16. S. Pan, S. Yan, and W. Zhu, “Security analysis on privacy-preserving cloud


aided biometric identification schemes,” in Australasian Conference on Information
Security and Privacy, pp. 446-453, 2016.

17. C. Zhang, L. Zhu and C. Xu, “PTBI: An efficient privacy-preserving biometric


identification based on perturbed term in the cloud,” Information Sciences, vol. 409,
pp. 56-67, 2017.

18. Y.Zhu, T.Takagi and R.Hu, “Security analysis of collusion-resistant nearest


neighbor query scheme on encrypted cloud data,”IEICE Transactionson Information
and Systems, vol. 97, no. 2, pp. 326-330, 2014.

19. A.Jain, S.Prabhakar, L.Hong, etal., “Filter bank-based finger print matching, ”
IEEE Transactions on Image Processing, vol. 9, no. 5, pp. 846-859, 2000.

91
20. H. Delfs, H. Knebl, and H. Knebl, “Introduction to cryptography,” Berlin etc.:
Springer, 2002.
21. K. Liu, C. Giannella, and H. Kargupta, “An attacker’s view of distance
preservingmapsforprivacypreservingdatamining,”KnowledgeDiscovery in
Databases, pp. 297-308, 2006.

22. Y. Wang, and D. Hatzinakos, “Face recognition with enhanced privacy


protection,” in IEEE International Conference on Acoustics, Speech and Signal
Processing, pp. 885-888, 2009.

23. K.Wong, andM.Kim, “A privacy-preserving biometric matching protocol for iris


codes verification,” in Third FTRA International Conference on Mobile, Ubiquitous,
and Intelligent Computing (MUSIC), pp. 120-125, 2012.

24. W. Wong, D. Cheung, B. Kao B, et al., “Secure KNN computation on


encrypted databases,” in Proceedings of the 2009 ACM SIGMOD International
Conference on Management of data, pp. 139-152, 2009.

92

You might also like