An Enhanced Three-Factor User Authentication Scheme Using Elliptic Curve Cryptosystem for Wireless Sensor Networks

As an essential part of Internet of Things (IoT), wireless sensor networks (WSNs) have touched every aspect of our lives, such as health monitoring, environmental monitoring and traffic monitoring. However, due to its openness, wireless sensor networks are vulnerable to various security threats. User authentication, as the first fundamental step to protect systems from various attacks, has attracted much attention. Numerous user authentication protocols armed with formal proof are springing up. Recently, two biometric-based schemes were proposed with confidence to be resistant to the known attacks including offline dictionary attack, impersonation attack and so on. However, after a scrutinization of these two schemes, we found them not secure enough as claimed, and then demonstrated that these schemes suffer from various attacks, such as offline dictionary attack, impersonation attack, no user anonymity, no forward secrecy, etc. Furthermore, we proposed an enhanced scheme to overcome the identified weaknesses, and proved its security via Burrows–Abadi–Needham (BAN) logic and the heuristic analysis. Finally, we compared our scheme with other related schemes, and the results showed the superiority of our scheme.


Introduction
With its strong self-organization, low-cost, resource-limited and data-centered, wireless sensor networks (WSNs) have been widely deployed in harsh environments such as military, industrial, transportation and even battlefields. Different to some systems such as the distributed architectures [1,2], there are three participants in WSNs. Each participant has different computational and storage power, and only the gateway can store the long-term key. Furthermore, most sensor nodes are distributed in an unattended environment, which means the sensor node is prone to be attacked. It also should be noted that the communications between users and sensor nodes are usually in an open channel, and the adversary can eavesdrop on or modify messages in the network. Therefore, the privacy and security of WSNs are always the thorny and vital issues. To deal with these security issues, it is a common practice to establish a security mechanism to share secret key between communicating parties and encrypt the date from remote parities. In this context, the remote user authentication protocol [3][4][5][6][7] with a session key is an essential security strategy for a secure and practical communication over an untrusted but complicated network. It guarantees that the communicating parties can verify the validity of each other and negotiate a session key for encrypting the future transmitted messages. The major challenge in designing an authentication protocol in WSNs is to balance the relationship between security, privacy and computational cost.
Generally, we authenticate a remote user from three aspects: what he knows, such as password; what he owns, such as a smart card; who he is, such as biometrics. A scheme using "X" aspects to verify the remote user is called "X-factor" authentication protocol. With the development of biotechnology and the increasing demands on security, three-factor (password + smart card + biometrics) user authentication scheme gets widely applied.

