Project Work
Project Work
Project Work
INTRODUCTION
TO secure communications between two parties, an authenticated
encryption key is required to agree on in advance. So far, two models have existed for
authenticated key exchange. One model assumes that two parties already share some
cryptographically-strong information: either a secret key which can be used for encryption
authentication of messages, or a public key which can be used for encryption signing of
messages. These keys are random and hard to remember. In practice, a user often keeps his
keys in a personal device protected by a password/PIN. Another model assumes that users,
without help of personal devices, are only capable of storing “human-memorable” passwords.
Bellovin and Merritt were the first to introduce password-based authenticated key exchange
(PAKE), where two parties, based only on their knowledge of a password, establish a
cryptographic key by exchange of messages. APAKE protocol has to be immune to on-line
and off-line dictionary attacks. In an off-line dictionary attack, an adversary exhaustively tries
all possible passwords in a dictionary in order to determine the password of the client on the
basisof the exchanged messages. In on-line dictionary attack, an adversary simply attempts to
login repeatedly, trying each possible password. By cryptographic means only, none of PAKE
protocols can prevent on-line dictionary attacks. Button-line attacks can be stopped simply by
setting a threshold to the number of login failures.
1.1Project Overview
1
practice, a user often keeps his keys in a personal device protected by a password / PIN.
Another model assumes that users, without help of personal devices, are only capable of
storing “human-memorable” passwords. Bellovin and Merritt [4] were the first to
introduce password-based authenticated key exchange (PAKE), where two parties, based
only on their knowledge of a password, establish a cryptographic key by exchange of
messages. A PAKE protocol has to be immune to on-line and off-line dictionary attacks.
In an off-line dictionary attack, an adversary exhaustively tries all possible passwords in a
dictionary in order to determine the password of the client on the basis of the exchanged
messages. In on-line dictionary attack, an adversary simply attempts to login repeatedly,
trying each possible password. By cryptographic means only, none of PAKE protocols
can prevent on-line dictionary attacks. But on-line attacks can be stopped simply by
setting a threshold to the number of login failures.
In two-server password-authenticated key exchange (PAKE) protocol, a client splits its
password and stores two shares of its password in the two servers, respectively, and the
two servers then cooperate to authenticate the client without knowing the password of the
client. In case one server is compromised by an adversary, the password of the client is
required to remain secure. In this paper, we present two compilers that transform any
two-party PAKE protocol to a two-server PAKE protocol on the basis of the identity-
based cryptography, called ID2S PAKE protocol. By the compilers, we can construct
ID2S PAKE protocols which achieve implicit authentication. As long as the underlying
two-party PAKE protocol and identity-based encryption or signature scheme have
provable security without random oracles, the ID2S PAKE protocols constructed by the
compilers can be proven to be secure without random oracles. Compared with the Katz et
al.’s two-server PAKE protocol with provable security without random oracles, our ID2S
PAKE protocol can save 22% to 66% computation in each server.
1.2Project Deliverables
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
2
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
What data should be given as input?computer output should proceed in an organized, well
thought out manner; the right output must be developed while ensuring that each output
element is designed so that people will find the system can use easily and effectively.
When analysis design computer output, they should Identify the specific output that is
needed to meet the requirements.
1.3Project Scope
Aquality 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.Designing computer output should proceed in an
organized, well thought out manner; the right output must be developed while ensuring that each
output element is designed so that people will find the system can use easily and effectively.
When analysis design computer output, they should Identify the specific output that is needed to
meet the requirements,Select methods for presenting information.Create document, report, or
other formats that contain information produced by the system.
3
2. LITERATURE SURVEY
Encrypted key exchange: password-based protocols secure against dictionary attacks
Classic cryptographic protocols based on user-chosen keys allow an attacker to mount password-
guessing attacks. A combination of asymmetric (public-key) and symmetric (secret-key)
cryptography that allow two parties sharing a common password to exchange confidential and
authenticated information over an insecure network is introduced. In particular, a protocol
relying on the counter-intuitive motion of using a secret key to encrypt a public key is presented.
Such protocols are secure against active attacks, and have the property that the password is
protected against offline dictionary attacks.
4
Fig2.1:key agreement
3. PROBLEM ANALYSIS
In the single-server setting, all the passwords necessary to authenticate clients are stored in a
single server. If the server is compromised, due to, for example, hacking or even insider attacks,
passwords stored in the server are all disclosed. This is also true to Kerberos, where a user
authenticates against the authentication server with his username and password and obtains a
token to authenticate against the service server.PAKE protocols in the single-server setting can
be classified into three categories as follows: Password-only PAKE, PKI-based and PAKE ID-
based PAKE
3.1.1 Limitations
The hash value accessible to an attacker.
The attacker can work offline, rapidly testing possible passwords against the true
password’s hash value.
An adversary can always succeed by trying all passwords one-by-one in an on-line
impersonation attack. A protocol is secure if this is the best an adversary can do. The on-
line attacks correspond to send queries
5
3.2 Proposed System
Typical examples are the “encrypted key exchange” (EKE) protocols given by Bellovin
and Merritt, where two parties, who share a password, exchange messages encrypted by
the password, and establish a common secret key. The formal model of security for
PAKE was firstly Based on the security model, PAKE protocols have been proposed and
proved to be secure.
A security model for ID2S PAKE protocol was given and a compiler that transforms any
two-party PAKE protocol to an ID2S PAKE protocol was proposed on the basis of the
Cramer-Shoup public key encryption scheme and any identity-based encryption scheme,
such as the Waters’ scheme.
The second model is called password-only model. Bellovin and Merritt were the first to
consider authentication based on password only, and introduced a set of so-called
“encrypted key exchange” protocols, where the password is used as a secret key to
encrypt random numbers for key exchange purpose. Formal models of security for the
password-only authentication were first
3.2.1 Advantages
We have implemented our ID2S PAKE protocols, it shows that our protocols save from 22%
to 66% of computation in each server, compared with the Katz et al.’s protocol.
The server performance is critical to the performance of the whole protocol when the
servers provide services to a great number of clients concurrently.
Our Protocol shows that less than one second is needed for the client to execute our
protocols.
In the real world, a protocol determines how users behave in response to input from their
environments. In the formal model, these inputs are provided by the adversary.
Each user is assumed to be able to execute the protocol multiple times (possibly
concurrently) with different partners.
6
This is modeled by allowing each user to have unlimited number of instances with which
to execute the protocol.
4. SYSTEM ANALYSIS
Existing System
password over a public channel which makes the hash value accessible to an attacker.
When this is done, and it is very common, the attacker can work offline, rapidly testing
possible passwords against the true password’s hash value. Studies have consistently
shown that a large fraction of user-chosen passwords are readily guessed automatically.
Disadvantage:
2.The attacker can work offline, rapidly testing possible passwords against the true
3.An adversary can always succeed by trying all passwords one-by-one in an on-line
impersonation attack. A protocol is secure if this is the best an adversary can do. The on-
Proposed System:
Typical examples are the “encrypted key exchange” (EKE) protocols given by Bellovin
and Merritt, where two parties, who share a password, exchange messages encrypted by
the password, and establish a common secret key. The formal model of security for
PAKE was firstly Based on the security model, PAKE protocols have been proposed and
proved to be secure.A security model for ID2S PAKE protocol was given and a compiler
that transforms any two-party PAKE protocol to an ID2S PAKE protocol was proposed
on the basis of the Cramer-Shoup public key encryption scheme and any identity-based
7
encryption scheme, such as the Waters’ scheme.The second model is called password-
only model. Bellovin and Merritt were the first to consider authentication based on
password only, and introduced a set of so-called “encrypted key exchange” protocols,
where the password is used as a secret key to encrypt random numbers for key exchange
purpose. Formal models of security for the password-only authentication were first given
independently by Bellare et al. and Boyko et al.. Katz et al. were the first to give a
password-only authentication protocol which is both practical and provably secure under
2.The sense that an adversary attacking the system cannot determine session keys with
Functional requirements define the fundamental actions that system must perform
He/she wants to share the file who has registered to the network
8
When the receiver want to see the data he needs private keys
Here two servers will there, they log onto the network and verifies the key and generate the
public and shares the keys through email (both the servers will do same action)
These functional requirements defines the needs in terms of performance, logical database
requirements, design constraints, reliability,availability,security, maintainability
Performance:
Reliability:
Specify the factors required to establish the required reliability of the software
Security:
Here, servers will provide security during the file downloading process of the receiver, and the
verify the file with encrypted key by the sender.
Maintainability:
To, develop this project we used java, which is open source which is portable on any system.
A feasibility study aims to objectively and rationally uncover the strengths and weakness of an
resources required to carry through,and ultimately the prospects for success. In this simplest
terms, the two criteria to judge feasibility are cost required and value to be attained.
Technical feasibility:
9
This assessment is based on an outline design of system requirements, to determine whether the
company has the technical expertise to handle completion of the project. When writing a
A brief description of the business to assess more possible factors which could affect the study
The part of the business being examined,The human and economic factor,The possible solutions
to the problem
Legal feasibility:
Determines whether the proposed system conflicts with legal requirements, e.g. a data processing
system must comply with the local data protection regulations and if the proposed venture is
Operational feasibility:
Operational feasibility is the measure of how well a proposed system solves the problems, and
takes advantage of the opportunities identified during scope definition and how it satisfies the
The operational feasibility assessment focuses on the degree to which the proposed development
projects fits in with the existing business environment and objectives with regard to development
To ensure success, desired operational outcomes must be imparted during design and
development.
. Schedule feasibility:
10
A project will fail if it takes too long to be completed before it is useful. Typically this means
estimating how long the system will take to develop, and if it can be completed in a given time
period using some methods like payback period. Schedule feasibility is a measure of how
reasonable the project timetable is. Given our technical expertise, are the project deadlines
reasonable? Some projects are initiated with specific deadlines. It is necessary to determine
11
Include Relationship: The include relationship between two
attached to it.
Use case diagram show business use cases,actors, and the relationships between them.
The relationships between actor and business use cases state that an actor can use a certain
12
Register
Login
File Upload
Client
View File
Server A
Server B
Download
Logout
A use case diagram in the Unified Modeling Language (UML) is a type of behavioral diagram
defined by and created from a Use-case analysis. Its purpose is to present a graphical overview
of the functionality provided by a system in terms of actors, their goals (represented as use
cases), and any dependencies between those use cases.
Use case diagrams model the functionality of system using actors and use cases. A
use case is a set of scenario that describing an interaction between the user and a system. The use
case diagram consists of two actors’ sender and receiver. Use case diagram model the
functionality of system using actor and use cases. Use case diagram address the static use case
view of a system. These diagrams are especially important in organizing and modeling the
13
behaviors of a system. An actor represents a user or another system that will interact with the
system you are modeling.
Interaction among actors is not shown on the use case diagram. If this interaction is
essential to a coherent description of the desired behavior, perhaps the system or use case
boundaries should be re-examined. Alternatively, interaction among actors can be part of the
assumptions used in the use case.
Actor Generalization
The hardware and software components of a computer system these are required to install and
use software efficiently. The software manufacturer will list the system requirements on the
software package. If your computer system does not meet the system requirements then the
software may not work correctly after installation. System requirements for operating systems
will be hardware components, while other application software will list both hardware and
operating system requirements. System requirements are most commonly seen listed as
minimum and recommended requirements. The minimum system requirements need to be met
for the software to run at all on your system, and the recommended system requirements, if met,
will offer better software usability.
Hardware requirement
Software requirements
14
RAM - 256 MB(min)
Hard Disk - 20 GB
Monitor - SVG
The most common set of requirements defined by any operating system or software application
is the physical computer resources, also known as hardware, a hardware requirements list is often
HCL lists tested, compatible, and sometimes incompatible hardware devices for a particular
operating system or applications. The following sub-sections discuss the various aspects of
hardware requirements
Scripts : JavaScript.
Database : Mysql
15
5. SYSTEM DESIGN
5.1 Introduction
System design is the process of defining the elements of a system such as the architecture,
modules and components, the different interfaces of those components and the data that goes
through that system. It is meant to satisfy specific needs and requirements of a business or
organization through the engineering of a coherent and well-running system.
Maintainability
Reusability
Productivity
16
5.1.1 Class Diagram
Class diagram is the unified modeling language it is a type ofstatic structure diagram that
describes the structure of a system by showing the systems classes, their attributes, operations
,(or methods) and the relationship among objects.
Client Server A
Server B
+id +id
+password +password +id
+password
+Login() +View Request file()
+file upload() +share the file key another server() +View request file()
+share the file() +share the file key another server()
+Generate Key()
17
5.1.2 Sequence Diagram:
A sequence diagram is an interaction diagram that shows how objects operate with one another
.it is aconstruct of a message sequence chart.
1 : Register()
2 : Login()
3 : File Upload()
18
5.1.3 Deployment digram:
Server B
Client
Server A
19
5.1.4 Data Flow Diagram:
A Dataflow diagram(dfd) illustrates how data is processed by a system in terms of inputs and
outputs. As it name indicates its focus is on the flow of information.
Level 1:
Client
Level 2:
View Client
Request Share file key Logout
Server 1
Level 3:
20
5.1.5 ER digram
Share File
Login File Upload
another
user
Register
Generate file
key
User
Server 1
View Server 2
client
client
request Share file key
another
server
Share file key
View Client another server
Request
21
5.2 System Architecture
Fig5.2:system architecture
22
5.2.1.ALGORITHM SPECIFICATION:
The concept of an algorithm is fundamental to computer science. Algorithms exist for many
common problems, and designing efficient algorithms plays a crucial role in developing large-
scale computer systems. Therefore, before we proceed further we need to discuss this concept
more fully. We begin with a definition. Definition: An algorithm is a finite set of instructions
that, if followed, accomplishes a particular task.
Fig5.2.1:key agreement
The Diffe-Hellman key agreement protocol (1976) was the first practicalmethod for
establishing a shared secret over an unsecured communication channel. The point is to agree on
a key that two parties can use for a symmetric encryption ,in such a way that an eavesdropper
cannot obtain the key.
Alice(knows Bob(knows
p,g,A) p,g,B)
23
4.2.STEPS IN THE ALGORITHM:
5.Bob computers ((g a mod p) b mod p).Both Alice and Bob can use this number as their key.
Notice that p and g need not be protected.
Example:
1.Alice and Bob agree on p=23 and g=5.
6. IMPLEMENTATION
Java Technology, Java technology is both a programming language and a platform.The Java
programming language is a high-level language that can be characterized by all of the following
buzzwords:
Simple
Architecture neutral
Object oriented
Portable
Distributed
High performance
24
Interpreted
Multithreaded
Robust
Dynamic
Secure
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.
The essentials: Objects, strings, threads, numbers, input and output, data
structures, system properties, date and time, and so on.
25
Applets: The set of conventions used by applets.
Networking: URLs, TCP (Transmission Control Protocol), UDP (User Data gram
Protocol) sockets, and IP (Internet Protocol) addresses.
Internationalization: Help for writing programs that can be localized for users
worldwide. Programs can automatically adapt to specific locales and be displayed
in the appropriate language.
Security: Both low level and high level, including electronic signatures, public
and private key management, access control, and certificates.
Software components: Known as JavaBeansTM, can plug into existing
component architectures.
Object serialization: Allows lightweight persistence and communication via
Remote Method Invocation (RMI).
Java Database Connectivity (JDBCTM): Provides uniform access to a wide range of
relational databases.
ODBC ,JDBC,JDBC Goals
2. SQL Conformance
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. JDBC must be implemental on top of common database
3. Keep it simple
This goal probably appears in all software design goal listings. Use strong, static typing
Keep the common cases simple
26
Port addresses
A service exists on a host, and is identified by its port. This is a 16 bit number. To
send a message to a server, you send it to the port for that service of the host that it is
running,
Sockets
A socket is a data structure maintained by the system to handle network connections. A socket is
created using the call socket. It returns an integer that is like a file descriptor. In fact, under
Windows, this handle can be used with Read File and Write File functions.
Profile 2: MIDP.
* java.lang
* java.io
* java.util
* javax.microedition.io
* javax.microedition.lcdui
* javax.microedition.midlet
* javax.microedition.rms
Modules Description We present two compilers transforming any two-party PAKE protocol P
to an ID2S PAKE protocol P0 with identity-based cryptography. The first compiler is built on
identity-based signature (IBS) and the second compiler is based on identity-based encryption
(IBE).
27
1.ID2S PAKE Based on IBS
We need an identity-based signature scheme (IBS) as our cryptographic building block. A high-
level description of our compiler in which the client C and two servers A and B establish two
authenticated keys, respectively. If we remove authentication elements from our compiler, our
key exchange protocol is essentially the Diffie-Hellman key exchange protocol. We present the
Key Generation: On input the identity S of a server S 2 Server, paramsIBE, and the secret
sharing master-keyIBE, PKGs cooperate to run ExtractIBE of the IBE scheme and generate a
private (decryption) key for S, denoted as dS, in a manner that any coalition of PKGs cannot
determine dS as long as one of the PKGs is honest to follow the protocol. Each user has a private
key x ,Each user has three public keys: prime modulus p, generator g and public Y = gxmod p
Security is based on the difficulty of DLP,Secure key size > 1024 bits ( today even 2048 bits)
Protocol Execution. Given a triple (C; A;B) 2 Client ServerTriple, the client C (knowing its
password pwC) runs the protocol P0 with the two servers A (knowing GpwC;A , gpwC;A and its
private key dA) and B (knowing GpwC;B , gpw C;B and its private key dB) to establish two
At first, the client randomly chooses pw1 from Zn and computes pw2 = pwCpw1(mod n). Next
the client C randomly generates a one-time public and private key pair (pk; sk) for the public key
encryption scheme E, and randomly chooses an integer rc from Zq and computes Wc= grc ; h =
H1(C;Wc; pk): Next, according to the identities of the two servers A and B, the client C
28
the client sends msg1 = hC;Wc; pk;Eai and msg2 = hC;Wc; pk;Ebi to the two servers A and B,
respectively.
3.Initialization
The two peer servers S1 and S2 jointly choose a cyclic group G of large prime order q with a
generator g1 and a secure hash function H : {0; 1}*->Zq, which maps a message of arbitrary
length into an l-bit integer, where l= log2 q. Next, S1 randomly chooses an integer s1 from Zq
and S2 randomly chooses an integer s2 from Zq , and S1 and S2 exchange g1s1 and g1s2 . After
that, S1 and S2 jointly publish public system parameters G; q; g1; g2;H where g2 = gs1s2 .
4.Registration
The two secure channels are necessary for all two server PAKE protocols, where a password is
split into two parts, which are securely distributed to the two servers, respectively, during
registration. Although we refer to the concept of public key cryptosystem, the encryption key of
one server should be unknown to another server and the client needs to remember a password
<!DOCTYPE HTML>
<html><head>
<meta charset="utf-8">
29
<title>Oxygen — Free Website Template, Free HTML5 Template by
gettemplates.co</title>
<meta name="keywords" content="free website templates, free html5, free template, free
bootstrap, free website template, html5, css3, mobile first, responsive" />
<!--Oxygen by gettemplates.co
Twitter: http://twitter.com/gettemplateco
URL: http://gettemplates.co-->
30
<meta name="twitter:url" content="" />
<script src="js/modernizr-2.6.2.min.js"></script>
31
<!-- FOR IE9 below --><!--[if lt IE 9]>
<div class="gtco-loader"></div>
<divid="gtco-logo"><href="index.html">ID2S.</a></div>
<ul><liclass="active"><ahref="index.jsp">Home</a></li>
<li class="has-dropdown">
<a href="#">File</a>
<ul class="dropdown">
<ul></li><li class="has-dropdown">
<li><a href="index.jsp">Logout</a></li>
32
</ul></div>
</div></div></div></nav>
image:url(images/img_bg_1.jpg);">
<div class="display-t">
</div></div></div></div></div></header>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
33
<!-- Bootstrap -->
<script src="js/jquery.waypoints.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.countTo.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/magnific-popup-options.js"></script>
<script src="js/main.js"></script></body></html>
Login.jsp
Author: W3layout
34
License URL: http://creativecommons.org/licenses/by/3.0/
-->
<!DOCTYPE HTML>
<html>
<head>
<title>Login Page</title>
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG,
</script>
<script src="js1/jquery.min.js"></script>
35
<script src="js1/bootstrap.min.js"></script>
<link href='//fonts1.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900'
rel='stylesheet' type='text/css'>
<!----font-Awesome----->
<!----font-Awesome----->
</head>
<body>
<div class="container">
<div class="navbar-header"></div>
<!--/.navbar-header-->
style="height: 1px;">
36
<li class="dropdown"> <ul class="dropdown-menu"> </ul>< li>
<li class="dropdown">
<div class="row">
<li><li class="dropdown></li></ul>
<div class="banner_1">
<span class="seeking-answer-group">
<span class="seeking-answer-input">
37
</span></span></div> </div>
<div class="login-form-section">
<div class="login-content">
<div class="textbox-wrap">
<div class="input-group">
placeholder="Username">
</div></div><div class="textbox-wrap">
<div class="input-group">
<div class="login-check">
38
<labelclass="checkbox1"><input
</div>
<div class="login-para">
<div class="login-btn">
</div><div class="login-bottom">
</body></html>
Key.jsp
Author: W3layout
39
License: Creative Commons Attribution 3.0 Unported
-->
<!DOCTYPE HTML>
<html>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<head>
<title>share data</title>
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG,
40
<script type="application/x-javascript"> addEventListener("load", function() {
</script>
<script src="js1/jquery.min.js"></script>
<script src="js1/bootstrap.min.js"></script>
<link href='//fonts1.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900'
rel='stylesheet' type='text/css'>
<!----font-Awesome----->
<!----font-Awesome----->
<div class="container">
<div class="navbar-header”></div>
<!--/.navbar-header-->
41
<div class="navbar-collapse collapse" id="bs-example-navbar-collapse-1"
style="height: 1px;">
<li class="dropdown">
<div class="col-sm-4">
<!--/.navbar-collapse</nav>
<div class="banner_1">
<div class="container"></div>
</div>
<div class="container">
<div class="single">
<div class="col-md-4">
42
<div class="col_3">
<ul class="list_1"></ul>
<span class="seeking-answer-input">
<span class="seeking-answer-input">
</span></span></div>
<form><%
String name=(String)session.getAttribute("myobj")%>
<div class="section-title">
<h3>Welcome Server</h3></div>
<div class="textbox-wrap">
<div class="input-group">
43
<table align="center" border="5" width="700px">
<tr>
<th style="color:green;"><center>Subject</center></th>
<th style="color:green;"><center>File
Name</center></th>
<th style="color:green;"><center>Secret
Key</center></th>
<th style="color:green;"><center>Verify</center></th>
<%
Class.forName("com.mysql.jdbc.Driver");
Conn= DriverManager.getConnection("jdbc:mysql://localhost:3306/id2s","root","root");
System.out.println("DB connected");
Statement st=con.createStatement();
44
String f="select * from share";
ResultSet rs=st.executeQuery(f);
while(rs.next())
{ String a=rs.getString("id");
String b=rs.getString("subject");
String c=rs.getString("filename");
String d=rs.getString("shareto");
String e=rs.getString("skey");%>
<th style="color:red;"><center><%=b%></center></th>
<th style="color:red;"><%=c%></center></th>
<th style="color:red;"><%=d%></center></th>
<th style="color:red;"><%=e%></center></th>
<th style="color:red;"><a
href="Keyex.jsp?a1=<%=a%>&&b1=<%=b%>&&c1=<%=c%>&&d1=<%=d%>&&e1=<%=e
%>">Verify</a></th></tr>
<% } %>
</table></div>< </div>
45
<div class="textbox-wrap">
</form></div> </div>
</div> </div></div></form></body></html>
Key exchange.jsp
Author: W3layout
-->
<!DOCTYPE HTML>
<%@page import="java.util.Random"%>
<html>
<%@page import="java.sql.*"%>
<head>
46
<title> View share data</title>
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG,
</script>
<script src="js1/jquery.min.js"></script>
<script src="js1/bootstrap.min.js"></script>
<link href='//fonts1.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900'
rel='stylesheet' type='text/css'>
<!----font-Awesome----->
47
<link href="css1/font-awesome.css" rel="stylesheet">
<!----font-Awesome----->
</head>
<body><% Class.forName("com.mysql.jdbc.Driver");
Connection con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/id2s","root","root");
System.out.println("DB connected");
Statement st=con.createStatement();%>
<div class="container">
<div class="navbar-header"></div>
<!--/.navbar-header-->
style="height: 1px;">
48
<li class="dropdown"> <ul class="dropdown-menu multi-column columns-3">
<div class="row">
</div>
<!--/.navbar-collapse--></nav>
<div class="banner_1">
<div class="contant”></div>
</div>
<div class="container">
<div class="single">
<div class="col-md-4">
49
<span class="seeking-answer-input">
</span></span>
<span class="seeking-answer-group">
<span class="seeking-answer-input">
</span></span></div></div></div> </div>
<div class="login-form-section">
String id=request.getParameter("a1");
String subject=request.getParameter("b1");
String filename=request.getParameter("c1");
String shareto=request.getParameter("d1");
request.getSession(true).setAttribute("id1",id);
request.getSession(true).setAttribute("subject1",subject);
request.getSession(true).setAttribute("filename1",filename);
request.getSession(true).setAttribute("shareto1",shareto) %>
50
<td> &n
bsp; &nb
sp; &nbs
p;  
;
<p align="left">
File ID :<%=id%></p>
<p align="left">
51
Subject :<%=subject%></p>
<p align="left">
File Name :<%=filename%></p>
<p align="left">
Share To :
<% String f="select * from share where id='"+id+"' and filename= '"+filename+"' ";
if(rs.next(){ c=rs.getString("skey");
session.setAttribute("secretekey", c);
%><%} %>
52
<p align="left">
</p><div class="login>
</div><div class="textbox-wrap">
<div class="input-group">
</div></div></div>
<div class="textbox-wrap">
</div> </div></div></body></html>
Upload.jsp
<head>
53
<meta charset="utf-8">
<title>File —Upload</title>
/>
<meta name="keywords" content="free website templates, free html5, free template, free
bootstrap, free website template, html5, css3, mobile first, responsive" />
<!--
Oxygen by gettemplates.co
Twitter: http://twitter.com/gettemplateco
URL: http://gettemplates.co
-->
54
<meta property="og:image" content=""/>
<!-- <link
href='https://fonts.googleapis.com/css?family=Work+Sans:400,300,600,400italic,700'
55
<link rel="stylesheet" href="css/bootstrap.css">
<script src="js/modernizr-2.6.2.min.js"></script>
<!--[if lt IE 9]>
<script src="js/respond.min.js"></script>
56
<![endif]-->
</head>
<body>
<div class="gtco-loader"></div>
<div id="page">
<div class="gtco-container">
<div class="row">
<div class="col-xs-2">
<div id="gtco-logo"><a
href="index.html">ID2S.</a></div>
</div>
<ul>
<li><a href="index.jsp">Home</a></li>
57
<li class="has-dropdown">
<ul class="dropdown">
</ul>
</li>
<li class="active"><a
href="home.jsp">Back</a></li>
</ul>
</div>
<ul>
Upload</span></a></li>
</ul>
</div>
58
</div>
</div>
</nav>
style="background-image:url(images/img_bg_1.jpg);">
<div class="gtco-container">
<div class="row">
<div class="display-t">
effect="fadeIn">
<h1>ID2S PASSWORD</h1>
<h2>AUTHENTICATED KEY
</div>
59
</div>
</div>
</div>
</div>
</header>
<div class="gtco-section">
<div class="gtco-container">
<div class="row">
<h3>File Upload</h3>
<div class="col-md-6">
</div>
60
</div>
<div class="col-md-12">
<label
for="subject">Subject</label>
id="subject" class="form-control"required="required">
</div>
</div>
<div class="col-md-12">
<label for="subject">Upload
File</label>
61
<input type="file" name="filename"
required="required">
</div>
</div>
<div class="col-md-12">
</div>
</div>
<br>
<div class="form-group">
class="btn btn-primary">
</div>
</form>
62
</div>
<div class="gtco-contact-info">
</div>
</div>
</div>
</div>
</div>
<div class="overlay"></div>
<div class="gtco-container">
<div class="row">
63
<div class="col-md-8 col-md-offset-2 text-center">
<div class="display-t">
</div>
</div>
</div>
</div>
</div>
<div class="gtco-container">
<div class="row">
</div>
</div>
64
<div class="col-md-2 col-md-push-1">
</div>
</div>
</div>
<div class="col-md-12">
<p class="pull-right">
</div>
</div>
</footer>
65
<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.waypoints.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.countTo.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/magnific-popup-options.js"></script>
<script src="js/main.js"></script>
66
</body>
</html>
7. TESTING
7.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.
Unit testing
Unit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program inputs produce valid outputs. All decision branches and
internal code flow should be validated. It is the testing of individual software units of the
application .
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.
Functional testing is centered on the following items:
System Test
67
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.
Unit Testing:
Unit testing is usually conducted as part of a combined code and unit test phase of the software
lifecycle, although it is not uncommon for coding and unit testing to be conducted as two distinct
phases.
Integration Testing
Software integration testing is the incremental integration testing of two or more integrated
software components on a single platform to produce failures caused by interface defects.The
task of the integration test is to check that components or software applications, e.g. components
in a software system or – one step up – software applications at the company level – interact
without error.
Acceptance Testing
User Acceptance Testing is a critical phase of any project and requires significant participation
by the end user. It also ensures that the system meets the functional requirements.
All the test cases mentioned above passed successfully. No defects encountered.
68
All the test cases mentioned above passed successfully. No defects encountered.
Fig7.3.1:share data
69
Fig8.2:Registration screen
Fig8.3:login screen
70
Fig8.4:file upload screen
71
Fig8.5:shared data screen
72
Fig8.7:key verification screen
73
Fig8.9:file download screen
9. CONCLUSION
We present two efficient compilers to transform any two-party PAKE protocol to an ID2S PAKE
protocol with identity-based cryptography. In addition, we have provided a rigorous proof of
security for our compilers without random oracle. Our compilers are in particular suitable for the
applications of password-based authentication where an identity-based system has already
established. Our future work is to construct an identity-based multipleserver PAKE protocol with
any two-party PAKE protocol
74
10. REFERENCES
1. M. Abdalla and D. Pointcheval.Simple password-based encrypted key exchange protocols.
2. M. Bellare, D. Pointcheval, and P. Rogaway.Authenticated key exchange secure against
dictionary attacks. In Proc. Eurocrypt’00, pages 139-155, 2000.
3. S. M. Bellovin and M. Merritt.Encrypted key exchange: Passwordbased protocol secure
against dictionary attack. In Proc. 1992 IEEE Symposium on Research in Security and Privacy,
pages 72-84, 1992.
4. J. Bender, M. Fischlin, and D. Kugler. Security analysis of the PACE
key-agreement protocol. In Proc. ISC’09, pages 33-48, 2009.
5. J. Bender, M. Fischlin, and D. Kugler. The PACEjCA protocol for
machine readable travel documents. In INTRUST’13, pages 17-35,2013.
75