71
CHAPTER 1 INTRODUCTION The recent technological advances make wireless sensor networks (WSNs) technically and economically feasible to be widely used in both military and civilian applications, such as monitoring of ambient conditions related to the environment, precious species and critical infrastructures. A key feature of such networks is that each network consists of a large number of unattended sensor nodes. These nodes often have very limited and non- replenish able energy resources, which makes energy an important design issue for these networks. Routing is another very challenging design issue for WSNs. A properly designed routing protocol should not only ensure a high message delivery ratio and low energy consumption for message delivery, but also balance the entire sensor network energy consumption, and thereby extend the sensor network lifetime. In addition to the aforementioned issues, WSNs rely on wireless communications, which is by nature a broadcast medium. It is more vulnerable to security attacks than its wired counterpart due to lack of a physical boundary. Wireless sensor networks are most widely used in many applications. Each network consists of a large number of unattended sensor nodes and they have very limited energy resources these makes energy as an important design issue for these networks. In wireless sensor domain, anybody can access and interrupt the sensor network requirements with the help of the appropriate wireless receiver. The process of selecting best path from the source to destination to move a packet is called routing. Difficult task in wireless sensor network is to design a routing protocol due to its limited resources. A routing protocol was designed for high message delivery and low energy Consumption for message transmission. Challenging task is networking, the large number of less power mobile nodes, this has been the major issue for researches. The primary issues to be handled in the network layer is routing and addressing . Another challenging task in wireless sensor networks is Security.

Sample document

Embed Size (px)

Citation preview

CHAPTER 1

INTRODUCTION

The recent technological advances make wireless sensor networks

(WSNs) technically and economically feasible to be widely used in both

military and civilian applications, such as monitoring of ambient conditions

related to the environment, precious species and critical infrastructures. A key

feature of such networks is that each network consists of a large number of

unattended sensor nodes. These nodes often have very limited and non-

replenish able energy resources, which makes energy an important design

issue for these networks. Routing is another very challenging design issue for

WSNs. A properly designed routing protocol should not only ensure a high

message delivery ratio and low energy consumption for message delivery, but

also balance the entire sensor network energy consumption, and thereby

extend the sensor network lifetime. In addition to the aforementioned issues,

WSNs rely on wireless communications, which is by nature a broadcast

medium. It is more vulnerable to security attacks than its wired counterpart

due to lack of a physical boundary.

Wireless sensor networks are most widely used in many applications. Each

network consists of a large number of unattended sensor nodes and they have

very limited energy resources these makes energy as an important design

issue for these networks. In wireless sensor domain, anybody can access and

interrupt the sensor network requirements with the help of the appropriate

wireless receiver.

The process of selecting best path from the source to destination to move

a packet is called routing. Difficult task in wireless sensor network is to

design a routing protocol due to its limited resources. A routing protocol was

designed for high message delivery and low energy Consumption for message

transmission. Challenging task is networking, the large number of less power

mobile nodes, this has been the major issue for researches. The primary issues

to be handled in the network layer is routing and addressing . Another

challenging task in wireless sensor networks is Security.

Geographical routing is one of the most widely used in wireless sensor

networks Geographic routing (also known as position-based routing or

geometric routing)is a technique to deliver a message to a node in a network

to deliver a message to a node in a network over multiple hops by means of

position information and location information to to deliver a packet from

source to destination location without any basic information about the

infrastructure Geographic routing provides the most organized and competent

way to route packets comparable to other routing protocols. In geographic

routing message transmission is done by choosing its nearest neighboring

node based on either the direction or distance.

In Geographic Adaptive Fidelity or GAF is designed primarily for mobile

adhoc networks, but is used in sensor networks as well. This protocol

optimizes the performance of wireless sensor networks by identifying

equivalent nodes with respect to forwarding packets. In GAF, the network

area is divided into fixed size virtual grids as shown in the . In each grid,

only one node is selected as the active node, while the others will wait for a

period to save energy. The sensor forwards the messages based on greedy

geographic routing strategy.

A query based geographic and energy aware routing (GEAR) was

proposed, In GEAR, Instead of using flooding, the sink node distributes the

requests with geographical attributes to the target region .Based on the

estimation cost and learning cost messages are forwarded from each node to

its neighboring node. The estimated cost considers both the distance to the

destination and remaining energy of the sensor nodes The learning cost

provides the updating information to deal with local minimum problem. While

in geographic algorithm each node only needs to maintain nearest node

information and may reach their local minimum but result in dead end or

loops. To solve this problem, basic routing algorithms were proposed with

some variations , including GEDIR, MFR and compass routing algorithm .If

each node is aware of its two-hop neighbours then the delivery ratio can be

improved. There are a few research reports discussed they comprise of

greedy and face routing to solve the local minimum problem. The main aim is

to set local topology as planar graph, and reach the destination by sending

messages to its possible sequences of adjacent faces. Lifetime is one of the

important area studied in WSNs. Instead of always selecting the lowest energy

path, routing schema proposed to find the sub-optimal path that can extend

the lifetime of WSN. The transmission power level can be adjusted according

to the distance between the transmitter and receiver is proposed by Chang &

Tassiulas. According to Zhang and Shen in Balancing energy consumption to

maximize network lifetime in data-gathering sensor networks is divided into

multiple zones and data aggregation is done by each and every node in the

network . A localized zone based routing schema was proposed among each

and every node to balance energy consumption. Security Threats to sensor

networks are due to the exposure of routing information ,because of these the

hackers can easily track the source node .To solve this problem, several

schemes were proposed .One among them is source location privacy through

secure routing protocol design .

Towards statistically strong source anonymity for sensor networks and

Enhancing source-location privacy in sensor network routing approach, In

source location privacy the dummy messages and valid messages are

combined together and broadcasted The aim of this is each node sends

messages continuously when there are no valid messages dummy messages

are transferred .if dummy messages are transmitted they utilize more sensor

energy and causes collision ns and decreases the packet delivery his to entrap

the attacker away from the source towards a phantom source. In phantom

routing there are two phases1.Pure random walk/Directed walk in these the

messages are transmitted to the phantom source 2.Single path routing in these

the messages are sent to the sink node. By using these two ways the phantom

source is away from the actual source. the adversaries are able to get the

information of direction messages this is the major drawback

1.1Problem DefinitionThis project mainly deals with Energy Consumption and security. More

energy consumption increases the network collision. Due to this packet

delivery ratio reduces, And it cannot provide full security for the packets.

1.2DatabaseIn this project, I used a MySqL Database, and MySqL is an open source

Relational Database Management System. Information in a MySqL is stored

in the form of related tables, MySqL databases are queried using a subset of

the standard query language commands (SQL) I have used MySqL 5.5

version.

1.3 Scope of the Present Study

Chapter 1 This report is divided into seven chapters as detailed below

Chapter 2 Provides an overview of the Literature Survey and covers the

initial investigation and survey carried over before starting the actual

implementation.

Chapter 3 Provides the System Requirements Specification for the project.

Chapter 4 Provides detailed information on Design(UML design), which

describes the system design i.e. UML diagrams [Use case diagrams, sequence

diagram, class diagram, and Activity diagram].

Chapter 5 Provides the details on the implementation of Proposed System

Algorithms and pseudo code.

Chapter 6 Provides the details on Testing on Proposed System Algorithms and

pseudo code.

Chapter 7 Provides the details of Result Analysis.

Chapter 8 Provides conclusion and future scope and followed by references.

1

CHAPTER 2

LITERATURE SURVEY

Routing techniques have been proposed for sensor networks, According

to Celal Ozturk, Yanyong Zhang, WadeTrappein[12] Flooding based routing

protocol is mainly used and there are four types of flooding based routing

protocols .In Baseline flooding they ensure that all the nodes must forward a

message only once and no node should resend the message which has been

previously transferred When a message reaches an intermediate node, it first

conforms whether it has received and forwarded that message before. If this

is for the first time, the node will transfer the message to all its neighbors.

Otherwise, the message will be discarded. But this is not possible because it

requires a cache at each sensor node. Probabilistic flooding was proposed for

optimizing the baseline flooding and to cut down energy consumption. In

probabilistic flooding, only a subset of nodes in the complete network

transmits the data while the other nodes simply discard the messages what

they receive. The major issue in this type of flooding is some messages are

lost in the network as a result it affects the complete network connectivity.

To protect the messages from the adversary they have proposed fake

messaging in this the messages are of same length and they are also encrypted

So that the adversary cannot find out the difference between the real

messages and fake messages due to this hacker misunderstands the fake

message as a real message and sends towards the fake source .One difficult

task is to inject the fake message. Next, we discuss such a fake message

injection method, referred to as Persistent Fake Source. The basic idea of this

is that once a node decides to become a fake source, it goes on sending the

fake messages due to this the hunter is targeted to misled However in this way

they try to provide privacy for the messages .In phantom flooding, every

message experiences two phases they are, a walking phase and a subsequent

flooding meant to deliver the message to the sink This type of flooding is

used to increase the network safety period because every message takes a

different shortest path to reach any node within the network .Phantom

flooding successfully protects the privacy and conforms the transmission of

the messages by using different methods like (a) random walk (b) neighbor

grouping method (c) directed walk (d) Latency for Phantom Flooding as

proposed in [12] .In the existing system there are two protocols based on

Geographical routing. Geographical routing is one of the most widely used in

wireless sensor networks Geographic routing (also known as position-

based routing or geometric routing)is a technique to deliver a message to a

node in a network to deliver a message to a node in a network over multiple

hops by means of position information and location information to deliver a

packet from source to destination location without any basic information

about the infrastructure Geographic routing provides the most organized and

competent way to route packets comparable other routing protocols[19].

In geographic routing message transmission is done by choosing its

nearest neighboring node based on either the direction or distance [2], [3],

[4]. In Geographic Adaptive Fidelity or GAF is designed primarily for mobile

