Abstract
Recently, several user authentication schemes for wireless sensor networks based on two-factor concept using the smart card technology were proposed. However, they have serious limitations in terms of security and usability. First, even though they are enhancements of other works, they still have several security flaws, such as vulnerability against parallel session, privileged-insider, and gateway-node bypassing attacks and lack of mutual authentication between user station and gateway node. On the other hand, they also present a usability constraint, in a sense that they do not consider the use case when sensor nodes cannot communicate with gateway node. In this case, data collected by isolated sensor nodes could not be accessed until they recover such communication, which is in many times not recoverable rapidly or forever (e.g., military applications, natural disaster monitoring). Due to all these reasons, this paper proposes a robust user authentication scheme which fixes the security weaknesses of previous solutions and provides wider usability considering the use case when the sensor nodes cannot communicate with the gateway node. Once the solution is described, its security is ensured by formal proof and analysis against attacks. Additionally, performance and cost analysis are executed to determine its level of feasibility for real implementation.
1. Introduction
With the growth of wireless sensor network (WSN) application fields, the frequency of WSNs managing critical tasks and important information has also increased. However, most of real applications do not include any security mechanisms making them vulnerable to serious attacks. This fact makes evident the necessity of security solutions for WSNs such as [1]. Among different security mechanisms, a user authentication mechanism that allows only legitimate users to access the WSN's data is considered one of the most important security mechanisms because it contributes to keeping the confidentiality and integrity of network's data and because it is an essential primitive upon which other security mechanisms such as secure channel establishment and over-the-air (OTA) programming [2] are built on.
At this point, several research works [3–7] have been executed for providing user authentication schemes for WSNs. Those proposals consider the resource limitations of WSNs and provide lightweight schemes. However, they have serious limitations in terms of security and usability. First, previous works have several security flaws such as vulnerability against parallel session, privileged-insider, and gateway-node bypassing attacks and lack of mutual authentication between user station and the gateway node. On the other hand, they also present a usability constraint, in a sense that they do not consider the case when sensor nodes cannot communicate with the gateway node; in this case, data collected by sensor nodes could not be accessed until they recover this communication, which is in many times not recoverable rapidly or forever. (e.g., military applications in war, natural disaster monitoring). Due to all these reasons, this paper proposes an enhanced user authentication scheme that solves the identified security issues and constraints.
The rest of this paper is organized as follows. Section 2 analyzes the existing works to detail their weaknesses and limitations in terms of security and usability. Section 3 then specifies the design criteria of the proposed user authentication scheme. Later, Section 4 presents the details of the proposed solution which solves the vulnerabilities and limitations mentioned in Section 2. Next, Section 5 analyzes the proposed protocol in terms of achieved security level, performance, and cost. Finally, Section 6 details the conclusions of this paper.
2. Analysis of Existing Works
Lately, user authentication for wireless sensor networks based on smart cards has been actively researched. The two-factor authentication approach which requires the verification of ownership of both a password and a smart card achieves effectively the purpose of authentic delivery of sensed data while minimizing the load of storing user data in the gateway node. This is because the tamper-proof smart card of the user delivers the function of secure storage of authentication data instead of the gateway node.
In 2009, Das [3] presented a research work where The author proposed an authentication scheme based on the two-factor user authentication concept using the smart card technology. Das' proposal was considered as an efficient two-factor user authentication scheme because it only required the usage of small number of hash function calculations [4]. However, even though Das' proposal was adopted by different research works, its limitations and security flaws were discovered in subsequent works. Nyang and Lee [4] identified that Das' protocol was vulnerable to offline password guessing and sensor node compromising attacks. Huang et al. [5] also identified some limitations of Das' scheme such as vulnerability from impersonate attack. Additionally, the authors of [6] pointed out the absence of mutual authentication feature in Das' protocol while Khan and Alghathbar [7] pointed out additional security flaws of Das' proposal, describing that it was vulnerable to privileged-insider and gateway-node bypassing attacks.
Once they discovered different vulnerabilities and security limitations of Das' proposal, the authors of [3–6] also proposed enhanced versions of Das' protocol to eliminate detected vulnerabilities. However, as shown in our previous work [8], those protocols still include serious vulnerabilities and security limitations of which an attacker can take advantage, exposing WSNs to serious risks. Table 1 summarizes the security analysis of [8] showing that the protocols in [3–7] are still vulnerable to different attacks and have several security limitations.
Summary of cryptanalysis of previous works based on smart cards.
In addition, all of the aforementioned approaches only focus their analysis on the security and performance aspects, and neglect the usability aspect. From this point of view, we can say that the previous user authentication schemes also present a serious usability constraint because they do not consider the case when important sensor nodes are isolated. Isolation of sensor nodes could occur because of network link failures between the gateway node and sensor nodes (see Figure 1) or because of disconnections between critical routing sensor nodes (see Figure 2). Sensor nodes isolation is considered problematic for several reasons. First, the isolated sensor nodes frequently store critical information which requires to be transmitted opportunely to the user for decision making. However, using the previous user authentication mechanisms, users could not authenticate to the isolated sensor nodes until sensor nodes recover the communication with the gateway node, which is in many times not recoverable rapidly or forever. Additionally, if the link between the gateway node and isolated sensor nodes is not reestablished rapidly, historical data of those nodes could be eliminated because of their limited storage memory capacity. In this regard, this situation demands for a new user authentication scheme with an offline user authentication mechanism which allows users to authenticate directly to isolated sensor nodes for getting the critical information in an opportune way.

