Evaluation key generator of Multiple Asymmetric methods in Wireless Sensor Network (WSNs)

The wireless sensor network (WSNs) is constructed with a combination of the sensor nodes and the sink nodes. WSNs applied in many applications. The Security in WSNs is necessary because of limitations of storage, computing capacity, power use. Encryption is one of the most important tools utilized to supply the security services for WSNs. Asymmetric and symmetric encryption algorithm can be utilized in the WSNs structure to supply the security. The asymmetric key encryption algorithm gives a higher level of the security, but compared to symmetric key encryption, that causes extra sensor overhead. In this research KCMA method used to generate chains key of twelve experiments of the algorithms (ECC, RSA, ELGamal). These chains merged with hash function SHA2 and XOR. Diehard test was utilized in all experiments to evaluate the randomness of the secret key generated, and show it’s more security system. SHA2 was the best as compared with XOR. Also, the work evaluated the performance (time) for the system and throughput network.


Introduction
Sensor networks be composed of hundreds of self-organizing, low cost ,low power wireless nodes prevailed to observe the environment [1]. Sensor nodes capture information from an environment, process data and transfer it over radio signals. In sensitive WSNs applications like as enemy line monitoring or border area surveillance, the security protocols that supply confidential data transfer from sensor nodes to the base station should be utilized. However, the low processor and radio capabilities of the sensor nodes do not permit for the application of the traditional security protocols in the sensor networks [2]. The security is generally accomplished through encryption in WSNs. Encryption protects data through encryption and decryption. It composes of two classes: asymmetric and symmetric encryption, where one key is utilized to achieve the security process in the symmetric method and to various keys are utilized in the asymmetric method. Several encryption algorithms are suggested for security. Encryption algorithms work with key creation that guarantees message confidentiality.
The last years have known about the evolution of novel, more energy-effective encryption algorithms and give the same security threshold as traditional algorithms like as RSA [3,4]. The Elliptic Curve  [10] is one of these novel algorithms and is the most promising in terms of energy and time consuming, making it very attractive for encrypting data in WSNs. The ECC provides equal security with smaller key sizes, providing memory, computational and energy for restricted wireless devices [4] [9]. On the other hand, Elgamal was developed in 1984 by Taher ElGamal. It is an asymmetric key technique-based D-H key interchange. ELGAMAL encoding can be described on any periodic group G. Security depends on G problem related to the calculation of discrete logarithms [4] [9]. The rapid generalized encryption of long messages and the rate of data extending have the biggest advantages of this technique . The prime restriction in ELGAMAL is a random condition and a slower speed [5] [2].
The security is a very important issue in the WSN, especially with the development of science and computers ,the researchers attempted to provide security by generating chains secret key, the randomness of these keys generated are low, so in this work suggested Key Chain Multiple Asymmetric (KCMA) method to increase randomness and improve the confidentiality of the system. The key chains generate through twelve experiments evaluate with Diehard test. The time and throughput network for the chains generated was calculated in the Java programming language. Also, the complexity of the algorithms is illustrated.
The rest of the paper as follows: The WSNs are explained in the Section 1. The related work is highlighted in the Section 2. The proposed research is explained in the Section 3. The Measures Metrics and result is illustrated in the Section 4. The complexity of an algorithm is explained in the section 5. And, the Section 6 concludes the paper.

Related work:
The work related to researchers who work in this field: The search In [6], the research suggests an algorithm based on complementary subtraction 1 to represent numerical multiplication in numerical multiplication which provides a lower Hamming weight and significantly improves the computational efficiency of numerical multiplication .In this paper, used a hybrid cryptosystem asymmetric RSA and El-gamal algorithm , improve performance and the security will be relay on throughput and encryption time , decryption time [7]. This paper has shown increase the security system by using the protocol MKP which use two series of ECC algorithm to generate secret keys. It gives the authentication , since it has multiple key and work in parallel mode, that increase the throughput and the performance of the system ,and decrease the run-time, also it save the energy [8]. (Palanisamy and Chellappan 2011) suggested RSA -CRT technology is enhanced in secure routing and gives functional management of keys that use the best encryption / decryption to authenticate broadcast messages. The suggested technique will resist attacks on the WSN network layer and will minimize overhead for communications, and energy node consumption, and storage space [9].This paper [10] implemented ECC and RSA over Sun SPOTs . Its transmit the light reading, time and capacity of the available battery. Initially charged the battery, then computed time taken by every technique to discharge the battery to detect which technique exhausts minimal battery. In the same conditions RSA exhausts, power more than ECC. [11] in this paper used two system RSA and ECC,and discover that ECC is more suitable as compared to RSA, because of low CPU consuming, low memory use and shorter key size as compared to the RSA.