adhoc networks, but is used in sensor networks as well. This protocol

optimizes the performance of wireless sensor networks by identifying

equivalent nodes with respect to forwarding packets. In GAF, the network

area is divided into fixed size virtual grids as shown in the Fig[1] . In each

grid, only one node is selected as the active node, as shown in Fig[2] while

the others will wait for a period to save energy[19]. The sensor forwards the

messages based on greedy geographic routing strategy. A query based

geographic and energy aware routing (GEAR) was proposed in [4][19]. In

GEAR, Instead of using flooding, the sink node distributes the requests with

geographical attributes to the target region .Based on the estimation cost and

learning cost messages are forwarded from each node to its neighboring

node. The estimated cost considers both the distance to the destination and

remaining energy of the sensor nodes The learning cost provides the updating

information to deal with local minimum problem. While in geographic

algorithm each node only needs to maintain nearest node information and may

reach their local minimum but result in dead end or loops. To solve this

problem, basic routing algorithms were proposed with some variations [7],

including GEDIR, MFR and compass routing algorithm .If each node is aware

of its two-hop neighbors then the delivery ratio can be improved.

There are a few research reports [2], [7], [8] discussed they comprise of

greedy and face routing to solve the local minimum problem. The main aim is

to set local topology as planar graph, and reach the destination by sending

messages to its possible sequences of adjacent faces. Lifetime is one of the

important area studied in WSNs. Instead of always selecting the lowest energy

path, routing schema[9] proposed to find the sub-optimal path that can extend

the lifetime of WSN. The transmission power level can be adjusted according

to the distance between the transmitter and receiver is proposed by Chang &

Tassiulas [9]. According to Zhang and Shan in Balancing energy consumption

to maximize network lifetime in data-gathering sensor networks is divided

into multiple zones and data aggregation is done by each and every node in

the network [10]. A localized zone based routing schema was proposed among

each and every node to balance energy consumption. Security Threats to

sensor networks are due to the exposure of routing information ,because of

these the hackers can easily track the source node .To solve this problem,

several schemes were proposed. One among them is source location privacy

through secure routing protocol design [12], [13], [14].

Towards statistically strong source anonymity for sensor networks and

Enhancing source-location privacy in sensor network routing approach, In

source location privacy the dummy messages and valid messages are

combined together and broadcasted The aim of this is each node sends

messages continuously when there are no valid messages dummy messages

are transferred [15], [16].if dummy messages are transmitted they utilize more

sensor energy and causes collision ns and decreases the packet delivery his to

entrap the attacker away from the source towards a phantom source [16]. In

phantom routing there are two phases1.Pure random walk/Directed walk in

these the messages are transmitted to the phantom source 2.Single path

routing in these the messages are sent to the sink node. By using these two

ways the phantom source is away from the actual source. the adversaries are

able to get the information of direction messages this is the major drawback.

Wireless sensor networks (WSNs) have been widely used in many areas for

critical infrastructure monitoring and information collection.

While confidentiality of the message can be ensured through content

encryption, it is much more difficult to adequately address source-location

privacy (SLP). For WSNs, SLP service is further complicated by the nature

that the sensor nodes generally consist of low-cost and low-power radio

devices. Computationally intensive cryptographic algorithms and large scale

broadcasting-based protocols may not be suitable. In this paper, we first

propose criteria to quantitatively measure source-location information leakage

in routing-based SLP protection schemes for WSNs. Through this model, we

identify vulnerabilities of some well-known SLP protection schemes. We then

propose a scheme to provide SLP through routing to a randomly selected

intermediate node (RSIN) and a network mixing ring (NMR). Our security

analysis, based on the proposed criteria, shows that the proposed scheme can

provide excellent SLP. The comprehensive simulation results demonstrate that

the proposed scheme is very efficient and can achieve a high message delivery

ratio. We believe it can be used in many practical applications.

Message authentication is one of the most effective ways to thwart

unauthorized and corrupted traffic from being forwarded in wireless sensor

networks (WSNs). To provide this service, a polynomial-based scheme was

recently introduced. However, this scheme and its extensions all have the

weakness of a built-in threshold determined by the degree of the polynomial

when the number of messages transmitted is larger than this threshold, the

adversary can fully recover the polynomial. In this paper, we propose a

scalable authentication scheme based on elliptic curve cryptography (ECC).

While enabling intermediate node authentication, our proposed scheme allows

any node to transmit an unlimited number of messages without suffering the

threshold problem. In addition, our scheme can also provide message source

privacy. Both theoretical analysis and simulation results demonstrate that our

proposed scheme is more efficient than the polynomial-based approach in

terms of communication and computational overhead under comparable

security levels while providing message source privacy.

We present Greedy Perimeter Stateless Routing (GPSR), a novel routing

protocol for wireless datagram networks that uses the positions of routers and

a packet’s destination to make packet forwarding decisions. GPSR makes

greedy forwarding decisions using only information about a router’s

immediate neighbors in the network topology. When a packet reaches a region

where greedy forwarding is impossible, the algorithm recovers by routing

around the perimeter of the region. By keeping state only about the local

topology, GPSR scales better in per-router state than shortest-path and ad-hoc

routing protocols as the number of network destinations increases. Under

mobility’s frequent topology changes, GPSR can use local topology

information to find correct new routes quickly. We describe the GPSR

protocol, and use extensive simulation of mobile wireless networks to

compare its performance with that of Dynamic Source Routing. Our

simulations demonstrate GPSR’s scalability on densely deployed wireless

networks.

GLS is a new distributed location service which tracks mobile node

locations. GLS combined with geographic forwarding allows the construction

of ad hoc mobile networks that scale to a larger number of nodes than

possible with previous work. GLS is decentralized and runs on the mobile

nodes themselves, requiring no fixed infrastructure. Each mobile node

periodically updates a small set of other nodes (its location servers) with its

current location. A node sends its position updates to its location servers

without knowing their actual identities, assisted by a predefined ordering of

node identifiers and a predefined geographic hierarchy. Queries for a mobile

node’s location also use the predefined identifier ordering and spatial

hierarchy to find a location server for that node. Experiments using the ns

simulator for up to 600 mobile nodes show that the storage and bandwidth

requirements of GLS grow slowly with the size of the network. Furthermore,

GLS tolerates node failures well: each failure has only a limited effect and

query performance degrades gracefully as nodes fail and restart. The query

performance of GLS is also relatively insensitive to node speeds. Simple

geographic forwarding combined with GLS compares favorably with Dynamic

Source Routing (DSR): in larger networks (over 200 nodes) our approach

delivers more packets, but consumes fewer network resources.

2.1 Existing TechniquesThe recent technological progresses make sensor networks feasible to be

widely used in both military and civilian applications. The nature of such

networks makes energy consumption, communication delay and security the

most essential issues for wireless sensor networks. However, these issues may

be conflicting with each other. The existing works generally try to optimize

one of these key issues without providing sufficient diversity and flexibility

of various other requirements in protocol design. In this dissertation, we

investigate the relationship and design trade-offs among these conflicting

issues.

2.2 Technology Used.

Java Framework

Java is a programming language originally developed by James Gosling

at Sun Micro systems and released in 1995 as a core component of Sun

Microsystems' Java platform. The language derives much of its syntax from C

and C++ but has a simpler object model and fewer low-level facilities. Java

applications are typically compiled to byte code that can run on any Java

Virtual Machine (JVM) regardless of computer architecture. Java is general-

purpose, concurrent, class-based, and object-oriented, and is specifically

designed to have as few implementation dependencies as possible. It is

intended to let application developers "write once, run anywhere".

Java is considered by many as one of the most influential programming

languages of the 20th century, and is widely used from application software to

web applications The java framework is a new platform independent that

simplifies application development internet. Java technology's versatility,

efficiency, platform portability, and security make it the ideal technology for

network computing. From laptops to datacenters, game consoles to scientific

supercomputers, cell phones to the Internet, Java is everywhere.

Objectives of Java

To see places of Java in Action in our daily life, explore java.com.

Java has been tested, refined, extended, and proven by a dedicated

community. And numbering more than 6.5 million developers, it's the largest

and most active on the planet. With its versatility, efficiency, and portability,

Java has become invaluable to developers by enabling them to write software

on one platform and run it on virtually any other platform.

Create programs to run within a Web browser and Web services Develop

server-side applications for online forums, stores, polls, HTML forms

processing, and more combine applications or services using the Java

language to create highly customized applications or services. write powerful

and efficient applications for mobile phones, remote processors, low-cost

consumer products, and practically any other device with a digital heartbeat.

Today, many colleges and universities offer courses in programming for the

Java platform. In addition, developers can also enhance their Java

programming skills by reading Sun's java.sun.com Web site, subscribing to

Java technology-focused newsletters, using the Java Tutorial and the New to

Java Programming Center, and signing up for Web, virtual, or instructor-led

courses.

Object-Oriented

To be an Object Oriented language, any language must follow at least the

four characteristics.

1.Inheritance :It is the process of creating the new classes and using the

behavior of the existing classes by extending them just to reuse   the existing

code and adding addition a features as needed.

2.Encapsulation: It is the mechanism of combining the information and

providing the abstraction.

3.Polymorphism: As the name suggest one name multiple form,

Polymorphism is the way of providing the different functionality by the

functions having the same name based on the signatures of the  methods.

4. Dynamic binding: Sometimes we don't have the knowledge of objects about

their specific types while writing our code. It is the way of providing the

maximum functionality to a program about the specific type at runtime.     

Collections

The Java Collections API's provide Java developers with a set of classes

and interfaces that makes it easier to handle collections of objects. In a sense

Collection's works a bit like arrays, except their size can change dynamically,

and they have more advanced behavior than arrays. In this project we are

using Array List for collecting the user input and saving values.

Threads

In this project threading concept is very important. A thread is a sequential