Sensor nodes isolated because of broken link between gateway and sensor nodes.

Sensor nodes isolated because of broken link between sensor nodes.
Even though many people may think sensor node isolations are not common, they are common in particular applications. Here we describe some applications where sensor nodes could be isolated and why offline user authentication (mobile user station authenticating directly to the sensor node) is important. First, let us consider a volcano monitoring sensor network [9] gathering seismic and infrasonic signals. In such systems, there are several events that could provoke sensor nodes' isolation. One of the possibilities is when an explosion occurs in a side vent (see Figure 3); in such case, the sensor nodes located in the superior region of the side vent can lose the connection with the inferior region because the sensor nodes nearby the side vent are destroyed or buried. Another case is when critical routing sensor nodes are buried or damaged because of lahars or seismic activities. Data of Tungurahua volcano in Ecuador (see Figure 4) published by Instituto Geofísico de la Escuela Politécnica Nacional (http://www.igepn.edu.ec/) illustrates how frequent this situation could occur in an active volcano. The report indicates that 29 lahars and 8400 long-period seismic events were detected only in 2004. In those cases, it is frequent that the isolated nodes store important data that could help to forecast the future behavior of the volcano. Therefore, it is important to provide a mechanism that allows a rapid and opportune access to such information while maintaining the confidentiality and integrity features.

Sensor nodes isolated because of side vent explosion of a volcano.