Related Works
In 2009, Das [8] introduced a password-based scheme with a smart card for WSNs; it then aroused an intense discussion and greatly promoted the development of user authentication in WSNs. Many researchers [4,[9][10][11] identified the security pitfalls in Das's scheme [8] (such as being prone to offline password guessing attack, impersonation attack and insider attack), and then proposed many enhanced versions. However, none of these schemes was secure enough to resist against various attacks or achieved low computational cost.
In 2011, Fan et al. [12] criticized the weakness of previous schemes and designed a new scheme with lightweight operations. With lower computational cost, their scheme seems quite suitable for a resources-limited environment such as WSNs. In 2012, Das et al. [13] proposed a new scheme which supports the dynamical addition of new nodes and only involves some lightweight operations. It has to be admitted that Das et al.'s scheme provides many desired attributes. Unfortunately, Wang et al. [14] identified that the two schemes both are vulnerable to many attacks: Fan et al.'s scheme [12] can neither achieve user anonymity, nor avoid smart card lost attack and insider attack, etc.; Das et al.'s scheme cannot resist against insider attack, smart card lost attack, etc.
In 2013, Xue et al. [15] introduced an efficient authentication scheme with admirable features and lightweight computational cost. However, it was revealed by Wang et al. [3] that this scheme fails to achieve user anonymity. Furthermore, Li et al. [16] demonstrated its vulnerability to offline dictionary attack, insider attack, stolen-verifier attack, etc., and proposed a new scheme which is still insecure against offline dictionary attack. In the same year, Li et al. [17] identified the weakness (not resistant to dictionary attack and session key disclosure attack, etc.) in Yeh et al.'s scheme [18].
In 2014, Choi et al. [19] showed that a previous scheme [20] suffers from sensor energy exhausting attack, offline password guessing attack and the session key attack, and then proposed a new scheme. After demonstrating the security flaws in Xue et al.'s scheme [15], Jiang et al. [21] also designed an improved one. However, both the scheme of Choi et al. [19] and Jiang et al. [21] were discovered as not being secure as claimed by Wu et al. [22].
In 2015, He et al. [23] described a temporal-credential-based scheme for WSNs, yet soon was pointed out subject to impersonation attack, smart card lost attack and tracking attack. In the same year, Chang et al. [24] proposed an enhanced dynamic identity authentication, once again, it was proved not secure against offline password guessing attack, user impersonation attack, etc. by Jung et al. [25] and Park et al. [26]. To strengthen the security of the scheme, Jung et al. [25] and Park et al. [26] both added the biological characteristic as a new factor and proposed a three-factor enhanced version. Furthermore, they both proved the security of their scheme formally, so they were confident in the security of their scheme.

Motivations and Contributions
When revisiting Jung et al.'s scheme [25] and Park et al.'s scheme [26], it was regretful to find that the two schemes are still not as secure as claimed, though they both are equipped with the complete formal proof, and furthermore, add a biometric factor into the scheme to improve the security of the previous scheme. Ridiculously, the improved two schemes that are armed with a biometric factor and a formal proof, even cannot provide the same level security assurance as the previous ones. We find them vulnerable to offline password guessing attack, impersonation attack, and no user anonymity, no forward security, etc.
In fact, it is pretty common that a scheme with formal security proof was found insecure. Though the user authentication in wireless sensor networks have been developed over almost ten years since Das [8] first proposed a two-factor scheme, there is not yet a secure and practical scheme. Even more alarming is the fact that many schemes violate some basic design principles that have been proposed. Such an unsatisfactory situation prompts us to design a secure but efficient scheme for wireless sensor networks. Furthermore, the common consensus on the system architecture, adversary model and security requirements should be reached. In conclusion, our contributions are as follows: 1. We depict the system architecture, adversary model and security requirements of wireless sensor networks. Though these factors are the basis of the authentication scheme, researchers usually ignore them. 2. We demonstrate that: (1) Jung et al.'s scheme cannot resist against offline password guessing attack, impersonation attack, and fails to achieve user anonymity and forward secrecy, etc.; (2) Park et al.'s scheme suffers from offline password guessing attack, and no user anonymity. Furthermore, we explain the inherent reason for these attacks. 3. We propose an improved scheme with various desirable attributes, and prove its security via BAN logic and heuristic analysis. Then, we compare our scheme with other related schemes.
The results show the great advantage of our scheme.

Organization of the Paper
The remainder of this paper is organized as follows: we describe the system architecture and adversary model in Section 2, analyze Jung et al.'s scheme and Park et al.'s scheme in Sections 3 and 4, respectively; in Section 5, we propose an enhanced scheme; the security and performance analysis are given in Sections 6 and 7, respectively; and the conclusions are drawn in Section 8.

Preliminaries
This section introduces the preliminaries in the user authentication scheme including computational problems, system architecture, adversary model and security requirements.

Computational Problems
Given two large primes p and q, let F p be a finite field, E/F p be an elliptic curve over F p , and G be a q-order subgroup of E/F p . Then, for α, β ∈ Z * p and a point P in G, we can define the discrete logarithm problem over the elliptic curve as follows: 1. Elliptic curve discrete logarithm problem: given (P, αP), it is impossible to compute α within polynomial time. 2. Elliptic curve computational Diffie-Hellman problem: given (αP, βP), it is impossible to compute αβP within polynomial time.

System Architecture
Wireless sensor networks (as shown in Figure 1) attract worldwide attention with the prevalence of Internet of Things (IoT). Generally, people may be more familiar with distributed systems, which involve two participants: a set of users and a single server, while there are three participants in the user authentication of WSNs: a number of sensor nodes, a gateway node and a set of users. In a wireless sensor network, there are tens to thousands of sensor nodes that are deployed in a particular area. They work together to collect the data from physical world and have limited computing and storage power. Furthermore, they are usually left in an unattended environment, so the adversary can easily capture them to acquire secret parameters. The gateway node acts like a registration center. In WSNs, an authentication protocol usually consists of four basic phases: registration, login, verification, and password update. Sometimes, the dynamic node addition phase is suggested for meeting the demand on increasing new sensor nodes. In the registration phase, users and sensor nodes submit their personal information to the gateway, then the gateway will issue users a smart card with some sensitive parameters physically (face to face or via the mail), and distribute a shared secret key to sensor nodes. When a user wants to access a sensor node, he/she can initialize an access request to the gateway in the login phase. After checking the legitimacy of the user, the gateway informs the corresponding sensor node about the request. Then, the user and the sensor node verify the legitimacy of each other via (or not) the gateway and negotiate a session key in the verification phase. The user can change the password in the password update phase. In addition, the new sensor nodes can join the network in the dynamic node addition phase.

Adversary Models
When considering cryptanalysis of the user authentication schemes in WSNs, the adversary A is also supposed to have the following capacities: A can enumerate all the items in D pw * D id in polynomial time, where D pw and D id denote the password space and the identity space, respectively [28,29]. 3. When evaluating forward secrecy, A can get the long-term secret key [28,30]. 4. A can acquire the password of a legitimate user by a malicious card reader, or get the parameters in the smart card, but cannot achieve both [28,30]. 5. A can get the data in sensor nodes for they are usually left unattended [3,31]. 6. A can get the past session keys [30]. 7. A can get the user's biometrics [29,32].
The capacity of acquiring biometrics is the most controversial. Many researchers view it as a quite strong factor that cannot be broken. However, this is impractical. For example, the adversary can at least get the biometrics via a malicious terminal. Moreover, unlike the password that may change with the different applications, the biometrics is unique to every particular person. Thus, the adversary can collect one's biometrics via any biometric-based terminal. This indicates that the adversary can acquire the password and biometrics both, or the smart card and the biometrics both. Furthermore, this hypothesis has been accepted in many schemes, such as [29,32,33].
It should be noted that: a secure three-factor authentication scheme should guarantee that the breaking of any two of the three factors will not affect the other one, and the system is still secure.

Security Requirements
Understanding the security requirements of the user authentication is a fundamental step to analyze or design a protocol. Thus, we summarize the security requirements of user authentication in the wireless sensor network: S1 Mutual authentication. It is an essential requirement in all authentication schemes. It requires the participants to authenticate each other [34,35]. S2 User anonymity. It is a privacy protection requirement for individual users, not directly related to system security. Many systems have such a requirement including distributed system [36]. While the privacy protection in wireless sensor networks is more severe, since the information among sensor nodes (usually unreliable) is transmitted in a way of broadcasting. Protecting user anonymity is to stop A from computing the user's identity or linking the transcript to a same user. Note that such a requirement is not applied to the gateway, but to sensor nodes for they are untrusted. S3 Key agreement. It is also an essential requirement in most authentication schemes. The session key is used to encrypt the further communications to achieve confidentiality. S4 Forward secrecy. It is for the final collapse of the whole system, and it requires that the previous communications will be secure, even the system collapses (usually refers to the adversary that owns the long-term key of the system). S5 User friendly. It is an additional requirement to improve the user experience with the development of the network. A user friendly scheme usually includes: let the user U i select the password freely, and change it locally [30]; when U i finds the smart card insecure, let he/she revoke it and re-register to the system with original identity. S6 No stolen-verifier attack. It is a requirement related to the security of the whole system (so as the following attacks), which requires that the verifier table does not expose any sensitive information for A to impersonate the participants or learn/control the session key. S7 No insider attack. It requires that the participants cannot get any sensitive information, which may provoke an attack. S8 No dictionary attack. It requires that A cannot conduct a brute force attack. S9 No replay attack. It stops A from conducting an attack via replaying the history message, which requires that the participants can check the freshness and validity of the received message. S10 No parallel session attack. This requirement is a bit similar to the replay attack, but it considers a condition where A conducts an attack via initiating multi-session simultaneously. S11 No de-synchronization attack. The synchronization attack in wireless sensor networks is more destructive than that in traditional networks, since a gateway may connect even hundreds of sensor nodes. It requires that the parameters among corresponding participants are consistent. S12 No impersonation attack. It is a very important requirement in authentication, which requires that the outside adversary (inside adversary has been considered in insider attack) will not be able to impersonate any participants. A scheme resistant to impersonation attack requires that the participants verify whether the corresponding communication party is a counterfeit one. Note that: the occasion where A performs a user impersonation attack using the password from a dictionary attack is not included-such an attack belongs to dictionary attack. S13 No known key attack. It is an attack related to the session key, which requires A, who knows that the current session key cannot compute the keys in others.

Cryptanalysis of Jung et al.'s Scheme
In 2017, Jung et al. [25] demonstrated several attacks against Chang et al.'s [24] two-factor user authentication scheme in WSNs. To improve the security and practicability of the scheme, they devised an enhanced one over Chang et al.'s scheme [24] by "employing biometrics information with the biohashing technique". They proved their scheme secure to various attacks such as offline dictionary attack using the Burrows-Abadi-Needham (BAN) logic. However, as we will show in this section, Jung et al.'s scheme still suffers from offline dictionary attack, impersonation attack, etc., which is even less secure than the previous one. For convenience of illustration, some notations are listed in Table 1. collision free one-way hash function Gen(BIO i ) one part of fuzzy extraction function, output a biometric key R i and a helper string P i Rep(BIO i , P i ) one part of fuzzy extraction function, output the biometric key R i in Gen(BIO i ) → a insecure channel ⇒ a secure channel

A Brief Review of Jung et al.'s Scheme
In this section, we review Jung et al.'s scheme [25] briefly, their scheme consists of four phases: registration, login, verification and password change. The password change phase was omitted, since it has little relevance to this work.

Registration Phase
In Jung et al.'s paper, there is only a user registration phase as follows: However, according to the paper, the sensor node S j preserves a private key X s j . So we deduce that the sensor node registration phase was missed. For the integrity, we add it as below: 3. S j stores X s j as a secret key.

Login Phase and Verification Phase
inputs the ID i and PW i , and his biometrics BIO i ; then, the smart card computes: GW first checks the freshness of T 1 , then computes: S j first checks T 2 , and computes: believes the legitimacy of GW and the authentication phase ends successfully. Otherwise, the authentication fails.

Security Flaws in Jung et al.'s Scheme
Jung et al. [25] criticized that Chang et al.'s scheme [24] fails to resist against offline password guessing attack and the session key attack. Thus, they add a new factor to enhance the security of the previous two-factor scheme, and formed a three-factor one. Despite armed with the biometrics factor and provable security proof, their scheme suffers from the same (even more serious) security issues.

Offline Dictionary Attack
Offline dictionary attack is exactly what most schemes suffer from and also the major security requirement of a user authentication protocol. Jung et al. [25] showed that Chang et al.'s scheme [24] cannot resist against this attack once the adversary breaches the victim's smart card and eavesdrops on the message from the open channel. Unfortunately, as we show below, the same attack also works for Jung et al.'s own scheme. In addition, Jung et al.'s scheme is vulnerable to other kinds of offline dictionary attacks with less attack cost.
According to the adversary capabilities mentioned in Section 2.3, it is natural to suppose that the adversary A somehow possessed U i 's smart card and then revealed the message {A i , E i , C i , D i } in it; acquired U i 's biometric BIO i by a malicious terminal or other ways; and intercepted transcripts {DID i , M U i ,G , C i , T 1 } via the public channel. Then, A can obtain U i 's password PW i as follows: 1. Guesses the value of PW i to be PW * i and ID i to be ID * i from the dictionary space D pw and D id , respectively. In fact, according to Wang et al. [28], once an adversary picks the victim's (U i ) smart card, it is easy to learn the corresponding identity ID i of the user U i .

Computes HPW
where T 1 is from the public channel. 7. Verifies the correctness of PWi * and ID * i by checking if the computed M * U i ,G is equal to the intercepted M U i ,G . 8. Repeats Steps 1-7 of this procedure until the correct value of PW i and ID i is found.
The time complexity of the above attack is O(|D pw | * |D id | * (5T H )). T H is the running time for hash computation. |D pw | denotes the number of passwords in D pw . |D pw | and |D id | are very limited, generally |D id | < |D pw | < 10 6 [30,37], so the above attack is quite efficient.
Besides the above kind of offline dictionary attack, Jung et al.'s scheme still suffers from another kind of offline dictionary attack where the adversary A obtained the victim's smart card and the biometrics BIO i . Then, A can conduct another offline dictionary attack as follows (Steps 1-5 are the same with the above attack, so they are omitted): Step 8. Repeats Steps 1-7 of this procedure until the correct value of PW i and ID i is found.
The time complexity of the attack is the same as the former attack. Actually, these two attack strategies are not new, and many researchers [32,36,[38][39][40] have captured these two attack scenarios to break numerous schemes. However, these kinds of adversaries are still rampant.

Remark 1.
As we mentioned before, a true three-factor authentication scheme should ensure that even if any two of the three factors are compromised, the other factor cannot be breached and the entire system is still secure. Obviously, this protocol is intrinsically not a three-factor protocol. It indicates that the biometric factor is not a master key to settle the problem in user authentication. On the contrary, a scheme armed with biometrics factor may even cannot provide the same security level as a two-factor authentication. The way to add more factors into the authentication protocol is not the essential way to design a more secure protocol.
In the scheme of Jung et al. [25], the obstacles to compute the verification value M U i ,G for an adversary A is the PW i and the ID i , so A can guess the value of the PW i and the ID i , then verify the guessed value by comparing the computed M * U i ,G with the intercepted M U i ,G . This is exactly the essential reason for the former kind of offline dictionary attack. Similarly, E i is also the fuse of the latter kind of attack. However, the function of the two parameters is quite different: the M U i ,G is the key of the GW to authenticate U i , while the E i contributes to changing the password locally and detecting incorrect input timely. Therefore, the M U i ,G is indispensable to an authentication protocol, and the E i conduces to improve the usability of a scheme. Furthermore, the "public-key principle" is necessary to resist the former attack [41]; and a way of "honeywords" + "fuzzy-verifiers" is suggested by Wang et al. [30] to deal with the latter attack.

Impersonation Attack
Suppose an adversary A was also a legal user U a , then he could get the secret key x as follows: where D a is from the smart card. 2. Computes TID a = h(ID a ||u). 3. Computes HPW a = h(PW a ||H(BIO i )). 4. Computes H ID a = A a ⊕ h(HPW a ||TID a ), where A a is from the card. 5. Computes x = C a ⊕ H ID a , where C a is from the card.
Obviously, the time complexity of the above attack is O(5T H + 3T R ), where T R is the running time for exclusive-or operation. With the secret x, A has the same capacity as the GW, thus A can impersonate as the GW or the S j ; this indicates that the security of the whole system collapsed.
Actually, not only can an insider legal user carry out such an attack, but also an adversary who has gotten the PW and ID of any users by "offline dictionary attack" can also perform such an attack.
is the fundamental reason for such an attack. To a legitimate user who knows the H ID i , the secret key x is actually exposed. Therefore, the only "XOR" operation on x is a risky behavior which is far from enough to protect such an significant parameter.

User Anonymity
User anonymity is of great significance to privacy protection. It requires that the adversary can neither confirm who transmits the messages nor recognize whether the messages come from the same user. In wireless sensor networks, numerous sensor nodes are deployed in an unattended environment. In addition, the information is transmitted in a way of broadcasting. Therefore, user anonymity in WSNs is an essential requirement. However, in Jung et al.'s scheme [25], user-specific parameters DID i and C i are transmitted via an open channel. Thus, following DID i or C i , the adversary A identifies the transmitted messages with the DID i and C i from a large amount of messages in the open channel, and links them to the user U i . Then, for the purpose of marketing or even other terrible attempts, the A can learn the user U i 's habits, such as the time to initiate an access request, the kinds of sensor nodes to visit. Therefore, Jung et al's scheme fails to achieve user anonymity.

Forward Secrecy
Forward secrecy requires that even if the long-term secret key was exposed, the adversary still cannot compute the previous session key. In other words, when the long-term key is compromised, the protocol cannot promise the security of further communications, but it can guarantee the security of the previous communication. Forward secrecy is the last umbrella of system security, but Jung et al.'s scheme fails to achieve it.
Supposing that an adversary A got the secret key x and intercepted the parameters DID i and M j in the channel, A could perform an attack to get the previous session key as follows: 1. Computes X s j = h(SID j ||x).

Remark 2.
In this scheme, the session key consists of a fixed parameter DID i and a random number R from GW. As DID i is exposed to an open channel, the only challenge in computing the session key is the value of R. On one hand, the sensor node S j has to know R to form the session key. This means that the S j is capable of computing R. On the other hand, S j 's special or only secret parameter is X s j , where X s j = h(SID j ||x). Thus, once acquiring X s j and the transmitted message in an open channel, anyone can compute the session key. Therefore, when an adversary learns the long-term key x, he/she has the same capability as the S j . Of course, he/she can compute the correct session key. In fact, it is a more secure way to set up the session key with the security mechanism of challenge-response for the two sides of communication. Anyway, all this corroborates that a protocol without any exponentiation operations conducted on the server side cannot achieve forward secrecy [41].

Cryptanalysis of Park et al.'s Scheme
Similar to Jung et al., Park et al. [26] also criticized Chang et al.'s scheme [24], and improved this two-factor scheme into a three-factor one. They claimed their new scheme overcomes the weaknesses in [24], and proved the security of the scheme via BAN logic. Unfortunately, we once again found this scheme also insecure: no resistance to two kinds of offline dictionary attacks and no user anonymity.

A Brief Review of Park et al.'s Scheme
This section describes Park et al.'s scheme [26] briefly.

Registration Phase
Note that the senor node registration phase is the same with Jung et al.'s [25], so it is omitted here.
and TID i is a random number, TID • i is initialized to NULL. 3. U i inputs P i into the smart card. Note that, in Park et al.'s scheme [26], this step is not mentioned.
But, according to the scheme, this step is necessary. We speculate it is missed.

Login Phase and Verification Phase
inputs the ID i and PW i , and the biometrics BIO i , and then the smart card computes: Otherwise, it ends the session. 2. GW → S j : {DID i , M G,S j , X i , T G }. GW first checks T i , then gets H ID i and computes: Otherwise, S j chooses b ∈ Z * p and computes: Y j = βP, , GW further computes: and updates (TID i , TID • i ) as (TID i new , TID i ), then sends {e i , M G,U i , Y i , T G } to the GW. Otherwise, it exits the session.

U i checks T G , and computes
, and updates TID i as h(H ID i ||T i ). Otherwise, it exits the session.

Security Flaws in Park et al.'s Scheme
Compared with Jung et al. [25], Park et al. [26] deployed an elliptic curve cryptosystem trying to achieve user anonymity and resist against offline dictionary attack. Though Wang et al. [3,41] pointed out that a public key algorithm is necessary to achieve user anonymity and offline dictionary attack, it does not mean that, once the public key algorithm is added, the system will be secure. Deploying the public key algorithm requires some skills, and we will propose a sound scheme as an example to explain such skills in Section 5. In this section, we proved that Park et al.'s scheme suffers from many attacks, including offline dictionary attack and no user anonymity.

Offline Dictionary Attack
Suppose the adversary A got the message {A i , B i , C i , P i , TID i } in the card; and also acquired U i 's biometrics BIO i in addition to intercepted transcripts {DID i , X i , M U i ,G , T i , TID i }. Then, A conducts an offline dictionary attack as follows: 1. Guesses PW i to be PW * i and ID i to be ID * i .

Computes
where A i is from the card, X i and T i are from the channel. 6. Verifies the correctness of PWi * and ID * i by checking whether M * U i ,G == M U i ,G . 7. Repeats Step 1-7 of this procedure until the correct value of PW i and ID i is found.
The time complexity of the above attack is O(|D pw | * |D id | * (3T H + T RE )). T RE is the running time of fuzzy extraction computation. Thus, the above attack is quite efficient.
Similar to the analysis in Section 3.2.1, the adversary can also select B i as the verification to test the guessed value of PW * i and ID * i .

User Anonymity
Park et al. [26] attempted to update some parameters to provide user anonymity. However, such a method is not as desirable as they expected. On one hand, the gateway has to update the database in every session, which is efficient; on the other hand, if the adversary A acquires the verifier table

Proposed Scheme
In this section, we proposed a new enhanced scheme (as shown in Figure 2) which not only provides some desirable attributes but also can resist against the known attacks. Furthermore, we improve the scheme from the following aspects: 1. based on Wang et al. [3,41], we apply a public key algorithm for resisting against offline dictionary attack via the verification from the open channel. In such an attack, as we analyzed above, the key solution is about the way to construct the verification parameter between the user and the gateway node. Once the verification parameter consists of a "challenge" that is deployed a public key algorithm, a trap door will be built. Therefore only the one who owns the corresponding secret key can compute the correct "challenge" (i.e., X in our scheme). In Park et al.'s scheme, though a public key algorithm is deployed, it is not used to construct a "challenge" for authentication. More specifically, all the parameters in the verification M U i ,G (=h(A i ||X S i ||X i ||T i )) can be computed with the static or open knowledge in the user side and the open channel, so A can compute all parameters (A i ,X S i ,X i ,T i ) with guessed password and then use M U i ,G to verify the guessed value. While, in our new scheme, a "challenge" X is built. Besides the static or open knowledge on the user side, A has to know the dynamic α or the long-term key to compute X, and thus fails to conduct such an attack; 2. as introduced in Section 3.2.1, we use "honeywords" + "fuzzy-verifiers" to resist against offline dictionary attack via verification from the smart card [30,42]; 3. we do not protect user anonymity via updating parameters as Park et al., but deploy a dynamic identity technique via a public key algorithm [3].
The details of our scheme is described as follows: They accept session key as Figure 2. Proposed scheme.

Registration Phase
The registration phase to the sensor node is similar to Jung et. al. [25] and Park et. al. [26], so it is omitted. When a new user wants to be a legitimate user of the system, then he/she may submit his/her personal information on the gateway to initiate a user registration phase as follows: Honey_List) in database, and Honey_List is supposed to count the number of failing in user login phase and it is initialized to NULL. Once its value is bigger than the predetermined threshold, the corresponding smart card will be discarded till the user re-registers. 3. U i inputs P i into the smart card.

Login Phase and Verification Phase
After being legitimated, the user U i can login to the system with the password, identity and biometrics, and get authenticated via exchanging information with the corresponding communication parties. Finally, after finishing the authentication successfully, the user and the sensor node will build a session key to protect the security of the subsequent communications.
1. U i → GW: {DID i , X i , M U i ,G , T i }. U i inputs his/her identity ID i , password PW i , and biometrics BIO i ; then, the smart card computes: i == B i , the card accepts the user, and selects a random number α ∈ Z * p , computes: and then finds r i and Hony_List via ID i . If Hony_List ≥ the preset value (for example 10), the GW thinks this smart card has been suspended and rejects the request. Otherwise, GW computes , GW rejects the request and sets Hony_List = Hony_List + 1. Once Hony_List is bigger than the preset value, the corresponding smart card is suspended. Otherwise, it computes: and sends {X i , M, M G,S j , T G } to S j to conveys U i 's request. 3. S j → GW: {Y j , M S j ,G , T j }. S j first checks the valid of T G , and computes h(k i ) * = M ⊕ h(X s j ).
If M * G,S j = h(h(k i ) * ||X s j ||X i ||SID j ||T G ), S j does not believe GW and rejects the session. Otherwise, S j chooses β ∈ Z * p and computes: Y j = βP, , and then sends {Y j , M G,U i , T G } to U i to transmit S j 's responds. Otherwise, it exits the session. 5. U i first checks T G , and if M G,U i == h((X s i ||k i ||X i ||Y j ||X||T G ), U i authenticates the GW, and computes SK i = h(X i ||Y j ||αY j ) to finish the authentication successfully. Otherwise, the authentication fails.

Password Change Phase
Once the user wants to change password for security consideration, he/she can achieve it through the following steps: 1. U i inputs ID i , PW i and new password PW new i .

The card computes:
If B * i = B i , the card does not permit U i to change the password. Otherwise, it further computes:

Revocation Phase
Revocation phase, as the emergency response strategy, is of great significance to the security of the system. It provides an efficient way to protect the account from being abused. When the user finds his/her smart card breached, he/she can revoke the smart card as follows: 1. U i firstly get authenticated by the card as the way to the step 1 in Section 5.2. 2. U i −→ GW: {DID i , X i , M U i ,G , T i , revoke_request}. As described in Section 5.2, the smart card computes DID i ,X i ,M U i ,G and sends {DID i , X i , M U i ,G , T i , revoke_request} to the gateway. 3. After receiving the revocation request from U i , GW first verifies U i . If GW authenticates U i successfully, it sets Honey_List to a big number, which is bigger than the preset value. Then, the smart card will be revoked, and nobody can login to the system with the card unless U i re-register. Otherwise, GW rejects the request.

Re-Register Phase
If a user U i with correct password and identity is still rejected by S j , then can re-register as follows: 2. Firstly, GW looks for ID i from User − list, checks whether Honey_List ≥ the preset value. If so, GW believes the card is suspended, then performs the corresponding steps in Section 5.1.

Security Analysis
To prove the security of our scheme, we analyze it from two aspects: a formal way using the Burrows-Abadi-Needham (BAN) logic [43]; a informal/heuristic way. Through the formal way, we prove our scheme achieves four basic security goals. These goals ensure that the user and the sensor node are mutual trust, and they both compute the session key successfully; furthermore, the session keys computed by them are equal. Through the informal/heuristic way, we prove that our scheme not only satisfies many desired attributes such as user anonymity and forward security, but also is resistant to various attacks such as offline dictionary attack, impersonation attack, and de-synchronized attack.

Formal Analysis Based on BAN Logic
The BAN logic [43] is a simple and efficient way to analyze the design logic and security of a protocol. It has a set of particular notions (shown in Table 2) to depict the logic of the protocol. We will prove the security of our scheme according to its notions and processes. P |≡ X P believes X, i.e., the principal P believes the statement X is true. P X P sees X, i.e., the principal P receives a message that contains X.
P |⇒ X P has jurisdiction over X, i.e., the principal P can generate or compute X.
P |∼ X P said X, i.e., the principal P has sent a message containing X. (X) X is fresh, i.e., X is sent in a message only at the current run of the protocol, it is usually a timestamp or a random number. P K ← → Q K is the shared key for P and Q. P Y Q Y is the secret known only to P and Q or some principals trusted by them.
X Y X combined with Y, and Y is usually a secret.
{X} K X encrypted with K. In BAN logic, the goals of our authentication scheme are defined as: According to the proof steps in BAN logic, we re-describe our scheme into an idealized form: Then, some assumptions are defined as follows: • H 4 : GW |≡ (T j ).
Based on the definition above, we perform the BAN logic proof as follows: Then, according to H 7 , S 1 , RULE(1), we get S 2 : According to H 3 and RULE(4), we get S 3 : In addition, according to S 2 , S 3 and RULE(2), S 4 : Then, according to H 7 , S 1 , RULE(1), we get S 6 : S j |≡ GW |∼ X i , h(k i ), SID j , T G . According to H 3 and RULE(4), we get S 7 : S j |≡ X i , h(k i ), SID j , T G . In addition, according to S 2 , S 3 and RULE(2), we get S 8 : From M 3 , it is easy to get S 9 : GW X j , k j , h(k i ), T j X s j .
Then, according to H 7 , S 1 , RULE(1), we get S 10 : GW |≡ S j |∼ X j , k j , h(k i ), T j . According to H 3 and RULE(4), we get S 11 : GW |≡ X j , k j , h(k i ), T j . In addition, according to S 2 , S 3 and RULE (2), we get S 12 : GW |≡ S j |≡ X j , k j , h(k i ), T j . From M 4 , it is easy to get S 13 : U i X j , k i , X, T G X s i .
Then, according to H 7 , S 1 , RULE(1), we get S 14 : U i |≡ GW |∼ X j , k i , X, T G . According to H 3 and RULE(4), we get S 15 : U i |≡ X j , k i , X, T G . In addition, according to S 2 , S 3 and RULE(2), we get S 16 : U i |≡ GW |≡ X j , k i , X, T G .
Therefore, we prove our scheme achieves Goals 1-4 successfully. In other words, our scheme promises that U i and S j have been authenticated mutually, and they further compute and share the same session key SK.

Informal Analysis
The heuristic way plays an important role in testing the security of the user authentication protocol. It makes up for the defects of formal proofs in some security requirements. For example, the formal proofs cannot capture user anonymity and user friendly problems. Therefore, in this section, we apply the heuristic method to prove the security of our scheme.

Mutual Authentication
In step 2 and step 5 of Section 5.2, the gateway node and the user authenticate each other via their shared secret parameter X s i and X. On the user side, only with the correct password, biometrics, and the corresponding smart card can U i compute X s i , so the gateway can authenticate U i via this parameter. On the gateway node, after receiving X i , only the one with the long-term key x, can compute X, so the user authenticate GW via X.
In step 3 and step 4 of Section 5.2, the gateway node and the sensor node authenticate each other via X s j . If an adversary wants to compute X s j , then he/she has to guess the long-term key x, and the probability of such an event can be ignored.
Therefore, the user and the sensor node have authenticated the gateway, and the gateway has also authenticated them. Furthermore, from the authentication relationship among the three parties, equivalently, the user and the sensor node get authenticated with each other. All in all, our scheme achieves mutual authentication well.

User Anonymity
In our scheme, ID i is concealed in DID i , which is changed with X in every session. To get ID i , A has to compute X, which means that A without α or x has to solve the elliptic curve discrete logarithm problem. As we introduced in Section 2.1, such a problem cannot be solved in polynomial time. Thus, in our scheme, the user identity is not only well protected, but also untraceable.
Furthermore, note that an obvious difference in user anonymity between the wireless sensor network and the distributed network is about whether the user identity can be known by other participants. In a distributed network, there are only two participants: the user and the server. In such a condition, the user identity can be known by the server to build a session key. While in the wireless sensor network, there are three participants: the user, the gateway node and the sensor node. The gateway node acts as a register center and is protected well, so it can know the user identity. While the sensor node is usually deployed in an unattended environment, it is of high possibility to be controlled by the adversary. Thus, the user identity should not be exposed to it. In addition, our scheme achieves such a goal: the user identity is not transmitted to the sensor node.

Forward Secrecy
The session key SK = h(X i ||Y j ||βX i ) = h(X i ||Y j ||αY j ). The key parameter is βX i or αY j . If an adversary A intercepts the message in an open channel, acquires the secret key x, then A knows X i and X j . Thus, A needs to compute βX i or αY j . However, computing βX i or αY j for A is equivalent to solving the Elliptic curve discrete logarithm problem, and it is bound to fail. Therefore, A cannot compute SK, and our scheme achieves forward secrecy.

Offline Dictionary Attack
A sound three-factor user authentication scheme should ensure that even if A gets any two of the three factors, he/she cannot break the system. In our scheme, if A gets the password and biometrics, he/she still cannot compute X s i to construct a valid login request; if A gets the password and the smart card, he/she can neither compute X s i nor guess the biometrics, thus also fails to perform an attack; if A gets the smart card and biometrics, then A may conduct an offline dictionary attack by using M u i ,G or B i as the verification parameter to check the correctness of the guessed value.
If A uses B i , then he/she may make the offline dictionary attack as follows: guesses ID i and PW i to be ID * i and PW * i , respectively, computes R * i = Rep(BIO i , P i ), HPW * i = h(PW * i ||R * i ), then verifies ID * i and PW * i by checking B i ?= h(h(HPW * i ) ⊕ h(ID i ) ⊕ h(P i )) mod n 0 . However, even A gets a pair of {ID * i , PW * i } such that B i == h(h(HPW * i ) ⊕ h(ID i ) ⊕ h(P i )) mod n 0 , he/she may not find the correct ID i and PW i , for there are |D pw | * |D id | \ n 0 ≈ 2 32 candidates of {ID i , PW i } pair (where n 0 = 2 8 and |D pw | = |D id | = 2 6 ) [30]. Thus, A then has to test the {ID * i , PW * i } via sending the login request to the gateway node, and once the number of login failures exceeds the preset value, the smart card will be suspended and the attack fails.
If A uses M u i ,G , then he/she can compute HPW * i as above, and further compute X * s i = A i ⊕ HPW * i ⊕ P i , k i = h(X * s i ||T i ), DID i = ID * i ⊕ h(X i ||X). However, A cannot compute X, as we explained in Section 6.2.2, and thus fails to finish such an attack.
In conclusion, our scheme is resistant to dictionary attack.

Privileged Insider Attack
In our scheme, the user submits {ID i , HPW i , P i } to the gateway node. The password is well protected by a long-term number R i , so GW cannot learn any useful information from it. Therefore, our scheme is secure against privileged insider attack.

Verifier-Stolen Attack
The verifier table stored in GW does not expose sensitive messages; even if an adversary acquires the table, he/she cannot make any attack. Thus, our scheme is resistant to verifier-stolen attack.

Replay Attack
The timestamp is used to prevent replay attack. On the one hand, if A replays the history message directly, the corresponding communication party will find it via checking the freshness of the timestamp. On the other hand, if A tries to forge the message in the open channel, such as {DID i , X i , M U i ,G , T i }, then he/she has to know X s i . However, to compute X s i , it is asked that A has to know x or U i 's password, biometrics and smart card, which is impossible. Similarly, A also cannot replay or construct other message flows.

Performance Analysis
To better evaluate our scheme, we make a comparison among the related schemes for wireless sensor networks [25,26,29,44]. From Table 3, it is obvious that our scheme is more competitive than other schemes: our scheme achieves all the security requirements while others [25,26,29,44] all have some attributes that fail to satisfy more or less; the computation of our scheme is similar or slightly high to that of other schemes. Furthermore, achieving all the security requirements is more significant to an authentication scheme, and it is not advisable to sacrifice security for efficiency. Table 3. Performance comparison among relevant schemes in wireless sensor networks.