path of code execution within a program. And each thread has its own local

variables, program counter and lifetime. Like creation of a single thread, we

can also create more than one thread (multithreads) in a program using

class Thread or implementing interface Runnable to make our project efficient

and dynamic. In our project we are using request process with the help of

multi threading concepts.

Swings

Swing, which is an extension library to the AWT, includes new and

improved components that enhance the look and functionality of GUIs. Swing

can be used to build Standalone swing GUI apps as well as Servlets and

Applets. It employs a model/view design architecture. Swing is more portable

and more flexible than AWT.

InputStreamReader

An InputStreamReader is a bridge from byte streams to character streams: It reads

bytes and decodes them into characters using a specified charset. The charset that it

uses may be specified by name or may be given explicitly, or the platform's default

charset may be accepted. Each invocation of one of an InputStreamReader's read ()

methods may cause one or more bytes to be read from the underlying byte-input

stream. To enable the efficient conversion of bytes to characters, more bytes may be

read ahead from the underlying stream than are necessary to satisfy the current read

operation.

BufferedInputStream

A BufferedInputStream adds functionality to another input stream-namely, the

ability to buffer the input and to support the mark and reset methods. When

the BufferedInputStream is created, an internal buffer array is created. As bytes from

the stream are read or skipped, the internal buffer is refilled as necessary from the

contained input stream, many bytes at a time. The mark operation remembers a point

in the input stream and the reset operation causes all the bytes read since the most

recent mark operation to be reread before new bytes are taken from the contained

input stream. For top efficiency, consider wrapping an Input Stream Reader within a

Buffered Reader.

For example: Buffered Reader in = new BufferedReader (new InputStreamReader

(System.in));

FileReader

Convenience class for reading character files. The constructors of this class

assume that the default character encoding and the default byte-buffer size are

appropriate. To specify these values yourself, construct an InputStreamReader on a

FileInputStream.

FileReader is meant for reading streams of characters. For reading streams of raw

bytes, consider using a FileInputStream.

File Writer

Convenience class for writing character files. The constructors of this class

assume that the default character encoding and the default byte-buffer size are

acceptable. To specify these values yourself, construct an OutputStreamWriter on a

FileOutputStream. Whether or not a file is available or may be created depends upon

the underlying platform. Some platforms, in particular, allow a file to be opened for

writing by only one File Writer (or other file-writing object) at a time. In such

situations the constructors in this class will fail if the file involved is already open.

File Writer is meant for writing streams of characters. For writing streams of raw

bytes, consider using a FileOutputStream.

InputStreamReader

An InputStreamReader is a bridge from byte streams to character streams: It reads

bytes and decodes them into characters using a specified charset. The charset that it

uses may be specified by name or may be given explicitly, or the platform's default

BufferedInputStream

A Buffered Input Stream adds functionality to another input stream-namely, the

ability to buffer the input and to support the mark and reset methods. When

the BufferedInputStream is created, an internal buffer array is created. As bytes from

the stream are read or skipped, the internal buffer is refilled as necessary from the

contained input stream, many bytes at a time. The mark operation remembers a point

in the input stream and the reset operation causes all the bytes read since the most

recent mark operation to be reread before new bytes are taken from the contained

input stream. For top efficiency, consider wrapping an InputStreamReader within a

BufferedReader.

For example: Buffered Reader in = new Buffered Reader (new Input Stream Reader

(System .in))

CHAPTER 3

SYSTEM ANALYSIS

3.1 Draw Backs In Existing System

1.More energy consumption.

2.Increase the network collision.

3.Reduce the packet delivery ratio.

4.Cannot provide complete security for packets.

3.2 Proposed Work

In addition to the aforementioned issues, WSNs rely on wireless

communications, which is by nature a broadcast medium. It is more

vulnerable to security attacks than its wired counterpart due to lack of a

physical boundary. In particular, in the wireless sensor domain, anybody with

an appropriate wireless receiver can monitor and intercept the sensor network

communications. The adversaries may use expensive radio transceivers,

powerful workstations and interact with the network from a distance since

they are not restricted to using sensor network hardware. It is possible for the

adversaries to perform jamming and routing trace back attacks.

A new scheme as introduced to overcome the drawback. Energy balancing

is used for the secure transmission of the data. Thus, the proposed scheme is

used for the development of energy balancing and for secure transmission. A

secure and efficient Cost Aware Secure Routing (CASER) protocol is used to

address energy balance and routing security concurrently in WSNs. In CASER

routing protocol, each sensor node needs to maintain the energy levels of its

immediate adjacent neighboring grids in addition to their relative

locations..The security analysis demonstrates the caser algorithm can protect

the source location information from the adversaries. In this paper, we will

focus on Energy balance control and two routing strategies for message

forwarding: Deterministic routing and Random walk to create routing path

unpredictability for source privacy and jamming prevention.

There are to modules they are

1. Energy balance control

2. Secure routing Analysis

Energy Balance control: We can balance the energy consumption in all grids

over a network by controlling the energy that is spent on the low level energy

sensor nodes To balance the overall sensor network energy consumption in all

grids by controlling energy spending from sensor nodes with low energy

levels. The source node sends the message to neighboring nodes, then move to

the next neighboring node. the data is sent the source node to destination node

based on the neighbor’s node selection. The EBC is the Energy Balance

control; it is used to calculate the energy. The energy is calculating based on

the EBC algorithm. Select the neighboring node for message forwarding. If

the node is having high energy then that node is selected and this

information is stored to the sink node. The source node sends the message to

neighboring nodes, then move to the next neighboring node. Finally the

message is send to sink node. In wireless sensor network, sink node has the

all node information. The EBC method is used to calculate the energy for the

sensor node.

Security routing analysis: In CASER, the next hop grid is selected based on

one of the two routing strategies: shortest path routing or random walking.

The selection of these two routing strategies is probabilistically controlled by

the security level Caser protocol supports routing strategies like deterministic

shortest path routing and secure routing grid selection through random

walking. With the help of this two strategies security is provided.

Deterministic Routing: In deterministic routing they use shortest path to

send data from the head node. It is also called as the shortest path routing in

this routing based on the relative locations neighbor node is selected The grid

which is near to the sink node is selected for forwarding the message. The

selected nodes must have the highest energy levels when compared with

other node’s energy levels. In this routing we are using cryptographic

technique for message security. The deterministic shortest path routing

ensures that the messages are sent from the source node to the sink node.

Random walk routing: In random walking they use random selection path to

send data from the head node. This routing is also called as secure routing, in

this routing the next hop grid is randomly selected from neighbor grid list for

message forwarding. The routing path becomes more dynamic and

unpredictable. In this way, it is more difficult for the adversary to capture the

message or to jam the traffic. Therefore, the delivery ratio can be increased in

a hostile environment. Using this routing we can avoid the jamming. In

addition to this we add an new attacker module. Attackers can abuse or

corrupt the files that have been sent by the service provider before reaching it

to the destination node. So for corrupting the file .The attacker selects the

node which is involved in the routing(The nodes selecting for the routing

must be active nodes in the network and having sufficient energy ) and then

he injects the corrupted data .

3.2 Feasibility Study

The feasibility study is the important step in any software development

process. This is because it makes analysis of different aspects like cost

required for developing and executing the system, the time required for each

phase of the system and so on. If these important factors are not analyzed then

definitely it would have impact on the organization and the development and

the system would be a total failure. So for running the project and the

organization successfully this step is a very important step in a software

development life cycle process. In the software development life cycle after

making an analysis in the system requirement the next step is to make

analysis of the software requirement. In other words feasibility study is also

called as software requirement analysis. In this phase development team has

to make communication with customers and make analysis of their

requirement and analyze the system. By making analysis this way it would be

possible to make a report of identified area of problem. By making a detailed

analysis in this area a detailed document or report is prepared in this phase

which has details like project plan or schedule of the project, the cost

estimated for developing and executing the system, target dates for each phase

of delivery of system developed and so on. This phase is the base of software

development process since further steps taken in software development life

cycle would be based on the analysis made on this phase and so careful

analysis has to be made in this phase. Though the feasibility study cannot be

focused on a single area some of the areas or analysis made in feasibility

study is given below. But all the steps given below would not be followed by

all system developed. The feasibility study varies based on the system that

would be developed.

Feasibility study is made on the system being developed to analyze whether

the system development process require training of personnel. This help in

designing training sessions as required in later stage. Is the system developed

has scope for expanding or scope for switching to new technology later if

needed in ease. In other study is made to find the portability of the system in

future.

Is the cost of developing the system high or does it meet the budgeted

costs. That is a cost benefit analysis is made. In other words an analysis is

made on cost feasibility of the project. This helps in identifying whether the

organization would meet the budgeted costs and also helps the organization in

making earlier and effective plans for meeting extra costs because of the

system development.

Analysis is made on what software to use for developing the system. This

study and analysis would help to choose the best implementation tor system

and the organization. This feasibility study includes factors like scalability,

how to install, how to develop and so on. This feasibility study in short

includes the analysis of technical areas. This analysis helps the efficiency of

the system developed to get improved. This is because by choosing the correct

technology by making analysis on the needs of system helps in improving the

efficiency of the system.

The above feasibilities are analysis which helps in development of the

system. But the scope of feasibility study does not end with this. Analysis or

feasibility study also includes the analysis of maintenance stage. In other

words feasibility study is made to analyze how one would maintain the system

during maintenance stage. This helps sin planning for this stage and also helps

in risk analysis. Also the analysis helps in making analysis about what

training must be given and how and what all documents must be prepared to

help users and developers to face maintenance phase.

3.2.1 Economic Feasibility

For any system if the expected benefits equal or exceed the expected costs,

the system can be judged to be economical feasible. In economic feasibility,

cost benefit analysis is done in which expected costs and benefits are

evaluated. Economic analysis is used for evaluating effectiveness of the proposed

