Documentation
Documentation
INTRODUCTION
The first model, called PKI-based model, assumes that the client keeps the
server’s public key in addition to share a password with the server. In this setting, the
client can send the password to the server by public key encryption. Gong et al. were
the first to present this kind of authentication protocols with heuristic resistant to
offline dictionary attacks, and Halevi and Krawczyk were the first to provide formal
definitions and rigorous proofs of security for PKI-based model.
1
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 standard cryptographic
assumption.
Current solutions for two-server PAKE are either symmetric in the sense that
two peer servers equally contribute to the authentication, such as, or asymmetric in
the sense that one server authenticates the client with the help of another server, such
as. A symmetric two server PAKE protocol, for example, Katz et al.’s protocol can
run in parallel and establishes secret session keys between the client and two servers,
respectively. In case one of the two servers shuts down due to the denial-of-service
attack, another server can continue to provide services to authenticated clients. In
terms of parallel computation and reliable service, a symmetric protocol is superior to
an asymmetric protocol. So far, only Katz et al.’s two-server PAKE protocol has been
symmetric. But their protocol is not efficient for practical use. An asymmetric two-
2
server PAKE protocol runs in series and only the front-end server and the client need
to establish a secret session key.
Current asymmetric protocols, for example, Yang et al.’s protocol and Jin et
al.’s protocol, need two servers to exchange messages for several times in series.
These asymmetric designs are less efficient than a symmetric design which allows
two servers to compute in parallel. This system presents a new symmetric solution for
two-server PAKE. In all existing two-server PAKE protocols, two servers are
provided random password shares pw1 and pw2 subject to pw1+pw2=pw. Our protocol
provide one server S1 with an encryption of the password ∑(g 2pw,pk2) and another
server S2 with an encryption of the password ∑(g2pw,pk1) where pk1 and pk2 are the
encryption keys of S1 and S2, respectively. In addition, two servers are provided
random password shares b1 and b2 subject to (b1 XOR b2) =H (pw) where H is a hash
function. Like, the password pw is secret unless the two servers collude.
Although the concept of public key cryptosystem is used, our protocol follows
the password-only model. The encryption and decryption key pairs for the two servers
are generated by the client and delivered to the servers through different secure
channels during the client registration, as the client in any two-server PAKE protocol
sends two halves of the password to the two servers in secret, respectively. In fact, a
server should not know the encryption key of another server and is restricted to
operate on the encryption of the password on the basis of the homomorphic properties
of Elgamal encryption scheme. For example, given ∑(g 2pw , pk2), S1 can construct
∑(Ag2pw , pk2), and ∑([Link] , pk2), for any group element A and integer a without the
knowledge of the encryption key pk2.
Security analysis has shown that our protocol is secure against both passive
and active attacks in case that one server is compromised. Performance analysis has
shown that our protocol is more efficient than the existing symmetric and asymmetric
two-server PAKE protocols in terms of parallel computation.
3
objects in a network such as users, computers, printers, and services. AD DS also
provides support for locating and working with these objects. For a large enterprise
running its own domain, there must be two AD DS domain controllers, for fault-
tolerance purpose. To authenticate a user on a network, the user usually needs to
provide his/her identification and password to one AD DS domain controller. Based
on our two-server PAKE protocol, the user’s password is splitted into two parts and
stores them, respectively, on the two AD DS domain controllers, which can then
cooperate to authenticate the user. Even if one domain controller is compromised, the
system can still work. In this way, one can achieve more secure AD DS.
4
Chapter 2
RELATED WORK
Literature Survey
This project provides strong security arguments to support the Encrypted Key
Exchange (EKE) -like protocols being standardized by the IEEE P1363.2 Standard
working group (namely the PPK series). This aim can be reached by slightly
modifying the original AuthA protocol (the two encryption primitives are instantiated
using separate mask generation functions but derived from a unique shared password)
to be able to achieve the security notion of forward-secrecy in a provably-secure way.
Our result is a slight departure from previously known results on EKE -like structures
since the security of AuthA is now based on the Gap Diffie-Hellman problem.
Moreover, AuthA is extended into a One-time Password-authentication and Key
exchange (OPKeyX) technology which allows a user to securely log into his account
using a remote un-trusted computer and limits the damages of corruption of the
server.
5
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.
Yang’s Protocol
In 2007, Jin et al. [18] further improved Yang’s protocol[21] and proposed a
two-server PAKE protocol with less communication rounds. In their protocol, the
client sends B=g1a g2π to SS, SS forwards B1=B/g1b1g2π1 to CS, CS returns A1=g1b2, B1=
(B1/ g2π2)b2= g1(a-b1)b2 to SS, SS computes B3=(B2A1b1)b3=gab2b3 and responds A2= A1b3,
S1=H(B3) to the client, where H is a hash function. Next, SS and the client
authenticate each other by checking if they can agree on the same secret session key
g1ab2b3, where a,(b1,b3),b2 are randomly chosen by the client, SS and CS, respectively.
The advantage of Jin et al.’s protocol is that it needs less communication rounds than
Yang et al.’s protocol in without introducing additional computation complexity. Like
Yang et al.’s protocols, the disadvantage of Jin et al.’s protocol is the protocol
structure which requires two servers to compute in series.
6
Chapter 3
SYSTEM ANALYSIS
3.1.1. Purpose
In a server all the passwords necessary to authenticate clients are stored that is
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. In our project, a
scenario where two servers cooperate to authenticate a client is considered and if one
server is compromised, the attacker still cannot pretend to be the client with the
information from the compromised server. This provides more security than others.
3.1.2 Scope
Our protocol provides explicit authentication in the sense that each party know
that other parties have established their secret session keys correctly if the message
7
authentication by the party succeeds. If the client C accepts the messages M4 and M5,
the client C is confirmed that the servers S 1 and S2 will compute their secret session
keys with the client C correctly. If the server S 1 accepts the message M6, the server S1
is confirmed that the client C has computed the same secret session key SK 1, and the
client C and the server S2 have established their secret session key correctly.
3.1.3. Objective
The first model, called PKI-based model, assumes that the client keeps the
server’s public key in addition to share a password with the server. In this setting, the
client can send the password to the server by public key encryption. Gong et al. were
the first to present this kind of authentication protocols with heuristic resistant to
offline dictionary attacks, and Halevi and Krawczyk were the first to provide formal
definitions and rigorous proofs of security for PKI-based model.
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-
8
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 standard cryptographic
assumption.
Limitations
Advantages
9
• Establish a cryptographic key for secure communications after authentication.
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 the concept of public key
cryptosystem is referred, the encryption key of one server should be unknown to
another server and the client needs to remember a password only after registration
Performance: User requests are to be responded quickly and send the required file to
destination properly.
Software Requirements:
10
• Technology : JAVA.
• Database : Mysql 5.5
• Database Connectivity :JDBC
Hardware Requirements:
11
Chapter 4
SYSTEM DESIGN
The designer’s goal is how the outputs to be produced and in what format
samples of the output are also presented. The processing phases are handled through
the program construction and testing. Finally details related to justification of the
system and an estimate of the impact of the candidate system on the user and the
organization are documented and evaluated by management as a step towards
implementation.
12
Reusability of the design artifacts, which saves time and cost.
System Architecture describes “the overall structure of the system and the
ways in which the structure provides conceptual integrity”.
The proposed system architecture is as follows and in this the efficiency is good.
Fig. [Link]
4.1.1 Modules
13
Module Description
The Diffie-Hellman key exchange protocol was invented by Diffie and Hellman in
1976. It was the first practical method for two users to establish a shared secret key
over an unprotected communications channel. Although it is a non authenticated key
exchange protocol, it provides the basis for a variety of authenticated protocols.
Diffie-Hellman key exchange protocol was followed shortly afterward by RSA, the
first practical public key cryptosystem.
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, S 1 randomly
chooses an integer s1 from Zq and S2 randomly chooses an integer s2 from Zq , and S 1
and S2 exchange g1s1 and g1s2 . After that, S1 and S2 jointly publish public system
parameters G, q, g1, g2, H where g2= gs1s2.
Registration
14
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 only after registration.
The DFD is also called as bubble chart. It is a simple graphical formalism that
can be used to represent a system in terms of the input data to the system, various
processing carried out on these data, and the output data is generated by the system.
15
Data-flow Diagram
User
Login
Check
yes No
Key Generation
Elgamal Encryption
File Search
The identification of actors and use cases result in the definition of the
boundary of the system i.e., differentiating the tasks accomplished by the system and
the tasks accomplished by its environment. The actors are outside the boundary of the
system, whereas the Use cases are inside the boundary of the system. Use Cases
describe the behavior of the system as seen from the actor’s point of view. It describes
the function provided by the system as a set of events that yield a visible result for the
actor.
16
Use Case diagram for User
Registrattion
User
key generation
File upload
File access
Class diagrams model class structure and contents using design elements such
as classes, packages and objects. Class diagram describe three different perspectives
when designing a system- conceptual, specification and implementation. Classes are
composed of three things: name, attributes, and operations. Class diagrams also
display relationships such as containment, inheritance, associations etc. The
association relationship is most common relationship in a class diagram. The
association shows the relationship between instances of classes.
Class diagram
User Server1
username name
password password
location
fileuplaod()
filesearch() register1()
filedownload()
Server2
name
password
email
register2()
generateprivatekey()
17
Fig. [Link] Diagram
Sequence diagrams
Object: Object can be viewed as an entity at a particular point in time with a specific
value and as a holder of identity that has different values over time.
Actor: An Actor represents a coherent set of roles that users of a system play when
interacting with the use cases of the system.
Message: A message is sending of a signal from one sender object to other receiver
object(s).
2: server2 Registration
3: Login
4: File download/search
5: Logout
18
Collaboration diagrams
: user
3: Login Server 2
Registration
5: Logout
4: File download/search
Login
File download/search
Logout
19
4.2.4 Activity diagram
Activity states and action states: An executable atomic computation is called action
state, which cannot be decomposed. Activity state is non atomic, decomposable and
takes some duration to execute.
Transition: It is the path from one state to the next state, represented as simple
directed line.
Forking and joining: The synchronization bar when split one flow into two or more
flows is called fork. When two or more flows are combined at synchronization bar,
the bar is called join.
Swim Lanes: Group work flow is called swim lanes. All groups are portioned by
vertical solid lines. Each swim lane specifies locus of activities and has a unique
name. Each swim lane is implemented by one or more classes. Transition may occur
between objects across swim lanes.
20
Activity diagram
START
Check login No
Yes
User login
Check Login
File share
File search
Key Entered
Check Key
No
Correct
Dictionary File
Attack Download
Logout
21
Chapter 5
IMPLEMENTATION
Java
22
The Java Application Programming Interface (Java API)
JDBC
NetBeans
The NetBeans IDE is written in Java and can run on Windows, OS X, Linux,
Solaris and other platforms supporting a compatible JVM.
Modules
23
Modules Description
Consider two users Alice and Bob, who know nothing about each other, but
wish to establish secure communications between them. Diffie-Hellman key exchange
protocol can be used as follows:
• Alice and Bob agree on a cyclic group G of large prime order q with a
generator g.
• Alice randomly chooses an integer a from Z *q and computes X=ga, while Bob
randomly chooses an integer b from Z, q and computes Y=g b. Then Alice and
Bob exchange X and Y.
• Alice computes the secret key K1=Ya=gba, while Bob computes the secret key
k2=Xb =gab.
It is obvious that k1=k2 and thus Alice and Bob have agreed on the same secret
key, by which the subsequent communications between them can be protected.
24
1985 [12] on the basis of Diffie-Hellman key exchange protocol. It consists of key
generation, encryption, and decryption algorithms as follows:
25
Algorithm
Chooses Private
Chooses random k X
Calculates
K=Yk modp
Calculates Calculates
C1=gkmodp (C1, C2) C1xmodp=K
C2=Mkmodp And recovers
message
M=k-1C2modp
26
Key generation
Encryption
Decryption
On inputs a cipher text (A, B), and the decryption key x, it outputs the plain
text m=D(C, x) = B/Ax.
Elgamal Security
The two peer servers S1 and S2 jointly choose a cyclic group G of large prime
order q with a generator g2 and a secure hash function H : {0; 1}*->Zq, which maps a
message of arbitrary length into an l-bit integer, where l= log 2q. 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.
27
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 the concept of public key
cryptosystem is used, the encryption key of one server should be unknown to another
server and the client needs to remember a password only after registration.
28
Chapter 6
TESTING
Testing Objectives
These are several rules that can save as testing objectives they are:
In order to make sure that the system does not have errors, the different levels of
testing strategies that are applied at differing phases of software development are:
6.1.1 Unit Testing
Unit Testing is done on individual modules as they are completed and become
executable. It is confined only to the designer's requirements. Unit testing is different from
and should be preceded by other techniques, including:
Inform debugging
Code inspections.
29
Each module can be tested using the following two Strategies:
In this the test cases are generated on the logic of each module by drawing
flow graphs of that module and logical decisions are tested on all the cases. It has
been uses to generate the test cases in the following cases:
30
conducted by the testing organization if a company has one. Test data may range from hand
generated to production.
In general a test case is a set of test data and test programs and their expected
results. A test case in software engineering normally consists of a unique identifier,
requirement references from a design specification, preconditions, events, a series of
steps (also known as actions) to follow, input, output and it validates one or more
system requirements and generates a pass or fail.
31
Test Case 6.1.1
32
Test Case 6.1.2
33
[Link] text Test case
34
Test Case 6.1.3
35
Fig. 6.4. registration Test case
36
Chapter 7
RESULT ANALYSIS
The performance of our protocol and compare our protocol with existing
protocols for two-server password-only authentication and key exchange is analyzed.
The client C broadcasts M1 to S1 and S2, receives M4 and M5 from S1 and S2,
respectively, and broadcasts M6 to S1 and S2. The total communication complexity for
C is 3L+4l, almost half of the communication complexity for S 1. The total
computation complexity is a four exponentiation.
37
In terms of parallel computation, our protocol has four communication rounds
only. The client C broadcasts M1 to the two servers S1 andS2 in the first round, S1 and
S2 exchange M2 andM3 in the second round, S1 and S2 both reply C with M4 andM5 in
the third round, C broadcasts M6 in the last round. The client C is involved in three
communication rounds.
To the best of our knowledge, Katz et al.’s protocol [20], called the KMTG
protocol for brevity, is the only existing symmetric protocol for two-server password-
only authentication and key exchange. The performance comparison of our protocol
with the KMTG protocol is shown in table. From above table our protocol is much
more efficient than the KMTG protocol in both the client and the server sides.
38
Chapter 8
CONCLUSIONS AND FUTURE EXTENSIONS
Future Enhancement
In terms of parallel computation, our symmetric protocol has a feature that the
total running time in the two-server side is equal to the total running time of one
server, i.e., transmitting 6L+3l bits and computing five modular exponentiations in
four rounds. However, in the asymmetric YDB protocol and the asymmetric JWX
protocol, the total running time in the two-server side is equal to the sum of two
servers’ running time, i.e., transmitting 8L+3l bits and computing nine modular
exponentiations in 10 rounds in the YDB protocol, and transmitting 11L+3l bits and
computing 12 modular exponentiations in six rounds in the JWX protocol. Even if the
pre-computation is allowed, the two servers in the YDB protocol or the JWX protocol
still need to compute seven modular exponentiations in series. Therefore, our protocol
is even more efficient than the asymmetric YDB protocol and the asymmetric JWX
protocol in terms of the total running time.
39
40
Chapter 9
REFERENCES
[5] D. Boneh and M. Franklin, “Identity Based Encryption from the Weil
Pairing,”Proc. 21st Ann. Int’l Cryptology Conf. (Crypto ’01), pp. 213-229, 2001.
[6] D. Boneh and M. Franklin, “Identity Based Encryption from the Weil
Pairing,”SIAM J. Computing, vol. 32, no. 3, pp. 586-615, 2003.
41
[9] J. Brainard, A. Jueles, B.S. Kaliski, and M. Szydlo, “A New Two-Server
Approach for Authentication with Short Secret,”Proc. 12 th Conf. USENIX Security
Symp., pp. 201-214, 2003.
[13] W. Ford and B.S. Kaliski Jr., “Server-Assisted Generation of a Strong Secret
from a Password,”Proc. IEEE Ninth Int’l Workshop Enabling Technologies:
Infrastructure for Collaborative Enterprises, pp. 176-180, 2000.
[15] L. Gong, T.M.A. Lomas, R.M. Needham, and J.H. Saltzer, “Protecting Poorly-
Chosen Secret from Guessing Attacks,”IEEE J. Selected Areas in Comm.,vol. 11, no.
5, pp. 648-656, June 1993.
42
[18] H. Jin, D.S. Wong, and Y. Xu, “An Efficient Password-Only Two-Server
Authenticated Key Exchange System,” Proc. Ninth Int’l Conf. Information and
Comm. Security (ICICS ’07),pp. 44-56, 2007.
[21] Xun Yi, San Ling, and Huaxiong Wang “Efficient Two-Server Password-Only
Authenticated Key Exchange,” IEEE Transactions on Parallel and Distributed
Systems, vol.24, no.9, September 2013
43
APPENDIX
package ElGamal;
import [Link].*;
import [Link].*;
import [Link].*;
import [Link].*;
//Prime key
BigInteger p, b, c, secretKey;
44
Random sc = new SecureRandom();
p = [Link](64, sc);
b = new BigInteger("3");
[Link]("****************");
[Link]("\n");
[Link]("\n");
[Link]("****************");
bint=[Link]()+","+[Link]()+","+[Link]();
return bint;
//Public Key
BigInteger p, b, c, secretKey;
p = new BigInteger(pp);
b = new BigInteger(bb);
45
secretKey = new BigInteger(skey);
c = [Link](secretKey, p);
[Link]("\n");
[Link]("Key Generation");
[Link]("\n");
[Link]("****************");
[Link]("\n");
[Link]("public key="+c);
[Link]("\n");
[Link]("****************");
return [Link]();
package ElGamal;
import [Link].*;
import [Link].*;
import [Link].*;
import [Link].*;
46
{
//Elgamal Encryption
public static String encrypt(String mx,String cc, String pp, String bb, String s)
BigInteger c2 = ([Link](k)).mod(p);
[Link]("****************");
[Link]("\n");
47
[Link]("Key Encryption K="+k);
[Link]("\n");
[Link]("****************");
return [Link]()+","+[Link]()+","+[Link]();
package ElGamal;
import [Link].*;
import [Link].*;
import [Link].*;
import [Link].*;
48
//Elgamal Encryption
BigInteger m = ([Link](c2)).mod(p);
[Link]("****************");
[Link]("\n");
[Link]("Elgamal Decryption");
[Link]("****************");
[Link]("K inverse="+kinv);
[Link]("\n");
[Link]("Recovered Key="+m);
[Link]("\n");
[Link]("****************");
return [Link]();
49
A.2 Input/Output Design
User Login
50
Registration
51
Searching and sharing files
52
Downloading files
53
54
55
Attacks
56