B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 1 INTRODUCTION Wireless sensor networks (WSNs) have been widely deployed for various applications, such as environment sensing, building safety monitoring, earthquake prediction, etc. Consider a two- tiered sensor network architecture in which storage nodes gather data from nearby sensors and answer queries from the sink of the network. The storage nodes serve as an intermediate tier between the sensors and the sink for storing data and processing queries. Storage nodes bring three main benefits to sensor networks. First, sensors save power by sending all collected data to their closest storage node instead of sending them to the sink through long routes. Second, sensors can be memory-limited because data are mainly stored on storage nodes. Third, query processing becomes more efficient because the sink only communicates with storage nodes for queries. The inclusion of storage nodes in sensor networks was first introduced in and has been widely adopted Several products of storage nodes, such as StarGate and RISE are commercially available. However, the inclusion of storage nodes also brings significant security challenges. As storage nodes store data received from sensors and serve as an important role for answering queries, they are more vulnerable to be compromised, especially in a hostile environment. A compromised storage node imposes significant threats to a sensor network. First, the attacker may obtain sensitive data that has been, or will be, stored in the storage node. Second, SCETW BE IV Year II Sem IT-Dept
70
Embed
Privacy and Integrity Presrving Range Queries in Sensor Networks documentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 1
INTRODUCTION
Wireless sensor networks (WSNs) have been widely deployed for various applications, such
as environment sensing, building safety monitoring, earthquake prediction, etc. Consider a
two-tiered sensor network architecture in which storage nodes gather data from nearby
sensors and answer queries from the sink of the network. The storage nodes serve as an
intermediate tier between the sensors and the sink for storing data and processing queries.
Storage nodes bring three main benefits to sensor networks. First, sensors save power by
sending all collected data to their closest storage node instead of sending them to the sink
through long routes. Second, sensors can be memory-limited because data are mainly stored
on storage nodes. Third, query processing becomes more efficient because the sink only
communicates with storage nodes for queries. The inclusion of storage nodes in sensor
networks was first introduced in and has been widely adopted Several products of storage
nodes, such as StarGate and RISE are commercially available. However, the inclusion of
storage nodes also brings significant security challenges. As storage nodes store data
received from sensors and serve as an important role for answering queries, they are more
vulnerable to be compromised, especially in a hostile environment. A compromised storage
node imposes significant threats to a sensor network. First, the attacker may obtain sensitive
data that has been, or will be, stored in the storage node. Second, the compromised storage
node may return forged data for a query. Third, this storage node may not include all data
items that satisfy the query.
To design a protocol that prevents attackers from gaining information from both sensor
collected data and sink issued queries, which typically can be modeled as range queries, and
allows the sink to detect compromised storage nodes when they misbehave. For privacy,
compromising a storage node should not allow the attacker to obtain the sensitive
information that has been, and will be, stored in the node, as well as the queries that the
storage node has received, and will receive. Note that we treat the queries from the sink as
confidential because such queries may leak critical information about query issuers’ interests,
which need to be protected especially in military applications. For integrity, the sink needs to
detect whether a query result from a storage node includes forged data items or does not
include all the data that satisfy the query. There are two key challenges in solving the privacy
SCETW BE IV Year II Sem IT-Dept
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 2
and integrity-preserving range query problem. First, a storage node needs to correctly process
encoded queries over encoded data without knowing their actual values. Second, a sink needs
to verify that the result of a query contains all the data items that satisfy the query and does
not contain any forged data.
1.1 Existing System
Existing Wireless sensor networks once sensor nodes have been deployed, there will be minimal
manual intervention and monitoring. But, when nodes are deployed in a hostile environment and there
is no manual monitoring.
1.2 Proposed System
In the existing system there are few drawbacks such as, the existing system is not suitable for
giving privacy for each and every nodes. These drawbacks are eliminated in the following
proposed system.
The proposed a scheme to preserve the privacy and integrity of range queries in sensor
networks .This scheme uses the bucket-partitioning for database privacy. The basic idea is to
divide the domain of data values into multiple buckets, the size of which is computed based
on the distribution of data values and the location of sensors. In each time-slot, a sensor
collects data items from the environment, places them into buckets, encrypts them together in
each bucket, and then sends each encrypted bucket along with its bucket ID to a nearby
storage node. For each bucket that has no data items, the sensor sends an encoding number,
which can be used by the sink to verify that the bucket is empty, to a nearby storage node.
When the sink wants to perform a range query, it finds the smallest set of bucket IDs that
contains the range in the query, then sends the set as the query to storage nodes. Upon
receiving the bucket IDs, the storage node returns the corresponding encrypted data in all
those buckets. SafeQ also allows a sink to detect compromised storage nodes when they
misbehave. The sink is the point of contact for users of the sensor network. Each time the
sink receives a question from a user, it first translates the question into multiple queries and
then disseminates the queries to the corresponding storage nodes, which process the queries
based on their data and return the query results to the sink.
SCETW BE IV Year II Sem IT-Dept
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 3
1.3Modules
In the proposed system the following modules are considered:
1. SafeQ
2. Integrity
3. Privacy
4. Range Queries
5. Sink
6. Storage Node
SCETW BE IV Year II Sem IT-Dept
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 4
SYSTEM REQUIREMENTS
2.1 Software Requirements
System : Pentium IV 2.4 GHz.
Hard Disk : 40 GB.
Floppy Drive : 1.44 Mb.
Monitor : 15 VGA Colour.
Mouse : Logitech.
Ram : 256 Mb.
2.2 Hardware Requirements
Operating System : Windows XP professional
Front End : JAVA, RMI,Swing(JFC)
Back End : MS-Access
SCETW BE IV Year II Sem IT-Dept
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 5
ANALYSIS AND DESIGN
3.1 Module Description
3.1.1 SafeQ Module:
SafeQ is a protocol that prevents attackers from gaining information from both sensor
collected data and sink issued queries. SafeQ also allows a sink to detect compromised
storage nodes when they misbehave. To preserve privacy, SafeQ uses a novel technique to
encode both data and queries such that a storage node can correctly process encoded queries
over encoded data without knowing their values.
3.1.2 Integrity Module:
The sink needs to detect whether a query result from a storage node includes forged
data items or does not include all the data that satisfy the query. There are two key challenges
in solving the privacy and integrity-preserving range query problem. First, a storage node
needs to correctly process encoded queries over encoded data without knowing their actual
values. Second, a sink needs to verify that the result of a query contains all the data items that
satisfy the query and does not contain any forged data.
3.1.3 Privacy Module:
Both simulations and analysis show that the relay load over the network, imposed by straight
line routing, depends on the model of the traffic pattern. Even if the system settings are
identical and straight line routing is commonly adopted, the relay load induced by “random”
traffic could be distributed differently over the network. This paradoxical result is a
consequence of the famous Bertrand’s paradox. Thus, in contrast to traditional belief, there
are many scenarios in which straight line routing itself can balance the load over the network,
and in such cases explicit load-balanced routing may not help mitigate the relaying load.
3.1.4 Range Queries Module
Analyze the load for a homogeneous multi-hop wireless network for the case of straight line
routing in shortest path routing is frequently approximated to straight line routing in large
multi-hop wireless networks. Since geographical and geometric attributes of nodes and routes
SCETW BE IV Year II Sem IT-Dept
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 6
affect the nodal load, we employ results from geometric probabilities to solve the problem.
Based on our analytical results, we are able to show the precise relationship between the
number of nodes and the load at each node, and the geographical distribution of the relaying
load over the network for different scenarios. Interestingly, straight line routing itself can
balance the relay load over the disk in certain cases.
3.1.5 Sink Module:
The sink is the point of contact for users of the sensor network. Each time the sink receives a
question from a user, it first translates the question into multiple queries and then
disseminates the queries to the corresponding storage nodes, which process the queries based
on their data and return the query results to the sink. The sink unifies the query results from
multiple storage nodes into the final answer and sends it back to the user. sink can detect
compromised storage nodes when they misbehave.
3.1.6 Storage node Module
Storage nodes are powerful wireless devices that are equipped with much more storage
capacity and computing power than sensors.The storage node collects all data from the
sensor nodes. The storage node can’t view the actual value of sensor node data. If the storage
node trying to view the sensor node data, sink detect misbehave of storage node.
3.2 System Design
Based on the user requirements and the detailed analysis of the existing system, the new
system must be designed. This is the phase of system designing. It is the most crucial phase
in the developments of a system. The logical system design arrived at as a result of systems
analysis is converted into physical system design. Normally, the design proceeds in two
stages:
1. Preliminary or General Design
2. Structured or Detailed Design
Preliminary or General Design: In the preliminary or general design, the features of the
new system are specified. The costs of implementing these features and the benefits to be
SCETW BE IV Year II Sem IT-Dept
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 7
derived are estimated. If the project is still considered to be feasible, we move to the detailed
design stage.
Structured or Detailed Design: In the detailed design stage, computer oriented work begins
in earnest. At this stage, the design of the system becomes more structured. Structure design
is a blue print of a computer system solution to a given problem having the same components
and inter-relationships among the same components as the original problem. Input, output,
databases, forms, codification schemes and processing specifications are drawn up in detail.
In the design stage, the programming language and the hardware and software platform in
which the new system will run are also decided.
3.3 UML Diagrams for Privacy and Integrity Preserving Range Queries In Sensor
Networks
Unified Modeling Language is a graphical visualization language. It consists of a series of
symbols and connectors that can be used to create process diagrams and is often used to
model computer programs and workflows.
3.3.1 Use Case Diagram for Privacy and Integrity Preserving Range Queries
In Sensor Networks
A use case diagram in unified Modeling Language (UML) is a type of behavioral diagram
defined by and created from a Use-case Analysis. Its purpose is to present a graphical
overview of the functionality provided by a system in terms of actors, their goals
(represented as use cases), and any dependencies between those use cases. The main purpose
of use case diagram is to show what system functions are performed for which actor. Roles
of the actors in the system can be depicted. Use Case diagrams are formally included in two
modeling languages defined by the OMG(Object Management Group) the Unified Modeling
Language(UML) and the System Modeling Language(SysML). The Use case diagram for
Privacy and Integrity Preserving Range Queries In Sensor Networks is shown in the Figure
3.1.
SCETW BE IV Year II Sem IT-Dept
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 8
The purposes of use case diagrams can be as follows:
1. Used to gather requirements of a system.
2. Used to get an outside view of a system.
3. Identify external and internal factors influencing the system.
4. Show the interacting among the requirements are actors.
Sensor
Storage node
Sink
Send file
View file name
View File details
View filename
View filedetails
View misbehavior details
Send query request
Response to Request
Receive file
Figure 3.1: Use Case Diagram for Privacy and Integrity Preserving Range Queries in Sensor
networks.
SCETW BE IV Year II Sem IT-Dept
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 9
3.3.2 Class Diagram for Privacy and Integrity Preserving Range Queries in Sensor
networks:
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 solidify the design. This example is only
meant as an introduction to the UML and class diagrams. Classes are composed of three
things: a name, attributes, and operations. The Class diagram for Privacy and Integrity
Preserving Range Queries In Sensor Networks is shown in the Figure 3.2.
The purpose of the class diagram can be summarized as:
1. Analysis and design of the static view of an application.
2. Describe responsibilities of a system.
3. Base for component and deployment diagrams.
4. Forward and reverse engineering.
SCETW BE IV Year II Sem IT-Dept
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 10
Figure 3.2: Class Diagram for Privacy and Integrity Preserving Range Queries in Sensor
networks
SCETW BE IV Year II Sem IT-Dept
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 11
3.3.3 Sequence Diagram for Privacy and Integrity Preserving Range Queries in Sensor
Networks:
A sequence diagram in a Unified Modeling Language (UML) is a kind of interaction
diagram that shows how processes operate with one another and in what order. It is
a construct of a Message Sequence Chart. A sequence diagram shows object interactions
arranged in time sequence. It depicts the objects and classes involved in the scenario and the
sequence of messages exchanged between the objects. A sequence diagram shows, as parallel
vertical lines (lifelines), different processes or objects that live simultaneously, and, as
horizontal arrows, the messages exchanged between them, in the order in which they
occur. The Sequence Diagram for Privacy and Integrity Preserving Range Queries in Sensor
Networks is shown in the Figure 3.3.
Sensor node Storage node Sink
Data base
1 : View avaialable file()2 : Send file()
3 : View file details()
4 : View misbehavior details()
5 : Send request()
6 : Receive file()
Figure 3.3: Sequence Diagram for Privacy and Integrity Preserving Range Queries in Sensor
Networks
SCETW BE IV Year II Sem IT-Dept
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 12
3.3.4 Activity Diagram for Privacy and Integrity Preserving Range Queries in Sensor
Networks:
Activity diagram is another important diagram in UML to describe dynamic aspects of the
system.Activity diagram is basically a flow chart to represent the flow form one activity to
another activity. The activity can be described as an operation of the system. The Activity
diagram for Cut Detection in WSN’s is shown in the figure 3.4.
The purposes can be described as:
1. Draw the activity flow of a system.
2. Describe the sequence from one activity to another.
3. Describe the parallel, branched and concurrent flow of the system.
SCETW BE IV Year II Sem IT-Dept
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 13
Figure 3.4: Activity Diagram for Privacy and Integrity Preserving Range Queries in Sensor
Networks
CODING AND TESTING
Implementation is the stage of the project when the theoretical design is turned out into a
working system. Thus it can be considered to be the most critical stage in achieving a
SCETW BE IV Year II Sem IT-Dept
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 14
successful new system and in giving the user, confidence that the new system will work and
be effective.
4.1 Technology:
4.1.1 JAVA:
Java technology is both a programming language and a platform. The Java programming
language is a high-level language that can be characterized as Simple, Architecture neutral,
Object oriented, Portable, Distributed, High performance, Interpreted, Multithreaded, Robust,
Dynamic, Secure.
With most programming languages, you either compile or interpret a program so that you can
run it on your computer. The Java programming language is unusual in that a program is both
compiled and interpreted. With the compiler, first you translate a program into an
intermediate language called Java byte codes —the platform-independent codes interpreted
by the interpreter on the Java platform. The interpreter parses and runs each Java byte code
instruction on the computer. Compilation happens just once; interpretation occurs each time
the program is executed. The following figure illustrates how this works.
Figure 4.1: Working of Java Technology
4.1.2 RMI:
Java Remote Method Invocation is a mechanism that allows the development of distributed
java applications. Using RMI a java application can call methods of a remote object on a
SCETW BE IV Year II Sem IT-Dept
B.C.Sangeetha Privacy and Integrity preserving Range queries in Sensor Networks 15
different Java Virtual Machine (JVM). RMI is supplied as part of Sun Micro system’s Java
Development Kit (JDK).
RMI is implemented as three layers:
1. A stub program in the client side of the client/server relationship, and a corresponding
skeleton at the server end. The stub appears to the calling program to be the program
being called for a service.
2. A Remote Reference Layer that can behave differently depending on the parameters
passed by the calling program. For example, this layer can determine whether the
request is to call a single remote service or multiple remote programs as in a
multicast.
3. A Transport Connection Layer, which sets up and manages the request.
4.2 Code:
ADMIN:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.util.*;
import javax.swing.event.*;
import java.sql.*;
import java.rmi.*;
public class login extends JFrame implements ActionListener