system. In economic feasibility, the most important is cost benefit analysis. As

the name suggests, it is an analysis of the costs to be incurred in the system

and benefits derivable out of the system.

A simple economic analysis which gives the actual comparison of costs

and benefits are much more meaningful in this case. In addition, this proves to

be a useful point of reference to compare actual costs as the project

progresses. There could be various types of intangible benefits on account of

automation. These could include increased customer satisfaction,

improvement in product quality better decision making timeliness of

information, expediting activities, improved accuracy of operations, better

documentation and record keeping, faster retrieval of information, better

employee morale.

3.2.2 Operational Feasibility

Operational feasibility is mainly concerned with issues like whether the

system will be used if it is developed and implemented. Whether there will be

resistance from users that w ill effect the possible application benefits? The

essential questions that help in the operational feasibility of a system are

following.

1. Does management support the project?

2. Are the users not happy with current business practices?

3. Will it reduce the time (Operation) considerably? If yes, then they will

welcome the change and the now system.

4. Have the users been involved in the planning and development of the

project? Early involvement reduces the probability of resistance towards

the new system.

5. Will the proposed system really benefit the organization?

6. Does the overall response increase?

7. Will accessibility of information be lost? Will the system affect the

customers in considerable way?

Proposed project is beneficial only if it can be turned into information

systems that will meet the organizations operating requirements. Simply

stated, this test of feasibility asks if the 5% stem will work when it is

developed and installed. Are there major barriers to Implementation? Here are

questions that will help test the operational feasibility of a project:

Is there sufficient support for the project from management from users? If the

current System is well liked and used to the extent that persons will not be

able to see reasons for change, there may be resistance.

3.2.3 Technical Feasibility

In technical feasibility the following issues are taken into consideration.

Whether the required technology is available or not

Whether the required resources are available

Once the technical feasibility is established, it is important to consider the

monetary factors also. Since it might happen that developing a particular

system may be technically possible but it may require huge investments and

benefits may be less. For evaluating this, economic feasibility of the proposed

system is carried out.

Evaluating the technical feasibility is the trickiest part of a feasibility study.

This is because, at this point in time, not too many detailed design of the

system, making it difficult to access issues like performance, costs on (on

account of the kind of technology to be deployed) etc. A number of issues

have to be considered while doing a technical analysis.

Understand the different technologies involved in the proposed system before

commencing the project we have to be very clear about what are the

technologies that are to be required for the development of the new system.

Find out whether the organization currently possesses the required

technologies.

Requirement Analysis: Requirements analysis in systems engineering and

software engineering, encompasses those tasks that go into determining the

needs or conditions to meet for a new or altered product, taking account of the

possibly conflicting requirements of the various stakeholders, such us

beneficiaries or users.

Requirements analysis is critical to the success of a development project;

requirements must be actionable, measurable, testable, related to identified

business needs or opportunities, and defined to a level of detail sufficient for

system design. Conceptually, requirements analysis includes three types of

activity:

Eliciting requirements: The task of communicating with customers and

users to determine what their requirements are. This is sometimes also

called requirements gathering.

Analyzing Requirements: Determining whether the stated requirements are

unclear, incomplete, ambiguous, or contradictory, and then resolving these

issues.

Recording requirements: Requirements may be documented in various

forms, such as natural-language documents, use cases, user stories, or process

specifications.

Requirements analysis can be a long and arduous process during which

many delicate psychological skills are involved. New systems change the

environment and relationships between people, so it is important to identify

all the stakeholders, take into account all their needs and ensure they

understand the implications of the new systems. Analysts can employ several

techniques to elicit the requirements from the customer. Historically, this has

included such things as holding interviews, or holding focus groups (more

aptly named in this context as requirements workshops) and creating

requirements lists. More modem techniques include prototyping, and use

cases. Where necessary, the analyst will employ a combination of these

methods to establish the exact requirements of the stakeholders, so that a

system that meets the business needs is produced. Systematic requirements

analysis is also known as requirements engineering, it is sometimes referred

to loosely by names such as requirements gathering, requirements capture, or

requirements specification. The term requirements analysis can also be

applied specifically to the analysis proper, as opposed to elicitation or

documentation of the requirements, for instance.

3.3 Software and Hardware Requirements .

These are the requirements for doing the project. Without using these tools

and software’s we can’t do the project. So we have two requirements to do the

project. They are

1. Hardware Requirements.

2. Software Requirements.

3.3.1 Hardware Requirements

The hardware requirements may serve as the basis for a contract for the

implementation of the system and should therefore be a complete and

consistent specification of the whole system. They are used by software

engineers as the starting point for the system design. It shows what the system

does and not how it should be implemented.

PROCESSOR : Intel.

RAM : 1GB

MONITOR : 15 VGA COLOR

HARD DISK : 500GB

3.3.2 Software Requirements.

The software requirements document is the specification of the system.

It should include both a definition and a specification of requirements. It is a

set of what the system should do rather than how it should do it. The software

requirements provide a basis for creating the software requirements

specification. It is useful in estimating cost, planning team activities,

performing tasks and tracking the team’s and tracking the team’s progress

throughout the development activity.

Front End : JAVA

Back End : MY SQL 5.5

Operating System : Windows 07

IDE : Eclipse

CHAPTER 4

SYSTEM DESIGN

4.1 Data Flow Diagram

Data flow diagrams illustrate how data is processed by a system in

terms of inputs and outputs. Data flow diagrams can be used to provide a

clear representation of any business function. The technique starts with an

overall picture of the business and continues by analyzing each of the

functional areas of interest. This analysis can be carried out in precisely the

level of detail required. The technique exploits a method called top-down

expansion to conduct the analysis in a targeted way.

As the name suggests, Data Flow Diagram (DFD) is an illustration that

explicates the passage of information in a process. A DFD can be easily

drawn using simple symbols. Additionally, complicated processes can be

easily automated by creating DFDs using easy-to-use, free downloadable

diagramming tools. A DFD is a model for constructing and analyzing

information processes. DFD illustrates the flow of information in a process

depending upon the inputs and outputs. A DFD can also be referred to as a

Process Model. A DFD demonstrates business or technical process with the

support of the outside data saved, plus the data flowing from the process to

another and the end results. as shown in fig[4.1]

Level-0

Fig4.1 User Interface Diagram.

EXPLANATION:

It does not show information about the timing of processes, or information

about whether processes will operate in sequence or in parallel. In the DFDs

the level zero process is based on the login validations. What is the user

contained constraints send to the provider. In level one diagram Router

maintains nodes which are useful for routing. The Service Provider browse

the files and send to the destinations. In the mean while the attackers attack

the nodes by injecting data. All these operations will be noticed and

controlled by the IDS Manager . as shown in fig[4.2]

Level 1

Fig.4.2 Complete flow of the system.

4.3 ER-DIAGRAM.

Fig4.3 ER Diagram.

EXPLANATION:

Entity-Relationship Model (ERM) is an abstract and conceptual

representation of data. Entity-relationship modeling is a database modeling

method, used to produce a type of conceptual schema or semantic data model

of a system, often a relational database. In our diagram user contained

constraints send to the server database. Router maintains nodes which are

useful for routing. The Service Provider browses the files and send to the

destinations. In the mean while the attackers attack the nodes by injecting

data. All these operations will be noticed and controlled by the IDS Manager

as shown in fig[4.3]

Service

Provider

Attacker

IDS

Manager

User Router

4.2 Modules

The modules for the proposed system are:

1. User Interface Design

2. Router

3. Service Provider

4. Nodes

5. Attacker

6. IDS Manager

4.2.1 User Interface Design This is the first module of our project. The important role for the user is

to move login window to data owner window. This module has created for the

security purpose. In this login page we have to enter login user id and

password. It will check user name and password is valid or not.(valid user id

and valid password). If we enter any invalid username or password we can’t

enter into login window to user window it will shows error message. So we

are preventing from unauthorized user entering into the login window to user

window. It will provide a good security for our project. So server contain user

id and password server also check the authentication of the user. It well

improves the security and preventing from unauthorized data owner enters

into the network. In our project we are using SWING for creating design.

Here we validate the login user and server authentication.

Fig4.2.1 User Interface Diagram.

4.2.2 Router

This is the second module of our project . In this the router can check

some major functions that are as Assign values, View Node Details, View

Router Details, View Time Delay. The Nodes are further classified in to sub-

networks based on some constraints. Each node had some energy at the time

of initialization that can be degraded after perform the tasks which are

allocated to that node .Degradation of Nodes energy must be dependent on

content and destination. The Router maintains the information regarding to

transmission in the database. The Time Delay can be concluded based upon

the routing path.

Fig:4.2.2 Router.

4.2.3. Service Provider

This is the third module of our project. In this, the Service Provider sends

files to the destinations with the help of the nodes which are available in the

network. For that purpose, first select the file then initialize the nodes which

are available in the network(For initializing the nodes , Router IP Address

will be required) and then selects the destination node for sending the file

successfully and have to choose the nodes dynamically for providing security

Fig4.2.3 .Service Provider.

4.2.4. Nodes

This is the fourth module of our project. In this module ,the information

regarding to nodes selection can be determined. The Service Provider can

choose the file for sending it to the destination .For sending purpose we have

to choose the routing path dynamically based on the available nodes in the

network and have to choose the destination node(receiver).

Fig4.2.4.Nodes.

4.2.5 Attacker

This is the fifth module of our project. In this module ,the Attackers can

abuse or corrupt the files that have been sent by the service provider before

reaching it to the destination node. So for corrupting the file ,The attacker

selects the node which is involved in the routing(The nodes selecting for the

routing must be active nodes in the network and having sufficient energy)and

then he injects the corrupted data .

Fig4.2.5.Attacker.

4.2.6IDS Manager

In this module, the services which are provided by the IDS Manager can be

clearly determined. Generally , the IDS Manager checks and controls the

