Professional Documents
Culture Documents
CHAPTER 1
INTRODUCTION
1.1 GENERAL
• Authentication
Authentication is managed through certificates signed by a trusted third
party or designated certificate authority. An exchange of certificates is required
when a node sends a request message for another node for the first time. An
authentication mechanism proves the nodes identity in a given instance of time.
• Key Management
The main concept of key pairs (private-public key) and neighborhood key
(1-hop neighbor key) dynamically generated using RSA technique. Using this
algorithm, encryption and decryption process done.
• Joining and Leaving Groups
Efficiently distributing data in such applications requires members to
join network groups for communication. Supporting large nodes of the group
requires an efficient way to exchange information between group members. In
order to construct and maintain the network group, and distribute application
data to the group members. As you notice adhoc network is a type of transient
network where nodes often join and leave network .It is essential to monitor the
nodes join or leave during session communication.
• Message Keys
In a scheme such as the neighborhood key method, where secrets are
exchanged only between neighbors of the communication network, encrypted
message payloads cannot be deciphered by non-neighbors. This creates a
problem when a message is forwarded. To reduce the overhead incurred for each
new message it generates a new symmetric key for this message, called a
message key, and encrypts or signs the payload of the message with the message
key.
• Backward secrecy and Forward secrecy
o Backward secrecy -A new member should not be able to access data
transmitted before the member joined
o Forward secrecy - A member cannot access data that is transmitted after the
member left
3
CHAPTER 2
The main goal of this project is to preserve session secrecies i.e., Backward &
forward secrecies. Proposed system adopts a novel key management and encryption
method, to preserve session secrecies (i.e., Forward and Backward secrecy). Privacy
and secrecy of data being transferred among nodes maintained by cryptographic
mechanisms.
Faster service
A user should be able to perform network operation quick and can obtain
transaction details with in time. Each component of simulator designed with swing
pluggable and play type provides good feel and look for windows platform.
Low Latency
All key generation and network operations done with limited battery backup
with less experience of latency.
5
This is a classic example of Adhoc network and the most simple way to tackle this
example would be through location based key agreement - to map locations to name
ladles and then use identity based mechanisms for key agreement. e.g.: participants
writing the configuration file such as node orientation, IP addresses on a piece of
paper and passing it around. Then a certificate based key agreement mechanism can
be used. These public key certificates can allow participants to verify the binding
between the configuration file (contains such as node orientation, IP address) and
keys of other participants.
2.5.1 Infrastructure
Ad-hoc networks contain nodes that may frequently change their locations. Hence
the topology in these networks is highly dynamic. This results in frequently changing
neighbors on whom a node relies for routing. As a result traditional routing protocols
can no longer be used in such an environment. This mandates new routing protocols
that can handle the dynamic topology by facilitating fresh route discoveries.
Perlman, in her thesis, proposed a link state routing protocol that achieves
Byzantine Robustness. Although her protocol is highly robust, it requires a very high
overhead associated with public key encryption. Secure BGP attempts to secure the
Border Gateway Protocol by using PKI (Public Key Infrastructure) and IPsecurity. In
their paper on securing ad hoc networks, Zhou and Haas primarily discuss key
management. They devote a section to secure routing, but essentially conclude that
“nodes can protect routing information in the same way they protect data”. They also
observe that denial-of-service attacks against routing will be treated as damage and
routed around. Security issues with routing in general have been addressed by several
and, lately, some work has been done to secure ad hoc networks by using misbehavior
detection schemes. This approach has two main problems: first, it is quite likely that it
will be not feasible to detect several kinds of misbehaving (especially because it is
very hard to distinguish misbehaving from transmission failures and other kind of
failures); and second, it has no real means to guarantee the integrity and
authentication of the routing messages.
A node initiating route discovery sets the sought security level for the route i.e. the
required minimal trust level for nodes participating in the query or reply propagation.
Nodes at each trust level can be randomly assigned a trust value based on initial
authentication made. Only the nodes with the highest trust value can read and process
the header and forward the packet. So if a packet has reached the destination, it must
guarantee that it has been propagated by nodes negotiating to provide same trust or
highest level.
8
2.7 OBJECTIVE
Group management
Adhoc nodes
Channel communication
Security and measures
CHAPTER 3
SYSTEM REQUIREMENTS
RAM 1GB
variety of technologies that communicate with the Internet to provide increased ease
of use and functionality. Browser and e-mail technologies are obvious examples, but
there are also technologies such as Automatic Updates that help users obtain the latest
software and product information, including bug fixes and security patches. These
technologies provide many benefits, but they also involve communication with
Internet sites, which administrators might want to control.
3.3.2 JAVA
One of the most compelling reasons to move to java is its platform
independence. Java runs on most major hardware and software platforms, including
windows XP, 98, 95, and NT Macintosh and several varieties of UNIX. Java is a
general USA in 1991. Originally called oak by James Gosling, one of the inventors of
the language. The java development team which included Patrick Naught on
discovered that the existing language like C and C++ had limitations in terms of both
reliability and portability. However, they modeled their new language java on C and
C++ but removed a number of features of C and C++ that were considered as sources
of problems and thus made java a really simple, reliable, portable and powerful
language.
Specifically, this overview will include a bit include a bit of the history of java
platform, touch of the java programming language, and the ways in which people are
using java applications and swings, now and in the likely future. After going a while
down the path of consumer – electronics devices, they realized that they had
something particularly cool in the java language and focused on it as a language for
network computing. Sun formed the java soft group which in a little over three years
has grown to over six hundred people working on java related technologies.
Swing:
Swing is a set of classes that provides more powerful and flexible components
that are possible with AWT and hence we adapted swing. In addition to normal
components such as buttons, check box, labels swing includes tabbed panes, scroll
panes, trees and tables. It provides extra facilities than the normal AWT components.
J Frame:
Like AWT’s frame class, the J Frame class can generate events when things
happen to the window, such as the window being closed, activated, iconified or
opened. These events can be sent to a window Listener if one is registered with the
frame.
J File Chooser:
It provides a simple mechanism for the user to choose a file. Here it points
the users default directory. It includes the following methods:
Methods Used
Show Dialog:
Pops a custom file chooser dialog with a custom approve button.
J Scroll Pane:
Encapsulates a scrollable window. It is a component that represents a
rectangle area in which a component may be viewed. It provides horizontal and
13
Image:
The image class and the java.awt.image package, together provide the support
for imaging both for the display and manipulation of web design. Images are objects
of the image class, and they are manipulated using the classes found in the
java.awt.image package.
String Tokenizer:
The processing of text often consists of parsing a formatted input string.
Parsing is the division of the text in to set of discrete parts or tokens, which in a
certain sequence can convey can convey a semantic meaning.
The String Tokenizer provides first step in this parsing process, often called
the lexical or scanner. String Tokenizer implements the Enumeration interface.
Therefore given an input sting, we can enumerate the individual tokens contained in it
using String Tokenizer.
JDBC Connectivity
JDBC Versions
JDBC 2.0 API is the latest version of JDBC API available in the java.sql package.
The previous version focused primarily on basic database programming services such
as creating connections, executing statements and prepared statements, running batch
queries, etc. However, the current API supports batch updates, scrollable resultsets,
transaction isolation, and the new SQL:1999 data types such as BLOB and CLOB in
addition to the SQL2 data types.
14
A database vendor typically provides a set of APIs for accessing the data managed by
the database server. Popular database vendors have supplied some proprietary APIs
for client access. Client applications written in native languages such as C and C++
can make these API calls for database access directly. The JDBC API provides a
Java-language alternative to these vendor-specific APIs. Though this takes away the
need to access vendor-specific native APIs for database access, the implementation of
the JDBC layer still need to make these native calls for data access.
JDBC accomplishes its goals through a set of Java interfaces; each gets implemented
differently by different vendors. The set of classes that implement the JDBC
interfaces for a particular database engine is called a JDBC driver. Hence the
necessity of a JDBC driver for each database server. In building a database
application, we do not have to think about the implementation of these underlying
classes at all as the whole point of using JDBC is to hide the specifics of each
database and let us concentrate on our application. A JDBC driver is a middleware
layer that translates the JDBC calls to the vendor-specific APIs. The Java VM uses
the JDBC driver to translate the generalized JDBC calls into vendor-specific database
calls that the database understands.
There are a number of approaches for connecting from our application to a database
server via a database driver.
The JDBC API is originally based on the ODBC API. Thus, it becomes feasible for
the first category of JDBC drivers providing a bridge between the JDBC API and the
ODBC API. This bridge translates the standard JDBC calls to corresponding ODBC
calls. The driver then delegates these calls to the data source. Here, the Java classes
for the JDBC API and the JDBC-ODBC bridge are invoked within the client
application process. Similarly, the ODBC layer executes in another process. This
configuration requires the client application to have the JDBC-ODBC bridge API, the
ODBC driver, and the native language level API, such as the OCI library for Oracle
installed on each client machine.
Each data access call has to go through many layers, this approach for data access is
inefficient for high-performance database access requirements. Though this is not a
preferred one, this has to be used in some situations for example, a Microsoft Access
2000 database can be only be accessed using the JDBC-ODBC bridge.
Part Native Driver - This approach use a mixture of Java implementation and
vendor-specific native APIs for data access. This one is a little bit faster than the
earlier one. When a database call is made using JDBC, the driver translates the
request into vendor-specific API calls. The database will process the request and send
the results back through the API, which will forward them back to the JDBC driver.
The JDBC driver will format the results to confirm to the JDBC standard and return
them to the program. In this approach, the native JDBC driver, which is part Java and
part native code, should be installed on each client along with the vendor-specific
native language API. The native code uses vendor-specific protocols for
communicating with the database. The improved efficiency makes this a preferred
method over the use of the earlier one.
then handles the request using another driver, for example the above one, to complete
the request. This is good because the intermediate server can abstract details of
connections to database servers.
Pure Java Drivers - This pure Java alternative to part Java, part native driver. These
drivers convert the JDBC API calls to direct network calls using vendor-specific
networking by making direct socket connections with the database like Oracle Thin
JDBC Driver. This is the most efficient method of accessing databases both in
performance and development time. It also the simplest to deploy since there are no
additional libraries or middleware to install. All major database vendors, such as
Oracle, Sybase, and Microsoft, provide this type of drivers for their databases.
3.3.4 MS-ACCESS
If the database design needs to be secured to prevent from changes, Access databases
can be locked/protected (and the source code compiled) by converting the database to
an .MDE file. All changes to the database structure (tables, forms, macros, etc.) need
to be made to the original MDB and then reconverted to MDE.
Using Access for rapid application development, especially for the creation of
prototypes and standalone applications that serve as tools for on-the-road salesmen.
Access does not scale well if data access is via a network, so applications that are
used by more than a handful of people tend to rely on Client-Server based solutions.
However, an Access "front end" (the form designs, swing layouts, queries and JAVA
code) can be used against a host of database backends, including JET (file-based
database engine, used in Access by default), Microsoft SQL Server, Oracle, and any
other ODBC-compliant product.
Benefits
CHAPTER 4
TABLE DESIGN
The system will use MS-ACCESS database for data storage. The database design is as
follows:
4.1.1 Table Name: Node Information
CHAPTER 5
5.1 GENERAL
Node
Positioning
User
User Interface Node plotting
Menu
Options
Monitor Status
deals with configuring the network; the node input which gives the number of nodes
to be inserted from the source to the destination, mobility menu item specifies the
mobility of nodes from one place to another.
This option provides key generation for the plotted nodes and authentication
options for processing validity of nodes identity. This menu process the nodes
configure file and identifies a first trusted node in the formed network.
The other options here are adjusting the background color of the simulation
process and the nodes. To improve the graphical user interface operations easy for
novice users help information added.
5.4 SUMMARY
The User Interface deals with the adhoc simulation interacting with the Java
GUI. This provides an effective communication built between the user and the
simulation environment. The GUI option shows a real time output of the
simulation compared to the traditional study of existing adhoc simulations.
CHAPTER 6
Data flow diagram is used to define the flow of the system and its
resources such as information. Data flow diagrams are a way of expressing system
requirements in a graphical manner. Data flow diagrams represent one of the most
ingenious tools used for structured analysis. A data flow diagram or DFD as it is
called; also known as a bubble chart. It has the purpose of clarifying system
requirements and identifying major transformations that will become programs in
system design. It is the major starting point in a design phase that functionally
decomposes the requirement specification down to the lowest level of detail.
outgoing flow
The DFD at the simplest level is referred in simple words a “CONTEXT ANALYSIS
DIAGRAM”. These are expanded by level, each explaining its process in detail.
Processes are numbered for easy identification and are normally labeled in a block
letters. Each data flow is labeled for easy understanding.
Communicating
Nodes
Request for
Authenticatio Verify communication
n signature
Ready for
Communication
Add Group comm. Details
Node Id
IDIDAddress
Node Details
CHAPTER 7
Once that the security architecture has been designed in terms of which
routing protocol to use, it is necessary to precise the requirements that a cryptographic
infrastructure must satisfy in order to be usable. Symmetric cryptography is fast and
light for encryption and digesting, while asymmetric cryptography is efficient for
signature and multiple key management. Asymmetric algorithms offer many
advantages in the securing process of an ad hoc network. However, these ciphers are
unsuitable when the nodes are unable to verify asymmetric signatures quickly enough,
or when network bandwidth is insufficient.
7.3 Requirements
• low complexity, because of the CPU power limitation of nodes in a mobile ad hoc
network.
The same applies for a hashing algorithm, with the remark that generation and
verification of the digest are the same operation.
Choosing which cryptographic scheme to use for the protection of the messages is
not an easy task. The choice depends largely on the requirements: whether we want to
identify messages from each node (i.e. ensure non-repudiation) or just guarantee the
integrity of messages – hence if we have to use asymmetric key pairs or just a
symmetric key; available techniques for key distribution; computational complexity;
robustness against different kind of cryptanalysis; size of the signature or digest;
required time for signature generation and verification, or digest generation; and
more. Furthermore, once the requirements are set, an algorithm can be carefully
implemented in software and/or dedicated hardware in a way to perform better than
another. With this in mind, comparing the different known algorithms has sense only
if all-purpose hardware is employed. The cipher should be chosen once the
requirements are clear, and while looking both at the algorithms and the software and
hardware available.
Asymmetric algorithms eligible for use in ad hoc networks may include RSA,
DSA, and ECNR. If a symmetric cipher must be used instead, a good choice would be
HMAC with MD5 or SHA-1, i.e. HMAC-MD5 or HMAC-SHA1. Note that the MD5
hash function has been broken i.e. collisions have been found in references mentioned
under [II, B]; however, this does not compromise the security of HMAC-MD5.
28
Encryption is the process of disguising a message in such a way that it hides its
content; the operation consists in transforming the message from plaintext to
ciphertext. The inverse process is called decryption.
It is likely that information that was true at some time in the past may not be true
anymore in the present. A common problem is that, even assuming a digest or
signature is successfully checked, previously transmitted messages can be sent again
by an attacker. That is, an intruder may record a bulk of messages and re-send them
some time later; these messages, if they cannot be identified as old (by some
definition of “old”), will be accepted as valid because they are properly signed. This is
known as replay attack, and may easily disrupt communications. To oppose replay
attacks, messages usually embed a piece of time information, called timestamp.
29
Encryption
Some of the symmetric algorithms for encryption are: DES with its improvements
Triple DES and AES, IDEA, LOKI, Lucifer, Skipjack, Vernam (also known as one-
time pad), RC2, and RC4.
To this class of algorithms also belong the ancient substitution and transposition
ciphers, like Caesar, Mary Stuart’s, Pigpen, Vigenere, Playfair, and ADFGVX. These
ciphers were in use centuries ago, in the pre-computer era, and are not used anymore
because they are easy to break by applying cryptanalysis.
30
Message digest
Symmetric algorithms make large use of hash functions [III] for digesting. A hash
function h maps a bitstring of arbitrary finite length to another bitstring of fixed
length n, where n depends on h. The hash function hence outputs a hash value which
is a condensed representative image of the bitstring fed in input. Changing just one bit
of the input string results in a very different hash value in output; this is known as the
avalanche effect.
Examples of hash functions are MD5 (Message Digest 5) [III] which is the
successor of MD4, Snefru, RIPEMD-160, and the class of SHA (Secure Hash
Algorithm) functions [III] such as SHA-1 [III] and SHA-256.
CHAPTER 8
(3) Buddy List: non-members maintain a list of members that are likely to be in
the communication network (a "buddy list"). They use this list to contact members.
This type of maintaining members nearby forms neighbors of network. For
neighborhood keying this type of buddy list computed whenever the potential
members of network changes.
SAR can extend any routing protocol. Most of AODV’s original behavior such
as on-demand discovery using flooding, reverse path maintenance and forward path
setup via Route Request and Reply (RREP) messages is retain. Route Discovery and
Route Maintenance each operate entirely “On demand”. In particular, unlike other
protocols, this requires no periodic packets of any kind at any layer within the
network. Providing a detailed scenario of ad-hoc networking can be used in the AEC
industry, giving an overview of the existing mobile ad-hoc networks and addressing
some issues of implementation and deployment of the networking protocol called Ad-
hoc On-demand Distance Vector routing (AODV). There is very little difference
between prior work on existing AODV and proposed security issues in ad hoc
network routing protocols.
8.2 AUTHENTICATION
RSA
• Using the public key and encryption algorithm, everyone can encrypt a
message.
Let us assume,
• p and q are two prime numbers.
• n = pq
• m = (p-1)(q-1)
35
• Message M < n.
• Encryption key = (a,n).
• Decryption key = (b,n).
• Encrypt => E = Ma mod n.
• Decrypt => M = Eb mod n. extended gcd algorithm also computes b when
gcd(m,a) = 1.
From this RSA algorithm, encryption and decryption process are followed in this
system with generated private-public keys for each node.
In this scheme using neighborhood key method, where secrets are exchanged
only between neighbors of the network, encrypted message payloads cannot be
deciphered by non-neighbors. This creates a problem when a message is forwarded.
Clearly, decrypting and re-encrypting a message at each hop is very time-consuming
and not practical in large networks. To reduce the overhead incurred at each hop
usage of separate keys for each message. Here, when an member wants to transmit a
message, it generates a new symmetric key for this message, called a message key,
and encrypts or signs the payload of the message with the message key. Then, the
message key is encrypted with the neighborhood key and appended to the message.
When routing takes place with neighboring members they share their neighborhood
keys with their neighbors in the network, only the message key must be decrypted and
re-encrypted at each hop, without modifying the encrypted message payload.
36
Thus final message is only confined to destination can whole process message
with payload to retrieve the message that has been sent by source. By this way we can
achieve privacy of message communication at application level since that can be
processed with intended receiver node using its own private key as it is a confidential
one. This technique can be represented in flow diagram as follows;
If it is No
Destina
tion Encrypt the message key
Node with sender’s
Neighborhood public
Yes key
If it is No
Destina Decrypt the message key
tion with neighborhood
Node public key
Yes
Let us consider that node1 in the network wants to find a route to the node 10.
There are two possible ways in the network to establish a route between node 1 and
node 10 Path1: 1-5-6-11-10, Path2: 1-2-3-8-10. In the network let us assume that the
security metrics of the nodes 2,3 and 8 are less than 5,6 and 11 and they are part of a
private network. So based on the security metrics, the SAR protocol chooses the path:
1-5-6-11-10 for routing between node 1 and node 10.
38
Using these metrics the tabulation indicates the value of trustiness calculated as per
requirements;
Advantage
Eliminates the attacks that happened while using legacy routing protocols.
Drawbacks
A lot of encryption overhead, since each intermediate node has to performs it.
Summary
SAR is indeed secure in the way that it does ensure that only nodes having the
required trust level will read and reroute the packets being sent. Unfortunately, SAR
still leaves a lot of security issues uncovered and still open for attacks such as:
SAR is intended for the managed-open environment as it requires some sort of key
distribution system in order to distribute the trust level keys to the correct devices.
40
CHAPTER 9
SYSTEM TESTING
The purpose of stress testing is to prove that the candidate system does
not malfunction under peak loads, subject a high volume of data over a short
period of time and in scalability. This creates an adhoc environment where
more processing of activities can be carried out.
9.3 Summary
The design of simulator is done with java swing components and hence
verification and validation testing done to simulation entry fields. Above
mentioned tests are also performed with basic testing tools. Thus software
defects are identified and test cases are recorded for various values and
effectively removed any software defect is present in this simulation design.
42
FUTURE ENHANCEMENTS
Currently this project deals with session secrecy alone. Moving to next level
of security for achieving confidential nature of data transmission. Providing this
feature would be an extension to the project. Confidentiality and integrity of data
being transferred among nodes can be maintained by using MAC mechanisms.
Confidentiality can be applied only for application data, i.e., the payload field of the
message. Encryption of the payload is performed at the source of a message and
decryption is performed at the destination(s) of the message. Data is encrypted using a
symmetric key algorithm (AES, Blowfish, DES, and DESede) with a specified key
length (between 0 and 1024 bits). For the above implementation needs MAC
computation, additional security header appended need to verify at receiving side and
MAC verify can provide data confidentiality along with data integrity.
43
CONCLUSION
This project is used for the development of applications that bringsthe total
security functionality inherent in popular messaging systems to a wireless ad-hoc
environment. Our primary goal is to facilitate spontaneous conversations between
mobile hosts where no centralized server exists. Application messages being
distributed reliably via Ad Hoc wireless nodes on the handheld devices. SAR provides
the best strategy for routing and evading well known routing attacks.
BIBILOGRAPHY
References
Book References
[ A ] Java 2 Network Security by Pistoia, Reller, Gupta, Nagnur and Ramani Pearson
EditionII -2001
[ B ] The hand book of Ad-hoc Wireless Networks, Mohammad IIyas - CRC press
Edition 2003.
http://freepastry.rice.edu.
http://www.ieeeexplore.org
http://www.ietf.org/rfc/rfc3626
http://www.wikipedia.org