The Proposed Research:
The objective of the research is building a strong WSNs security system and improve the performance   To generate the elements in each chain, the asymmetric algorithms are used as in the following Eq.1 and Eq.2: Ai=PK1en (TK1, Ai-1) (1) 0< I <n Bi=PK2en (TK2, Bi-1) (2) 0< I <n Where: PK1en = the first algorithm, PK2en = the second algorithm. The keys are calculated using the hash function (f) as shown in the following Eq.3: (3) 1< i <n Where F represents hash function XOR or SHA2

Measured Metrics
This section demonstrated some important measures for the evaluation of the proposed KCMA method, this measure can be illustrated as follows:

Randomness test
The randomness of the output is one of the significant factors in measuring the security of any algorithm. The search implements diehard tests. Diehard (develop by Marsaglia) is a battery of statistical tests for measuring the quality of a random number generator.  [12] .These tests are p-values that dividing the range to three region : safe, doubt, and failure area. These regions can be defined by this following limits: 0.1 < p -value ≤ 0.25 or 0.75 ≤ p > < 0.9 lies in the Doubt region. 0 < p -value ≤0.1 or 0.9 ≤ p -value ≤ 1 located in the failure region . 0.25 < p -value < 0.75 located in a safe region [13].

Network throughput
Throughput is the amount of the data transferred in a unit of the time. Moreover, the node throughput is the rate of the data transported through the simulation time as described in Eq. (4). The throughput network is the throughput rate of all nodes on the number of the nodes as shown in Eq. (5) [14] T_N Data/Time… (4) Where T_N: the node's throughput, Data: the amount of the transferred data, and Time: the time simulation.

Randomness test
The test was performed on the twelve experiments of the asymmetric method described in the following table (1). The work file that size (11) MB was used as a measure to test the randomness of suggested research.
The randomness of the twelve experiments is illustrated in Figures below:

Time generating of the ECC methods
To calculate the time in five cases of the key (100,200,300,400,500), when using two ECC _XOR, it consumes the longer time of use it with SHA2, the time consumption of ECC_RSA and ECC_ELGamal when used them with XOR spent more time when used them with SHA2, but ECC_ELGamal is the least time consuming, as shown in Figure No. (16).

Time generating of the RSA methods
In the five cases of no. of the keys (100,200,300,400,500), we notice that the use of TwoRSA with XOR takes longer time than when used with SHA2, as well as ELGamal_RSA _ XOR consume time more than four ELGamal_RSA _ SHA2, as shown in the figure no. (17).

Throughput of the ECC based KCMA methods
From the figure (19), to measure throughput of five keys (100,200,300,400,500), the chart illustrates the high throughput network in the key (100), and network's throughput is less in the key number (500). The ECC_ELGAMAL_SHA2 is higher throughput, and TwoECC_XOR is a lower throughput network in this chart.    Figure 21. Throughput of the ELGamal based KCMA methods

Time Complexity
Time complexity is a mathematical complexity that describes the amount of the time it gets to run an algorithm. The complexity of the algorithm is classified according to the kind of function that appears in the large notation (O). For instance, a time complexity algorithm is linear time algorithm and a time complexity algorithm for constant is polynomial algorithm [15]. The problems of integer factorization of algorithm RSA permit algorithms which run in sub-exponential time [16]. according to [17]complexity of RSA refer to is (o(log(n)3)). With regard to El-Gamal encryption system is based on the discrete logarithm problem at Zp*,. It is necessary that different random integers k be utilized to encrypt various messages [18]. The time complexity of El-Gamal cryptosystem is (o(log(n)3) [17]. The complexity of ECC "difficult to break it" is equal to resolving problem of the discrete logarithm. Find discrete logarithm of one item in elliptic will not help locate the logarithm of any another item [19]. The time complexity of ECC is equal to(o√n) [20].

Conclusion
Security is one of the most difficult problems in WSNs. In this research, the KCMA method has been proposed to generate a key chain of asymmetrical algorithms. These chains generated from two different algorithms combined with hash function SHA2 and XOR, then it have been tested by Diehard Test, the results shown the randomness increased by using the SHA2, so the system is confidential and secure, as demonstrated by the test the highest security methods were (TwoRSA_SHA2, TwoELGamal_SHA2, RSA_ELGAMAL_SHA2, ECC_RSA_SHA2, ECC_ELGamal_sha2). The time was calculated in the Java language for the generated keys and, shown that the method which used less time consuming were (ECC_RSA_SHA2, ECC_ELGamal_ SHA2, ELGamal_RSA_SHA2, ECC_RSA_SHA2, TwoELGamal_XOR). SHA2 is the best in terms of security and time consumption. The complexity of the RSA and Elgamal were o(log(n)3, and ECC is o√n.