You are on page 1of 60

B.C.

Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

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

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

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

SYSTEM REQUIREMENTS
2.1 Software Requirements System Hard Disk Floppy Drive Monitor Mouse Ram : Pentium IV 2.4 GHz. : 40 GB. : 1.44 Mb. : 15 VGA Colour. : Logitech. : 256 Mb.

2.2 Hardware Requirements Operating System Front End Back End : Windows XP professional : JAVA, RMI,Swing(JFC) : MS-Access

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

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 Bertrands 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

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 cant 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

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

The purposes of use case diagrams can be as follows:


1. 2. 3. 4.

Used to gather requirements of a system. Used to get an outside view of a system. Identify external and internal factors influencing the system. Show the interacting among the requirements are actors.

Send file

View file name

View File details Sensor View filename

View filedetails

Storage node

View misbehavior details

Send query request Sink

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

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. 2. 3. 4.

Analysis and design of the static view of an application. Describe responsibilities of a system. Base for component and deployment diagrams. 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

2 : Send file()

1 : View avaialable file()

3 : View file details()

4 : View misbehavior details()

5 : Send request() 6 : Receive file() Data base

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 WSNs is shown in the figure 3.4. The purposes can be described as:
1. 2. 3.

Draw the activity flow of a system. Describe the sequence from one activity to another. 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

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

14

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 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

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

15

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 different Java Virtual Machine (JVM). RMI is supplied as part of Sun Micro systems 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.*;

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

16

import java.sql.*; import java.rmi.*; public class login extends JFrame implements ActionListener { JLabel fname; JLabel file; JLabel packet; JLabel title,title1; JLabel n1,n2; JButton open; JButton send; JButton reset; JTextField fname1; JPasswordField file1; JTextArea packet1; String msg="" Container c; ImageIcon ii; ImageIcon i2; Socket c1; public login()

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

17

{ initializeComponent(); } private void initializeComponent() { fname=new JLabel("<html><font color=#FFFFFF size=+1><strong>User

Name</strong></font>"); file=new JLabel("<html><font color=#FFFFFF

size=+1><strong>Password</strong></font>"); title=new JLabel("<html><font color=#FFFFFF size=+2><strong>ADMIN LOGIN

</strong></font>") JLabel imageLabel1 = new JLabel(); ImageIcon v1 = new ImageIcon(this.getClass().getResource("")); imageLabel1.setIcon(v1); send=new JButton("Send"); send.addActionListener(this); fname1=new JTextField(10); file1=new JPasswordField(10); c=getContentPane(); c.setLayout(null); c.add(fname); c.add(file);

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

18

c.add(imageLabel1); c.add(title); c.add(send); c.add(fname1); c.add(file1); c.setBackground(new java.awt.Color(100,90,150)); c.setLocation(300,300); title.setBounds(75,30,700,50); imageLabel1.setBounds(450,100,350,250); fname.setBounds(30,100,250,25); file.setBounds(30,150,250,25); send.setBounds(150,215,75,25); fname1.setBounds(150,100,150,25); file1.setBounds(150,150,150,25); setSize(350,300); setVisible(true); setTitle("Admin Login"); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==send)

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

19

{ if(fname1.getText().equals("")) { JOptionPane.showMessageDialog(null,"Enter UserName"); fname1.requestFocus(); } else if(file1.getText().equals("")) { JOptionPane.showMessageDialog(null,"Password"); file1.requestFocus(); } else if((fname1.getText().equals("chennaisunday"))&&(file1.getText().equals("chennaisunday"))) { new sink(); this.dispose(); } else JOptionPane.showMessageDialog(null,"Invalid UserName and Password"); fname1.requestFocus(); }

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

20

} } public static void main(String args[]) { new login(); } }

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

21

