Abstract
Introduction
Wireless sensor network (WSN) is a self-configuring wireless network composed of either static or mobile nodes without any infrastructure (ad hoc mode) as shown in Figure 1. The sensor nodes in a network are equipped with a variety of functions, such as sensing, processing, aggregation, exchange of data, and so on. 1 The size of a WSN may range from a few hundred to thousands of nodes depending on the requirement in the area of interest.

A typical wireless sensor network.
Energy efficiency and security are two major and all time open issues in WSN.2–4 Thus, a sensor node may die in relatively lesser time after its deployment if its operations are handled improperly. In other words, an energy-efficient node is the one whose operations consume minimum power during execution. Such operation includes routing, sensing, processing, authentication, and security. Apart from the usual operations that any sensor node has, such as, sensing, processing, and routing, security can be termed as a top-up for enhanced features.5,6
This research mainly focuses on the use of WSNs in such hazardous areas, such as battlefield, fire zone, and so on, where security and energy efficiency are the issues of major concern. In a battlefield, various types of sensor nodes can be deployed like soldier trackers and acoustic sensors to monitor the approach of enemy while securing the parameters. 7 Other extreme application is the fire zone where human access is not possible. Here, the sensor is mainly used for detecting life inside the building, taking the readings of fire and collecting building information.
Energy efficiency and security of data always remained as open research issues in WSN. Most of the battery power is consumed by routing of the data and thus the life of a network mainly depends on the efficiency of its routing protocol. The more the energy-efficient routing of a network, the longer will be its network lifetime. Moreover, the delivery of data to destination without being captured or forged by the attackers is also a vital issue. There are verities of protocols designed for energy-efficient routing and securing the data.
Rodoplu and Meng 8 proposed an energy-efficient routing protocol. The technique is focused on the minimal use of power but requires the location information of each node through global positioning system (GPS) or other location techniques.
Chang and Tassiulas 9 proposed a scalable cost-aware routing in WSNs. The “cost aware” refers to longer network life by choosing the optimum route having maximum residual energy. A new approach of routing based on renewable energy is proposed by Chalasani and Conrad 10 known as energy-harvesting aware routing protocols. This technique proposes a mechanism to harvest the energy from external resources, such as energy from wind, solar, motion, noise and so on. However, this technique requires additional resources to be mounted over the node.
Moreover, another energy-harvesting awarded protocol is the distributed energy-harvesting aware routing algorithm (DEHAR), 11 which describes a metric named as “energy distance” for selecting the optimum route. This metric calculates the route with minimum total energy distance instead of spatial distance. But this shortest energy distance is calculated by methods such as directed diffusion flooding which incurs routing overhead.
Beheshtiha et al. 12 designed a routing protocol with energy-management functionalities known as opportunistic routing algorithm with adaptive harvesting–aware duty cycling (OR-AHaD). OR-AHaD is an opportunistic and adaptive protocol, which can dynamically tune the duty of a sensor node based on the remaining power in order to prolong its life in the network. The protocol however requires a regular update of energy levels and geographic information of a node. Moreover, the frequency of power updates increases with the passage of time as the power level of nodes decreases.
Another security protocol known as secure ad hoc on-demand distance vector (SAODV) 13 is an extension of ad hoc on-demand distance vector (AODV). The protocol signs the data in SAODV to ensure the integrity of data. The mechanism used in SAODV known as double signature is used for authenticity but increases the processing overhead since signature on every chunk of data is an expensive process. To solve this limitation of SAODV, Cerri and Ghioni 14 proposed another protocol known as A-SAODV. In A-SAODV, the nodes use request/reply mechanism like wireless networks. Reply to the request will be sent by a node only if it is not overloaded. Also, the replaying node can determine whether to use single signature or double signature based on processing overhead. This mechanism is good in theory but again not suitable for resource-constrained WSNs.
Similarly, Zhou 15 proposed an encryption and authentication–based protocol. The proposed scheme is named as routing protocol based on encryption and authentication (BEARP), which claims routing information confidentiality, authentication, and integrity of data. The idea of BEARP provides a good platform for data security in WSN; however, in WSN, the security and integrity of data never remained as a single and independent goal for the researcher. As discussed earlier, the network life and processing overhead, convergence time, network traffic, and so on are the challenges that arise while designing a secure routing protocol. The BEARP exchanges too many control messages, such as confidential data enquiry (CDE), routing path selection system (RPSS), confidential enquiry reply (CDER), confidential route reply (CRR), and acknowledgment. Even though all the communication between a base station (BS) and sensor nodes remains encrypted, still the BS adds a random number RB and a time stamp TB as an additional secure layer which obviously adds the processing overhead head to the nodes. The BEARP does not explain what is the probability of success and failure of the proposed scheme. Moreover, the paper lacks about the explanation what is the convergence/setup time of the proposed scheme.
Similarly, Djenouri et al. 16 represent a secure ant colonization–based routing protocol. According to the paper, the proposed methodology has the capability of multilayer security threats; however, the term multilayer has not been explained clearly by the paper. The proposed methodology in the paper uses ant colony optimization and claims to achieve the security by four features: route discovery, route selection, route security, and data forwarding. The route is discovered by launching a broadcast request that reaches to a destination and the destination responds with an acknowledgment through backward broadcast. The path through which the packet arrives earlier is chosen as the shortest path. The watchdog algorithm is used to decide whether a packet needs to be secured before sending or not; if yes, the RC4 algorithm is used to encrypt the data. The paper does not explain how the RC4 algorithm is embedded with the proposed scenario also the probability of success or failure of secure model is also not highlighted.
The WSN faces the same security challenges as any ah-hoc network would.17,18 There are routing protocols that attempts to secure the network, such as TinySec, 19 Spins, 20 TinyPK, 21 TinyECC,22,23 and LS-LEACH. 24 The most popular technique in security domain of routing is the encryption and decryption of data. This technique is used to prevent or detect the unauthorized parties or malicious behavior of a sensor node. However, these solutions mostly run over application level resulting in a complex code implementation in higher-level language which adds processing overheads for a node’s processor. This phenomenon eventually fails the claim of secure and energy-efficient routing (SEER) protocol.
Attacks in WSNs
The data transmission services and network life both are solely dependent on routing protocols which makes them one of the most critical modules in the network. Usually the routing protocols are developed upon the assumption that sensing field is fully trustworthy and comfortable as far as the security is concerned. But this assumption does not come true in many situations. There are varieties of attacks that can be launched on a WSN. The most commonly discussed and launched attacks are Sybil, DoS, Sniffing, Tempering, Wormhole, Sinkhole, Black hole, Gray hole, and so on.25,26
As shown in Table 1, these attacks can be categorized into active and passive attacks. In active attacks, a malicious sensor node may actively request sensitive information, or it can remove or change the messages transmitted over the network. Also, the active mode of attacks involves the ability to disturb the overall operation of the network, such as DoS. Whereas in passive attacks, a node intends to eavesdrop the transmission. The node in passive attack does not modify the data or inject its own packets to the network. The detection of passive attacker is difficult as compared to active attack.
Types of attacks in WSN.
Also, in active attacks, malicious nodes may gather sensitive information or behave selfishly in collaborative operations, such as routing, to passively affect the proper operation of WSNs. Table 1 summarizes the different types of attacks, their nature, and behavior.
A WSN is always prone to various types of attacks that can be launched to interfere in the operation and steal or forge data, such as wormhole, sinkhole, and Sybil attacks. 27 The network once gained by the attacker may start malfunctioning in various ways which must be monitored and isolated after detection. 28
A design based on certificate-less signcryption for crowdsourced internet of things (IoT) based on the hyper elliptic curve is proposed by Ullah et al. 29 Similarly, Waheed et al. 30 proposed a new scheme namely known as N-PSC (new proxy signcryption) based on elliptic curve cryptography (ECC).
The sensor nodes once deployed mostly become vulnerable and inaccessible in hostile situation for the replacement of power source or other modules. Thus, in addition to securing data during routing, the nodes in such situation must also be able to prevent the wastage of energy in order to prolong the network life. The routing protocol must be able to select the optimum path for the routing of data to minimize the energy consumption. Thus, we have two objectives: energy efficiency and security of the data.
Most of the existing routing protocols can handle either energy efficiency or security of data at a time. Moreover, the security algorithms are mostly implemented as part of application layer causing additional cosmetics and overheads for processor, which at one side, although provides the security but consumes much more processing power at the other side. The routing protocol must balance the two objectives of energy and security by implementing the security algorithm at hardware level instead of its implementation at application level. To the best of our knowledge, such approach is not available in the literature.
Contribution
In this article, we propose a secure and energy-efficient scheme for routing data known as SEER, which not only provides end-to-end security of data but also strives to minimize energy consumption. The proposed scheme is designed to be implemented at hardware level to minimize the processing overhead and save battery power. We use GRACE routing protocol as a platform for the routing of data in an energy-efficient way. The simulation results show that the proposed security module is not only energy efficient but also provides a strong security against data interception attacks.
The proposed architecture introduces a low-complexity SEER mechanism by integrating A5 encryption scheme used for voice encryption in Global System for Mobile Communications (GSM). 31 In this article, we introduced a secure version of GRACE 32 routing protocol known as SEER. The proposed scheme is inherited from the voice encryption mechanism used in second-generation cellular mobile communication system, the GSM. The A5 algorithm is responsible for encrypting the voice data between the two parties. We implemented the A5 at hardware level which creates less computational burden over a sensor node. We embed the A5 algorithm in GRACE which is an energy-efficient routing protocol.
One of the beauties of A5 algorithm is that we can create a key for encryption of any length. Thus, the proposed scheme can support the data packet of 32, 64, and 128 bits. The proposed routing protocol can be implemented both at centralized as well as hierarchical sensor networks depending on the needs and requirements. Simulations are performed to validate the performance of the proposed algorithm in MATLAB (version 8.61). From the simulation results, we prove that the proposed scheme is not only secure enough to protect the data but also requires lesser processing and battery power as compared to notable existing data securing schemes. Also, the proposed scheme consumes lesser convergence time to become ready for exchange of data. Moreover, the scheme creates little message overhead resulting in negligible increase in the traffic of the network. In order to prove the efficiency, the performance of the proposed algorithm is compared with the two mentioned secure routing protocols that is., Gong et al. 33 and Alrajeh et al. 34 Second, we devised a mechanism to perturb the length of shift registers in variable number unlike GSM which uses only three fixed shift registers named as X, Y, and Z registers. We developed probabilistic models to prove the strength of the proposed mechanism. To the best of our knowledge, this novel work has never been done before.
Working of A5 algorithm used in GSM
As discussed earlier, the A5 encryption procedure is originally designed for second-generation GSM-based networks. This mechanism is responsible for the confidentiality of voice data between the parties. The subscriber identity module (SIM) contains the ciphering key-generating algorithm, the A8 algorithm. The A8 algorithm is used to calculate the 64-bit ciphering key
The MS is first authenticated through signed response using A3 algorithm.
After successful authentication, the following steps are carried out in order to incorporate voice encryption mechanism:
The MS receives a random number RAND from the BS as a challenge.
The MS generates a key known as Session Key
This session key is produced by using the A8 algorithm, the subscriber authentication key
The MS sends the session key
Meanwhile, the mobile services switching center also produces and sends its session key
The BS receives the session key
The BS verifies the session keys received from the MS and the mobile services switching center.
The voice encryption algorithm A5, as explained in Figure 2, is then initialized with the verification of the Session Key

