Efficient and Anonymous Two-Factor User Authentication in Wireless Sensor Networks: Achieving User Anonymity with Lightweight Sensor Computation

A smart-card-based user authentication scheme for wireless sensor networks (hereafter referred to as a SCA-WSN scheme) is designed to ensure that only users who possess both a smart card and the corresponding password are allowed to gain access to sensor data and their transmissions. Despite many research efforts in recent years, it remains a challenging task to design an efficient SCA-WSN scheme that achieves user anonymity. The majority of published SCA-WSN schemes use only lightweight cryptographic techniques (rather than public-key cryptographic techniques) for the sake of efficiency, and have been demonstrated to suffer from the inability to provide user anonymity. Some schemes employ elliptic curve cryptography for better security but require sensors with strict resource constraints to perform computationally expensive scalar-point multiplications; despite the increased computational requirements, these schemes do not provide user anonymity. In this paper, we present a new SCA-WSN scheme that not only achieves user anonymity but also is efficient in terms of the computation loads for sensors. Our scheme employs elliptic curve cryptography but restricts its use only to anonymous user-to-gateway authentication, thereby allowing sensors to perform only lightweight cryptographic operations. Our scheme also enjoys provable security in a formal model extended from the widely accepted Bellare-Pointcheval-Rogaway (2000) model to capture the user anonymity property and various SCA-WSN specific attacks (e.g., stolen smart card attacks, node capture attacks, privileged insider attacks, and stolen verifier attacks).