Statistical data of Tungurahua volcano in 2004.
Another type of applications where critical sensor nodes could be isolated is the military one. Consider that a battlefield application has lost some intermediate nodes because they have been destroyed by the enemy, but the nodes deployed in the enemy's territory have accumulated important data. In this case, an automaton user station could be sent to the enemy's territory to gather such information. An easy way to authenticate to the sensor nodes is that the automaton carries the secret keys. However, carrying the secret keys in hostile environment opens wide possibilities of leakage of the secret values which could compromise the security of the whole network. Therefore, the user authentication scheme must provide a way to maintain the security of the sensor network even if the automaton is taken by the adversary.
In conclusion, as described previously, previous works present several limitations in terms of security and usability, and this situation creates the need for designing an enhanced user authentication scheme which overcomes such constraints.
3. User Authentication Scheme Design Criteria
We believe that several limitations of previous works were produced because of the absence of a concrete and clear requirement elicitation process. To avoid falling into the same mistake, this paper has decided to describe the design criteria of the proposed user authentication scheme.
3.1. General Considerations and Assumptions
The proposed user authentication scheme must be able to be implemented in a scenario with the following considerations and assumptions.
The network is composed of traditional elements, that is, sensor nodes, gateway node(s), and user station with time synchronization. The network has at least one gateway node which has a stable link with the user station. The network implements a routing protocol which provides the path between sensor nodes and gateway node(s). The hierarchies of sensor nodes and the topology of the network are taken care of by the routing protocol. Each sensor node can store a set of predefined data.
3.2. Security Requirements
The most important aspect of the proposed user authentication scheme is its security. Therefore, it is vital to precisely define the security requirements that the proposed scheme must satisfy. This section defines the threat model and then describes the list of security requirements considered in this paper.
3.2.1. Threat Model
In the analysis of the proposed protocol, the widely used Doley and Yao [10] threat model will be used, which assumes that two communicating parties communicate over an insecure channel. This means that the attacker is able to eavesdrop and manipulate the messages sent over the air. In other words, the attacker can read, modify, and delay the messages sent by the different entities that participate in WSNs. Additionally, it is assumed that the attacker may know the algorithm of the security mechanisms that are deployed in the network. The main aim of the attacker is the falsification of an authentication. It is assumed that the attacker aims for a forgery in the proposed message exchange scenario where a user authenticates to the sensor network. The attack is considered successful if the sensor network (whether sensor node or gateway node) accepts a fake message that was not sent by an authentic user or if the user accepts messages coming from a fake sensor node or gateway node. All kinds of nonauthentic messages such as random new messages, replayed messages, and modified messages sent by the attacker are considered as fake messages.
This paper only takes care of the user authentication problem; other security issues of other layers of the protocol are taken care of by security solutions of other levels. In addition, it is assumed that gateway node(s) is managed by a trusted infrastructure. Therefore, the gateway node(s) is considered as secure and its security is not considered as part of this work. Additionally, not every aspect of physical attacks is considered in this paper; however, the unauthorized extraction of the secret values of a sensor node or smart card using techniques such as shown in [11–13] must not have effect on the security of the rest of nodes and users.
3.2.2. Basic Requirements
Data Confidentiality. Data confidentiality is the most important issue in network security. The proposed security solution must provide concealment of private information making it infeasible for an unauthorized user to understand the confidential data.
Data Integrity. With the implementation of confidentiality, an adversary may be unable to read the information. However, this does not mean the data is safe. The adversary can change the data to produce disorder in the sensor network. Therefore, it is important that different entities of the network can detect modification of messages transmitted over the network.
Data Freshness. Even if confidentiality and data integrity are assured, it is necessary to ensure the freshness of each message. Data freshness suggests that the data is recent and it ensures that no old messages have been replayed.
3.2.3. Attack List
There are several attacks that have been considered common in user authentication for WSNs such as privileged-insider, stolen-verifier, replay, parallel session, guessing, brute force, impersonation, and gateway-node bypassing attacks [3–7]. The proposed solution must also demonstrate its security against such attacks.
3.2.4. Other Security Requirements
Mutual Authentication. Some of previous works [4, 7] provide mutual authentication between the gateway node and sensor nodes but do not provide mutual authentication between user and gateway node. This situation can compromise the security of the whole network because newer sensor network implementations offer remote administration/query features in their gateway nodes [14, 15], allowing users to access to network's data from a remote terminal. In this kind of environment, it is really important to authenticate the validity of the gateway node from the user's side to avoid adversaries collecting valuable data using fake gateway nodes.
Secure Registration, Authentication, and Password Change Processes. It is important to remember that the proposed user authentication mechanism must offer user registration, authentication, and password change processes and they must be executed in a secure manner.
Session Key Establishment. After authentication, the scheme must provide a simple session key establishment algorithm to provide a secure channel between entities after authentication.
3.3. Performance Requirements
WSNs own special characteristics which must also be considered in the designing of the security mechanisms. The most important resource constraints of WSN are the resource related ones [16], namely, limited storage space, limited computation power, and low energy capacity. Since the use of security algorithms reduces the lifetime of nodes, it is critical that the user authentication algorithm uses low quantity of energy. The aspects to be considered as performance requirements are as follows.
Type of Cryptographic Algorithm. Traditionally, there are two different types of cryptography algorithms, namely, public-key cryptography and symmetric-key cryptography. The first one has the characteristic of using two separate keys: one to encrypt the plaintext and another to decrypt the ciphertext. The most representative algorithms in public-key cryptography are Rivest-Shamir-Adleman ((RSA) the creators of the algorithm) and elliptic curve cryptography (ECC). On the other hand, the symmetric-key cryptography uses a common key for encryption and decryption which is shared among the communicating parties. One of the most representative algorithms of symmetric-key cryptography is advanced encryption standard (AES). Additionally, there is another type of encryption/decryption mechanism based on hash functions and exclusive-or operations which is considered as part of symmetric-key cryptography because it uses a common key between the communicating entities. One of the most representative hash functions used in such mechanisms is the secure hash algorithm (SHA). The importance of selecting a correct cryptographic algorithm lies in its complexity. A different Different cryptographic algorithms mean different complexities which is reflected in the required computation power and energy usage. This issue is very important because the common sensor nodes have very limited computation power and energy capacity. Several research works [17–20] have applied the asymmetric-key algorithms in WSNs. The results of such works reveal that despite the use of energy efficient techniques, such as ECC or dedicated cryptography coprocessors, asymmetric-key algorithms consume more energy than symmetric-key algorithms. For this reason, many researchers believe that the processing time and power consumption make it undesirable for public key algorithm techniques to be employed in sensor networks. Based on this criterion, the public cryptography was discarded for the proposed solution.
On the other hand, between the traditional symmetric key cryptography and encryption using hash functions, this paper has considered to use the last one because of its benefits in terms of energy usage as shown in previous works such as [21, 22]. In case of [21], the authors explain how AES-128 consumes more than double of SHA-1 function showing that the last one consumes around 154 μJ while AES-128 consumes 339 μJ on CrossBow nodes. The work described in [22] shows how for payloads of 17 bytes or above SHA-1 requires considerably less iterations than AES and therefore a shorter running time and less energy. In another earlier publication [16], the authors estimated that the energy per bit consumed by MIPS R4400 and MC68328 “DragonBall” processors for performing AES encryption/decryption operations is 9 nJ/bit and 101 nJ/bit, respectively, while for SHA-1 hashing function, the same processors consume 7.2 nJ/bit and 41 nJ/bit, respectively.
Number of Cryptographic Operations. The number of cryptographic operations used in sensor nodes must be minimal to extend their lifetime. The number of cryptographic operations executed by the user station and gateway node is not considered as important because they own superior resource capacities (i.e., computation power, storage, and energy capacity).
Number of Messages. One of main the operations that consume more energy is the transmission of messages. Therefore, the number of messages sent by sensor nodes must also be minimal to reduce their energy spent in wireless communication.
Energy Consumption Analysis. Energy consumption analysis using realistic data sizes will help to understand the effects of the proposed user authentication scheme over WSN.
3.4. Usability Requirements
The proposed scheme must also consider the different use cases of the authentication process according to the state of the network to offer extensive usability. This paper considers two specific use cases.
3.4.1. Online User Authentication
Online user authentication refers to the user authentication process executed when the sensor node has network connection with the gateway node (see Figure 5). This is considered the most traditional because sensor nodes are commonly monitored from the fixed network infrastructure installed in a safe place which includes the gateway node.