Encryption and decryption of voice in GSM.
The A5 encryption scheme uses three shift registers in the processor: X, Y, and Z. The values assigned to these registers are as follow:
X: 19 bits (X0, X1, X2,…, X18) first 19 bits of
Y: 22 bits (Y0, Y1, Y2,…, Y21) next 22 bits loaded to register Y.
Z: 23 bits (Z0, Z1, Z2,…, Z22) last 23 bits loaded to register Z.
Figure 3 represent the execution of process inside a processor. After the bits are shifted to the respective registers, a majority rule is applied to elect the successor. For this purpose, bits from position X8, Y10, and Z10 are picked from X, Y, and Z registers, respectively. The majority rule picks two successors based on bit 1 or bit 0. The position having maximum numbers of 1s or 0s will become successor like in our example, the register X and register Z are the successors, as there are two 1s and one 0.

Bits perturbation process inside three shift registers.
In the next step, the two registers (X and Z) are stepped forward. In register X, the positions 13, 16, 17, and 18 are taken and XoRed with each other. The result is saved at least significant bit (LSB) by shifting the register values to right side.
Similarly, from the Z register, the bits from positions 7, 20, 21, and 22 are picked and XoRed with each other, saving the result at LSB.
The proposed SEER scheme
Data encryption algorithm for proposed SEER
SEER Algorithm
In order to implement the A5 encryption mechanism in WSN, we make necessary modifications in the existing encryption/decryption scheme implemented in GSM. Figure 4 depicts the block diagram of proposed scheme. The data security mechanism can then be used in both ad hoc network environments. In ad hoc mode, a sink is responsible to encrypt/decrypt the data sent by a source node. The step-by-step procedure of the proposed algorithm is given below:
The BS generates a 128-bit random challenge known as RAND.
RAND is forwarded to the sensor nodes as a challenge in order to authenticate it.
The sensor node starts to calculate the session key
The algorithm A8 and the key
The BS also starts to calculate the session key
The sensor node sends
The BS receives the
If both the
The data are sent encrypted over air interface.