Sensor Node1: 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 sensornode1 extends JFrame implements ActionListener { String filesel,s1,s2,mst; String[] pmes; String[] str1=new String[10]; Random r; File f; JLabel fname; JLabel file; JLabel packet; JLabel title,title1;

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

22

JLabel n1; JButton open; JButton send; JButton reset; JTextField fname1; JTextField file1; JTextArea packet1; String msg=""; Container c; ImageIcon ii; ImageIcon i2; Socket c1; public sensornode1() { initializeComponent(); } private void initializeComponent() { fname=new JLabel("<html><font color=#FFFFFF size=+1><strong>FileName</strong></font>"); file=new JLabel("<html><font color=#FFFFFF size=+1><strong>File</strong></font>");

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

23

packet=new JLabel("<html><font color=#FFFFFF size=+1><strong>Packet Sending</strong></font>"); title=new JLabel("<html><font color=#FFFFFF size=+2><strong>Privacy- and IntegrityPreserving Range Queries in </strong></font>"); title1=new JLabel("<html><font color=#FFFFFF size=+2><strong>Sensor Networks</strong></font>"); n1=new JLabel("<html><font color=#FFFFFF size=+1><strong>Sensor Node1</strong></font>"); JLabel imageLabel1 = new JLabel(); ImageIcon v1 = new ImageIcon(this.getClass().getResource("AnimatedTower.gif")); imageLabel1.setIcon(v1); open=new JButton("Open"); open.addActionListener(this); send=new JButton("Send"); send.addActionListener(this); fname1=new JTextField(10); file1=new JTextField(10); packet1=new JTextArea(); c=getContentPane(); c.setLayout(null); c.add(fname); c.add(file);

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

24

c.add(packet); c.add(packet1); c.add(n1); c.add(imageLabel1); c.add(title); c.add(title1); c.add(open); c.add(send); c.add(fname1); c.add(file1); c.setBackground(new java.awt.Color(100,90,200)); c.setLocation(300,300); title.setBounds(75,30,700,50); title1.setBounds(300,60,300,50); imageLabel1.setBounds(475,125,450,350); fname.setBounds(30,150,250,25); file.setBounds(30,200,250,25); packet.setBounds(150,300,200,25); packet1.setBounds(150,350,150,150); n1.setBounds(475,375,150,100);

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

25

open.setBounds(255,200,75,25); send.setBounds(150,245,75,25); fname1.setBounds(150,150,150,25); file1.setBounds(150,200,100,25); setSize(800,600); setVisible(true); setTitle("Sensor Node1"); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==send) { if(fname1.getText().equals("")) { JOptionPane.showMessageDialog(null,"Enter File Name"); fname1.requestFocus(); } else if(file1.getText().equals("")) { JOptionPane.showMessageDialog(null,"Browse File");

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

26

file1.requestFocus(); } else { System.out.println("Connected To StorageNode...."); System.out.println("\n"); String nm="sensornode1"; String fn =fname1.getText(); f=new File(filesel); String st; try { String url = "rmi://127.0.0.1/storagenode"; srvint in = (srvint) Naming.lookup(url); int sz; byte[] buffer; pmes=new String[10]; r =new Random(); FileInputStream fin=new FileInputStream(filesel); sz=fin.available()/7; buffer=new byte[sz];

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

27

int m=r.nextInt(7); StringBuffer sb=new StringBuffer(); for(int i=0;i<=7;i++) { fin.read(buffer); st=new String(buffer); pmes[i]=st; sb.append(st); } String pt=packet1.getText(); String pt1="null"; if(pt!=pt1) { packet1.setText(""); } System.out.println("File Sending From Sensornode1 to Storagenode"); System.out.println("\n"); System.out.println("Filename:\t"+fn); System.out.println("\n");

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

28

for(int i=0;i<=7;i++) { if(i!=m) { packet1.append("Packet["+i+"]:PACK"); packet1.append("\n"); new cc1(i,m); } else { packet1.append("Packet["+i+"]:NACK"); packet1.append("\n"); new cc1(i,m); } } System.out.println("\n \t Packet["+m+"]:Positive ACK" ); System.out.println("\n File Sent To Storagenode" ); packet1.append("Packet["+m+"]:PACK"); in.getfile(nm,fn,sb); file1.setText(""); fname1.setText("");

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

29

} catch(Exception e) { } } } if(ae.getSource()==open) { FileDialog fd1=new FileDialog(this,"OPEN",FileDialog.LOAD); fd1.setVisible(true); filesel=fd1.getDirectory()+fd1.getFile(); file1.setText(filesel); } } public static void main(String args[]) { new sensornode1(); System.out.println("Sensornode1 Started...."); } } class cc1 extends Thread

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

30

