A secure and energy saving protocol for wireless sensor networks

Received Jan 10, 2021 Revised Apr 26, 2021 Accepted Oct 4, 2021 The research domain for wireless sensor networks (WSN) has been extensively conducted due to innovative technologies and research directions that have come up addressing the usability of WSN under various schemes. This domain permits dependable tracking of a diversity of environments for both military and civil applications. The key management mechanism is a primary protocol for keeping the privacy and confidentiality of the data transmitted among different sensor nodes in WSNs. Since node's size is small; they are intrinsically limited by inadequate resources such as battery life-time and memory capacity. The proposed secure and energy saving protocol (SESP) for wireless sensor networks) has a significant impact on the overall network life-time and energy dissipation. To encrypt sent messsages, the SESP uses the public-key cryptography’s concept. It depends on sensor nodes' identities (IDs) to prevent the messages repeated; making security goalsauthentication, confidentiality, integrity, availability, and freshness to be achieved. Finally, simulation results show that the proposed approach produced better energy consumption and network life-time compared to LEACH protocol; sensors are dead after 900 rounds in the proposed SESP protocol. While, in the low-energy adaptive clustering hierarchy (LEACH) scheme, the sensors are dead after 750 rounds.


RELATED WORK
WSNs comprise many sensor nodes (l) that can gather data and communicate wirelessly. Additionally, most WSNs include two other components, which are the cluster head (CH) and the base station (BS) [12]. The key management plays an essential role to solve issues such as authentication and authorization which are critical [1].
Zhu et al. [13] reckon that a scalable and distributed protocol is described that allows a shared key to be established by each pair of nodes. Moreover, two different protocol s, namely, threshold secret sharing and probabilistic key sharing are the basis of a protocol designed. The shared key is used for authentication between the two nodes. Furthermore, each node in this protocol should obtain its neighbors' identity (ID) to calculate the shared key. The node is loaded with a small fraction of the keys from the pool before deployment. Also, after distribution by using a probabilistic protocol (public and deterministic) that allows each pair of nodes, with a certain probability, to share one or more keys. Finally, every pair of nodes connected directly via one or more keys in their key sets, and in case of no shared key, the nodes connect indirectly through an intermediate node. The protocol guarantees connectivity, and because the message is repeated, the adversary can get the key and attacks the network by exhausting the energy of the sensor. Finally, the network will be hacked.
Huang et al. [12] improve the low-energy adaptive clustering hierarchy (LEACH) protocol by using hybrid nodes. The network encompasses of WSNs and a distributed fiber sensor link, which is positioned at the middle of the sensor field. The last one needs a steady and comparatively higher power supply. The authors isolate the network into two areas wherein the sensors have restricted energy. Moreover, there is no communication between the two areas. The node's life-time in this protocol is better than the LEACH protocol, but they did not talk about message encryption which makes the network insecure and vulnerable to attacks.
Heinzelman et al. [14] produce LEACH protocol, the nodes in the network are homogenous and each node can gather data and send it to the base station. After distribution, the sensors select themselves to become cluster head at a threshold, after which they distribute their status to the other nodes inside the network. The other nodes choose the CH sensor depending on minimal communication energy. Eventually, in LEACH, periodically, a group of nodes is selected as a cluster-based to guarantee that energy load is distributed evenly among the nodes of the different groups. This protocol needs message authentication to prevent the network from malicious nodes.
Rasul et al. [15] propose a key distribution scheme wherein random key pre-distribution is used such that better security and performance are achieved for a heterogeneous sensor network (HSN). On the other hand, a homogeneous network produces both high computation and communication overhead in addition to higher storage. The authors use a key pool, a small number of keys, to generate random keys. Key chains, that are made using a one way hash function, make a key pool. For each sensor node, a small number of generation keys that are randomly selected is assigned.

RADIO ENERGY DISSIPATION MODEL
The model in Figure 1 for the radio hardware energy distraction where the energy is dissipated by the transmitter to operate the power amplifier and the radio electronics [16]. Also, the energy is dissipated by the receiver to run the radio electronics as depicted in Figure 1. In this scheme, based on the distance between the transmitter and receiver, the channel models multipath fading (d4 power loss) and free space (d2 power loss) were used. Sensors spend energy to transmit and receive k bits packet (length of message) to a distance d as described as shown in: This loss can be inverted using power control when the power amplifier is properly configured. When the distance is lower than a predefined threshold, the free space model is considered; otherwise, the multipath model is utilized [16]. The energy of the electronics, Eelec, depends on different factors such as modulation, filtering, digital coding, and spreading of the signal. On the other hand, the energy of the amplifier, fs*d 2 or mp*d 4 , depends on a sufficient bit-error-rate and the distance between the transmitter and receiver. The parameters for the energy of the communication are Eelec=50 nJ/bit,∈fs=10 pJ/bit/m 2 , ∈mp=0.0013pJ/bit/m4. However, the data aggregation energy is EDA=5 nJ/bit/signal and the threshold distance value Do is given as shown in [16]: The proposed SESP protocol uses the radio energy dissipation model because it uses less energy than the LEACH protocol.

