Security Improve in ZigBee Protocol Based on RSA Public Algorithm in WSN

-ZigBee is consuming low energy and providing the protection in Wireless Sensor Networks. ZigBee pro is supporting most applications. In spite of improved the security, ZigBee pro weak in key administration. In this paper, we depend on Logistic Map Diffie Hellman (LMDH) and SubMAC for Wireless Sensor Networks by ZigBee. In addition, we will improve the security in ZigBee by using the Rivest-ShamirAdleman (RSA) algorithm instead of Advanced Encryption Standard (AES). LMDH used for improved key administration schema (protect key distribution) and SubMAC used for providing authentication and prevented Man-In-The-Middle (MITM) and Replay attacks, LMHD did not provide this service, so we use SubMAC to overcome with this problem, and use RSA to improve the security by encrypting the network key and ensure that the connection is secure between the nodes and then we can send the data safely. And the results ensure: the proposed is extra effective when compare with ZigBee pro from where the execution time and power consumption, in addition, it proved that security is improving.


Introduction
Nowadays, Wireless sensor networks become important feature and very used of our daily life in most applications, recently, in monitoring health, environmental, agricultural and other applications. Most Challenges facing us how secure the messages that transmitted in WSN, Because the sensor nodes transmit sensitive and private information, must be secured so that ZigBee Pro [1] will ensure safety and low energy consumption for WSN. Sensors node have limited memory and low capacity .Therefore, limitations of the sensor must be considered. We will use LMDH for safety key distribution, and SubMAC for supporting the authentication and integrity to send message without any modification to the network, then we use RSA for improving the security in ZigBee. ZigBee pro [2] (Last specification of ZigBee is called Zigbee2007) is suitable for WSN and improve security. Nevertheless, the improved key administration in ZigBee pro remains weak, especially in key Distribution. In this essay: we implement logistic map and Diffie-Hellman (LMDH) for overcome on the ZigBee Pro weakness and to make LMDH is more efficiently, we used SubMAC [3] to provide the endorsement beside the prohibition Man-In-The-Middle attack, and RSA to improve the security and reduce time computation during encryption and deception process. The proposed abled to improve the security and support the endorsement in ZigBee pro for Wireless Sensor Networks. The remainder of the essay arranged in this way. Part 2 show related work. Part 3, 4 and 5 discussed Logistic Map, Diffie Hellman and RSA. Part 6 shows the proposed improved key management mechanism. Part 7 display environment, and discussed the results of proposed to estimate the efficacy of our suggested. In part 8 we estimated the schema in terms of security. Lastly, we deduce this essay in part 9.

Related Work
I. ZigBee pro ZigBee depends on (IEEE 802.15.4). ZigBee pro is a criterion specific in (ZigBee 2007). ZigBee pro is improving the security in (Zigbee2006) by using two types of safely methods: a standard security method, appropriate to the resident security in (Zigbee2006) and high security method, appropriate with commercial security in (Zigbee2006). The security in ZigBee relies on Advanced Encryption Standard (AES-128) [4] algorithm. But in our proposed system, we will use RSA to improve the security and reduce run time. ZigBee' security consists of the modes and Transport, Device administration, and protect the frame. ZigBee used (master, network, and links) as a keys for security Administration.  [7] to improve the key administration schema and SubMAC for Wireless Sensor Networks to overcome the vulnerabilities of key management of ZigBee. ECDH used for providing the safely of key distribution and SubMAC to avoid the vulnerabilities in ECDH, especially the endorsement and Man-In-The-Middle attack. By SubMAC, the endorsement for sending the packets and prevent Man-In-The-Middle and Replay attacks is achieving .
III. Chaotic encryption depends on ZigBee for the wireless network. [8] Qiang H et al. Based on the chaotic theory, they presented a compound chaotic cryptographic system, which is based on the optical instability model and Logistic model, used as a chaotic sequence cipher. The complicated degree of chaotic sequences and cryptographic specific property are strengthened . They suggested a combination chaotic cryptographic schema, it depends on the optic imbalance mode and Logistic mode that use like chaotic series encrypt. The complicated degree of chaotic series and cipher specified property are supported.ZigBee becomes very important to the improvement of industrial automation, in particular the security in ZigBee become Focus of attention .The suggested schema is showed: it is need a few memory and it provided high security and the run time in encryption is very fast.