{ Thread t; cc1(int ps,int rm) { try { if(rm!=ps) { System.out.println("\t Packet["+ps+"]:Positive ACK"); System.out.println("\n"); t.sleep(2000); } else { System.out.println("Packet["+ps+"]:Negative ACK"); System.out.println("\n"); } } catch(Exception e) { System.out.println(e);

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

31

} } } Code similar for other nodes. 4.3 System Testing: The purpose of testing is to discover errors. Testing is the process of trying to discover every conceivable fault or weakness in a work product. It provides a way to check the functionality of components, sub assemblies, assemblies and/or a finished product. It is the process of exercising software with the intent of ensuring that the software system meets its requirements and user expectations and does not fail in an unacceptable manner. There are various types of test. Each test type addresses a specific testing requirement. Types of testing are Integration Testing, Functional Testing, System Testing, White Box Testing, Black Box Testing. 4.3.1 Unit Testing: Unit testing is usually conducted as part of a combined code and unit test phase of the software lifecycle, although it is not uncommon for coding and unit testing to be conducted as two distinct phases. Test Strategy and Approach Field testing will be performed manually and functional tests will be written in detail. Test Objectives 1. All field entries must work properly. 2. Pages must be activated from the identified link. 3. The entry screen, messages and responses must not be delayed.

Features to be tested 1. Verify that the entries are of the correct format
SCETW BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

32

2. No duplicate entries should be allowed 3. All links should take the user to the correct page. 4.4 Test Cases for Privacy and Integrity Preserving Range Queries in Sensor Networks:

Figure 5.1 Storage Node: Where the files are stored.

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

33

Figure 5.2 Sensor Node1: The files are sent from Sensor Node1 to Storage Node

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

34

Figure 5.3 Sensor Node 2: The files are sent from sent from Sensor Node1 to Storage Node

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

35

Figure 5.4 Sensor Node 3: The files are sent sent from Sensor Node3 to Storage Node

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

36

Figure 5.5 Packets are sent from Sensor Node1 to Storage Node

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

37

Figure 5.6 The file is received from Sensor Node1 by Storage Node

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

38

Figure 5.7: Packets are sent from Sensor Node2 to Storage Node

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

39

Figure 5.8: The file is received from Sensor Node2 by Storage Node

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

40

Figure 5.9: Packets are sent from Sensor Node3 to Storage Node

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

41

Figure 5.10: File received at Sink

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

42

Figure 5.11: Sink Viewing File ID, File Name, File Received.

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

43

Figure 5.12: Sink Viewing information from the file.

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

44

Figure 5.13: Sink cannot view the information as Encryption Algorithm is used.

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

45

Figure 5.14: Sink detects the misbehavior details.

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

46

Figure 5.15: File saved at the desired destination

Figure 5.16: File saved as Notepad

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

47

CONCLUSION
6.1 Conclusion SafeQ, a novel and efficient protocol for handling range queries in two-tiered sensor networks in a privacy- and integrity- preserving fashion. SafeQ uses the techniques of prefix membership verification, Merkle hash trees, and neighborhood chaining. In terms of

security, SafeQ significantly strengthens the security of two-tiered sensor networks. Unlike prior art, SafeQ prevents a compromised storage node from obtaining a reasonable estimation on the actual values of sensor collected data items and sink issued queries. In terms of efficiency, our results show that SafeQ significantly outperforms prior art for multidimensional data in terms of both power consumption and storage space. Second, we propose an optimization technique using Bloom filters to significantly reduce the

communication cost between sensors and storage nodes. Third, a solution to adapt SafeQ for event-driven sensor networks.

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

48

