www.ijecs.in International Journal Of Engineering And Computer Science ISSN:2319-7242 Volume 4 Issue 2 February 2015, Page No. 10346-10350 An Efficient Pairwise Key Establishment Scheme for Wireless Sensor Networks Using ORP #1 *2 #3 Gisha N , Jeena Sara George ,Sushitha Susan Joseph Final b-tech students#1,*2,Assistant Professor #3 Department of Computer Science and Engineering Mar Baselious College Christian of Engineering Technology,Peermade,Kerala,India 1 gishanandan@gmail.com sarageorgektm@gmail.com 3 sushisusan64@gmail.com 2 Abstract- Wireless sensor network has many application such as environment sensing, building safety monitoring, earthquake prediction etc. Security is critical issue in sensor networks. A fundamental security service is to establish pairwise key shared between two sensor nodes, which is basis of other security such as encryption and authentication. The prime problem in key management is to establish secure keys between the sensor nodes. To avoid this pairwise key establishment is used. This scheme consists of two key pools. One key pool is hashed value of keys in another key pool. With the one-way hash function, this scheme can make attackers get less key information from the compromised sensor nodes. Along with this Otway Rees protocol is used to provide integrity and authenticity. If direct path between two sensors are not present, then by using this protocol it is easy to find key with the help of intermediate node. Keywords-Wireless Sensor Network; Key Management;Otway Rees Protocol; I.INTRODUCTION Wireless sensor networks (WSNs) have been widely deployed for various applications, such as environment sensing, building safety monitoring, earthquake prediction etc. WSNs may be deployed in hostile environments, especially in military applications. Security is critical issue when sensor networks are deployed such situations. A fundamental security service is to establish pairwise key shared between two sensor nodes, which is the basis of other security such as encryption and authentication. The prime problem in key management is to establish the secure keys between the sensor nodes. However due to the resource constraints, implementation an efficient key establishment mechanism is not a trivial task. Wireless Sensor network consists of large number of sensors. Each sensor collects the data and sends it to the neighbour. Security in WSNs is critical. To provide security data encryption is used. For this key is needed. Each sensor encrypts the data using the key and send to the neighbours. Neighbour can decrypt the data using same the key. So to provide security key establishment is important. In normal case there exist only one key for a network. But if any attacker capture the key, then they get all the data from several sensors because there is only one key. In order to avoid this pairwise key establishment scheme is used. In pairwise key establishment scheme there exist a key between two sensor. So that if any attacker capture this key no other sensor node can compromised using that key. So this scheme provides more security. This scheme consists of two key pools. One key pool is the hashed value of keys in another key pool. Because of the one-way property of the hash function, given the keys in the first key pool, anybody can compute the corresponding keys in the second key pool on the fly, but given the keys in the second key pool, nobody can compute the corresponding keys in the first key pool. Pairwise key establishment scheme consist of three phases. They are Setup phase, Direct key establishment phase, Path key establishment phase. Before deploying each sensor node distribute some key to them. The set phase is performed to initialize the sensor nodes by distributing keys to them. Key is from these two key pools either it may from the original key pool or from the hashed key pool. After being deployed, if two sensor nodes need to establish a pairwise key, they first attempt to do so through direct key establishment. If they can successfully establishment a common key, there is no need to start Gisha N#1 IJECS Volume 4 Issue 2 February, 2015 Page No.10346-10350 Page 10346 path key establishment. Otherwise, these sensor nodes start path key establishment, trying to establishment a pairwise with the help of other sensor nodes. The scheme is based on EG scheme and use one-way hash function to generate a new key pool from a given key pool. With the one-way hash function, this scheme can make attackers get less key information from the compromised sensor nodes. Along with this Otway Rees protocol is used to provide integrity and authenticity. If there is a direct path between two sensors then exchange the key between these two sensors. If direct path between two sensors are not present then identify the sensor which has link to the both source sensor and destination sensor. With the help of this intermediate node new key is generated and distributed to the source and destination sensor. During that time it is difficult to find which sensor has link between source and destination. If any attacker is present that act as the intermediate node. To avoid this Otway Rees protocol is used. By using this, it is easy to find the intermediate node that has link to source as well as the destination. This help to identify the authenticity of the sensor node. While sending the data between two sensors if any attacker is present then they corrupts the key exchanged between source and destination. Normally it is difficult to identify this. With the help of Otway Rees protocol it is easy to find whether correct key is exchanged between two sensors. So pairwise key establishment scheme helps to establish the key between two sensors and Otway Rees protocol helps to provide integrity and authenticity. II.RELATED WORK 2.1. EG Basic Scheme Based on key pre-distribution schemes, a random key pre-distribution was proposed by Eschenauer and Gligor [2]. It generates a large pool of random keys and each sensor node is preconfigured a random subset of keys from a large key pool before deployment of the network. By doing this, any two sensor nodes have a certain probability to share one key. To agree on a pairwise key for communication, two nodes find one common key within their subsets and use this key as their pairwise key. This scheme consists of three phases: key predistribution, shared-key discovery, and path-key establishment. In the key pre-distribution phase, a large key pool S is generated first. Then, each sensor randomly selects m distinct keys from the key pool S, and stores them in its memory. This set of m keys is called the sensor’s key ring. After the sensor nodes have been deployed, the key-setup phase will be performed. During this phase, each pair of neighbouring sensor nodes attempts to find a common key that they share. Since all the keys are randomly selected from the same key pool, two sensor nodes may have some overlapped keys in their memories. If such a key exists, the key will be used to secure the communication link between these two sensor nodes. After the key-setup phase is complete, a connected graph of secure links is formed. Sensor nodes can then set up path keys with their neighbours with which they do not share keys. If the graph is connected, a path can always be found from a source sensor to any of its neighbours. The source sensor can then generate a path key and send it securely via the path to the target sensor. The disadvantage of the EG scheme is that all pre-load keys are selected from the same key pool. As the number of compromised sensor nodes increases, the fraction of the affected keys increases quickly. As a result, a small number of compromised nodes may affect large fraction of the secure link. 2.2 Random Key Pre-Distribution Scheme Chan, Perrig and Song [3] proposed a random key predistribution scheme for key distribution. It requires that two sensor nodes share at least q ( q>1) keys instead of just one common key to establish a secure connection . The q-composite scheme increase the network resilience against node captures, but it is only advantageous when there is few captured sensor nodes. This scheme also have disadvantage, i.e. large number of key is needed and also it can be used when the number of sensor node is less. 2.3polynomial Based Key Distribution Liu and Li.[4] proposed a similar pairwise key scheme based on the basic scheme in[3] and based on that Blundo,Santis and Herzberg proposed a polynomialbased key distribution scheme[5], in which every sensor node is preloaded with coefficients of a symmetric bivariate polynomial evaluated at one of its variables using its identification value and the symmetry property of a polynomial allows every sensor node to establish a pairwise key with every neighbour sensor node or any node in the network evaluated at their ID value. In these key pre-distribution schemes, as the number of number of compromised nodes increases, the fraction of affected pairwise keys increase quickly. As a result, a small number of compromised nodes may affect a large fraction of pairwise. To avoid this problem, pairwise key establishment scheme is used. There are two key pools in our scheme and the keys in the first key pool are generated directly by the setup sever, and the keys in the second one are the hash value of the keys in the first key pool. Because of the one way property of the hash function, given the keys in the first key pool, anyone can compute the corresponding keys in the second key pool on the fly, but given the keys in the second key pool, no one can get the corresponding keys in the first key pool. III.PROPOSED SYSTEM 3.1 System Model Gisha N#1 IJECS Volume 4 Issue 2 February, 2015 Page No.10346-10350 Page 10347 Sensor Base Station Link between sensors Figure 3.1: Network model Network model consists of large number of sensor node. Each sensor senses the data and sends this to neighbours. Through different sensors this sensed data is send to the base station. Data is not directly send, it sends as encrypted form in order to prevent from attackers. In order to perform encryption a key needed. To establish a key between two sensors, Pairewise key establishment scheme is used. 3.2 Key Predistribution Phase This phase is conducted offline by a setup server before all sensor nodes have been deployed in a target field. The purpose of this phase is to assign key materials to each sensor node. Based on these key materials, neighboring nodes could setup pairwise keys after deployment. It has the following steps: Step 1: The setup server generates w keys, which are called original keys. Then, the setup sever generates w new keys, which are called derived keys, by applying a keyed hash algorithm to the original. These 2w keys form a key pool P. Here, each key in the key pool has a two of credentials (Id, T). And T indicates the types of key. T is 0 or 1. When T is 0, the key is an original key and when T is 0 the key is a derived key. Step 2: For each sensor node, the setup server stores the hash function H, which uses to generate the derivative keys, into the each sensor node. Step 3: For each sensor node, the setup server randomly chooses t original keys and t derivative keys, which have distinct Id, from the key pool P and stores them into each sensor node. Here, we call the set of the t keys the node’s key ring. 3.3 Shared Key Discovery Phase After the sensor nodes have been deployed, the shared keys discover phase will be performed. During this phase, the sensor nodes first perform key discovery to find out with which of their neighbors the share a key. To discovery whether a node has a common key ID with its neighbors, the source node disclose a list of key IDs and the type these keys to the destination node. Assume sensor node u and sensor node v are neighbors. When senor node u is to find or calculate the shared key with sensor node v, it needs to matches the key index Id. If the index Id of the key ku in sensor node u is the same as that of the key kv in sensor node v. They can compute the pairwise secret key as follows. There are three cases need to be considered: Case 1: The T of the key ku is the same as that of the kv. In this case, the two sensor node can use the ku or kv as their communication key. Case 2: The T of the key ku is 1 and that of key kv is 0. In these case, the sensor node v need to calculate H(kv) as the pairwise key and sensor node u needs no calculation and uses kv as the pairwise key. It is obviously that ku equals to H(kv) . Case 3: The T of the key ku is 0 and that of key kv is 1. In these case, the sensor node u need to calculate H(ku) as the pairwise key and sensor node v needs no calculation and uses ku as the pairwise key 3.4 Path Key Establishment Phase If direct key establishment fails, two sensor nodes will have to start to establishment a pairwise key with the help of other sensor nodes. To establish a pairwise key with sensor node u, a sensor node v needs to find a path between them such that any two adjacent sensor nodes in the path can establish a pairwise key directly. Then either sensor node u or v initiates a request to establish a pairwise key with the other sensor node through the intermediate nodes along the path. 3.5 Otway Rees Protocol When there is no direct path, then use intermediate node for the key establishment. But if any attacker is present then they corrupts the key exchanged between source and destination. Normally it is difficult to identify this. With the help of Otway Rees protocol(ORP) it is easy to find whether correct key is exchanged between two sensors. When sensor1 needs to communicate with sensor3, there is no direct path. So sensor2 act as the intermediate node. Sensor1 send (source, destination,R) to sensor3. Along that (source, destination, R, RA) which is encrypted using KA is send. At sensor3 it can see (source, destination, R) and add RB i.e (source, destination, R, RB) which is encrypted using KB. This is send to sensor2. Sensor2 know KA and KB. So this can decrypt it. Sensor2 select one key RAB for communication between sensor1 and sensor3. This key is encrypted using KA and KB. Sensor2 sends (RA, RAB) which is encrypted using KA and (RB, RAB) which is encrypted using KB to sensor3. Sensor3 decrypt (RB, RAB) using KB and send (RA, RAB) to sensor1 which is decrypted using KA. By this Sensor1 and sensor3 get RAB as the key and then using that key they exchange another key which is used as the key between sensor1 and sensor3. Gisha N#1 IJECS Volume 4 Issue 2 February, 2015 Page No.10346-10350 Page 10348 sensor which has link to the both source sensor and destination sensor. With the help of this intermediate node new key is generated and distributed to the source and destination sensor. Otway Rees Protocol is used to find the intermediate node that has link to source as well as the destination. This help to identify the authenticity of the sensor node. V.FUTURE WORK Pairwise key establishment using Otway Rees protocol takes more time for finding the key between two sensors. So this problem is avoided by using enhanced version of Otway Rees protocol. Also this provides more security. If any attack on sensor node occurs it can be easily identified using this protocol. By using this, a key is established between source and destination when there is no direct path exists. Enhanced Otway Rees protocol provides authenticity and integrity. Thus by using this, it is easy to find whether correct key is used or not. Figure 3.4:Otway rees protocol REFERENCE By checking R , RA ,RB value we can know that any attacker is present or not. If any change to the value occurs then attacker is present otherwise sensors are secure. In the presence of attacker value of R , RA ,RB value is not same.The working of Otway Rees Protocol can be seen from the below figure. Alice represents sensor1. Bob represent sensor3 and KDC represent sensor2. IV.CONCLUSION Wireless sensor networks (WSNs) have been widely used for various applications, such as environment sensing, building safety monitoring, earthquake prediction etc. Security is critical issue when sensor networks are deployed such situations. A fundamental security service is to establish pairwise key shared between two sensor nodes, which is the basis of other security such as encryption and authentication. The prime problem in key management is to establish the secure keys between the sensor nodes. To provide security key establishment is important. For that pairwise key establishment scheme is used. This scheme consists of two key pools. One key pool is the hashed value of keys in another key pool. Because of the one-way property of the hash function, given the keys in the first key pool, anybody can compute the corresponding keys in the second key pool on the fly, but given the keys in the second key pool, nobody can compute the corresponding keys in the first key pool. Pairwise key establishment scheme consist of three phases. They are Setup phase, Direct key establishment phase, Path key establishment phase. Along with this Otway Rees protocol is used to provide integrity and authenticity. If direct path between two sensors are not present then identify the [1] I.F. Akyildiz, W. Su, Y. Sankarasubramanian. A survey on wireless sensor networks. IEEE Communication Magazine, 2002, 38(8): 102~114 [2] L. Eschenaure and V.D. Gligor, “A keymanagement scheme for distributed sensor networks”. in: Proc. of the 9the ACM Conference on Computer and Communications, Washington DC, USA, pp.4147, Nov. 2002 [3] J.Zhang, Q.Cui, X.Liu. An Efficient Key Management Scheme for Wireless Sensor Networks in Hostile Environments. in: International Conference on Multimedia Information Networking and Security, 2009, Hubei, pp.417-420, Nov.2009 [4] H. Chan, A. Perrig and D. Song, “Random key predistribution schemes for sensor networks”, in: Proc. 20003 IEEE Symposiumon Security and Privacy, pp.197-313, May 2003 [5] D. Liu, P. Ning, and R. Li, “Establishing pairwise keys in distributed sensor networks”. ACM Transactions on Information and System Security, vol.8, pp.41-77, Feb. 2005 [6] C. Blundo, A. D. Santis, A. Herzberg. S. Jutten, U. Vaccaro, and M. Yung. “Perfectly secure key distribution for dynamicconference”, Information and Computation, vol.1, pp.1-23 , Jan.1995 BIOGRAPHIES Gisha N#1 IJECS Volume 4 Issue 2 February, 2015 Page No.10346-10350 Page 10349 Jeena Sara George pursuing B-tech- CSE in MBCCET college of engineering ,Peermade,Kerala, India. She is interested in Networks,Security. Gisha N pursuing B-tech-CSE in MBCCET college ofengineering ,Peermade,Kerala, India. She is interested in networks,DBMS. Sushitha Susan Joseph (M.E.,2012, Anna University,Chennai; B.Tech.,2009, Mahatma Gandhi University,Kottayam) is an assistant professor in the Department of Computer Science and Engineering, MBCCET, Peermade,Kerala. Her main research interests focus on artificial intelligence, data mining,wireless sensor networks and data privacy. Gisha N#1 IJECS Volume 4 Issue 2 February, 2015 Page No.10346-10350 Page 10350