Block diagram of data encryption/decryption in WSN.
Figure 5 illustrates a distributed network with hierarchical structure having Cluster Heads (CHs) along with the member sensor nodes. We assume that the CH to be a powerful node that may become a sink in case of a centralized network and are directly connected to gateway or BS. The malicious Nodes are assumed to be present in the network and they have the complete information of security mechanism of the network. The CH is responsible to convey encrypted data transmitted from low powered sensor nodes present in its vicinity to sink, gate way or BS. The CH sends the report of any malicious activity to the BS or any controlling entity if determined. Although only one BS is shown in figure but there could be as many BS as required by the network and environment. The deployment of nodes can be Arial or manual depending upon the nature of physical environment. Each sensor node is assigned an ID and the position of the sensor node is assumed to be known to it. We also assume that the sink or cluster head has all the necessary information about member sensor nodes, such as sensor ID, sensor MAC address, and the assigned authentication key

Hierarchical WSN.
Probability of interception
We derived the following probabilistic model in order to prove the strength of the proposed model against the interception attempts. The following parameters are focused:
Probability of random number generation of
The probability of splitting the key in to
The probability of selecting a random bit from each of these
The probability of perturbation process.
Let
We split the key
where
In order to distribute the key
where
Thus, the probability to split a key
The probability of selecting a random bit from each of these
where
where
Vulnerability level of interception of sessionkey (Kc ) when multiple registers are used
As discussed earlier, the proposed SEER algorithm use A5 algorithm for encryption. In this process, the session key (
The vulnerability level of interception of interception for the proposed scheme is given below
where
We derived a formula to produce the total number of possible odd combinations of registers after increasing the number of registers from three registers to a possible odd number, keeping the length of the session key
As we know that the total possible combinations depend on two factors, that is, number of distinct registers and length of the key. We represent the statement as
where
where as
where
Thus,
The total number of combinations of
Proof by example
Taking the simplest scenario. Suppose we have number of registers
The total numbers of bits in a session key (
By substituting the values we get
We get 6 × 256 = 1536.
Hence, the vulnerability level of interception of breaking 8-bit session key segregated in the three registers becomes
This example shows that by increasing the number of registers, the total number of combinations will also increase. This means that when bits’ combinations increase, the vulnerability level of intercepting the data decreases; or in other words, there will be less chances for the interceptor to get the session key. As far as the relationship of the vulnerability level of interception with the number of registers is concerned, by increasing the number of registers, the number of combinations of bits increases and the vulnerability level of interception decreases. In other words, with an increase in the number of combinations, the vulnerability level of interception decreases, and our data are more secure and protected.
Results and discussion
The performance of the proposed SEER mechanism is evaluated through different parameters, such as number of alive nodes, energy consumed by the sensor nodes, traffic overhead, packet delivery ratio and end-to-end delay. Extensive simulations have been carried out for the evaluation purpose using a simulation scenario of 500 nodes deployed randomly in 100 m × 100 m area. The simulation was run multiple times to obtain average results for the aforementioned parameters. The obtained results are then compared with the two notable secure routing protocols ETRAP and SRCE.
Figure 6 shows the lifetime comparison of SEER with SRCE and ETRAP. As discussed earlier, SRCE is an energy-harvesting protocol; thus, the nodes harvest energy from an external source during its operation. Therefore, the number of alive nodes of SRCE is greater than the SEER and ETRAP. However, the SEER still outperforms and stays longer even in extreme sensing environment. However, if SRCE is run without energy-harvesting module, its lifetime curve falls much faster than SEER and ETRAP as shown in the figure. Figures 6 and 7 depicts the energy consumed by each sensor node when SRCE runs without an energy-harvesting module. The total energy consumed by individual sensor node includes data packet formation, route selection, routing table, data security mechanisms, and data routing. However, more energy may be consumed in procedures specific to protocol.

Lifetime comparison of SEER with SRCE and ETRAP.

Lifetime comparison of SEER with SRCE and ETRAP without energy-harvesting module with SRCE.
Figure 8 represents a traffic overhead comparison of the three protocols. The comparison is done in terms of number of packets exchanged between nodes and the BS or gateway. These messages include control overheads, data packets, acknowledgments, and so on. The figure shows that ETRAP has a great traffic overhead as compared to SRCE and SEER. Both SRCE and SEER give almost similar result till the number nodes reach to 400 where the trend of the plot seems to be different. The plot shows a clear change when the number of nodes reaches to 450 where the similarity of SEER and SRCE performance begin to break.

Message exchanged at various number of nodes.
Figure 9 shows the packet delivery ratio in the presence of malicious nodes. The presence of malicious nodes deeply affects the performance of a network. This may lead the network to degrade its packet delivery. The figure shows a comparative analysis packet delivery ratio of SEER in comparison with ETRAP. This result has been taken in the presence of a variable number of compromised or malicious nodes. As we can see, that ETRAP has a very rapid fall in throughput with the number of increased malicious nodes. SEER and SRCE, however, provide a better result against the initial number of compromised nodes as can be seen in the result. There is a slight fall in both SEER and SRCE in the malicious nodes between 40 and 50, but SEER again provides a constant and satisfactory data rate as compared to SRCE.

Packet delivery ratio in presence of compromised nodes.
Figure 10 shows the end-to-end delay of data among the nodes. The delay is calculated as the time taken by the protocol to take a packet from source to destination. This delay also includes the time taken by the node to place a bit on the medium after being encrypted. It has been observed that the SEER has the lowest end-to-end delay among all. This is because, the GRACE by its self has a fast mechanism for selecting the most optimum route before transmitting the data and adds less overhead to it than other ETRAP and SRCE. Since the SEER is designed to work at hardware level, it adds comparatively less overhead resulting a minimum end-to-end delay.

End-to-end delay by each protocol.
Conclusion
In this article, we proposed a secure mechanism for routing protocol known as SEER protocol. The proposed protocol is based on A5 encryption scheme developed for GSM. SEER has been tested through simulations in MATLAB by setting up hostile and vulnerable WSN scenarios with respect to data integrity. The obtained results were than compared with other two notable secure routing protocols. We proved that the proposed SEER helps to achieve the desired performance under dynamically changing network conditions with various number of malicious nodes. Due to its liner complexity, lesser power consumption and more dynamic route updation, SEER can easily find its use in the emerging IoT systems.