PROPOSED SESP PROTOCOL
This paper proposes a MAC formula for key management that is designed for hierarchical WSNs. each cluster head (CH) and sensor (L) has their IDs in hierarchical WSN. Besides, only the CH can communicate with base station (BS), the L sensors can communicate with CH, and L sensors cannot communicate with each other's [17].
In the network, the CHs have high power, large memory capacity, and great process capability. However, the L sensors are normal (restricted energy and memory size) [5], [18]. The distribution area is (100 x 100) m 2 , number of CHs are two with 100 L sensors which are scattered randomly in the uncontrolled area [19], [20], the circles are L sensors, pink rectangles are CHs sensors and the green star is BS as shown in Figure 2. There are no power restrictions for the BS, high storage capacity, and larger communication [5], [18], while the power consumption has to be highly reserved for the scattered nodes to keep the life-time of the network as long as possible and position in a safe area. The L sensors' costs are cheaper than CH and that is due we use two CHs, and in case of increases in the CHs, the cost will increase. Moreover, when using large areas, we can increase the number of CHs and BS.

Distribution phase
After random deployment, each CH broadcasts a hello message as shown in Figure 2 and Figure 3 where IDCH is the identification of the cluster head, || is an append operation, ⨁ is an XOR operation, K∈G is an integer number that starts with one and increased by one in each round to prevent message redundancy, and i is the sensor number. In step 2, each L receives more than one message from different CHs and chooses the strongest CH's signal after decrypting the message according to Figure 4 [21]. Moreover, the L sensor sends an encrypted message to selected CH consists of its ID as shown in Figure 4. The dotted green line represents near Ls to CH spends energy according to (1) when d<D0 and the dotted orange line considers the far Ls from CH which spends energy according to (1) when d>=D0. In step 3, each CH decrypts the Ls message and identifies the legal node via preloaded ID, then creates its cluster and joins the BS as shown Figure 5. In step 4, the BS sends an acknowledgment to each CH according to Figure 6 and leads to complete the network. Moreover, the message is encrypted and decrypted using a protocol shown in Figure 7. In the proposed SESP protocol, nodes select their respective CHs according to the signal ratio from the node that announces itself as CH. Data aggregation is executed by CH, thus CH nodes consume relatively much more energy than member nodes. Calculation of energy dissipated is performed based on distance.

SECURITY GOALS ANALYSIS
The security goals' analysis is the main part of the proposed SESP protocol as given as shown in: -Authentication: each node in the proposed SESP protocol has a unique key (ID). The sender encrypts its message by its ID in a formula. Besides, the receiver authenticates the received message by the ID of the sender. -Confidentiality: messages in the proposed protocol is encrypted via an equation: the ID of each sensor remains secret from the enemy by embedding it in the formula. Moreover, it is not repeated. -Integrity: the proposed SESP protocol protects the received messages from alteration and modification by using an embedded ID in the formula described above in the proposed protocol. -Availability: the network in the proposed SESP protocol is survived until the nodes spend their energy.
Further, the messages are updated in each round. -Freshness: this goal is achieved because first, the messages exchanged are fresh, and second, the resending of old data is avoided using a counter in the formula. -Resilience: if an attacker compromises the CHs, then he/she can hack the network. Besides, if the attacker compromises Ls, he/she can hack only this cluster. Besides, Table 1 shows the comparison between the proposed SESP protocol and the protocols presented in the literature in terms of security goals according to reference [22].

ATTACKS ANALYSIS
The proposed SESP method is effective versus different attacks as explained as shown in: -Eavesdrops attack: the proposed SESP protocol is resistant to this attack because the attacker catches the signals. However, he/she cannot determine what the message includes because the message's contents are a stream bit of numbers, which makes the message non-understandable. -Sybil attack: this does not influence the network of the proposed SESP protocol because the nodes' IDs are embedded in a formula. -Sinkhole attack: the nodes in the proposed SESP protocol decrypt the messages according to the formula supplied in pre-distribution. Therefore, the attacker's messages will be canceled. -Wormhole attack: the attacker work to make a tunnel and change the network route. The attacker doesn't affect our network unless he/she gains the formula. -Hello flood attack: the proposed SESP protocol is resistant to this attack because the nodes in the proposed SESP protocol have the BS's ID which is embedded in a formula, and recognize the illegitimate BS. -Clone attack: the intruder can attack and hack the network of the proposed SESP protocol. Table 2 shows the comparison between the proposed SESP protocol and other protocols presented in the related work in terms of security goals according to this reference [15]. Furthermore, Figure 8 shows the life-time of the sensors. We can see that the proposed SESP protocol is satisfied in terms of the death and life of sensors. The sensor is dead after 750 rounds in the LEACH protocol. while, in the proposed SESP protocol, the sensors are dead after 900 rounds; due to the use of the model in section (3 radio energy dissipation model). Further, Figure 9 shows the total dissipated energy for all the sensors to propose SESP protocol is better than LEACH protocol. due to the use of the model in section (3 radio energy dissipation model). Finally, the simulation of the proposed SESP protocol that was done by MATLAB R2015a shows that the proposed SESP protocol is better than LEACH.

CONCLUSION
The proposed SESP protocol is based on a hierarchical network. Nodes in the network establish a secure link through a protocol constructed based on public-key cryptography principles wherein, the ID is considered as a public-key and the formula as a private key. The message in the proposed SESP protocol is encrypted and never repeated in the network (i.e., no other sensor sends a message that was sent by other sensors). İn each round, there are new messages different from the messages either in the previous and/or the next round. That makes the proposed SESP protocol attain security goals like authentication, confidentiality, integrity, availability, and freshness. Moreover, the proposed SESP protocol is resistant to various attacks mentioned above in the attack analysis. Finally, the simulation produced better energy consumption, dissipated energy, network life-time, and better security goals compared to the leach.