Logistic Map
It suggested by Pierre Verhulst (in 1845). Logistic Map is easy, nonlinear, and dynamic. It is a type of Chaotic Maps. Robert M. Used it (in 1979), and Made it very popular.Logistic Map is a Complicated polynomial of a chaotic schema where its action able appears from nonlinear Dynamic of simplest calculation. Logistic Map's equation shows as follows shows the value between 1 and 0, and displays the value between 0 and 1 [9].

Diffie Hellman [10]
Usually, there is a problem that everyone faces when sending data that is important, how to protect this data and send it in a safe way. Therefore, there were several ways to encrypt and how to exchange keys between the sender and the receiver, but the problem appeared exchange keys, how to send the message without exposure during transmission to modify and change and understood only by the sender and the recipient [11]. In 1976, Diffie and Hellman proposed algorithm usage to generate a shared private key among two people. Where it used like a schema for exchange encrypted keys for using in public cryptography algorithms as AES . Diffie-Hellman protocol key exchanging [12]:  Two parties concur for using prime value Pr and Q {1,….,Pr-1},  This parties generate their private keys, named a, b {1,…, Pr-1}.  User A compute his public key X=q^a mod p.  User B computes his public key Y=q^b mod p.  User A and user B exchange their public keys, to be used for private generation of common Secret key.  User A compute the secret key SA=Y^a mod p. User B computes his secret key SB=X^b mod p.  SA=SB.

Rivest-Shamir-Adleman (RSA)
In 1978, RSA suggested by, Ron, Rivest, Adi, Shamir, and, Leonard Adleman [13]. It is among the finest known public key cryptosystems for key interchange or digital signature or cryptography of information. RSA uses not fixed size cryptography block and the size of the key is not fixed. RSA asymmetric encryption algorithm depends on number theory, it is a block cipher system. It uses two prime values to create the public and private keys. This keys use to encoder and decoder. Transmitter encrypts the packet by recipient public key, when the packet transfer to the recipient, the recipient will able to decrypt it with his private key . RSA procedures can be analyzed in three steps; key creation, encryption and decryption.
I. Key creation step [14] 1. Select two big prime values P & Q from the logistic map 2. Calculate N= P× Q . 3 .Compute: R = (P-1) × (Q-1) . 4. Select public key E, GCD (E, R) =1 . 5. Calculate the private key D by the relation D × E = 1 mod R; D is kept as private for two parties .

II. Encryption
Plain-text: M < N Cipher-text: C= M^E mod N .

III. Decryption
Cipher-text: C Plaint-text: M=C^D mod N.

Proposed System
We suggest using Diffie Hellman depend on Logistic Map to exchange the keys generated from logistic map. Fig. 2 shows the key exchange process. Where XA, XB public keys and SA, SB secret keys Fig. 3. Displayed a packet arrangement schema in the direction of the endorsement in criterion safely method. The Update Device and Transport Key requests communication among (Coordinator and Router) must secure. The Transport Key request sends from (the Router to the End Device) must not safely. Figure. 4 display the packet arrangement schema for the endorsement step in the criterion safely method.   We used LMDH to make network-key secure. SubMAC used for supported the packet endorsement, in addition it achieve the integrity, But there is still the risk of attack and detection of the value of network key, so it will encoded by RSA algorithm to improve the security and sent by the sender. The recipient will decrypt to check the integrity. Figure. 4 show the suggested key administration in criterion safely method.

I. Programming Environment
The proposed system was written in c# language version 2013 on widows10 .