REFERENCES
[1] F. Chen and A. X. Liu, SafeQ: Secure and efficient query processing in sensor networks, in Proc. IEEE INFOCOM, 2010, pp. 19. [2] S. Ratnasamy, B. Karp, S. Shenker, D. Estrin, R. Govindan, L. Yin, and F. Yu, Datacentric storage in sensornets with GHT, a geographic hash table, Mobile Netw. Appl., vol. 8, no. 4, pp. 427442, 2003. [3] P. Desnoyers, D. Ganesan, H. Li, and P. Shenoy, Presto:A predictive storage architecture for sensor networks, in Proc. HotOS, 2005, p. 23. [4] D. Zeinalipour-Yazti, S. Lin, V. Kalogeraki, D. Gunopulos, and W. A. Najjar, Microhash: An efficient index structure for flash-based sensor devices, in Proc. FAST, 2005, pp. 3144. [5] B. Sheng, Q. Li, and W. Mao, Data storage placement in sensor networks, in Proc. ACM MobiHoc, 2006, pp. 344355. [6] B. Sheng, C. C. Tan, Q. Li, and W. Mao, An approximation algorithm for data storage placement in sensor networks, in Proc. WASA, 2007, pp. 7178. [7] B. Sheng and Q. Li, Verifiable privacy-preserving range query in twotiered sensor networks, in Proc. IEEE INFOCOM, 2008, pp. 4650. [8] Xbow, Stargate gateway (spb400), 2011 [Online]. Available: http:// www.xbow.com [9] W. A. Najjar, A. Banerjee, and A. Mitra, RISE:More powerful, energy efficient, gigabyte scale storage high performance sensors, 2005 [Online]. Available: http://www.cs.ucr.edu/~rise [10] S. Madden, Intel lab data, 2004 [Online]. Available: http://berkeley. Intel research.net/labdata

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

49

[11] J. Shi, R. Zhang, and Y. Zhang, Secure range queries in tiered sensor networks, in Proc. IEEE INFOCOM, 2009, pp. 945953. [12] R. Zhang, J. Shi, and Y. Zhang, Secure multidimensional range queries in sensor networks, in Proc. ACM MobiHoc, 2009, pp.197206. [13] H. Hacigm, B. Iyer, C. Li, and S. Mehrotra, Executing SQL over encrypted data in the database-service-provider model, in Proc. ACM SIGMOD, 2002, pp. 216227. [14] B. Hore, S. Mehrotra, and G. Tsudik, A privacy-preserving index for range queries, in Proc. VLDB, 2004, pp. 720731. [15] R. Agrawal, J. Kiernan, R. Srikant, and Y. Xu, Order preserving encryption for numeric data, in Proc. ACM SIGMOD, 2004, pp. 563574. [16] D. X. Song, D. Wagner, and A. Perrig, Practical techniques for searches on encrypted data, in Proc. IEEE S&P, 2000, pp. 4455. [17] P. Golle, J. Staddon, and B. Waters, Secure conjunctive keyword search over encrypted data, in Proc. ACNS, 2004, pp. 3145. [18] D. Boneh and B. Waters, Conjunctive, subset, and range queries on encrypted data, in Proc. TCC, 2007, pp. 535554. [19] P. Devanbu, M. Gertz, C. Martel, and S. G. Stubblebine, Authentic data publication over the internet, J. Comput. Security, vol. 11, no. 3, pp. 291314, 2003. [20] H. Pang and K.-L. Tan, Authenticating query results in edge computing, in Proc. ICDE, 2004, p. 560.

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

50

POWER POINT SLIDES

Privacy- and Integrity-Preserving Range Queries In Sensor Networks

BY B.C.SANGEETHA R.No-160609737031

SCETW

B.E-IV/IV-2nd Sem

TABLE CONTENTS
1.Abstract 2.Introduction
Existing system Proposed system Modules

3.System Requirements
Software Requirements Hardware Requirements

SCETW

B.E-IV/IV-2nd Sem

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

51

TABLE CONTENTS
4.Design Process
Process flow for Privacy- and Integrity-Preserving Range Queries In Sensor Networks UML diagrams for Privacy- and IntegrityPreserving Range Queries In Sensor Networks

5.Screen shots 6.Conclusion 7.Bibilography


SCETW B.E-IV/IV-2nd Sem 3

Abstract
In wireless sensor security is the main concern to identify the range queries we are trying to implement privacy and integrity of the range queries. 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.
SCETW B.E-IV/IV-2nd Sem

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

52

Introduction
Here, storage nodes gather data from nearby sensors(nodes) Serve as an intermediate node between Sensors and sink and answer queries from the sink of the network.

SCETW

B.E-IV/IV-2nd Sem

Storage nodes has the 3 main advantages to sensor networks : Save power Memory-limited More efficient Definitions: Sensor node: It may contain data and files Storage Area: Where the files are stored. Sink: Its a functionality. Checks the IP and batch code.
SCETW B.E-IV/IV-2nd Sem 6

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