operations done by the Router, Service Provider and the Attacker. When the

IDS Manager identifies any corrupted node immediately reserved it in the

corrupted nodes list. By doing this the senders at the time of selecting routing

path can easily detect those nodes.

Fig.4.2.6.IDSManager.

4.3 UML DIAGRAMS The Unified modeling Language (UML) is a graphical language for

visualizing, specifying, constructing and documenting the artifacts of a

software-intensive system. The UML offers a standard way to write a

system’s blueprints, including conceptual things such as business processes

and system functions as well as concrete things such as programming

language statements, database schemas, and reusable software components.”

UML is unique in that it has a standard data representation. This

representation is called the meta model. The meta-model is a description of

UML in UML. It describes the objects, attributes, and relationships necessary

to represent the concepts of UML within a software application.

The UML system is rich and full bodied. It is comprised of two major

subdivisions. There is a notation for modeling the static elements of a design

such as classes, attributes, and relationships. There is also a notation for

modeling the dynamic elements of a design such as objects, messages, and

finite state machines. UML allows the software engineer to express and

analyze model using the modeling notation that is governed by a set of

syntactic semantic and pragmatic rules.

A UML system is represented using the five different views that describe the

system from distinctly different perspective.

1. User Model View

This view represents the system from the user’s perspective. The analysis

representation describes a usage scenario from the end- users’ perspective.

2. Structural Model View

This model the data and functionality are arrived from inside the system. This

model view models the static structures.

3. Behavioral Model View

It represents the dynamic or behavioral parts of the system, depicting the

interactions of collections between various structural elements described in

the user model and structural model view.

4. Implementation Model View

In this the structural and behavioral parts of the system are represented as

they are to be built.

5. Environmental Model View

In this the structural and behavioral aspects of the system is to be

implemented are represented.

UML is specifically constructed through two different domains they are:

UML Analysis modeling, this focuses on the user model; and structural model

views of the system.

UML design modeling, which focuses on the behavioral modeling,

implementation modeling and environmental model views.

4.4.Relationships in UML

1. Dependency Relationship

2. Association Relationship

3. Generalization Relationship

4. Realization Relationship

1. Dependency: A dependency is a semantic relationship between two things

in which a change to one thing may affect the semantics of the other thing

(the dependent thing).

Fig: Dependencies

2. Association: An association is a structural relationship that describes a set

links, a link being a connection among objects. Aggregation is a special kind

of association, representing a structural relationship between a whole and its

parts.

Fig: Association

3.Generalization: A generalization is a specialization/ generalization

relationship in which objects of the specialized element (the child) are

substitutable for objects of the generalized element (the parent).

Fig: Generalization

4. Realization: A realization is a semantic relationship between classifiers,

where in one classifier specifies a contract that another classifier guarantees

to carry out.

Fig: Realization

4.5.1 Use Case Diagram

A use case diagram is a graph of actors set of use cases enclosed by a system

boundary, communication associations between the actors and users and

generalization among use cases. The use case model defines the outside

(actors) and inside (use case) of the system’s behavior.

Use case diagram is quite simple in nature and depicts two types of elements:

one representing the business roles and the other representing the business

processes.

Figure: an actor in a use case diagram

In this use case diagram, there are two actors one is user and database, they

both communicate with each other as shown in fig[4.5.1]

User Login

Nodes Creation

Router

Service Provider

Attacker

IDS ManagerUser

Upload file

Database

Fig:4.5.1 Use Case Diagram.

.

4.6.1 Class Diagram

Class diagrams are widely used to describe the types of objects in a

system and their relationships. Class diagrams model class structure and

contents using design elements such as classes, packages and objects. Class

diagrams describe three different perspectives when designing a system,

conceptual, specification, and implementation. These perspectives become

evident as the diagram is created and help to solidify the design. Classes are

composed of three things: a name, attributes, and operations.

A Class diagram is an object oriented one where all the classes communicate

with each other. as shown in fig[4.6.1]

Router : RouterAssinValuesNodesDetailsTimeDelay

request()checking()

UserUserNamePassword

login()

Nodes CreationIpportNoName

nodescreating()

Manager : IDS ManagerNodesattacker

response()

Provider : Service ProviderUploadfilesInitializesending

upload()

DB : DataBaseRequestResponse

db()

Attacker : AttackerSelectInjectAttack

virify()

Fig.4.6.1 Class Diagram.

4.7 Interaction Diagram

Interaction diagrams model the behavior of use cases by describing the

way groups of objects interact to complete the task. The two kinds of

interaction diagrams are sequences and collaboration diagrams .

4.7.1 Sequence Diagram

Sequence diagrams demonstrate the behavior of objects in a usecase by

describing the objects and the messages they pass. The diagrams are read left

to right and descending.

In our sequence diagram specifying processes operate with one another and

in order. In our sequence diagram first propose a data expansion technique

by creating sentiment reversed reviews. as shown in fig[4.7.1]

User Router Service Provider

DataBaseAttacker

User Login ( Nodes Creation n1,n2,n3,n4.......)

If valid

If Invalid

Assign Values

Node Details

Router Details

Time Delay

Result Display

Upload Files

Send Files

Select nodes

Attacker Nodes

Display Result

Fig.4.7.1. Sequence Diagram.

4.7.2 Collaboration Diagram

Collaboration diagrams are also relatively easy to draw. They show the

relationship between objects and the order of messages passed between them.

The objects are listed as icons and arrows indicate the message being passed

between them. The numbers next to the messages are called sequence

numbers. As the name suggests, they show the sequence of messages as they

are passed between the objects. There are many acceptable sequence

numbering schemes in UML.

A collaboration diagram describes interactions among objects in terms of

sequenced messages. User collaborates with different classes in different

sequences. as shown in fig[4.7.2]

User

Router

Service Provider

DataBase

Attacker

1: User Login ( Nodes Creation n1,n2,n3,n4.......)2: If valid

3: If Invalid

4: Assign Values5: Node Details

6: Router Details7: Time Delay

8: Result Display

9: Upload Files10: Send Files

11: Select nodes

12: Attacker Nodes

13: Display Result

Fig.4.7.2.Collabaration Diagram.

4.8.1 Activity Diagram

An activity diagram is characterized by states that denote various operations.

Transition from one state to the other is triggered by completion of the

operation. The purpose of an activity is symbolized by round box, comprising

the name of the operation. An operation symbol indicates the execution of

that operation. This activity diagram depicts the internal state of an object

In Activity Diagram, there is a continuous work flow from one use case to

another. Each activity shows the overall control of the flow. as shown in

fig[4.8]

.

User

Nodes Creation

Router

IDS Manager

Service Provider

Attacker

Fig4.8.1 Activity Diagram.

4.9.1 Component Diagram

Component diagram shows components, provided and required interfaces,

ports, and relationships between them. This type of diagrams is used in

Component-Based Development (CBD) to describe systems with Service-

Oriented Architecture (SOA).

Component-based development is based on assumptions that previously

constructed components could be reused and that components could be

replaced by some other "equivalent" or "conformant" components, if needed.

The artifacts that implement component are intended to be capable of being

deployed and re-deployed independently, for instance to update an existing

system.

Components in UML could represent

Logical Components (e.g., business components, process components), and

Physical Components (e.g., CORBA components, EJB components, COM+

and .NET components, WSDL components, etc.), along with the artifacts that

implement them and the nodes on which they are deployed and executed. It is

anticipated that profiles based around components will be developed for

specific component technologies and associated hardware and software

environments.

In our diagram user contained constraints send to the server database. Router

maintains nodes which are useful for routing. The Service Provider browse

the files and send to the destinations. In the mean while the attackers attack

the nodes by injecting data. All these operations will be noticed and

controlled by the IDS Manager. As shown in Fig[4.9.1]

Service Provider

User Node Creation

Router

Attacker DataBase IDS Manager

Fig4.9.1Component Diagram.

4.10 System Architecture:

Fig.4.10 System Architecture.

Explanation:

The system architecture clearly explains us about the workflow of our

system. In this diagram user contained constraints send to the server

database. Router maintains nodes which are useful for routing. The Service

Provider browse the files and send to the destinations. In the mean while the

attackers attack the nodes by injecting data. All these operations will be

noticed and controlled by the IDS Manager. as shown in fig[4.10]

4.11 ALGORITHM

Caser steps:

1. Find the neighboring grid for all the grids.

2. Compute the remaining energy of the adjacent neighboring grid.

3. Select the head node based on the highest energy level for transferring the

packet.

4. Make the choice of the routing type.

5. Select the random number γ € [0, 1]

6. If γ > β, the node will send the message through the shortest path, which is

deterministic routing

7. Otherwise transmit the packet through the randomly selected neighboring

grid, which is random walk routing

CHAPTER 5

IMPLEMENTATION5.1 Source Code.

import java.awt.BorderLayout;import java.awt.Color;import java.awt.Container;import java.awt.Font;import java.awt.Image;import java.awt.Toolkit;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.KeyEvent;import java.awt.event.WindowAdapter;import java.awt.event.WindowEvent;import java.io.BufferedInputStream;import java.io.BufferedOutputStream;import java.io.BufferedReader;import java.io.BufferedWriter;import java.io.DataInputStream;import java.io.DataOutputStream;import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;import java.io.InputStreamReader;import java.io.PrintStream;import java.math.BigInteger;import java.net.InetAddress;import java.net.Socket;import java.net.UnknownHostException;import java.security.DigestInputStream;import java.security.MessageDigest;import java.sql.Connection;import java.sql.Statement;import java.text.SimpleDateFormat;import java.util.Date;

import javax.swing.BorderFactory;import javax.swing.ImageIcon;import javax.swing.JButton;import javax.swing.JCheckBox;import javax.swing.JComboBox;import javax.swing.JFileChooser;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JOptionPane;import javax.swing.JPanel;import javax.swing.JScrollPane;