Introduction
The quest to understand real-world phenomena at a fine spatial-temporal resolution has led to a great increase in the interest in wireless sensor networks (WSNs).Where not already in place, a WSN is now being planned and deployed in various application settings such as wildlife monitoring, military surveillance, healthcare diagnostics, and vehicular tracking [1].Providing an application service in a WSN environment introduces significant security challenges for the involved parties: sensors, users and gateways.One fundamental challenge is to establish a shared session key between a sensor and a user in an authenticated manner (known as authenticated key exchange) via a gateway, and thereby to prevent unauthorized access to sensitive sensor data and their transmissions.Since sensors have severe resource constraints and due to network characteristics such as unattended operation and unreliable communication channel, authenticated key exchange in WSNs is generally regarded as more challenging to achieve than in traditional networks with sufficient computing resources and pre-existing infrastructures.Achieving authenticated key exchange becomes even more difficult when user anonymity is desired.As the concern for privacy increases in our lives, user anonymity has become a vital security property in various WSN applications as well as in many other applications like locationbased services, e-voting, mobile roaming services, and anonymous web browsing.
One common security requirement for SCA-WSN schemes is to ensure that: only a user who is in possession of both a smart card and the corresponding password can be successfully authenticated (by the gateway) and access the sensor data.
This requirement is commonly referred to as two-factor security [21][22][23][24][25] and is modelled via an adversary who is able to either extract all the information inside the smart card of a user or learn the password of the user, but not both.(Clearly, there is no means to prevent the adversary from impersonating a user if both the information in the smart card and the password of the user are disclosed.)The former requires physical access to the smart card and then mounting a side-channel attack [26,27] on the (lost, misplaced or stolen) card, while the latter can be achieved with shoulder-surfing or by using a malicious card reader.Any attack exploiting the former ability is commonly called a stolen smart card attack and is considered practical under the assumption that users' smart cards are non-tamper-resistant.Accordingly, SCA-WSN schemes should be designed to achieve their intended security properties, such as authenticated key exchange and user anonymity, against stolen smart card attacks.
Despite the many research efforts to date, it remains a challenging task to design an efficient SCA-WSN scheme that provides user anonymity.The recent work of Wang and Wang [28,29] shows that, under the non-tamper-resistance assumption of smart cards, no SCA-WSN scheme can provide user anonymity without recourse to public key cryptography.This result is somewhat surprising because it implies that all existing anonymous schemes using only lightweight cryptographic techniques [7,10,11,[13][14][15][16][17][18][19] fail to achieve user anonymity in the presence of an adversary who can mount a stolen smart card attack.As an example of such a failure, we here take the recent SCA-WSN scheme of Jiang et al. [19] which has been presented with a claim of user anonymity.To illustrate the failure, we only need to examine the user registration and login request phases of the scheme.Let MK be the master key of the gateway GW, and H be a cryptographic hash function.Then, the two phases proceed as follow: User Registration.A user U registers with GW as follows: 1. U chooses its identity ID U and password PW U , generates a random number r, computes RPW U = H(rkPW U ), and submits ID U and RPW U to GW via a secure channel.
Assume an attacker A who has obtained the information {H(Á), TID U , TE U , PTC U , r} stored on the smart card of user U. A eavesdrops and obtains the login request message M U = hTID U , C U , PKS U , T U i, and mounts the following offline dictionary attack.
Step 1.A makes a guess PW 0 U on the password PW U and computes TC 0 Step 3. A repeats Steps 1 and 2 until the correct password and identity are found.This dictionary attack works because the identity space is very limited in practice, being usually even smaller than the password space [28,29].All other schemes using only lightweight cryptographic techniques are also vulnerable to similar dictionary attacks, as shown in [28,29].Note that simply using a symmetric encryption scheme cannot overcome the inherent failure.Although there are some published schemes that employ elliptic curve cryptography [6,12,20], these schemes were designed with no user anonymity in the first place and moreover, are not efficient in the sense that they impose expensive scalar-point multiplications on resourceconstrained sensors.
In this paper, we present an efficient and provably-anonymous SCA-WSN scheme that requires sensors to perform only lightweight cryptographic operations.Our scheme employs elliptic curve cryptography but restricts its use to anonymous user-to-gateway authentication in order not to impose any (expensive) public-key operations, such as scalar-point multiplications and map-to-point operations, on sensors.We formally prove that our scheme achieves user anonymity as well as authenticated key exchange in an extension of the widely accepted model of Bellare et al. [30].In proving the security properties, we assume that the cryptographic hash functions used are random oracles and the elliptic curve computational Diffie-Hellman problem is computationally hard.The extended model captures not only the notion of two-factor security but also standard attacks against SCA-WSN schemes like node capture attacks, privileged insider attacks, and stolen verifier attacks.
The remainder of this paper is structured as follows.Section 2 describes an extended security model for the analysis of anonymous SCA-WSN schemes.Section 3 presents our proposed SCA-WSN scheme along with cryptographic primitives on which the security of the scheme relies.Section 4 provides proofs for the security properties of our proposed scheme in the extended security model.Section 5 concludes the paper with a comparative efficiency and security of our scheme and other SCA-WSN schemes.

A Security Model for Anonymous SCA-WSN Schemes
This section describes a security model extended from the Bellare et al.'s model [30] to analyze authentication and key exchange protocols of anonymous SCA-WSN schemes.Our security model captures the notion of two-factor security as well as the resistance to node capture attacks, privileged insider attacks, stolen verifier attacks, and other common attacks.We provide two security definitions associated with the model, one for authenticated key exchange and one for user anonymity, which collectively define a secure, anonymous SCA-WSN scheme.

Participants
Let SN and U be the sets of all sensors and users, respectively, registered with the gateway GW.Let E = U[SN[{GW}.We identify each entity E 2 E by a string, and interchangeably use E and ID E to refer to this identifier string.To formally capture the user anonymity property, we assume that: (1) each user U 2 U has its pseudo identity PID U in addition to the true identity ID U and (2) the adversary A is given only PID U but not ID U .

Protocol Executions
A user U 2 may run multiple sessions of the authentication and key exchange protocol of a SCA-WSN scheme, either serially or concurrently, to establish a session key with a sensor SN 2 SN via assistance of the gateway GW.Therefore, at any given time, there could be multiple instances of the entities U, SN and GW.We use P i E to denote instance i of entity E 2 E. Instances of U and SN are said to accept when they compute a session key in an execution of the protocol.We denote the session key of P i E by sk i E .

Long-Lived Keys
During the initialization of the protocol, • each U 2 U chooses its password PW U from a fixed dictionary D, and • GW generates its master secret(s), issues a smart card to each U 2 U, and shares a cryptographic key with each SN 2 SN.

Partnering
Informally, two instances are said to be partners of each other if they participate together in the same protocol session and as a result, compute the same session key.Formally, partnering between instances is defined in terms of the notion of session identifier.A session identifier (sid) is an identifier of a protocol session and is typically defined as a function of the messages exchanged in the session.Let sid i E denote the sid of instance P i E .We say that two instances, P i U and P j SN , are partners if (1) both the instances have accepted and (2) sid i U ¼ sid j SN .

Adversary Capabilities
We assume there exists an adversary A running in a probabilistic polynomial time (PPT) in the security parameter κ, which represents the bit-length of session keys.We note that the size of the dictionary D is a fixed constant that is independent of the security parameter κ.The PPT adversary A has complete control of all communications between entities, can request for access to session keys and long-term keys, and can extract user's information stored on the smart card.These capabilities of A are modeled via the following oracle queries which are allowed for A to make.
• Execute(P i U , P j SN , P k GW ): This query models passive attacks against the protocol.It prompts an execution of the protocol between the instances P i U , P j SN and P k GW , and outputs the transcript of the protocol execution to A.
• Send(P i E ; m): This query sends a message m to an instance P i E , modelling active attacks against the protocol.Upon receiving m, the instance P i E proceeds according to the protocol specification.The message output by P i E , if any, is returned to A. A query of the form Send(P i U , start:hSN, GWi) prompts P i U to initiate a protocol session with instances of SN and GW.
• Reveal(P i E ): This query captures the notion of known key security.The instance P i E , upon receiving the query and if it has accepted, returns the session key, sk i E , back to A. • CorruptLLðU Þ=CorruptSCðU Þ: These queries together capture the notion of two-factor security.The former returns the password of U while the latter returns the information stored in the smart card of U.
• CorruptLL(SN): This query returns the long-lived secret(s) of the sensor SN, modelling node capture attacks.
• CorruptVFR(GW): This query returns the password verifiers stored by GW, modelling stolen verifier attacks.
• TestAKE(P i E ): This query is used for determining whether the protocol achieves authenticated key exchange or not.If P i E has accepted, then depending on a random bit b chosen by the oracle, A is given either the real session key sk i E if b = 1 or a random key drawn from the session-key space if b = 0.
• TestUA(U): This query is used for determining whether the protocol provides user anonymity or not.Depending on a randomly chosen bit b, A is given either the identity actually used for U in the protocol sessions (when b = 1) or a random identity drawn from the identity space (when b = 0).
CorruptLL queries all together also capture the notion of perfect forward secrecy.SN and GW are said to be corrupted when they are asked a CorruptLL query while U is considered as corrupted if it has been asked both CorruptLL and CorruptSC queries.

Authenticated Key Exchange (AKE)
The AKE security of an authentication and key exchange protocol P is defined via the notion of freshness.Intuitively, a fresh instance is one that holds a session key which should not be known to the adversary A, and an unfresh instance is one whose session key (or some information about the key) can be known by trivial means.A formal definition of freshness follows: Definition 1 (Freshness).An instance P i E is fresh if none of the following occurs: , where P j E 0 is the partner of P i E .2. A queries both CorruptLLðU Þ and CorruptSCðUÞ when U is E itself or the peer entity of E.
Note that this definition of freshness is unable to capture the notion of perfect forward secrecy.(As explained in the next section, the authentication and key exchange protocol of our scheme does not provide perfect forward secrecy.)The AKE security of protocol P is defined in the context of the following two-stage experiment: Experiment ExpAKE 0 : Stage 1.A makes any oracle queries at will, except that: 1.A is not allowed to make the TestAKE(P i E ) query if the instance P i E is not fresh.

2.
A is not allowed to make the Reveal(P i E ) query if it has already made a TestAKE query to P i E or its partner instance.3. A is not allowed to access to the TestUA oracle.

User Anonymity
An authentication and key exchange protocol that does not provide user anonymity may still be rendered AKE-secure.That is, the AKE security does not imply user anonymity.Therefore, a new, separate definition is necessary to capture the user anonymity property.Our definition of user anonymity is based on the notion of cleanness.
Definition 3 (Cleanness).A user U 2 U is clean if none of the following occurs: 1.A queries both CorruptLLðU Þ and CorruptSCðUÞ.

A queries
Note that the definition of cleanness does not impose any restriction on making CorruptLL queries to sensors.This reflects our objective to achieve user anonymity even against sensors.
User anonymity is formalized in the context of the following two-stage experiment: Experiment ExpUA 0 : Stage 1.A makes any oracle queries at will, except that: 1.A is not allowed to make the TestUA(U) query if the user U is not clean.

2.
A is not allowed to corrupt GW and U if it has already made the TestUAðU Þ query.

3.
A is not allowed to access to the TestAKE oracle.Let SuccUA 0 be the event that A succeeds in the experiment ExpUA 0 , and Adv UA P ðAÞ denote the advantage of A in attacking the user anonymity of protocol P.Then, we define Adv UA P ðAÞ ¼ 2 Á Pr P;A ½SuccUA 0 À 1. Definition 4 (User Anonymity).An authentication and key exchange protocol P provides user anonymity if Adv UA P ðAÞ is negligible for any PPT adversary A.

Our Proposed Scheme
Our SCA-WSN scheme restricts the use of elliptic curve cryptography to anonymous user-to-gateway authentication and thereby allows sensor nodes to perform only lightweight cryptographic operations such as symmetric encryption/decryption, MAC generation/verification, and hash function evaluation.We begin by describing the cryptographic building blocks on which the security of our scheme depends.

Building Blocks
Elliptic curve computational Diffie-Hellman (ECCDH) problem.Let G be an elliptic curve group of prime order q.Typically, G will be a subgroup of the group of points on an elliptic curve over a finite field.Any elliptic curve and finite field recommended by NIST [31] can be used to instantiate the group G.The recent work of Choi et al. [20], for example, describes a typical elliptic curve group of a prime order.Let P be a generator of G.The ECCDH problem for G is to compute xyP 2 G when given two elements (xP,yP) 2 G 2 , where x; y2 R Z Ã q .We say that the ECCDH assumption holds for G if it is computationally infeasible to solve the ECCDH problem for G. Let Adv ECCDH Message authentication code schemes.A message authentication code (MAC) scheme S is a pair of efficient algorithms (Mac, Ver) where: (1) the MAC generation algorithm Mac takes as input an '-bit key k and a message m, and outputs a MAC σ; and (2) the MAC verification algorithm Ver takes as input a key k, a message m, and a MAC σ, and outputs 1 if σ is valid for message m under the key k or outputs 0 if σ is invalid.We require that S should achieve the strong existential unforgeability against chosen message attacks.To formally define this requirement, let Adv EFÀCMA S ðAÞ be the probability that an adversary A, who mounts an adaptive chosen message attack against S with oracle access to Mac k ðÁÞ and Ver k ðÁÞ, outputs a message/ tag pair (m, σ) such that: (1) Ver k ðm; sÞ ¼ 1 and (2) σ has not been output by the oracle Mac k ðÁÞ as a MAC on the message m.The, we say that the MAC scheme S is secure if Adv EFÀCMA S ðAÞ is negligible for every PPT adversary A. We use Adv EFÀCMA S ðtÞ to denote the maximum value of Adv EFÀCMA S ðAÞ over all adversaries A running in time at most t.Cryptographic hash functions.Let κ be the bit-length of session keys, ' be as defined for S, and ω be the bit-length of EID U (see the registration phase of our scheme described in the next section).Then, our scheme uses three cryptographic hash functions H:{0, 1} Ã !{0, 1} κ , J: {0, 1} Ã !{0, 1} ' , and I:{0, 1} Ã !{0, 1} ω .These hash functions are modelled as random oracles in our security proofs.
Symmetric encryption schemes.A symmetric encryption scheme Δ is a pair of efficient algorithms (Enc, Dec) where: (1) the encryption algorithm Enc takes as input an '-bit key k and a plaintext message m, and outputs a ciphertext c; and (2) the decryption algorithm Dec takes as input a key k and a ciphertext c, and outputs a message m.For an eavesdropping adversary A against Δ, and for an integer n ! 1 and a random bit b 2 R {0, 1}, consider the following indistinguishability experiment where only a single encryption key is used: We now claim that if a symmetric encryption scheme is secure with respect to a single encryption key, then it is also secure with respect to multiple encryption keys.Now consider the following indistinguishability experiment where d encryption keys are used: Experiment  That is:

Description of the Scheme
The scheme consists of three phases: the registration phase, the authentication and key exchange phase, and the password update phase.During the system initialization, the gateway GW determines the following public parameters: (1) an elliptic curve group G with a generator P of prime order q, (2) a MAC scheme S ¼ ðMac; VerÞ, (3) a symmetric encryption scheme D ¼ ðEnc; DecÞ, and (4) three hash functions H, J and I.We assume that these parameters are known to all parties in the network including the adversary A. As part of the system initialization, GW chooses two master secrets y 2 Z Ã q and z 2 {0, 1} ' , computes its public key Y = yP, and shares a secret key k GS = J(ID SN kz) with each sensor SN.
Registration phase.A user U should register itself with the gateway GW before it can ever gain access to the sensor network and data.The registration proceeds as follows: 1. U chooses its identity ID U and password PW U at will, and submits the identity ID U to GW via a secure channel.
2. GW computes EID U ¼ Enc z ðID U kID GW Þ and issues U a smart card loaded with {EID U , Y, ID GW , G, P, S, Δ, H, J, I}. (We assume that q is implicit in G.) 3. U replaces EID U with XEID U = EID U ÈI(ID U kPW U ).
Authentication and key exchange phase.U needs to perform this phase with SN and GW whenever it wishes to access to the sensor network and data.The steps of the phase are depicted in Fig. 1 and are described as follows: Step 1. U inserts its smart card into a card reader and inputs its identity ID U and password PW U .Then, the smart card retrieves the current timestamp T U , selects two random x 2 Z Ã q and k US 2 {0, 1} κ , and computes After the computations, the smart card sends the message M 1 = hT U ,ID SN ,X,C U ,σ U i to the gateway GW.
Step 2. GW rejects the message M 1 (and aborts the session) if T U is not fresh.Otherwise, GW computes K UG = yX and k UG = J(T U kXkYkK UG ), and checks if Ver k UG ðID GW kID SN k and sends the message M 2 = hID GW ,T GW ,T U ,C GW ,σ GW i to the sensor SN.
Step 3. Upon receiving M 2 , SN verifies that (1) T GW is fresh and ( 2) If any of the verifications fails, SN aborts the session.Otherwise, SN decrypts C GW to obtain k US and computes the session key sk and the authenticator ρ SN as follows: Then, SN sends the message M 3 = hρ SN i to the user U.
Step 4. With M 3 in hand, U checks if ρ SN is equal to H(k US kID SN kT U ). U aborts the session if the check fails or otherwise computes the session key sk = H(k US kT U kID SN ).
Password update phase.One of the recommended guidelines for achieving better password security is to enforce regular password updates.In our scheme, users can change their passwords either non-interactively or interactively.The non-interactive password change procedure proceeds as follows: 1. U inserts his smart card into a card reader and enters the identity ID U , the current password PW U , and the new password PW 0 U .

The smart card computes XEID
U .Although this procedure is simple and non-interactive, it may render the smart card unusable if the user enters a wrong password by mistake or an adversary intentionally inputs an arbitrary password after gaining temporary access to the smart card.When an invalid password is entered, subsequent login requests of the user will be rejected unless it reregisters with the gateway.This problem can be addressed by storing a password verifier on the smart card, which is used to check the correctness of the user-given password.However, as soon as the smart card contains a password verifier, the scheme becomes vulnerable to an offline dictionary attack under the non-tamper-resistance assumption of smart cards and, consequently, fails to achieve two-factor security.This is clearly unacceptable and, therefore, we suggest the following interactive password change procedure.
1. U inserts his smart card into a card reader and enters the identity ID U , the current password PW U , and the new password PW 0 U .
2. The smart card retrieves the current timestamp T U , selects a random x 2 Z Ã q , and computes The smart card sends a password update request hT U ,X,C U i to the gateway GW.
3. GW rejects the request if T U is not fresh.Otherwise, GW computes K UG = yX and k UG = J (T U kXkYkK UG ), decrypts C U with key k UG and then EID U with key z, and checks whether the two decryptions return the same ID U .If the check succeeds, GW computes ρ GW = H (ID GW kID U kXkk UG ) and sends it to the smart card.Otherwise, GW sends a failure message to the smart card.
4. The smart card aborts the password change procedure if it receives a failure message or ρ GW is not equal to H(ID GW kID U kXkk UG ).Otherwise, it sets XEID U ¼ EID U È IðID U kPW 0 U Þ.This interactive password change procedure provides a secure yet practical way of updating user password, though it is more expensive than the non-interactive one.

Performance and Security Comparison
In Table 1, we provide a comparative summary between our scheme and other SCA-WSN schemes both in terms of computation and security.As shown in the table, our scheme requires the sensor SN to perform only lightweight cryptographic operations while enjoying provable anonymity in an extension of the widely accepted model of Bellare et al. [30].While the recent schemes of Shi & Gong [12] and Choi et al. [20] provide forward secrecy, they impose 2 scalar- point multiplications on the resource-constrained sensor SN.Note that scalar-point multiplication is much more expensive than the lightweight cryptographic operations considered in the table, such as symmetric encryption/decryption, MAC generation/verification, and hash function evaluation.Moreover, these two schemes fail to achieve user anonymity despite their use of elliptic curve cryptography.The schemes presented in [10,11,[13][14][15][16][17][18][19] are computationally efficient, but suffer from the inherent failure of user anonymity.To the best of our knowledge, all existing SCA-WSN schemes fall into one of the two classes.According to Crypto++ 5.6.0 benchmarks that ran on an Intel Core 2 1.83 GHz processor under Windows Vista in 32-bit mode, SHA-1 and HMAC take 11.4 and 11.9 cycles per byte respectively; while AES (with 128-bit key) takes 12.6 to 16.9 cycles per byte, depending on the operation mode used-see Table 2 and we refer interested readers to http://www.cryptopp.com/benchmarks.html for Crypto++ benchmarks for commonly used cryptographic algorithms.
Our scheme requires the sensor SN to perform 1E+1A+2H operations which amount to about 4.5H operations.Therefore, in terms of computational requirements for SN, our scheme is comparable with other SCA-WSN schemes [11, 13-16, 18, 19] using only lightweight cryptographic techniques.Although the schemes of Vaidya et al. [10] and Kim et al. [17] require SN to perform only 2 hash function evaluations, these schemes do not achieve user anonymity and are vulnerable to a stolen smart card attack.Under the non-tamper-resistance assumption of smart cards, our scheme is the only one that provides user anonymity and resists stolen smart card attacks.

Security Proofs
We now prove that the authentication and key exchange protocol of our scheme is AKE-secure (in the sense of Definition 2) and provides user anonymity (in the sense of Definition 4).Recall that the security model described in Section 2 captures various SCA-WSN specific attacks (such as stolen smart card attacks, node capture attacks, privileged insider attacks, and stolen verifier attacks) as well as other common attacks (like impersonation attacks, man-in-the-middle attacks, replay attacks, and known key attacks) [21,23,25,34].Before providing formal security proofs in the model, we briefly discuss the security of our scheme against SCA-WSN specific attacks.
Stolen smart card attacks.Our scheme does not require a password verifier to be stored on the smart card of user U.Moreover, even if an adversary managed to obtain the ciphertext , the adversary would be unable to exploit C U as a password verifier since, under the ECCDH assumption, it is infeasible to compute k UG = J (T U kXkYkK UG ) from X and Y. Thus, our scheme is resistant against stolen smart card attacks.
Node capture attacks.In our scheme, each sensor node SN holds its individual secret key k GS = J(ID SN kz) which is shared only with the gateway GW.In other words, different sensor nodes have different secret keys (with an overwhelming probability).Thus, the secret key k GS obtained by capturing a sensor node SN will be of no use in impersonating another sensor node SN 0 who holds a key other than k GS .Therefore, node capture attacks are not possible against our scheme.
Privileged insider attacks.A privileged insider attack occurs when the gateway administrator can access a user's password to impersonate the user.In our scheme, the gateway GW receives no password-related information from the user U and does not manage any table for storing such information.It is thus clear that privileged insider attacks cannot be mounted against our scheme.
Stolen verifier attacks.In a stolen verifier attack, the adversary attempts to impersonate a legitimate user by stealing the user's password verifier stored on the gateway GW.However, in our scheme, GW does not store a password verifier of any kind but stores only two master secrets y and z which are selected independently of user passwords.Hence, our scheme is secure against stolen verifier attacks.

User Anonymity
Theorem 1.Our authentication and key exchange protocol, P, provides user anonymity in the random oracle model under the ECCDH assumption in G and the security of the symmetric encryption scheme Δ.
Proof.Let A be a PPT adversary against the user anonymity property of protocol P. We prove the theorem by making a series of modifications to the original experiment ExpUA 0 , bounding the difference in the success probability of A between two consecutive experiments, and ending up with an experiment where A has a success probability of 1/2 (i.e., A has no advantage).Let SuccUA i denote the event that A correctly guesses the hidden bit b chosen by the TestUA oracle in experiment ExpUA i .Let t i UA be the maximum time required to perform the experiment ExpUA i involving the adversary A.
Experiment ExpUA 1 .In this experiment, we simulate the random oracle J as follows: Simulation of the J oracle: For each J query on a string str, the simulator first checks if an entry of the form (str,j) is in a list called JList which contains all the input-output pairs of J.If such an entry exists in JList, the simulator returns j as the output of the J query.Otherwise, the simulator chooses a random '-bit string j 0 , returns j 0 in response to the query, and adds the entry (str,j 0 ) to JList.
For all other oracle queries of A, the simulator answers them as in the original experiment ExpUA 0 .Then, ExpUA 1 is perfectly indistinguishable from ExpUA 0 and therefore, Claim 1 holds.
Claim 1. Pr P;A ½SuccUA 1 ¼ Pr P;A ½SuccUA 0 .Experiment ExpUA 2 .Here, we modify the experiment so that X is computed as follows: The ExpUA 2 modification: • The simulator chooses a random exponent a 2 Z Ã q and computes A = aP.• For each user instance, the simulator chooses a random r 2 Z Ã q and sets X = rA.As a result of the modification, each K UG is set to rayP for some random r 2 Z Ã q .Since the view of A is identical between ExpUA 2 and ExpUA 1 , it follows that: Claim 2. Pr P;A ½SuccUA 2 ¼ Pr P;A ½SuccUA 1 .Experiment ExpUA 3 .We next modify the computations of X and Y as follows: The ExpUA 3 modification: • The simulator chooses two random elements A, B 2 G and sets Y = B.
• For each instance of clean users, the simulator chooses a random r 2 Ã q and sets X = rA.For other instances, the simulator computes X as in experiment ExpUA 2 .
• For each instance of clean users, the simulator sets each k UG to a random '-bit string.For other instances, the simulator computes k UG as in experiment ExpUA 2 .
Since k UG is set to a random '-bit string (for instances of clean users), the success probability of A may be different between ExpUA 3 and ExpUA 2 if it makes an J(T U kXkYkK UG ) query.However, this difference is bounded by Claim 3.
Claim 3. j Pr P;A ½SuccUA 3 À Pr P;A ½SuccUA 2 j 1=q J Á Adv ECCDH G ðt 3 UA Þ, where q J is the number of queries made to the J oracle.
Proof.We prove the claim via a reduction from the ECCDH problem which is believed to be hard.Assume that the success probability of A is non-negligibly different between ExpUA 3 and ExpUA 2 .Then we construct an algorithm A ECCDH that solves the ECCDH problem in G with a non-negligible advantage.The objective of A ECCDH is to compute and output the value W = uvP 2 G when given an ECCDH-problem instance (U = uP, V = vP) 2 G 2 .A ECCDH runs A as a subroutine while simulating all the oracles on its own.
A ECCDH handles all the oracle queries of A as specified in experiment ExpUA 3 but using U and V in place of X and Y.When A outputs its guess b 0 , A ECCDH chooses an entry of the form (T U kXkYkK,j) at random from JList and terminates outputting K/r.From the simulation, it is clear that A ECCDH outputs the desired result W = uvP with probability at least 1/q J if A makes a J(T U kXkYkK UG ) query for some instance of a clean user U 2 U.This completes the proof of Claim 3.
Experiment ExpUA 4 .We finally modify the experiment so that, for each clean user U 2 U, a random identity ID 0 U drawn from the identity space is used in place of the true identity ID U in generating C U .In the experiment ExpUA 4 , the adversary A gains no information on the hidden bit b chosen by the TestUA oracle because the identities of all clean users are chosen uniformly at random from the identity space.It, therefore, follows that Pr P;A ½SuccUA 4 ¼ 1=2.This result combined with Claims 1-4 yields the statement of Theorem 1.

AKE Security
Theorem 2. As long as the MAC scheme S and the symmetric encryption scheme Δ are both secure, our authentication and key exchange protocol P is secure in the random oracle model under the ECCDH assumption in G.
Proof.Fix a PPT adversary A against the security of the protocol P. To prove the theorem, we make a series of modifications to the original experiment ExpAKE 0 , bounding the effect of each change in the experiment on the success probability of A and ending up with an experiment where A has a success probability of 1/2.We use SuccAKE i to denote the event that A correctly guesses the hidden bit b chosen by the Test oracle in experiment ExpAKE i .Let t i AKE be the maximum time required to perform the experiment ExpAKE i involving the adversary A.
Experiment ExpAKE 1 .This experiment is different from ExpAKE 0 in that the random oracle J is simulated as follows: Simulation of the J oracle: For each J query on a string str, the simulator first checks if an entry of the form (str,j) is in a list called JList which contains all the input-output pairs of J.If such an entry exists in JList, the simulator returns j as the output of the J query.Otherwise, the simulator chooses a random '-bit string j 0 , returns j 0 in response to the query, and adds the entry (str,j 0 ) to JList.
The other oracle queries of A are answered as in the original experiment ExpAKE 0 .Then, since J is a random oracle, ExpAKE 1 is perfectly indistinguishable from ExpAKE 0 , and Claim 5 immediately follows.
Claim 5. Pr P;A ½SuccAKE 1 ¼ Pr P;A ½SuccAKE 0 .Experiment ExpAKE 2 .Here, we modify the experiment so that X is computed as follows: The ExpAKE 2 modification: • The simulator chooses a random exponent a 2 Z Ã q and computes A = aP.
• For each instance of users, the simulator chooses a random r 2 Z Ã q and sets X = rA.
As a result, each K UG is set to rayP for some random r 2 Z Ã q .Since the view of A is identical between ExpAKE 2 and ExpAKE 1 , it follows that: Claim 6. Pr P;A ½SuccAKE 2 ¼ Pr P;A ½SuccAKE 1 .Experiment ExpAKE 3 .We further modify the experiment as follows: The ExpAKE 3 modification: • The simulator chooses two random elements A,B 2 G and sets Y = B.
• For each fresh instance, the simulator chooses a random r 2 Z Ã q and sets X = rA.For other instances, the simulator computes X as in experiment ExpAKE 2 .
• For each fresh instance, the simulator sets each k UG to a random '-bit string.For other instances, the simulator computes k UG as in experiment ExpAKE 2 .
Since k UG is set to a random '-bit string (for fresh instances), the success of A may be different between ExpAKE 2 and ExpAKE 3 if it makes an J(T U kXkYkK UG ) query.This difference is bounded by Claim 7.
Claim 7 j Pr P;A ½SuccAKE 3 À Pr P;A ½SuccAKE 2 j 1=q J Á Adv ECCDH G ðt 3 AKE Þ, where q J is the number of queries made to the J oracle.
Proof.We prove the claim via a reduction from the ECCDH problem which is believed to be hard.Assume that the success probability of A is non-negligibly different between ExpAKE 2 and ExpAKE 3 .Then we construct an algorithm A ECCDH that solves the ECCDH problem in G with a non-negligible advantage.The objective of A ECCDH is to compute and output the value W = uvP 2 G when given an ECCDH-problem instance (U = uP,V = vP) 2 G 2 .A ECCDH runs A as a subroutine while simulating all the oracles on its own.
A ECCDH handles all the oracle queries of A as specified in experiment ExpAKE 3 but using U and V in place of X and Y.When A outputs its guess b 0 , A ECCDH chooses an entry of the form (T U kXkYkK,j) at random from JList and terminates outputting K/r.From the simulation, it is clear that A ECCDH outputs the desired result W = uvP with probability at least 1/q J if A makes a J(T U kXkYkK UG ) query for some fresh instance of any U 2 U.This completes the proof of Claim 7.
Experiment ExpAKE 4 .This experiment is different from ExpAKE 3 in that it is aborted if the following event Forge occurs.
Forge: The event that the adversary A makes a Send query that contains a MAC forgery.
Then we claim that: Claim 8 j Pr P;A ½SuccAKE 4 À Pr P;A ½SuccAKE 3 j q send Á Adv EFÀCMA S ðt 4 AKE Þ, where q send is the number of queries made to the Send oracle.
Proof.Assume that the event Forge occurs with a non-negligible probability.Then, we construct an algorithm A EF who generates, with a non-negligible probability, a forgery against the MAC scheme S. The algorithm A EF is is given access to the Mac k ðÁÞ and Ver k ðÁÞ oracles.The goal of A EF is to produce a message/MAC pair (m,σ) such that: (1) Ver k ðm; sÞ ¼ 1 and (2) σ has not been output by the oracle Mac k ðÁÞ on input m.
Let n be the total number of MAC keys used in the sessions initiated via a Send query.A EF begins by choosing a random i 2 {1, . .., n}.Let k i denote the i th key among all the n MAC keys, and Send i be any Send query that is expected to be answered and/or verified using k i .A EF runs A as a subroutine and answers the oracle queries of A as in experiment ExpAKE 3 except that: it answers all Send i queries by accessing its Mac k ðÁÞ and Ver k ðÁÞ oracles.As a result, the i th MAC key k i is not used during the simulation.If Forge occurs against an instance who holds A EF halts and outputs the message/MAC pair generated by A as its forgery.Otherwise, A EF terminates with a failure indication.
If the guess i is correct, then the simulation is perfect and A EF achieves its goal.Namely, Adv EFÀCMA S ðA EF Þ ¼ Pr½Forge=n.Since n q send and A EF runs in time at most t 4 AKE , we get Pr½Forge This completes the proof of Claim 8. Experiment ExpAKE 5 .We next modify the way of answering queries to the H oracle as follows:Simulation of the H oracle: For each H query on a string str, the simulator first checks if an entry of the form (str,h) is in a list called HList which is maintained to store input-output pairs of H.If it is, h is the answer to the hash query.Otherwise, the simulator chooses a random κ-bit string h 0 , answers the query with h 0 , and adds the entry (str,h 0 ) to HList.
The other oracle queries of A are handled as in experiment ExpAKE 4 .Since 5 is perfectly indistinguishable from ExpAKE 4 , it is clear that: Claim 9. Pr P;A ½SuccAKE 5 ¼ Pr P;A ½SuccAKE 4 Experiment ExpAKE 6 .We finally modify the experiment so that the session key sk is set to a random κ-bit string for each fresh instance and its partner.Accordingly, the success probability of A may be different between ExpAKE 6 and ExpAKE 5 if it asks an H query of the form H (k US kT U kID SN ) for some uncorrupted U 2 U and SN 2 SN.But the difference is bounded by: Claim 10 j Pr P;A ½SuccAKE 6 À Pr P;A ½SuccAKE 5 j 1 q H Á Adv INDÀMEK D ðt 6 AKE Þ, where q H is the number of queries made to the H oracle.
Proof.That is, each C GW is set to the encryption of either k US or k 0 US .Now when A terminates and outputs its guess b 0 , A IND-MEK selects an entry of the form (k US kT U kID SN ,h) at random from HList and outputs 0 if k = k US , and 1 otherwise.If A asks an H query of the form H (k US kT U kID SN ) for some uncorrupted U 2 U and SN 2 SN, A IND-MEK correctly guesses the bit b in its indistinguishability experiment with probability at least 1 q H and therefore, Claim 10 follows.
In experiment ExpAKE 6 , the adversary A obtains no information on the hidden bit b chosen by the TestUA oracle since the session keys of all fresh instances are selected uniformly at random from {0, 1} κ .Therefore, it follows that Pr P;A ½SuccUA 4 ¼ 1=2.This result combined with Claims 5-10 completes the proof of Theorem 2.

Concluding Remarks
With the continuing advancements in sensor technologies, WSNs will play an increasingly important role in commercial, government and military settings.A number of recent high profiles such as the revelations by Edward Snowden that the US National Security Agency has been conducting massive online surveillance of both US and non-US citizens highlighted the potential of ensuring user privacy and anonymity.In WSNs, for example, designing a secure and efficient user authentication scheme without compromising user anonymity remains an area of active research.
In this work, we have presented a SCA-WSN scheme, a smart-card-based user authentication scheme for wireless sensor networks, which achieves user anonymity without imposing (expensive) public key operations on sensors.Our result in this paper does not contradict the result of Wang and Wang [28,29] but rather supports and clarifies it: in order for a SCA-WSN scheme to achieve user anonymity, the use of public key cryptography is inevitable but, if forward secrecy is not desired, can be avoided at least on the sensor side.Extending our result to the case of threefactor authentication [34] would be an interesting future work.

Stage 2 .
Once A decides that Stage 1 is over, it outputs a bit b 0 as a guess on the hidden bit b chosen by the TestAKE oracle.A is said to succeed if b = b 0 .Let SuccAKE 0 be the event that A succeeds in the experiment ExpAKE 0 , and Adv AKE P ðAÞ denote the advantage of A in breaking the AKE security of protocol P.Then, we define Adv AKE P ðAÞ ¼ 2 Á Pr P;A ½SuccAKE 0 À 1. Definition 2 (AKE Security).An authentication and key exchange protocol P is AKE-secure if Adv AKE P ðAÞ is negligible for any PPT adversary A.

Stage 2 .
Once A decides that Stage 1 is over, it outputs a bit b 0 as a guess on the hidden bit b chosen by the TestUA oracle.A is said to succeed if b = b 0 .

G
ðAÞ be the advantage of an algorithm A in solving the ECCDH problem for G and be defined as Adv ECCDH G ðAÞ ¼ Pr½AðG; P; xP; yPÞ ¼ xyP.We assume that Adv ECCDH G ðAÞ is negligible for all PPT algorithms A (i.e., the ECCDH assumption holds in G).We denote by Adv ECCDH G ðtÞ the maximum value of Adv ECCDH G ðAÞ over all algorithms A running in time at most t.
where b 0 2 {0, 1} return b 0 We use Adv INDÀSEK D ðAÞ to denote the advantage of A in violating the indistinguishability of Δ in experiment Exp INDÀSEK D ðA; n; bÞ, and define it as Adv INDÀSEK D ðAÞ ¼ jPr½Exp INDÀSEK D ðA; n; 0Þ ¼ 1 À Pr½Exp INDÀSEK D ðA; n; 1Þ ¼ 1j: We say that the symmetric encryption scheme Δ is secure if Adv INDÀSEK D ðAÞ is negligible for every PPT eavesdropper A. Let Adv INDÀSEK D ðtÞ be the maximum value of Adv INDÀSEK D ðAÞ over all A running in time at most t.

where b 0 2
{0, 1} return b 0 We define Adv INDÀMEK D ðAÞ and Adv INDÀMEK D ðtÞ respectively as Adv INDÀMEK D ðAÞ ¼ jPr½Exp INDÀMEK D ðA; n; d; 0Þ ¼ 1 À Pr½Exp INDÀMEK D ðA; n; d; 1Þ ¼ 1j is over all A running in time at most t.Lemma 1.For any symmetric encryption scheme Δ, Adv INDÀMEK D ðtÞ d Á Adv INDÀSEK D ðtÞ; where d is as defined for experiment Exp INDÀMEK D ðA; n; d; bÞ.Proof.Assume an adversary A who attacks the indistinguishability of Δ in Exp INDÀMEK D ðA; n; d; bÞ with time complexity t.The proof proceeds with a standard hybrid argument [32].Consider a sequence of d + 1 hybrid experiments Exp INDÀMEK D;x ðA; n; d; bÞ, 0 ξ d, where each Exp INDÀMEK D;x ðA, n, d, b) is different from Exp INDÀMEK D ðA; n; d; bÞ only in that each c i,j is set as follows:

:
The experiments Exp INDÀMEK D;0 ðA; n; d; bÞ and Exp INDÀMEK D;d ðA; n; d; bÞ at the extremes of the sequence are identical to the experiments Exp INDÀMEK D ðA; n; d; 0Þ and Exp INDÀMEK D ðA; n; d; 1Þ, respectively.As we move from Exp INDÀMEK D;xÀ1 ðA; n; d; bÞ to Exp INDÀMEK D;x ðA; n; d; bÞ in the sequence, we change the n ciphertexts c ξ,1 , . .., c ξ,n from encryptions of the first plaintexts to encryptions of the second plaintexts.Since there are d such moves from Exp INDÀMEK D;0 ðA; n; d; bÞ to Exp INDÀMEK D;d ðA; n; d; bÞ, the inequality of the lemma follows immediately if we prove that the difference between the probabilities that A outputs 1 in any two neighboring experiments Exp INDÀMEK D;xÀ1 ðA; n; d; bÞ and Exp INDÀMEK D;x ðA; n; d; bÞ is at most Adv INDÀSEK D ðtÞ.That is, to complete the proof, it suffices to show that for any 1 ξ d, jPr½Exp INDÀMEK D;xÀ1 ðA; n; d; bÞ ¼ 1 À Pr½Exp INDÀMEK D;x ðA; n; d; bÞ ¼ 1j Adv INDÀSEK D ðtÞ: ð1Þ Let ¼j Pr½Exp INDÀMEK D;xÀ1 ðA; n; d; bÞ ¼ 1 À Pr½Exp INDÀMEK D;x ðA; n; d; bÞ ¼ 1 j.Then, to prove Equation 1, we will construct, from A, an adversary A ξ who attacks the indistinguishability of Δ in Exp INDÀSEK D ðA; n; bÞ with advantage .A ξ begins by invoking adversary A, then proceeds to simulate the indistinguishability experiment for A, and finally ends by outputting whatever bit A eventually outputs.In the simulated experiment, A ξ generates the ciphertexts exactly as in the hybrid experiment Exp INDÀMEK D;x ðA; b; nÞ except that it generates c ξ,1 , . .., c ξ,n as follows: When A outputs the n plaintext pairs (m ξ,1,0 ,m ξ,1,1 ), . .., (m ξ,n,0 ,m ξ,n,1 ), A ξ outputs them as its own plaintext pairs in experiment Exp INDÀSEK D ðA x ; n; bÞ, receives in return the ciphertexts c 1 , . .., c n , and sets c ξ,1 = c 1 , . .., c ξ,n = c n .Then, it follows that: • the probability that A ξ outputs 1 when the given ciphertexts are the encryptions of the first plaintexts is equal to the probability that A outputs 1 in the experiment Exp INDÀMEK D;xÀ1 ðA; n; d; bÞ, and • the probability that A ξ outputs 1 when the given ciphertexts are the encryptions of the second plaintexts is equal to the probability that A outputs 1 in the experiment Exp INDÀMEK D;x ðA; n; d; bÞ.
; n; d; bÞ ¼ 1 À Pr½Exp INDÀMEK D;x ðA; n; d; bÞ ¼ 1j: Since A ξ has time complexity t, it follows that Adv INDÀSEK D ðA x Þ Adv INDÀSEK D ðtÞ by definition.This completes the proof of Equation 1 and hence the proof of Lemma 1.

Claim 4 .
j Pr P;A ½SuccUA 4 À Pr P;A ½SuccUA 3 j Adv INDÀMEK D ðt 4 UA Þ. Proof.We prove the claim by constructing an eavesdropping adversary A IND-MEK who attacks the indistinguishability of Δ in Exp INDÀMEK D ðA; n; d; bÞ with advantage equal to j Pr P;A ½SuccUA 4 À Pr P;A ½SuccUA 3 j (see Section 1 for details of experiment Exp INDÀMEK D ðA; n; d; bÞ).A IND-MEK begins by choosing a random bit b 2 {0, 1}.Then, A IND-MEK invokes the adversary A and answers all the oracle queries of A as in experiment ExpUA 3 except that, for each clean user U 2 U, it generates C U by accessing its own encryption oracle as follows: A IND-MEK outputs ðID U kEID U kk US ; ID 0 U kEID U kk US Þ as the first plaintext-pair in the indistinguishability experiment Exp INDÀMEK D .Let c 1 be the ciphertext received in return for the first pair.A IND-MEK sets C U equal to the ciphertext c 1 .That is, A IND-MEK sets C U to the encryption of either ID U kEID U kk US or ID 0 U kEID U kk US .Now when A terminates and outputs its guess b 0 , A IND-MEK outputs 1 if b = b 0 , and 0 otherwise.Then, it is clear that: • the probability that A IND-MEK outputs 1 when the first plaintexts are encrypted in the experiment Exp INDÀMEK D is equal to the probability that A succeeds in the experiment ExpUA 3 , and • the probability that A IND-MEK outputs 1 when the second plaintexts are encrypted in the experiment Exp INDÀMEK D is equal to the probability that A succeeds in the experiment ExpUA 4 .That is, Adv INDÀMEK D ðA INDÀMEK Þ ¼j Pr P;A ½SuccUA 4 À P;A ½SuccUA 3 j.Note that in the simulation, A IND-MEK eavesdrops at most q send encryptions which is polynomial in the security parameter '.This completes the proof of Claim 4.
We prove the claim by constructing an eavesdropper A IND-MEK who attacks the indistinguishability of Δ in experiment Exp INDÀMEK D ðA; n; d; bÞ.A IND-MEK invokes the adversary A and answers all the oracle queries of A as in experiment ExpAKE 5 except that it generates each C GW to be sent to a fresh sensor instance by accessing its own encryption oracle as follows: Let k 0 US 6 ¼ k US be a random string chosen from {0, 1} κ .A IND-MEK outputs ðk US ; k 0 US Þ as a plaintext pair in the indistinguishability experiment Exp INDÀMEK D .Let c be the ciphertext received in return for the plaintext pair.A IND-MEK sets C GW equal to the ciphertext c.
2. If ID U is valid, GW generates a temporary identity for U, TID U , and computes TC U = H (MKkID U kTE U ) and PTC U = TC U ÈRPW U , where TE U is the expiration time of TID U .
GW then stores (TID U , ID U , TE U ) in its verification table, and issues U a smart card containing {H(Á), TID U , TE U , PTC U }.3.U stores the random number r into the smart card, which then holds {H(Á), TID U , TE U , PTC U , r}.Login Request.U inserts its smart card into a card reader, and inputs ID U and PW U .The smart card retrieves the current timestamp T U , selects a random key K U , and computes

Table 1 .
A comparative summary of smart-card-based user authentication schemes for wireless sensor networks.