53

Existing system
There will be minimal manual intervention and monitoring. There is no manual monitoring.

SCETW

B.E-IV/IV-2nd Sem

Proposed system
To preserve the privacy and integrity of range queries in sensor networks it uses the bucket partitioning for database privacy.

SCETW

B.E-IV/IV-2nd Sem

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

54

Modules
SafeQ Integrity Privacy Range Queries Sink Storage Node

SCETW

B.E-IV/IV-2nd Sem

System Requirements
Software requirements:Operating System Front End Database Database Connectivity
:Windows XP :JAVA(Swings) :Microsoft Access :JDBC.

Hardware requirements:Processor - Pentium IV 2.5 GHZ RAM - 512 MB Hard Disk - 80 GB


SCETW B.E-IV/IV-II SEM 10

SCETW

B.E-IV/IV-2nd Sem

10

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

55

Process Flow
1) The files are sent from Sensor Node1 to Storage Node. 2) The files are sent from sent from Sensor Node1 to Storage Node 3) The files are sent sent from Sensor Node3 to Storage Node 4) File received at Sink 5) Sink views the File name, Batch ID.
SCETW B.E-IV/IV-2nd Sem 11

ER-Diagram for Privacy- and IntegrityPreserving Range Queries In Sensor Networks

SCETW

B.E-IV/IV-2nd Sem

12

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

56

Class diagram for Privacy- and IntegrityPreserving Range Queries In Sensor Networks

13

SCETW

B.E-IV/IV-2nd Sem

13

Sequence diagram for Privacy- and IntegrityPreserving Range Queries In Sensor Networks
Sensor node Storage node Sink 2 : Send file() 1 : View avaialable file()

3 : View file details()

4 : View misbehavior details()

5 : Send request() 6 : Receive file() Data base

SCETW

B.E-IV/IV-2nd Sem

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

57

Use case diagram for Privacy and integrity preserving range queries in Sensor networks
Send file View file name

View File details Sensor View filename

View filedetails

Storage node

View misbehavior details

Send query request Sink

Response to Request

Receive file

SCETW

B.E-IV/IV-2nd Sem

15

Screen Shot for storage node

SCETW

B.E-IV/IV-2nd Sem

16

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

58

Screen shot for Sensor node 1

SCETW

B.E-IV/IV-2nd Sem

17

Screen shot for Sensor node 2

SCETW

B.E-IV/IV-2nd Sem

18

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

59

Screen shot for Sensor node 3

SCETW

B.E-IV/IV-2nd Sem

19

Conclusion
1)SafeQ:efficient protocol for handling range queries in two-tiered sensor networks in a privacy- and integrity- preserving. 2)Bucket partioning: To preserve privacy and range queries in sensor networks. 2)Optimization technique : Using Bloom filters to significantly reduce the communication cost between sensors and storage nodes.
SCETW B.E-IV/IV-2nd Sem 20

SCETW

BE IV Year II Sem IT-Dept

B.C.Sangeetha

Privacy and Integrity preserving Range queries in Sensor Networks

60

References
[1] F. Chen and A. X. Liu, SafeQ: Secure and efficient query processing in sensor networks, in Proc. IEEE INFOCOM, 2010, pp. 19. [2] S. Ratnasamy, B. Karp, S. Shenker, D. Estrin, R. Govindan, L. Yin, and F. Yu, Data-centric storage in sensornets with GHT, a geographic hash table, Mobile Netw. Appl., vol. 8, no. 4, pp. 427442, 2003. [3] P. Desnoyers, D. Ganesan, H. Li, and P. Shenoy, Presto:A predictive storage architecture for sensor networks, in Proc. HotOS, 2005, p. 23. [4] D. Zeinalipour-Yazti, S. Lin, V. Kalogeraki, D. Gunopulos, and W. A. Najjar, Microhash: An efficient index structure for flash-based sensor devices, in Proc. FAST, 2005, pp. 3144.

SCETW

B.E IV/IV 2nd Sem

21

QUESTIONS????

SCETW

B.E-IV/IV-II SEM

22

SCETW

BE IV Year II Sem IT-Dept

You might also like