import javax.swing.JTextArea;import javax.swing.JTextField;import javax.swing.UIManager;import javax.swing.border.Border;import javax.swing.border.TitledBorder;import java.io.BufferedReader;

public class ServiceProvider implements ActionListener{byte[] b;String dd;String txtstr=null;String hash;String filename;String content,path1;ImageIcon ic;public JLabel T0= new JLabel();public JLabel confirm=new JLabel();public JLabel T2= new JLabel("File Name");public JLabel T4= new JLabel();public JButton btn = new JButton("Browse");public JTextArea tf = new JTextArea();public JScrollPane pane = new JScrollPane();public JButton btn1 = new JButton("Open");public JButton btn2 = new JButton("Initialise Nodes");public JButton btn3 = new JButton("Send");public JTextField txt=new JTextField();public JTextField txt1=new JTextField();public JTextField txt2=new JTextField();public JLabel leftButton,l5;JLabel back= new JLabel();public JFrame jf;public Container c;String event;String keyWord = "ef50a0ef2c3e3a5fdf803ae9752c8c66";String send,event1,event2;//ImageIcon greengr = new ImageIcon(this.getClass().getResource("sp.png"));ServiceProvider(){jf = new JFrame("Service Provider::Cost Aware SEcure Routing (CASER) Protocol Design for Wireless Sensor Networks");c = jf.getContentPane();c.setLayout(null);jf.setSize(955,555);if.setResizable(false); c.setBackground(Color.white);ic=new ImageIcon(this.getClass().getResource("owner1.png"));l5=new JLabel();l5.setIcon(ic);l5.setBounds(0, 0, 970,490);

T0.setForeground(Color.CYAN);T2.setBounds(350, 110, 250,45);T2.setForeground(Color.blue);txt1.setBounds(450, 120, 300,25);txt1.setForeground(Color.MAGENTA);T4.setBounds(225, 540, 250,45);T4.setForeground(Color.RED);txt2.setBounds(220, 595, 250,30);txt2.setForeground(Color.BLUE); confirm.setBounds(445, 520, 250,45) confirm.setForeground(new Color(255,0,0)); btn.setBounds(130,150,120,30); btn2.setBounds(130,250,120,30); btn3.setBounds(130, 350,120,30); btn.setFont(f3); btn1.setBounds(420,198,70,25);txt.setBounds(260,150,180,25);txt.setForeground(Color.BLUE);pane.setBounds(350, 150, 400, 250);tf.setColumns(20);tf.setForeground(Color.MAGENTA);tf.setRows(10);tf.setName("tf");pane.setName("pane");pane.setViewportView(tf);btn1.addActionListener(this);btn.addActionListener(this);btn2.addActionListener(this);btn3.addActionListener(this); txt2.setEnabled(false);jf.show();c.add(txt1);c.add(btn);c.add(btn2);c.add(confirm);c.add(T2);c.add(T3);c.add(T4);c.add(T5);c.add(pane, BorderLayout.CENTER);c.add(btn1);c.add(T0);c.add(btn3);c.add(l5);jf.addWindowListener(new WindowAdapter(){public void windowClosing(WindowEvent win){System.exit(0);}

});}public void actionPerformed(ActionEvent e) {String dataname="";DataInputStream input;BufferedInputStream bis;BufferedOutputStream bos = null;BufferedWriter writer = null;int in;StringBuffer buffer = new StringBuffer();String strLine = null;String newline = "\n"; if (e.getSource() == btn) {String strLine1 = null;JFileChooser chooser = new JFileChooser();try {File f = new File(new File("filename.txt").getCanonicalPath());chooser.setSelectedFile(f);} catch (IOException e1)}

chooser.showOpenDialog(btn3);int retval = chooser.showOpenDialog(btn1);if (retval == JFileChooser.APPROVE_OPTION) {File field = chooser.getSelectedFile();path1=field.getAbsolutePath();}File curFile = chooser.getSelectedFile();String f = curFile.getName();txt1.setText(f);try {FileInputStream fstream = new FileInputStream(curFile);DataInputStream ins = new DataInputStream(fstream);BufferedReader br = new BufferedReader(new InputStreamReader(ins));StringBuffer buffer1 = new StringBuffer();while ((strLine1 = br.readLine()) != null) {System.out.println(strLine1);buffer1.append(strLine1 + "\)}tf.setText(buffer1.toString());System.out.println(buffer1.length());} catch (Exception e1)

System.err.println("Error: " + e1.getMessage());}

}if(e.getSource()== btn3) {try {if(!(txt1.equals(null)&&tf.equals(null))) {String[] dsname = { "Select Destination", "A", "B", "C", "D", "E" }; dataname = (String) JOptionPane.showInputDialog(null,"Select Destination", "Destination Name",JOptionPane.QUESTION_MESSAGE, null, dsname, dsname[0]);String ip = JOptionPane.showInputDialog(null,"Please Enter the IP Address Of Router");String dest = JOptionPane.showInputDialog(null,"Please Enter the IP Address Of "+dataname);AES a1=new AES();String cont=tf.getText();String fname = txt1.getText();String content=a1.encrypt(cont,keyWord);PrintStreamout= new PrintStream(new FileOutputStream("Sender\\"+fname));out.print(content);out.close();MessageDigest md = MessageDigest.getInstance("SHA1");FileInputStream in1 = new FileInputStream("Sender\\" + fname);DigestInputStream dis2 = new DigestInputStream(in1, md);BufferedInputStream bd = new BufferedInputStream(dis2);while (true) {int b2 = bd.read();if (b2 == -1)break;}BigInteger bi2 = new BigInteger(md.digest());String mac = bi2.toString(16);System.out.println(mac);Socket sc1 = new Socket(ip,1234);DataOutputStream dout1 = new DataOutputStream(sc1.getOutputStream());dout1.writeUTF(fname); dout1.writeUTF(mac); dout1.writeUTF(content); dout1.writeUTF(dataname); dout1.writeUTF(dest); DataInputStream ins=new DataInputStream(sc1.getInputStream()); String msg=ins.readUTF(); System.out.println(msg); JOptionPane.showMessageDialog(null,"Data Sent Successfully"); }else{

JOptionPane.showMessageDialog(null,"Browse the File to Send"); }}catch (UnknownHostException e1) {e1.printStackTrace();} catch (Exception e1) {}finally { } if(e.getSource()== btn2) { Try{ if((txt1.equals(null)&&tf.equa((null))) {AES a1=new AES();String cont=tf.getText();String fname = txt1.getText();String content=a1.encrypt(cont,keyWord);PrintStream out = new PrintStream(new FileOutputStream("Sender\\"+fname)); out.print(content); out.close();MessageDigest md = MessageDigest.getInstance("SHA1");FileInputStream in1 = new FileInputStream("Sender\\" + fname);DigestInputStream dis2 = new DigestInputStream(in1, md);BufferedInputStream bd = new BufferedInputStream(dis2);while (true) {int b2 = bd.read();if (b2 == -1)break;}BigInteger bi2 = new BigInteger(md.digest());String mac = bi2.toString(16);System.out.println(mac);String ip = JOptionPane.showInputDialog(null,"Enter Router Ip Address");Socket soc = new Socket(ip,3939);DataOutputStream dout = new DataOutputStream(soc.getOutputStream());dout.writeUTF(mac);dout.writeUTF(fname);DataInputStream dis = new DataInputStream(soc.getInputStream());String msg = dis.readUTF();System.out.println(msg);JOptionPane.showMessageDialog(null,"Nodes Initialised Successfully");} else{JOptionPane.showMessageDialog(null,"Browse the File to Initialise"); }}

catch(Exception e1){e1.printStackTrace();} } }public static void main(String args[]){new ServiceProvider();try {UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");} catch (Exception e1) {e1.printStackTrace();}java.awt.EventQueue.invokeLater(new Runnable() {public void run() {new ServiceProvider();}});}}}

IDS.java

import java.awt.Color;

import java.awt.Container;

import java.awt.Font;

import java.awt.Menu;

import java.awt.MenuBar;

import java.awt.MenuItem;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import java.io.BufferedInputStream;

import java.io.DataInputStream;

import java.io.DataOutputStream;

import java.io.FileInputStream;

import java.io.FileOutputStream;

import java.io.ObjectOutputStream;

import java.io.PrintStream;

import java.math.BigInteger;

import java.net.ServerSocket;

import java.net.Socket;

import java.security.DigestInputStream;

import java.security.MessageDigest;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.ResultSetMetaData;

import java.sql.Statement;

import java.text.DateFormat;

import java.text.SimpleDateFormat;

import java.util.ArrayList;

import java.util.Date;

import java.util.Vector;

import javax.swing.BorderFactory;

import javax.swing.ImageIcon;

import javax.swing.JButton;

import javax.swing.JFrame;

import javax.swing.JLabel;

import javax.swing.JOptionPane;

import javax.swing.JPanel;

import javax.swing.JScrollPane;

import javax.swing.JTable;

import javax.swing.JTextArea;

import javax.swing.JTextField;

import javax.swing.Timer;

import javax.swing.UIManager;

import javax.swing.border.Border;

public class IDS implements ActionListener

{

JFrame jf;

Container c;

JLabel l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12;

JPanel p1, p2;

JButton b1,b2, b3, b4;

JScrollPane sp;

JTextArea ta;

JTextField t1;

MenuBar mbr;

Menu file;

MenuItem item2, users,csfile,exit;

Border b11, b22, b33;

JScrollPane pane;

String Scheme1, rank;

String f1 = "", f2 = "", f3 = "", f4 = "", f5 = "", f6 = "", f7 = "",f8 = "";

int count = 0;

Timer timer;

ImageIcon one,two,three,four,arrow1,arrow2,arrow3,arrow4,arrow5,arrow6;

JLabelonel,twol,threel,fourl,arrow1l,arrow2l,arrow3l,arrow4l,arrow5l,arrow6l

,arrow7l,arrow8l;

JLabel lab1,lab2,lab3,lab4,lab5,lab6,lab7,lab8,lab9,lab10,lab11;

public Font f = new Font("Times new roman", Font.BOLD, 14);

public Font font = new Font("Times new roman", Font.BOLD, 18);

JLabel mg1, mg2, mg3, mg4, mg5, mg6, mg7, mg8, mg9, mg10, g11, g22,

g33,g44, g55, g66, g77;

String keyWord = "ef50a0ef2c3e3a5fdf803ae9752c8c66";

IDS()

{

jf = new JFrame("IDS Manager ::Cost Aware SEcure Routing (CASER)

Protocol Design for Wireless Sensor Networks");

c = jf.getContentPane();

c.setLayout(null);

c.setBackground(Color.pink);

mbr = new MenuBar();

file = new Menu("IDS MANAGER");

item2 = new MenuItem("View Attackers");

exit = new MenuItem("Exit");

item2.addActionListener(this);

exit.addActionListener(this);

file.add(item2);

file.add(exit);

mbr.add(file);

jf.setMenuBar(mbr);

b1=new JButton("IDS Manager");

b1.setBounds(200, 300, 120, 30);

b1.addActionListener(this);

c.add(b1);

jf.setBounds(40, 0, 550,395);

jf.show();

int[] ports = new int[] {309};

for (int i = 0; i < 1; i++)

{

Thread t2 = new Thread(new PortListener(ports[i]));

t2.start();

}

}

public static void main(String args[])

{

//new CloudServer();

try {

UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLoo

kAndFeel");

}

catch (Exception e1)

{

e1.printStackTrace();

}

java.awt.EventQueue.invokeLater(new Runnable()

{

public void run() {

new IDS();

}

}

);

}

public void actionPerformed(ActionEvent e) {

Object o = e.getSource();

if (o == b1)

{

try {

Vector heading = new Vector();

heading.addElement("Node Name");

heading.addElement("Fake Mac");

heading.addElement("Date");

Vector data = new Vector();

String query = "SELECT * FROM IDSManager";

DBCon con=new DBCon();

ResultSet rs =con.getConnection().createStatement().executeQuery(query);

ResultSetMetaData rsm = rs.getMetaData();

int col = rsm.getColumnCount();

while (rs.next()) {

Vector row = new Vector();

for (int i = 1; i <= col; i++)

{

row.addElement(rs.getObject(i));

}

data.addElement(row);

}

JTable table = new JTable(data, heading);

JScrollPane pane = new JScrollPane(table);

pane.setBounds(20,30,500,250);

c.add(pane);

}

catch (Exception ex)

{

ex.printStackTrace();

}

}

if(o==item2)

{

ViewAttacker r1 = new ViewAttacker();

r1.setSize(700, 400);

r1.setVisible(true);

}

if(o == exit)

{

System.exit(0);

}

}

class PortListener implements Runnable {

int port;

public PortListener(int port) {

this.port = port;

}

public void run() {

if (this.port == 309)

{

try

{

ServerSocket server909 = new ServerSocket(309);

Socket con777;

while (true)

{

DBCon db = new DBCon();

Connection connect = db.getConnection();

con777 = server909.accept();

DataInputStream din = new DataInputStream(con777.getInputStream());

String node = din.readUTF();

String mac = din.readUTF();

SimpleDateFormat dateFormat = new SimpleDateFormat();

//get current date time with Date()

Date date = new Date();

String dt=dateFormat.format(date);

connect.createStatement().executeUpdate("insert into IDSManager

values('"+node+"','"+mac+"','"+dt+"')");

DataOutputStream dos2 = new

DataOutputStream(con777.getOutputStream());

dos2.writeUTF("success");

}

}catch (Exception e) {

e.printStackTrace()

}

}

}

}

}

Attacker.javaimport java.awt.*;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import java.io.DataInputStream;

import java.io.DataOutputStream;

import java.net.InetAddress;

import java.net.ServerSocket;

import java.net.Socket;

import java.sql.Connection;

import java.sql.SQLException;

import javax.swing.*;

public class Attacker extends JFrame implements ActionListener

{

JPanel p1;

JLabel l1,l2;

JTextField t1,t2;

JTextArea ta;

JScrollPane pane;

JButton b1;

String keyWord = "ef50a0ef2c3e3a5fdf803ae9752c8c66";

JComboBox c1;

public Font f1 = new Font("Times new roman", Font.BOLD, 25);

public Font f2 = new Font("Times new roman", Font.BOLD, 15);

Attacker()

{p1=new JPanel();

p1.setLayout(null);

p1.setBackground(Color.DARK_GRAY);

setTitle("Attacker ::Cost Aware SEcure Routing (CASER) Protocol Design

for Wireless Sensor Networks");

l1=new JLabel("Select Node :");

l1.setFont(f2);

l1.setForeground(Color.white);

l1.setBounds(40,100,100,30);

l2=new JLabel("Inject Data");

l2.setFont(f2);

l2.setForeground(Color.white);

l2.setBounds(40,150,100,30);

t1=new JTextField();

t1.setBounds(140,100,100,25);

t2=new JTextField();

t2.setBounds(140,150,100,25);

c1=new JComboBox();

c1.addItem("Node2");

c1.addItem("Node3");

c1.addItem("Node4");

c1.addItem("Node5");

c1.addItem("Node6");

c1.addItem("Node7");

c1.addItem("Node10");

c1.addItem("Node11");

c1.addItem("Node12");

c1.addItem("Node13");

c1.addItem("Node14");

c1.addItem("Node15");

c1.addItem("Node18");

c1.addItem("Node19");

c1.addItem("Node20");

c1.addItem("Node21");

c1.addItem("Node22");

c1.addItem("Node23");

c1.addItem("Node26");

c1.addItem("Node27");

c1.addItem("Node28");

c1.addItem("Node29");

c1.addItem("Node30");

c1.addItem("Node31");

c1.setBounds(140,100,100,25);

b1=new JButton("Attack");

b1.setBounds(120,220,100,25);

b1.addActionListener(this);

c1.addActionListener(this);

p1.add(l1);p1.add(l2);p1.add(c1);p1.add(t2);p1.add(b1);p1.add(l2);

add(p1);

setSize(350,350);

setVisible(true);}

public static void main(String[] args) {

new Attacker();

try

{

UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLoo

kAndFeel");

}catch(Exception es){System.out.println(es);}}

public void actionPerformed(ActionEvent a1)

{

if(a1.getSource()==b1){

String node=(c1.getSelectedItem()).toString();

String inject=t2.getText();

String fname=JOptionPane.showInputDialog(null,"Enter the File Name");

String ip=JOptionPane.showInputDialog(null,"Enter Ip Address Of Router");

try

{

InetAddress ia = InetAddress.getLocalHost();

String ip1 = ia.getHostAddress();

Socket s1=new Socket(ip,4444);

DataOutputStream dos5=new DataOutputStream(s1.getOutputStream());

dos5.writeUTF(node);

dos5.writeUTF(inject);

dos5.writeUTF(fname);

dos5.writeUTF(ip1);

DataInputStream in5=new DataInputStream(s1.getInputStream());

String msg=in5.readUTF();

if(msg.equalsIgnoreCase("success"))

{

JOptionPane.showMessageDialog(null,"Successfully Attacked");

}

if(msg.equalsIgnoreCase("nofile"))

{

JOptionPane.showMessageDialog(null,"File Not Found");

}

if(msg.equalsIgnoreCase("block"))

{

JOptionPane.showMessageDialog(null,"Currently You Are Blocked");

}

}catch(Exception es){System.out.println(es);}

}

}

}

CHAPTER6

TESTING6.1 IntroductionSoftware testing is the process used to help identify the correctness,

completeness, security, and quality of developed computer software. Testing

is a process of technical investigation, performed on behalf of stakeholders,

that is intended to context in which it is intended to operate. This includes,

but is not limited to, the process of executing a program or application with

the intent of finding errors. Quality is not absolute; it is value to some person.

With that in mind, testing can never completely establish the correctness of

arbitrary computer software; testing furnishes a criticism or comparison that

compares the state and behavior of the product against a specification. An

important point is that software testing should be distinguished from the

separate discipline of Software Quality Assurance (SQA), which encompasses

all business process areas, not just testing.

There are many approaches to software testing, but effective testing, but

effective testing of complex products is essentially a process of investigation,

not merely matter of creating and following routine procedure. One definition

of testing is “the process of questioning a product in order to evaluate it”,

where the “questions” are operations the tester attempts to execute with the

product, and the product answers with its behavior in reaction to the probing

of the tester [citation needed]. Although most of the intellectual processes of

testing are nearly identical to that of review or inspection, the word testing is

connoted to mean the dynamic analysis of the product by putting the product

through its paces. Some of the common quality efficiency, probability,

maintainability, attributes includes capability, reliability, compatibility and

usability. A good test is sometimes described as one which reveals an error.

However, more recent thinking suggests that a good test is one which reveals

information of interest to someone who matters within the project community.

6.2 Design Of Test Cases Scenario.

\

Test Case Id

Test Case Name

Test Case Desc

Test Steps Test Case Status

Test PriorityStep Expecte

dActual

01UserLogin

Verifyinguser

To Verify whether the user is valid or not

If the user is not valid

It should not open the router page

Router page is displayed

High High

02 Router

Sends the data

Send the text data only .

If our Sending data is not text data it will not send

Nothing will be displayed

It display the message like “Data sent sucessful”

High High

03 Attacker

Attack the data

Our textWhich we have sent before should be attacked

The data which is not sent before cannot be attacked

Nothing will be displayed

Mac Found and IDS resolves the problem and sends

High High

04 Blocking Data

Once the data is attacked its blocked

We are verifying wheter we can send the blocked data

If we are sending the blocked data

Nothing will be displayed

It displays the succesfully .blocked

High High

CHAPTER 7

RESULTSANALYSIS7.1User Interface

It is a home page . Its acts as an user interface. It gives access to only the

valid user, and does not give any permission to the invalid user, if we enter

submit button then Router page is displayed as shown in fig[7.1].

Fig7.1 Home page

7.2Router

This is a router which is used for sending data from source to destination. It is

used for Assign values, View node details, View Router details, View Time

Delay. As shown in fig[7.2].

Fig7.2 Router

7.3.IDSManager

The IDS Manager checks and controls the operations done by the Router,

Service Provider and the Attacker. It provides security. as shown in fig[4.3]

Fig7.3 IDSManager

7.4Attacker

The Attackers can abuse or corrupt the files sended by the service provider

before reaching it to the destination node. So,for corrupting the file ,the

attacker selects the node which is involved in the routing. as shown in

fig7.4].

Fig7.4 Attacker

7.5 Service Provider

The Service Provider sends files to the destinations with the help of the

nodes which are available in the network. It acts as a source file. as shown in

fig[7.5]

Fig7.5Service Provider.

7.6 Security

When the attacker attacks a node Mac is found and the IDS Manager resolves

the attacker and sends the data .And provides security. as shown in fig[7.6]

Fig:7.6 Security

7.7 Energy Balance

While sending the data it balances the energy, and successfully sends the

data to the destination. as shown in fig[7.7]

Fig7.7 Energy Balance.

7.8.Data Flow in Router

The Data is successfully sent from source to destination. In the Router.

Fig7.8 Data Flow in Router

CHAPTER 8CONCLUSION&FUTURESCOPE

8.1CONCLUSION:

We presented a secure and efficient Cost- Aware Secure Routing (CASER)

protocol for WSNs to balance the energy consumption and increase network

lifetime. CASER has the flexibility to support multiple routing strategies in

message forwarding to extend the lifetime while increasing routing security.

Both theoretical analysis and simulation results show that CASER has an

excellent routing performance in terms of energy balance and routing path

distribution for routing path security.

8.2 FUTURE SCOPE

In Future we implement a better non-uniform energy deployment scheme to

maximize the sensor network lifetime. Our analysis and simulation results

show that we can increase the lifetime and the number of messages that can be

delivered under the non-uniform energy deployment scheme was four times

better.

REFERANCES:

[1] Y. Li, J. Ren, and J. Wu, “Quantitative measurement and design of source-

location privacy schemes for wireless sensor networks,” IEEE Trans. Parallel

Distrib. Syst., vol. 23, no. 7, pp. 1302–1311, Jul. 2012.

[2] Y. Li, J. Li, J. Ren, and J. Wu, “Providing hop-by-hop authentication and

source privacy in wireless sensor networks,” in Proc. IEEE Conf. Comput.

Commun. Mini-Conf., Orlando, FL, USA, Mar. 2012, pp. 3071–3075.

[3] B. Karp and H. T. Kung, “GPSR: Greedy perimeter stateless routing for

wireless networks,” in Proc. 6th Annu. Int. Conf. Mobile Comput. Netw., New

York, NY, USA, 2000, pp. 243–254.

[4] J. Li, J. Jannotti, D. S. J. De Couto, D. R. Karger, and R. Morris, “A

scalable location service for geographic ad hoc routing,” in Proc. 6th Annu.

Int. Conf. Mobile Comput. Netw., 2000, pp. 120–130.

[5] Y. Xu, J. Heidemann, and D. Estrin, “Geography-informed energy

conservation for ad-hoc routing,” in Proc. 7th Annu. ACM/IEEE Int. Conf.

Mobile Comput. Netw., 2001, pp. 70–84.

[6] Y. Yu, R. Govindan, and D. Estrin, “Geographical and energyaware

routing: A recursive data dissemination protocol for wireless sensor

networks,” Comput. Sci. Dept., UCLA, TR-010023, Los Angeles, CA, USA,

Tech. Rep., May 2001.

[7] N. Bulusu, J. Heidemann, and D. Estrin, “GPS-less low cost outdoor

Localization for very small devices,” Comput. Sci. Dept., Univ. Southern

California, Los Angeles, CA, USA, Tech. Rep. 00- 729, Apr. 2000.

[8] A. Savvides, C.-C. Han, and M. B. Srivastava, “Dynamic finegrained

localization in ad-hoc networks of sensors,” in Proc. 7 th ACM Annu. Int.

Conf. Mobile Comput. Netw., Jul. 2001, pp. 166–179.

[9] P. Bose, P. Morin, I. Stojmenovic, and J. Urrutia, “Routing with

guaranteed delivery in ad hoc wireless networks,” in Proc. 3rd Int. Workshop

Discrete Algorithms Methods Mobile Comput. Commun., 1999, pp. 48–55.

[10] P. Bose, P. Morin, I. Stojmenovic, and J. Urrutia, “Routing with

guaranteed delivery in ad hoc wireless networks,” in Proc. 3 rd ACM Int.

Workshop Discrete Algorithms Methods Mobile Comput. Commun., Seattle,

WA, USA, Aug. 1999, pp. 48–55.

[11] T. Melodia, D. Pompili, and I. Akyildiz, “Optimal local topology

knowledge for energy efficient geographical routing in sensor networks,” in

Proc. IEEE Conf. Comput. Commun., Mar. 2004, vol. 3, pp. 1705–1716.

[12] Y. Li, Y. Yang, and X. Lu, “Rules of designing routing metrics for

greedy, face, and combined greedy-face routing,” IEEE Trans. Mobile

Comput., vol. 9, no. 4, pp. 582–595, Apr. 2010.

[13] R. Shah and J. Rabaey, “Energy aware routing for low energy ad hoc

sensor networks,” in Proc. IEEE Wireless Commun. Netw. Conf., Mar. 17–21,

2002, vol. 1, pp. 350–355.

[14] J.-H. Chang and L. Tassiulas, “Maximum lifetime routing in wireless

sensor networks,” IEEE/ACM Trans. Netw., vol. 12, no. 4, pp. 609–619, Aug.

2004.

[15] H. Zhang and H. Shen, “Balancing energy consumption to maximize

network lifetime in data-gathering sensor networks,” IEEE Trans. Parallel

Distrib. Syst., vol. 20, no. 10, pp. 1526–1539, Oct. 2009.

[16] F. Liu, C.-Y. Tsui, and Y. J. Zhang, “Joint routing and sleep scheduling

for lifetime maximization of wireless sensor networks,” IEEE Trans. Wireless

Commun., vol. 9, no. 7, pp. 2258–2267, Jul. 2010.

[17] C.-C. Hung, K.-J. Lin, C.-C. Hsu, C.-F. Chou, and C.-J. Tu, “On

enhancing network-lifetime using opportunistic routing in wireless sensor

networks,” in Proc. 19th Int. Conf. Comput. Commun. Netw., Aug. 2010, pp.

1–6.

[18] C. Ozturk, Y. Zhang, and W. Trappe, “Source-location privacy in energy-

constrained sensor network routing,” in Proc. 2nd ACM Workshop Security

Ad Hoc Sens. Netw., 2004, pp. 88–93.

LIST OF FIGURES

FIGURE NO NAME OF THE FIGURE PAGE NO.

2.3.2 Module Diagram

4.2 Activity Diagram

4.3 Use case Diagram

4.4 Data flow diagram

4.5 Sequence diagram

4.6 Collaboration diagram

4.7 Class diagram

4.8 Architecture Diagram

4.9 State Diagram

4.1 Component Diagram

4.12 E-R Diagram

LIST OF ABBREVATION

S.NO ABBREVATION EXPANSION

1. DB Data Base

2. JVM Java Virtual Machine

3. JSP Java Server Page

4. CB Collective Behavior

5. SD Social Dimension

6. JRE Java Runtime Environment

7. SSD Sparse Social Dimension

8. LGP Line Graph Partition

ContentsCHAPTER 1.................................................................................................................1

INTRODUCTION.......................................................................................................1

1.1Problem Definition................................................................................................3

1.2Database..................................................................................................................4

1.3 Scope of the Present Study..................................................................................4

CHAPTER 2.................................................................................................................5

LITERATURE SURVEY...........................................................................................5

2.2 Technology Used................................................................................................10

CHAPTER 3...............................................................................................................15

SYSTEM ANALYSIS..............................................................................................15

3.1 DRAWBACKS IN EXISTING SYSTEM:......................................................15

3.2 PROPOSED WORK:.........................................................................................15

3.2 Feasibility Study.................................................................................................17

3.2.1 Economic Feasibility..............................................................................19

3.2.2 Operational Feasibility...........................................................................19

3.2.3 Technical Feasibility..............................................................................20

3.3 SOFTWARE AND HARDWARE REQUIREMENTS..................................22

3.3.1 HARDWARE REQUIREMENTS.........................................................22

3.3.2 SOFTWARE REQUIREMENTS...........................................................22

CHAPTER 4...............................................................................................................24

SYSTEM DESIGN....................................................................................................24

4.1 Data Flow Diagram............................................................................................24

4.2 Modules................................................................................................................27

4.2.1 User Interface Design................................................................................27

4.2.2 Router...........................................................................................................28

4.2.3. Service Provider........................................................................................28

4.2.4. Nodes.......................................................................................................29

4.2.5 Attacker....................................................................................................30

4.2.6IDS Manager.............................................................................................30

4.3 UML DIAGRAMS..........................................................................................31

4.4.2.Class Diagram..........................................................................................34

4.4.3. INTERACTION DIAGRAM................................................................35

Interaction diagrams model the behavior of use cases by describing the

way groups of objects interact to complete the task. The two kinds of

interaction diagrams are sequences and collaboration diagrams...............35

6.1 Introduction.....................................................................................................58

6.3 Design Of Test Cases Scenario....................................................................61