Online user authentication.
3.4.2. Offline or Gateway-Less User Authentication
This case is when the user authenticates directly to the sensor node because the network connection between the sensor node and gateway node cannot be established. In this case, the user must approach to the sensor node to authenticate with it but without the authorization of the gateway node (see Figure 6).

Offline or gateway-less user authentication.
Important. Although this use case is very important for different types of WSNs such as military operation and natural disaster monitoring applications (as explained in Section 2), none of the previous works have considered this use case.
4. Proposed User Authentication Scheme
The proposed solution is composed of three protocols: user registration, user authentication, and password change protocols which are executed among three independent entities, that is, users, gateway node, and sensor nodes.
4.1. User Registration Protocol
The user registration protocol is executed when new user needs to be authorized to access the sensor network. The steps executed in this protocol are as follows (see Figure 7 and Table 2). A user
Notations of the proposed scheme.

Proposed user registration protocol.
On the other hand, a unique secret key
The proposed user registration protocol includes several enhancements compared to the previous solutions. First, each smart card and sensor node includes unique secret values:
4.2. User Authentication Protocol
This protocol is performed when
4.2.1. Online User Authentication Protocol
This subsection describes the authentication protocol when the sensor node is connected to the gateway node (see Figure 5). In this case, the gateway node works as a verifier to validate the authenticity of the user and sensor node. The steps executed in this protocol are as follows (see Figure 8 and Table 2).