II. Effectiveness analyses of improved Key mechanism
We suggest improved key management mechanism by LMDH for secures key allocation and SubMAC to beat on the weakness of LMDH and improve the security by using RSA. The result was implemented five times . In every of the former two steps with Coordinator, Router, and End Device. Median execution time in criterion safely method [6] is 0.5156 seconds, and in standard-ECDH [6] it is 0.5778 seconds; the contrast is 0.0622 seconds. While this difference compare to the median execution time of criterion safely method, added 12%. Although, the variation, 0.0622, either in suggesting key administration in a proposed system [16] (using LMDH) is 0.3593 Seconds. Note that, in our proposal's time is significantly reduced when compared to previous values.   Then, we compute power consumption in End Device, Router and Coordinator. Table2 show details the values. While suggesting key distribution in safely method (stander ECDH) [6] is comparable to the criterion safely method, it absorbs more power .In particular, receiver state in the Coordinator display extreme distinction is 0.001447mJoule.Although, the Coordinator has enough Memory and power, thus the distinction is slight. Another distinction is 0.001412mJoule in receiver state in the End Device. In, receiver state in the Coordinator display extreme distinction is 0.001447mJoule. Although, the Coordinator has enough Memory and power, thus the distinction is slight. Another distinction is 0.001412mJoule in receiver state in the End Device. Our proposed [16] consumes close value in the Coordinator and in End Device in transmitted and received mode. In End Device, the energy has reduced compared with the standard security method and stander ECDH in transmitted. In received mode increase few. The sensor node uses two AA alkaloid batteries. An AA alkaloid battery contains a maximum of 3000mAh, so the total energy is 6000mAh. The formal voltage of an AA battery assumes 1.5 volts. The amount of electric power is 9Wh, Product Of 6Ah and 1.5 V and this is converted into 32,400J, 3600 X into 32, 400J, 3600 X 9(J) [17]. The difference is slight compared to 32,400J.

Security Analysis
We will discuss our improved key administration for ZigBee Pro. It is supporting the security characterize and overcome on several attacks.
ZigBee Pro has weakness in key administration in standard security methods, and by LMDH, this weakness solved. But LMDH could not avoid Man-In-The-Middle Attack and did not support The endorsement. Nevertheless, the suggested system by SubMAC exceed this weakness and improves the safety, then we use RSA to improve (Router and the End Device). Improve the security and reduce run time

I. Confidential
ZigBee pro has important problem with confidentiality, due to the fact that master and network-key didn't secure the sending among The suggested system confirms on the Confidentiality of the keys by LMDH and the confidential increase when we are using RSA, because when just use LMDH may can detect about the value of network key when created. This is due to the reason that the public key participates in the channel, so the attacker may get the value of network key, but when encrypt the network key by RSA, this operation becomes very difficult .

II. Packet endorsement and integrity
In spite of LMDH did not secure sending data for key creation, it safely creates Keys. However, LMDH does not support authentication. By the SubMAC can check if any change occurs, our proposed confirms packet endorsement and integrity.

III. Man in the Middle Attack
LMDH have weakness to avoid (Man-In-The-Middle Attack). Nevertheless, the suggested system used SubMAC to overcome this attack, because the attacker did not realize the SubMAC and he not able to edit the SubMAC packet, despite of he take XA or XB (public keys) only and can edit them .Our suggestion examined the modification of sending packet by SubMAC.
Besides, the use of logistic map in our proposed system help to reduce the attacks, because the logistics are sensitive to any change in values, if occur any change that leads to a change in the results, and thus this means attacker impossible to predict or try to compute any results and if he try it will be endless attempts .

IV. Replay attacks
The proposed system supported freshness by used, a, nonce to overcome on the Replayattack. When the packet sends more than once, the attacker may Misuse key generation data. Our suggestion change -nonce-value when a new key is created among (End Device and Coordinator) to avoid this problem. Consequently, the suggestion achieved the-freshness, also overcome on the Replay -attack.

Conclusion
The paper improves the security and reduce the time in encryption and decryption operations by using the RSA algorithm instead of the AES algorithm. And using LMDH and SubMAC help to achieve the effectiveness and the security also. LMDH use of secured key distribution, in addition, enhancement the weakness in LMDH, by SubMAC, the suggested system able to achieve the endorsement and integrity. And by nonce number the freshness achieves. Our scheme in comparison with ZigBee Pro and proposed ECDH provides effectiveness by obtaining less execution time and few power consuming in criterion safely method .