Proposed online user authentication protocol.
Authentication Phase.
Session Key Establishment Phase. A session key between
Note. Although the process of the online user authentication protocol is similar to that proposed by the existing works, it includes several enhancements. First, it delivers mutual authentication among all entities (
4.2.2. Offline or Gateway-Less User Authentication Protocol
In this use case,
The offline or gateway-less user authentication protocol is composed of two subprotocols, namely, permit issue and User Authentication. The first one allows
(A) Permit Issue Subprotocol. After receiving the smart card from

Proposed offline permit issue subprotocol.
Note. The permit can be obtained (1) immediately after receiving the smart card as well as (2) when the need arises. The criterion for checking the validity of
(B) User Authentication Subprotocol. Once the Permit received,

Proposed offline user authentication subprotocol.
Authentication Phase. Once the
Session Key Establishment. A session key between
4.3. Password Change Protocol
One of the requirements of a secure protocol is the delivery of a mechanism to users so that they can freely change their passwords. The proposed scheme provides a simple and efficient password change protocol which does not require communication with the gateway node. The proposed password change protocol is executed as follows (see Figure 11 and Table 2).

Proposed password change protocol.
4.4. Implementation Issue
This paper does not consider the details related to the real implementation of the proposed scheme. However, we would like to share several ideas required on implementing the proposed scheme. First, the user interface of the application to be installed in the user station (
5. Analysis of the Proposed Scheme
5.1. Security Analysis
This part analyzes the security of the proposed scheme in terms of formal verification and analysis of security requirements described in Section 3. The registration and password change protocols of the proposed scheme are excluded from this analysis because they are executed in a secure environment. In the analysis of the user authentication protocol, the threat model discussed in Section 3 is applied.
5.1.1. Formal Proof Based on BAN Logic
(A) Notations and Rules of BAN Logic. This subsection demonstrates the security of the proposed scheme by a well-known formal model called BAN logic [23, 24]. BAN logic has been widely used in different works such as [25–27] to reason about their security validation. The logical notations of BAN logic used in this paper are as described in Table 3. This section also lists some main logical postulates to be used in proofs.
Notations of BAN logic.
Message-Meaning Rule. If the principal P believes that the secret key is shared with the principal Q and P sees that the statement X is encrypted or combined (hashed) under K then the principal P believes that the principal Q once said the statement X:
(B) Formal Proof. In the following, it shows the security proof of the authentication protocol using the BAN logic.
(1) Formal Proof of Online User Authentication. This part presents the formal proof of the online user authentication protocol, when sensor nodes have active communication link with the gateway node.
In this case, the protocol must satisfy the following goals:
First, messages of the protocol are transformed to the idealized form as shown below:
Second, assumptions about the initial state of the protocol are defined. Those assumptions are listed below:
Finally, the proof steps to the idealized form of the proposed protocol are performed based on BAN logic rules and assumptions. The proof steps are as in Table 21.
The proposed goals were reached by
(2) Formal Proof of Offline or Gateway-Less User Authentication
(a) Permit Issue Subprotocol. In the following, there is the security proof of the proposed permit issue sub-protocol. In this sub-protocol, goals to be reached are as follows:
First, messages of the protocol are transformed to the idealized form as shown below:
Second, the following assumptions are made about the initial state of the sub-protocol to analyze the proposed scheme:
Finally, proof steps to the idealized form of the proposed sub-protocol are performed based on the BAN logic rules and the assumptions as in Table 22.
The proposed goals were reached by
(b) User Authentication Subprotocol. In the following, there is the security proof of the proposed user authentication sub-protocol using the BAN logic. The sub-protocol will satisfy the following goals:
First, here is the transformation of protocol's messages to the idealized form:
Second, the following assumptions are made about the initial state of the scheme to analyze the proposed scheme:
Finally, the proof steps to the idealized form of the proposed sub-protocol are performed based on the BAN logic rules and the assumptions as in Table 23.
The proposed goals were reached by
5.1.2. Security Verification
This subsection analyzes the security of the proposed solution from the point of view of basic security requirements mentioned in Section 3. This section also analyzes how the proposed solution is secure against possible attacks. As mentioned previously, the paper assumes that the communication channels used in user authentication are insecure and that there exists an attacker who can intercept all messages exchanged among
(A) Security Analysis of Basic Requirements
Confidentiality. Confidentiality of messages is guaranteed by usage of secret values. Communication between
Integrity. Integrity of messages transmitted during the authentication process is guaranteed by verification in each step of protocols. In each verification step, entities, that is,
Freshness. In network security protocols, the freshness and uniqueness of messages allow the provision of a strong defense against replay attacks. These two properties are reachable by using a time variant parameter inside messages, such as random numbers, sequence numbers, and timestamps, being most common the usage of random numbers (nonces) and timestamps. This work has used the timestamp method because it is always more efficient in terms of number of communication rounds compared to the nonce-based counterpart [28].
(B) Security Verification from Possible Attacks
Privileged-Insider Attack. In the proposed solution,
Stolen-Verifier Attack. One of the features of the proposed protocol is the absence of a password/verifier table in GW and
Replay Attack. Timestamps are used to avoid replay attacks. In each message, a different timestamp is used to guarantee its freshness.
Parallel Session Attack. In previous works, the attacker can obtain a valid authentication request message for the next timestamp because they use the XOR operation in a vulnerable way (see reference [8] for more details). In the proposed protocol, we have eliminated the possibility of parallel session attack by sending hash values instead of values resulting from XOR operations. Therefore, even though another legal user of the system eavesdrops on
Guessing Attack. In the proposed scheme, secret values are never sent in plaintext but encrypted by a one-way hash function or symmetric cryptography algorithm. Therefore, even when the adversary got
Gateway-Node Bypassing Attack. The reason for the possibility of a GW bypassing attack in [3, 6] is due to the sharing of secret parameter
In the proposed protocol,
User Impersonation. An adversary who wants to impersonate a valid user
Gateway-Node Impersonation. An adversary who wants to impersonate a valid GW must calculate a valid
Sensor Node Impersonation. An adversary who wants to impersonate a valid
Many Logged-In Users with the Same Login-ID. By using two-factor based authentication, the proposed scheme offers higher protection than only password-based schemes. Assuming that the
Brute-Force Attack. An attacker can try two kinds of brute-force attacks. (1) First, the attacker can attempt to authenticate by sending random or sequential messages
(C) Security Verification of Other Security Requirements
Mutual Authentication. The proposed protocol provides both mutual authentication between Online User Authentication. (1) The mutual authentication between Offline or Gateway-Less User Authentication/Permit Issue Subprotocol. The mutual authentication between Offline or Gateway-Less User Authentication/User Authentication Subprotocol. The mutual Authentication between
Password Change Phase. Our proposal offers a lightweight password change phase that does not require communication with GW, making it secure and efficient.
Session Key Establishment. Our proposal offers a simple and practical method for session key establishment among
(D) Summary of Security Features of the Proposed Solution. Table 4 shows the comparison of security features among different works. This demonstrates how our scheme is stronger in terms of security. Our approach provides protection against different kinds of attacks (privileged-insider attack, gateway-node bypassing attack), also provides a secure password change phase and session key establishment, and achieves complete mutual authentication (mutual authentication between GW and
List of enhanced security features of the proposed scheme.
5.2. Performance and Cost Analysis
5.2.1. Cryptographic Operations
Table 5 indicates the number of cryptographic operations required in each protocol per entity for online user authentication. It shows that our protocol requires a few more operations in the verification phase than some previous works. However, the majority of additional operations are executed by
Number of cryptographic operations in online user authentication.
h: hash, se: symmetric encryption, and sd: symmetric decryption.
Number of cryptographic operations in offline user authentication.
h: hash, se: symmetric encryption, and sd: symmetric decryption.
5.2.2. Number of Messages
Analyzing the number of messages transmitted and received by sensor nodes is considered important because it affects the energy consumption of those devices. This paper only focuses on the protocols where the resource limited sensor nodes participate in (i.e., online and offline user authentication protocols). Table 7 shows the number of transmissions and receptions executed by different entities in online user authentication protocols in different proposals. It illustrates how the proposed protocol maintains equal or less number of messages than previous works to show its competitiveness.
Number of transmissions and receptions in online user authentication.
Tx: transmission; Rx: reception.
Going into details of Table 7, the present work also presents the content of messages transmitted and received by different entities and their sizes in each solution (see Tables 8, 9, 10, 11, 12, and 13). This work has considered that the size of the different data inside of messages, such as user identification, timestamps, hash values, and login confirmation messages, is equal because the intention of this part is to analyze the number of data units in each protocol (analysis using more realistic data sizes is executed in Section 5.2.3). As you can see in Tables 8–13, the most lightweight solutions in terms of messages sizes in sensor nodes are those proposed by Das, Huang et al., and Chen-Shih. However, messages sizes in those protocols are reduced because they omit steps required to provide mutual authentication between the gateway-node and sensor nodes opening serious vulnerabilities. Therefore, even though they offer less communication, they cannot be considered as optimal solutions. On the other hand, Table 9 shows how Nyang-Lee's proposal has the highest communication overhead requiring 4 data units for transmission and 4 data units for reception in sensor nodes. Finally, Alghathbar's proposal and the proposed solution have the same communication overhead in sensor nodes with 2 data units in transmission and 3 data units in reception.
Details of communication messages of Das' proposal [3].
Details of communication messages of Nyang-Lee's proposal [4].
Details of communication messages of Huang et al.'s proposal [5].
Details of communication messages of Chen-Shih's proposal [6].
Details of communication messages of Khan-Alghathbar's proposal [7].
Details of communication messages of the proposed scheme (online user authentication).
On the other hand, Table 14 shows the number of messages in offline user authentication. In this protocol, only one message exchange between
Details of communication messages of the proposed scheme (offline user authentication).
5.2.3. Energy Consumption
One of the most sensible limitations in sensor nodes is their energy capacity. Therefore, it is important to analyze the energy consumption in those devices. The energy consumptions of user station and gateway node have not been analyzed because they do not suffer from this aspect. Following the fact that the battery power of a sensor node is depleted by computational processing and radio consumption [30], this paper has calculated the energy consumption overhead caused by (1) cryptographic operations and (2) radio communications in executing the proposed security mechanism.
(A) Energy Consumption Overhead of Cryptographic Operations. First, for the calculation of energy used by cryptographic operations, this paper has used the energy consumption estimates indicated in [16]. In [16], the authors estimated that the energy per bit consumed by MIPS R4400 and MC68328 “DragonBall” processors for performing AES encryption/decryption operations is 9 nJ/bit and 101 nJ/bit, respectively, while for the SHA-1 hashing function the same processors consume 7.2 nJ/bit and 41 nJ/bit, respectively. Additionally, this work has assumed that the size of random numbers is 160 bits, the sizes of timestamps, identifications (ID of users, gateway node, and sensor nodes), and Login OK messages are 64 bits each, and the sizes of secret values such as
Energy consumption of cryptographic operations executing different online user authentication protocols.
On the other hand, this work also has calculated the energy consumption of sensor nodes in executing cryptographic operations during the offline user authentication sub-protocol (see Table 16). It shows how this approach consumes 0.001152 and 0.00656 mJ more than the online user authentication using MIPS R4000 and MC68328 processors, respectively. However, we believe that it is not an impediment for real implementation because offline user authentication is not executed all the time but only in extraordinary situations where online user authentication cannot cover.
Energy consumption of cryptographic operations executing the proposed offline user authentication sub-protocol.
(B) Energy Consumption Overhead of Radio Communication. For the calculation of energy consumption of radio communication produced by the proposed protocols, the present work has assumed a simple model where the radio dissipates
Radio communication parameters.
Table 18 indicates the energy used by a sensor node in executing the online user authentication in different schemes. Here we show an example of how such values were calculated. In the proposed online authentication protocol, the message
Energy consumption of radio communication in different protocols.
On the other hand, the offline user authentication sub-protocol only consumes 0.0032 mJ more than the proposed online user authentication protocol. We believe that this difference is acceptable considering the extraordinary situation when the offline user authentication is used.
(C) Total Energy Consumption Overhead. The total energy consumption overhead in sensor nodes can be calculated adding the energy consumption of cryptographic operations and radio communication. Table 19 shows the total energy consumption overhead of different schemes. It shows that the proposed solution consumes 0.008122, 0.008582, and 0.008122 mJ more than M. Das's, Huang et al.'s, and Chen-Shih's schemes, respectively, and consumes 0.03816 and 0.00595 mJ less than Nyang-Lee's and Khan-Alghathbar's schemes, respectively, when using the MIPS R4400 processor. It also illustrates how the proposed solution consumes 0.00386 mJ less than the average energy consumption of the rest of approaches, which means it has competitive energy consumption compared to the rest of solutions. Similar conclusion can be reached with the energy consumption of schemes when using the MC68328 microprocessor. It is important to say that the additional energy overhead from other works is justifiable considering that our scheme includes security features that previous works do not offer, which is indispensable for implementing a reliable and trustworthy network.
Total energy consumption overhead of authenticating sensor nodes executing different online user authentication protocols.
On the other hand, Table 20 shows the total energy consumption of authenticating sensor nodes executing the proposed offline user authentication sub-protocol. It shows that this approach consumes 0.004352 and 0.00976 mJ more than the online user authentication using MIPS R4000 and MC68328 processors, respectively. However, we believe that it is not an impediment for real implementation because offline user authentication is not executed all the time but only in extraordinary situations where online user authentication cannot cover.
Total energy consumption overhead of authenticating sensor nodes executing the proposed offline user authentication sub-protocol.
(D) Effect of Energy Consumption Overhead in the Wireless Sensor Network. Although there are differences among the energy consumption in different schemes, as they are small, it could not be neglected. Therefore, this paper has analyzed how much the energy consumption overhead of the proposed solution affects the lifetime of the sensor network. According to [16], one of the most common typical batteries in sensor nodes is the MN1500 Duracell AA with energy potential of 15.39 kJ. Based on this data, this work calculates how long a sensor node can survive executing the proposed user authentication scheme. In this simulation, we assume that the user authentication can use from 1% to 5% of the total energy while the rest of energy is used by other functionalities of the sensor node, such as path maintenance, data gathering, and data transmission.
Knowing that common sensor network applications are not dedicated for a massive user access yet, this work assumes that it is acceptable to use the average of one user authentication per minute as parameter. However, to understand how the proposed user authentication can act from higher demand, the present paper also considers the case when the average number of user authentication per minute is five. Figure 12 shows the number of months a sensor node with MIPS R4000 microprocessor can survive when executing 1 and 5 online user authentications per minute assuming that 1% to 5% of the total energy of the battery is dedicated for user authentication. It shows that a sensor node can survive from 20.2 to 100.8 months depending on the number of authentications (1 and 5 per minute) using only 1% of the total energy of the sensor node. The same figure also indicates that the sensor node can survive up to 503.9 months using 5% of the total energy.

Number of months that a sensor node can survive executing the proposed online user authentication protocol using the MIPS R4000 microprocessor.
Figure 13 also shows the number of months a sensor node can survive executing 1 and 5 online user authentications per minute using 1% to 5% of the total energy and using the MC68328 microprocessor. It shows that a sensor node can survive from 13.0 to 65 months depending on the number of authentications per minute using only 1% of the total energy of the sensor node. The same figure also indicates that the sensor node can survive up to 325 months using 5% of the total energy.

Number of months that a sensor node can survive executing the proposed online user authentication protocol using the MC68328 microprocessor.
Note. If high demand of user authentication (number of authentication request per minute) in online user authentication protocol was required, the following solution could be provided. It is possible to establish a predefined session period to maintain the authentication session between the gateway node and sensor node. So, if another user requests for authentication for such node, the authentication can be executed only between the
Figures 14 and 15 show the number of months for which a sensor node with MIPS R4000 and MC68328 microprocessor can survive when executing 1 and 5 offline user authentications per minute assuming that 1% to 5% of the total energy of the battery is dedicated for user authentication. It shows that the survival period of a sensor node (from 11 to 448.7 months) depends on the microprocessor, number of authentication per minute, and percentage of total energy dedicated for user authentication. Once again, we believe this durability is consistent for real implementation because offline user authentication is not executed all the time but only in extraordinary situations where online user authentication cannot cover.

Number of months that a sensor node can survive executing the proposed offline user authentication sub-protocol using the MIPS R4000 microprocessor.

Number of months that a sensor node can survive executing the proposed offline user authentication sub-protocol using the MC68328 microprocessor.
6. Conclusion
With the increase of different types of sensor network implementations such as medical, ecology, and military operation applications, there have been many proposals which tried to give secure user authentication schemes for them. However, even though they deliver important advance in this area, they still incorporate serious vulnerabilities and limitations. In those circumstances, this paper proposes a user authentication mechanism which considers the security, performance, and usability factors. The security is guaranteed by an intensive analysis in terms of formal verification and analysis of possible attacks. The optimization of performance is achieved by using lightweight cryptography and in most of cases, only hash functions and XOR operations; additionally, the number of messages is reduced by using timestamps instead of challenge response of random nonces. Finally, the usability requirements are satisfied by considering both the online and offline user authentication use cases, the feature which was not considered in previous works.
In summary, this paper analyzes previous user authentication mechanisms for wireless sensor networks and identifies their vulnerabilities and limitations and proposes a robust user authentication for wireless sensor networks that eliminates the identified security flaws and limitations. The proposed solution takes advantage of the two-factor authentication concept to provide a secure authentication system offering balanced features in terms of security, performance, and usability.
Footnotes
Acknowledgment
This work was supported by the Sogang University Research Grant of 2011 (no. 201110026).
