Efﬁcient and Provably Secure Key Agreement for Modern Smart Metering Communications

: Security in modern smart metering communications and in smart grid networks has been an area of interest recently. In this ﬁeld, identity-based mutual authentication including credential privacy without active involvement of a trusted third party is an important building block for smart grid technology. Recently, several schemes have been proposed for the smart grid with various security features (e.g., mutual authentication and key agreement). Moreover, these schemes are said to offer session key security under the widely accepted Canetti-Krawczyk (CK) security model. Instead, we argue that all of them are still vulnerable under the CK model. To remedy the problem, we present a new provably secure key agreement model for smart metering communications. The proposed model preserves the security features and provides more resistance against a denial of service attack. Moreover, our scheme is pairing-free, resulting in highly efﬁcient computational and communication efforts.


Introduction
Modern smart metering networks are one of the stepping stones in the evolution of smart grid (SG) networks and in renewable and distributed energy resource management systems.Unlike traditional metering systems, the infrastructure of modern smart metering relies typically on advanced information communication technologies (ICT).Smart metering networks will provide new opportunities for better control and management on energy production/consumption.Therefore, the future energy grid can operate, control and manage more efficiently and reliably.
In a smart metering network, a smart meter (SM) is an important enabler that utilises two-way communication to send/receive consumption data or commands from a service provider (SP) and then to various entities, e.g., energy supplier, distribution network operator (DNO) and others, as shown in Figure 1.Therefore, the increasing deployment of SMs in homes will provide many notable features, e.g., monitoring and control of energy consumption within the home area network, and communicating energy pricing information to consumers [1].
Smart metering provides various notable features, but it also poses various security and privacy challenges.For instance, recently three power companies experienced a massive cyberattack that disrupted the smooth functionality of the power grid and resulted in an energy blackout in a region for several hours [2].Such verified attack incidents serve as prominent demonstrations of the significant risks to utility companies.Moreover, to meet the demands of energy consumption and generation, both customers and utility SPs need to exchange two-way information.In this scenario, an adversary can easily tamper with or capture the flow of information (i.e., wireless packets), which may affect various use-cases, e.g., imbalance demand and supply systems, revenue losses, etc.Moreover, SMs can be captured physically as they are installed outside homes.As a SM usually collects and stores energy usages in its memory, the attacker can easily compromise a SM and dig out the information stored in it.This stored information may compromise the privacy of an individual, i.e., daily habits, sleeping patterns, and other activities.Moreover, as suggested in recent papers, under the Canetti-Krawczyk (CK) model [3,4], an attacker can even use the credentials that are stored in a meter and can impersonate other non-compromised entities.Therefore, security and privacy issues have been the main barriers recently in the success of smart metering and resistance.

Related Work
To address security and privacy issues in smart metering networks, cryptography-based solutions play a significant role providing authentication, integrity and confidentiality of flow of information between the SM and utility SPs.Recently, several authentication and key agreement schemes have been proposed in SGs.
In [5,6], the authors proposed a secure key management and key distribution scheme, respectively, in the SG network.The authors utilized the involvement of a trusted third party (TTP) during the key negotiation phase and symmetric key operations between the SM and SP.This feature may not be always efficient as it requires the TTP to be online and enlarges the attack scope.Moreover, these schemes do not offer anonymity and are vulnerable to man-in-the-middle (MITM) attacks and impersonation attacks.
Considering public key infrastructure, Mahmood et al. and Mohammadali et al., proposed lightweight message authentication schemes for the SG in [7,8], respectively.In particular, Mahmood et al. [7] formally prove the resistance of the scheme in the CK security model.Unfortunately, both schemes do not provide anonymity of the SM's credentials.
In 2016, Tsai-Lo proposed the first anonymous key distribution scheme for SG communications [9].The authors utilised an identity-based signature to achieve authentication and anonymity at low computational cost.Unfortunately, in [10], Odelu et al. reported that Tsai-Lo's scheme provides weak security to the session key and that leads to many other security attacks.Then in [10], the authors proposed another authentication and session key agreement scheme for SGs.The authors asserted that their scheme required low computational cost and provided security of the session keys in the CK security model.However, in [11], Chen et al. claimed that the registration phase of the scheme proposed in [10] may be vulnerable and may lead to attacks.They also proposed a new scheme, with session key security in the CK security model, but with a different registration phase.In [12], another anonymous key agreement scheme was proposed, which is claimed to be resistant in the CK security model.This scheme does not use computing-intensive pairing operations and is limited to elliptic curve multiplications and additions.We will show that the schemes [10][11][12], claiming to be secure in the CK security model, do not satisfy this security feature.The advantage of resistance in the CK security model is that the scheme then also offers security attributes such as perfect forward secrecy, loss of information, known-key security, key-compromise impersonation, and unknown key-share, as proven in [13].In addition, we also discuss their weakness with respect to resilience to denial of service (DoS).
In [14], Gope-Sikdar proposed an authenticated key agreement scheme for securing SG networks in the CK security model.The authors utilized a physically unclonable function (PUF) and claimed that their scheme can provide robust security against MITM attacks, and offers resilience to DoS.However, the PUF uses a fuzzy extractor, which has limitations as reported in [15].
Consequently, most of the proposed schemes are either vulnerable to security attacks or require high computation costs at resource-constrained SMs.

Contributions
First, we show how three recently proposed schemes [10][11][12] for authentication in the SG domain, aiming to establish session key security in the CK model, are still vulnerable.In addition, these schemes may suffer a MITM attack, and that may lead to a DoS attack.Moreover, the scheme proposed in [10] also experiences the key escrow problem.
Second, we propose a pairing-free scheme, able to establish the security features of [10][11][12], having identity-based mutual authentication, credential privacy, session key security, and resistance under the CK adversary model.Since the operations are limited to elliptic curve multiplication and addition, hashes and symmetric key encryption operations, both computational and communication performance largely outperforms the state of the art.In addition, the proposed scheme does not require a secure channel during the registration of the entities and is resilient to key escrow due to the usage of Elliptic Curve Qu Vanstone (ECQV) certificates.Moreover, the success of DoS attacks at the side of the SP is largely avoided as the key is derived in one single phase from the side of the SP.
Third, we formally prove the security of the scheme under the CK adversary model and random oracle model.The security verification simulations are performed using the AVISPA software tool [16].In addition we compare the computational and communication cost with the other recently proposed anonymous, identity-based, mutual authentication schemes.

Outline
The paper is organised as follows.Section 2 deals with preliminaries.We show the weaknesses of the security scheme of [10][11][12] in Section 3. In Section 4, the proposed scheme is described.In Section 5, we give a formal proof of the security in the CK model.The computational complexity and the communication cost is explained in Section 6.Finally, conclusions are drawn in Section 7.

Preliminaries
We start with some background on bilinear pairings as it is required to understand the schemes and the attacks on [10][11][12].Next, the CK security model is further elaborated.We also discuss in more detail the ECQV certificate scheme as it is an important building block in the registration phase of our proposed scheme and also used in [11].

Bilinear Pairings
Denote the additive cyclic group by G 1 and the multiplicative group by G 2 , with both having high prime order q.Let P be a generator of G 1 .Then, the bilinear pairing e : G 1 × G 1 → G 2 should satisfy the followings: ) and e(aP 1 , bQ 1 ) = e(abP 1 , Q 1 ) = e(P 1 , abQ 1 ) = e(bP 1 , aQ 1 ) = e(P 1 , Q 1 ) ab for any a, b ∈ Z * q .
• Nondegenerate: There exist P, Q ∈ G 1 , such that e(P, Q) = 1, with 1 the identity element of G 2 .

•
Computable: For any P, Q ∈ G 1 , the value e(P, Q) is efficiently computed.
The following related mathematical problems are considered.

•
The Elliptic Curve Discrete Logarithm Problem (ECDLP).This problem states that given two points R and Q of an additive group G, generated by an elliptic curve (EC) of order q, it is computationally hard for any polynomial-time bounded algorithm to determine a parameter x ∈ Z * q , such that Q = xR.

•
The Elliptic Curve Diffie Hellman Problem (ECDHP).Given two points R = xP, Q = yP of an additive group G, generated by an EC of order q with two unknown parameters x, y ∈ Z * q , it is computationally hard for any polynomial-time bounded algorithm to determine the EC point xyP.

Smart Metering Network Model
Following Figure 1, in the HAN, a SM collects the consumption data usage from the appliances within a home and then it sends the collected data to the SP, periodically.To send energy usage data, a SM can utilize IEEE 802.15.4 (e.g., ZigBee/Zwave), IEEE 802.11 (e.g., WiFi), and/or powerline communication technologies, as discussed in [17,18].
The SP aggregates consumption usage data from several SMs within the neighbouring area network (NAN), and provides data services to many other stakeholders, e.g., energy suppliers, DNO, etc.The SP can communicate to the other stakeholder via WiMAX, 4G/5G, etc.Note that the main focus of this research is to establish a secure communication between the SM and the SP.

Thread Model
Following the scheme proposed in [10], we assume the CK adversary model, as presented in [3], where the adversary cannot only eavesdrop on the channel or actively manipulate (insert, change, replay) the transmitted messages, but he/she can reveal session state specific information, session keys, or long-term private keys.For details, the interested readers may refer to [3,10].The session specific information is defined as the local state of the session and its subroutines.Access is limited to either the locally stored information (local variables) or the long-term secret information, not the combination of both.
The ultimate goal of the attacker is to derive the common shared key.

ECQV Certificates
The ECQV certificate scheme [19] is a very efficient mechanism to construct a secret key pair together with a certificate for an entity in the scheme without the need for a secure channel between the TTP and the entity to share material for the generation of its secret private key.As a consequence, the TTP is also not able to derive the private key of the entity and so there are no key escrow problems.Its security has been formally proven in [20].The ECQV scheme works as follows for an entity A requesting the generation of its secret key pair and corresponding certificate with the TTP.
Consider the curve E p(a,b) in Z p with generator point P or order q.Denote the private and public key of the TTP by (k, P pub ) with P pub = kP.Define the hash function H 0 : {0, 1} * → Z * q .First the entity A with identity ID A chooses a random value r A ∈ Z * p and computes R A = r A P. The message ID A , R A is sent to the TTP.Here, the TTP also selects a random value r T ∈ R Z * p and computes R T = r T P. Next, it computes cert A = R A + R T , and r = H 0 (cert A ID A )r T + k.The values (cert A , r) are sent to A over a public channel.Using these values, A now computes its private key as d A = H 0 (cert A ID A )r A + r.It accepts the registration if its public key P A satisfies the following equality Consequently, given ID A , cert A , any legal entity is able to construct the corresponding public key of A using Equation (1).Thanks to the usage of the certificate, the other entity is assured of the relation between identity and public key.

Security Analysis of Authentication Schemes Recently Proposed in Literature
Based on weaknesses in the registration phase and key generation in [10], as also discussed later, Chen et al. [11] proposed a slightly different scheme.We argue that both schemes do not offer the required strength in the CK security model.In addition, we also describe some more practical issues with the registration phase in [10] and the resistance against DoS attacks.This last type of attack is also applicable for the scheme of [11].

Description of the scheme [10]:
TTP setup phase: The TTP first chooses a bilinear map e : a cyclic additive and multiplicative group respectively, both of order q, and P a generator of G 1 .Also five hash functions are identified: q , and H 5 : {0, 1} * × G 1 → Z * q , with m = n + w and w a constant determined by the security level.
Then the private key k is chosen and its corresponding public key is computed P pub = kP.These system parameters are published by the TTP.
Registration phase: In this phase, both the SM and the SP need to undergo a different process.
For the SM, after receiving its identity ID A , the TTP chooses a random number r A ∈ Z * q and computes R A = r A P and ) is sent over a secure channel to the SM.The SM stores in its tamper-proof module the pair (d A , R A ).
For the SP with identity ID B , the TTP computes the private key as d B = 1 k+H 1 (ID B ) and sends d B also over a secure channel.Denote hd b = H(ID B d B ), then the SP stores the pair (d b , hd b ) in its tamper-proof module.
Key negotiation phase: The steps in the key negotiation phase to derive the session key SK are summarised in Figure 2.
Weaknesses in [10]: Now we discuss the weaknesses of Odelu et al.'s scheme, as follows.
(A) Security in CK model: In the CK security model, a secure session reveal on the SM and SP, i.e., SSReveal(SM) and SSReveal(SP), is possible.We can assume the leakage of r 1 + d A as it represents a local session state at the side of the SM.It is a local variable needed to be stored in order to be reused after reception of MSG 2 .Similarly, we can assume r 2 + hd B as a local session state at the side of the SP.Again, this variable needs to be stored as it is used two times in the calculations of the SP.Since, SK = H 4 (g (r 1 +d A )(r 2 +hd B ) ), thus only depends on these two local session states, the session key can be retrieved and the scheme turns out to be vulnerable under the CK security model.(B) Practical issues with registration phase: The generation of key material for both the SM and the SP from the TTP is not resistant against an honest but curious TTP, as the TTP derives the key material completely on its own and pushes it to the SM and SP.Consequently, the TTP can follow all the operations, and is able to track the SMs and SPs communications, and can collect the information.
Moreover, in the registration phase, a secure channel is required between the SM, SP and TTP.
Secure channels are often difficult to establish, especially in the case of SMs, where they are mostly in practice established through physical contact.Therefore, secure channels are not always practical.
Finally, we also mention the weakness already noted by [11] regarding the key escrow problem.
Once the private key of the TTP is revealed, all private keys of the SPs and SMs are easily derived.Once these private keys are revealed, impersonation attacks and many more attacks can start.(C) Late detection of MITM: Lead to DoS: The scheme behaves very weak with regard to MITM attacks that may lead to DoS attacks on the server side.Assume that an attacker (Tom) acts as MITM.Tom can capture MSG 1 and sends it (MSG 1 Tom ) to the SP.Note that the SP can only decide about the validity of a request (MSG 1 Tom ) after completing the whole process, i.e., after receiving the message MSG 3 .As a consequence, each request opens a buffer, where first several compute intensive pairings need to be computed, followed by the submission of a response.This buffer needs to be kept open until a response of the SM is received.Consequently, the memory can easily overflow by sending a huge number of invalid requests, where valid and invalid requests cannot be distinguished due to the late detection of forged messages.

Description of the scheme [11]:
TTP setup phase: The setup phase is the same as in [10].
Registration phase: In this phase, both the SM and the SP are able to construct their key material according to the ECQV implicit certificate mechanism.As a result, the key pairs of SM and SP equal to (d A , P A ) and (d B , P B ) respectively.
Key negotiation phase: The steps in the key negotiation phase are summarised in Figure 3.
Weaknesses in [11]: Now we discuss the weaknesses of Chen et al.'s scheme, as follows.
(A) Security in CK model: A similar type of attack as in [10]
Then the private key k is chosen and its corresponding public key is computed P pub = kP.These system parameters are published by the TTP.
Registration phase: Based on the ECQV-implicit certificate mechanism, both the SM and the SP are able to construct their key material.As a result, the key pairs of SM and SP equal to (d A , P A ) and (d B , P B ) with corresponding certificate cert A and cert B respectively.
Key negotiation phase: The steps in the key negotiation phase are summarised in Figure 4.
Weaknesses in [12]: Now we discuss the weaknesses of Abbasinezhad et al.'s scheme, as follows.
(A) Security in CK model: The scheme is not resistant in the CK security model if the private keys d A and d B of the SM and SP respectively are leaked.This follows from the fact that As a result, the adversary is able to compute SK = H(ID A ID B C A D A ) and the security of the session key is broken.(B) Late detection of MITM: Lead to DoS: The same issue regarding the late detection of a MITM attack also holds in this scheme.After receiving MSG 1 , the SP is unable to check if this request is coming from a registered SM.Only after receiving the last message MSG 3 and verifying the hash value V 3 , the SP can decide if the key negotiation has been successfully executed.As a result, this weakness could lead to a DoS threat.

Lessons Learned
We here summarise the two most important lessons which need to be taken into account when deriving a key agreement protocol, offering resistance in the CK model and being less vulnerable for DoS attacks.

•
Resistance in CK model: Any possible definition of the SK should consist of a combination of both the local state variable and the private key of at least one entity.For instance, in [10,11], the SK can be written in a form only consisting of local state variables of the two entities and in [12], the SK is derivable to a form only consisting of the private keys of the two entities.

•
Resistance to DoS attacks: In [10][11][12], the SP only retrieves the identity of the SMs after receiving a second message and is not able to detect malicious behaviour.Therefore, to avoid the SP keeping open a huge amount of (potential malicious) sessions, it is better to let the request initiated by the SP.The SM is less vulnerable since it can react when too many requests are sent as they are coming from only one entity, i.e., the SP.

Proposed Scheme
The proposed scheme consists of three main phases.

Setup Phase
In this phase, the TTP selects the EC E p(a,b) in Z p with generator point P of order q.It determines six hash functions q , and H 5 : {0, 1} * → Z * q .Also a symmetric key encryption algorithm is chosen to encrypt a message M into the ciphertext C using the secret shared key k, C = E k (M), together with the corresponding decryption algorithm, M = D k (C).A random value k is set as the private key of the TTP.The corresponding public key P pub is computed by P pub = kP.Now, the public parameters {E p(a,b) , P pub , P, H 0 , H 1 , H 2 , H 3 , H 4 , H 5 , E k (), D k ()} are published.

Registration Phase
The registration phase for SMs and SPs are similar and follow the ECQV certificate scheme, refer to Section 2.3.As a result, each entity U is storing the public parameters {E p(a,b) , P, H 0 , H 1 , H 2 , H 3 , E k (), D k (), P pub }, its public key P u , certificate cert U and identity ID U , together with its private key d U .Note that only the private key needs to be stored in the tamper resistant part of the memory.Similar as in the other papers in literature on key agreement schemes, we assume that the SM is also storing the public key of the SP.If not, it needs to request before the key agreement phase the identity and certificate of the SP in order to compute the corresponding public key and verify the certificate, cf.Equation (1).

Key Agreement Phase
In the key agreement phase, the actual symmetric secret shared SK between SM and SP is established.We denote the SM by the entity with identity ID A , key pair (d A , P A ) and certificate cert A .Similar, the SP is denoted by the entity with identity ID B , key pair (d B , P B ) and certificate cert B .The detailed description is as follows.
SP broadcast: Every fixed period, the SP broadcasts the EC point M 0 = {R 2 }.This point is computed by randomly choosing a variable r 2 and R 2 = r 2 P.
SM response: For each SM that wants to do a key update or start a key negotiation process, the following steps are executed.First, the SM chooses a random value r 1 and computes the EC point R 1 = (r 1 + d A )P. Next, the SM derives the symmetric shared key with the SP by K = H 1 ((r 1 + d A )P B ).This key is used to encrypt the identity information of the SM, SP response: Upon arrival of this message, the SP first computes the key, K = H 1 (d B R 1 ) in order to decrypt C 1 and to derive ID A , cert A .Using these values, the public key P A of the SM can be computed (Equation ( 1)), P A = H 0 (cert A ID A )cert A + P pub .At this point, the SK can be computed by the SP as Finally, if also the SM verifies the correctness of the received hash, both SM and SP have successfully derived a common shared secret key, SK.The key agreement phase is summarised in Figure 5. Remark.Note that the SK is the result of a hash function, whose length is normally longer than the required key size of an encryption algorithm of the same security, due to the birthday problem.Therefore, in practice, only the first l bits of SK are considered.

Formal Security Analysis
We now show that our key agreement scheme offers session key security under the CK adversary model [3,21] and in the random oracle model, following the method of [10,11,22].The participants U in our scheme are the SM, SP, TTP or a random oracle O, i.e., U = {SM, SP, TTP, O}.Taking into account the CK adversary model, we assume that the attacker can run the following queries.

•
Hash queries H i (m) with i ∈ {0, 1, 2, 3, 4, 5}.If m already exists in the list L H i , the value H i (m) will be returned.Otherwise, a random value will be generated, added to the list L H i , and returned.

•
Send queries.These queries simulate active attacks, in which the adversary is able to modify the transmitted messages.As a result, a corresponding reply will be generated.Since there are three communication passes, four different Send queries need to be defined.
-Send(0,SP).A random value r 2 is chosen to compute R 2 = r 2 P. The output of the query is • Execute queries.These queries simulate the passive attacks, in which the adversary can only eavesdrop onto the channel and is able to collect the transmitted messages.We can distinguish three different execute queries resulting from the first three Send queries, as defined above.

•
Session specific state reveal queries (SSReveal).According to the CK adversary model, the attacker is able to retrieve session specific state information, derived by the SM and the SP, respectively.Note that no long-term private keys are revealed in this query.
-SSReveal(SM).The output of this query results in . The output of this query results in r 2 , R 2 , h 1 , h 2 , S 2 .
• Corrupt queries.These queries give the private key of the entity as result.Note that only Corrupt(SM) and Corrupt(SP) exist and no corrupt queries with regards to the TTP, which is considered a completely trusted entity.They are included to prove the perfect forward security of the scheme.

•
Session key reveal query (SKReveal).In this query, the established symmetric SK between SP and SM is returned in case it has been successfully generated.

•
Test query.In this query, either the established SK or a random value is returned, dependent on the output c = 1 or c = 0, respectively of a flipped coin c.Note that the test query cannot be issued when the SKReveal query, the SSReveal(SM) and Corrupt(SM), or SSReveal(SP) and Corrupt(SP), have been executed.
In order to prove the semantic security of the scheme, we consider the following two definitions.

•
The SP and SM are partners if they are exchanging messages directly and are the only entities able to successfully derive an authenticated common shared SK.

•
The established shared secret key is said to be fresh if the SK has been established without SKReveal query by the adversary or Corrupt query of SM and SP.
The final goal of the adversary A is to distinguish the difference between a real secret session key or a random value, i.e., to successfully predict the output of the test query.If Pr(succ) denotes the probability that the adversary succeeds in its mission, the advantage of the adversary in breaking the semantic security of the proposed scheme equals to Adv(A) = |2Pr[succ] − 1|.Consequently, our scheme offers semantic security under the CK adversary and random oracle model if the advantage for A winning the game satisfies Adv(A) ≤ , for any sufficiently small >0.The difference lemma [23] is used to prove the statement.

Lemma 1. (Difference Lemma
) Let E 1 , E 2 be the events of winning game 1 and game 2. Denote an error event by E, such that E 1 |¬E occurs if and only if Theorem 1.Let A be a polynomial-time adversary against the semantic security, which makes a maximum of q s Send queries, q e Execute queries and q h Hash queries.The advantage of A is bounded by Adv(A) ≤ O(q s +q e ) 2 2q + O(q h ) 2 2q + O(q s +q h ) q + O(q h T), with T the time to solve the ECDH problem.
Proof.We proof the theorem by means of game hopping [21,23].An attacker's success probability only increases by a negligible amount when moving between the games, as a consequence of Lemma 1.
There are five games {GM0,GM1,GM2,GM3,GM4} to be defined.Denote by succ i the event that A wins the game GM i , with 0 ≤ i ≤ 4.

•
Game GM0.This is the real game, as defined in the semantic security framework.From the definition, we have that • Game GM1.In this game, the oracles for the different queries are simulated and the resulting outputs of the queries are stored in the lists.In the random oracle model, it holds that • Game GM2.In this game, also all oracles are simulated, but collisions are avoided in the output of the hash functions and the selection of the random values r 1 , r 2 among the different sessions.
Due to the birthday paradox, the probability that these two events appear is bounded by and respectively.Consequently, it holds • Game GM3.In this game, the adversary A is able to find the hash values S 1 , S 2 without input of the random oracle Send queries.In this case, the scheme is simply terminated.Consequently, GM3 and GM2 are indistinguishable, if and only if the SM rejects S 2 or the SP rejects S 1 .
Rejection only appears when the requested message belongs to the list of stored transcripts and when the hash value is also present in the list of stored record, kept by the adversary A.
As a consequence, due to the difference lemma, we have that • Game GM4.In this game, we consider the CK adversary model and assume that either the session state variables or the long-term secret variables are revealed at each of the involved participants.The goal of the adversary is to find the SK by performing Execute and Hash queries, with four possible combinations of SSReveal and Corrupt queries.In each of the four scenarios, we show that for successfully deriving the SK, one should be able to both solve the ECDHP and to perform a successful hash query of H 1 .
-SSReveal(SM) and SSReveal(SP).As a result of these queries, the adversary A possesses , respectively.In order to compute the session key, either d A or d B is required.An impersonation attack is also not possible due to the usage of the ECQV implicit certificates scheme [20] and the presence of both P A , P B in the SK computation.-SSReveal(SM) and Corrupt(SP).Here, the adversary A receives the information C, S 1 and d B , respectively.For the derivation of the SK, cf.Equation ( 6), also r 2 or d A is required.-Corrupt(SM) and SSReveal(SP).After performing these queries, the adversary A learns the information d A and r 2 , R 2 , h 1 , h 2 , S 2 , respectively.However, for the derivation of the SK, cf.Equation ( 6), also r 1 or d B is required.-Corrupt(SM) and Corrupt(SP).In this case, as a result of these queries, the adversary A possesses the information d A and d B , respectively.However, for the derivation of the SK, cf.Equation ( 6), also r 1 or r 2 is required.
To conclude, the difference between GM3 and GM4 is negligible as long as the probability to solve the ECDHP and to perform a successful hash query of H 3 is small.Consequently, with T the time to solve the ECDH problem and Succ 3 the event that A wins the game GM3.Consequently, applying Lemma 1 on the games GM0, GM1, GM2, GM3 and GM4, taking into account Equations ( 2)-( 5) and (7), results in the final proof of the theorem.[16] In this subsection, we perform the security verification simulations for the proposed scheme using the AVISPA tool.It is a software tool and quite popular for performing automated verification of Internet security protocols and applications.The tool is widely used in industry and academia.For verification, the tool integrates backend servers, such as On-the-Fly Model Checker (OFMC) and Constraint-Logic-based Attack Searcher (Cl-AtSe).The AVISPA uses a high-level security protocol specification language (HLPSL).The HLPSL specifies the roles of each actor (e.g., SM and SP).These roles are as follows: (i) Basic role reports what initial information can be used by the SP and SM and how the conversions are being happening in the protocol; (ii) Composition role reports a session where the SP and SM are communicating together; (iii) Environment role provides details the global parameters, sessions and an attacker knowledge in the key agreement phase in the proposed protocol.In security verification, the tool utilizes the Dolve-Yao model [24], which is represented as the channel(dy).

Security Simulation Using AVISPA Tool
We developed HLPSL script for the proposed scheme (i.e., key agreement phase).The SP and SM basic roles are shown in Figure 6.The results of the security verification presented in Figure 7 show that the proposed scheme is secure and SAFE from attacks using the (OFMC) backend.Precisely, Table 1 summaries the results from the AVISPA tool that the proposed key agreement achieved confidentiality and authentication.In addition, it is safe from MITM and replay attacks with a bounded number of sessions.

Informal Security Analysis
We now informally discuss the strength of the proposed protocol with respect to the required security features for an identity-based mutual authentication scheme, to be applied in a SG context [10,11].

•
Resistance against replay attacks.There are two options, either M 1 is replayed in the same period of R 2 usage or it is replayed when a new R 2 is determined by the SP.In the first case, the same key as before is derived.However by capturing M 2 , which is a hash value containing the SK, no additional information can be derived by the attacker.If the server keeps track of the parameters R 1 sent during the period in which R 2 remains constant, further action of the SP can be avoided.
In the second case, a new session key is generated by the SP.However, when checking the hash value S 1 a contraction is found by the SP as the SK is different.The session is then stopped immediately.

•
Resistance against impersonation attacks.There are again two options, impersonation of messages M 0 and M 1 .First, it is impossible to impersonate the message M 0 as it is used to construct the SK by both the SM and the SP.Even if the SM is using R 2 , sent from a malicious entity, the corresponding SK computed by the SM will not correspond with the SK computed by the SP and at the point where S 1 is validated.At that moment, the session will be terminated.Also impersonation of the message M 1 sent by the SM is impossible.This follows from the fact that M 1 consists of the parameter R 1 .Only the SP is able to derive from R 1 the common shared key K with the SM in order to decrypt the ciphertext C for finding the identity and certificate of the SM.From these two parameters and the strength of the ECQV certificate mechanism, the SP can construct the corresponding public key P A of the SM.The construction of the SK by the SP exploits the usage of this public key P A and its own private key d B , which is also derivable by the SM who is in possession of the correct corresponding private key d A and the public key P B of the SP.Consequently, it is impossible for an attacker to impersonate M 1 without knowledge of a valid private-public key pair of a SM or to impersonate M 2 without knowledge of the private key d B of the SP.

•
Resistance against MITM attacks.For the same reasons as explained in the replay and impersonation attacks, it is impossible to execute a MITM attack.Note that this resistance also strongly relies from the authentication feature established through the ECQV certificate mechanism.

•
Anonymity.From the messages M 0 , M 1 , M 2 sent in the protocol, no information on the identity of the SM can be derived.The only identity related information is hidden in the message C, which is encrypted using a key only derivable by the SP.

•
Resistance against DoS attacks.First of all, we here consider DoS attacks from the side of the server as resistance from the SM is easier to obtain by just blocking the amount of sent requests.Compared to the previous schemes in literature [10][11][12]14], our scheme is initiated by the SP with one single and common message to all interested SMs.Consequently, no separated buffers from received messages of different unknown SMs need to be saved by the SP.Upon arrival of a message M 1 from a particular SM, the SP can immediately check the validity and integrity of it in one single phase.If the check is not successful, it can drop the request and go to the next received message.

Comparison of Security Features
Table 2 compares the security features of our scheme with other schemes presented for the purpose of identity-based mutual authentication in the context of SGs.It must be in addition mentioned that the security strength of [14] with respect to the anonymity feature and the replay, impersonation and MITM attack is strongly dependent on the number of pre-stored security material, which is established with the need for a secure communication channel.Consequently, the process to update the security material is very impractical and by generating a DoS attack both from the side of the SM and the SP, this key material can be very easily exhausted.
Based on Table 2 and the fact that anonymity of the SM's credentials is an elementary security feature, we decided to perform our performance analysis on the schemes providing anonymity.These schemes correspond also with the most recent schemes.Consequently, we compare our scheme with the schemes [9][10][11][12]14].

Performance Analysis
The performance analysis is split into the computation and communication costs.

Computation Costs
The computation costs are measured by counting the number of most compute intensive operations and taking their corresponding computational time into account.We denote the timing for the bilinear pairing as T b , the point multiplication T mp , point addition T ap , modular exponentiation T e , a symmetric encryption/decryption T s , and hash operation T h .
The timings of these operations have been computed in [25] on a personal computer with a 2.5 GHz CPU, an 8 GB RAM and Windows 7 as OS for an 80-bit security level.This corresponds with a hash function resulting in a 160-bit output and an EC of order 160, i.e., q = 160.For the timing of the same operations on a more constrained device, mimicking a SM, a single core 798 MHz CPU and 256 MB of RAM is chosen.We refer to [14] for the corresponding timings.In addition, similar as in [14], the time to execute a 128-bit arbiter PUF call on an embedded device MSP430 micro controller with 798 MHz CPU is derived from [26].For the time to execute a fuzzy extractor generation operation, T FE.Gen , and a fuzzy extractor reconstruction operation, T RE.Rec , the code offset mechanism using the Bose-Chaudhuri-Hocquenghem (BCH) code is considered, as in [27].
Table 3 shows the comparison of the computational overheads between our scheme and [9][10][11]14].As it can be seen, our scheme is offering a better overall computational complexity compared to most of the other schemes.The complexity is very close to the scheme of [12].However, the scheme of [11] is still slightly more efficient at the side of the SM.This cost in performance needs to be paid in order to offer resistance in the CK security model.
In addition, there is a huge difference in complexity with [14] at the SM, as the timing in [14] strictly depends on the efficiency of the PUF and the fuzzy extractor and no EC operations are computed.However, it should be noted that the fuzzy extractor of the PUF has several severe limitations [15].

Communication Costs
For the communication costs, we determine the number of bits transmitted by both the SM and the SP.In all the considered schemes, the number of communication phases equals to three, except in [14], where there are four phases required.Note that we consider the 80-bit security level.Therefore, the length of the hash function and the nonces/random numbers equals to 160 bits.For the schemes of [9][10][11], the sizes of the groups G 1 and G 2 , related to the pairing operation, are 320 and 512 bits, respectively.When sending an EC point, it is sufficient to send the x-coordinate together with a sign bit.In addition, we assume that the length of identity related information equals to 32 bits.The length of the PUF responses equals to 128 bits.As can be concluded from Table 4, our scheme, together with [12], requires the smallest number of transmitted bits to be sent over the channel, compared to the other schemes.
Consequently, in our scheme messages M 0 , M 2 from SP contain 161 and 160 bits respectively, resulting in a total message size sent by the SP equal to 321.The message M 1 consists of 1 hash (160 bit), 1 EC point (161 bit) and 1 ciphertext message (192 bits) containing the identity and an EC point.Therefore, the SM sends a message of size 511 to the SP.

Other Simulations
Other simulations considering a real time smart metering communications are performed.The total traffic volume gain at the SP can be a concern due to the high number of packets received from the SMs.For instance, in order to manage the load balancing in the SG, the SP receives consumption usages data packets (i.e., P) from a number of SMs (i.e., N), periodically (every 15/30 min).Therefore, the total traffic volume gain at the SP will be very high, which is N × P for each session.
The results of the total traffic volume gain (in bits) at the SP presented in Figure 8 by varying the number of SMs.In our analysis, we consider one session per SM that sends consumption usages data to the SP.As shown in Figure 8, in the proposed scheme, the total traffic gain volume is gradually increasing as the number of SMs are increasing, which is quite obvious.Nevertheless, the increase in traffic volume is significantly higher in [9][10][11]14] as compared to our proposed scheme and [12].Hence, the proposed scheme is more secure and efficient than the state of art schemes.

Conclusions
In this paper, we have shown weaknesses on three recently proposed authentication schemes in the context of SG, claiming to offer session key security in the CK security model.This security model has increasingly become the standard in common authentication protocols.From the lessons learned, we developed a new scheme which is able to provide effective session key security in the CK model and offered the same set of required security features in a smart metering setting and also in the SG.This set included identity-based mutual authentication, credential privacy, and session key security, as well as resistance against the well-known attacks of replay, MITM, and impersonation.Moreover, we also developed the scheme to offer maximum protection against DoS attacks by providing the possibility to the SP to derive from the first received message the validity of the request, thus avoiding the need for storing buffers coming from potential attackers, as required in the other schemes in the literature.Also from a computation and communication point of view, our proposed scheme behaves very well, if not excellently, compared to related work.Finally, we want to note that the application of our scheme goes beyond the domain of the SG, which will be purpose of future work.

Figure 2 .
Figure 2. Steps and computations in the key agreement phase of [10].

Figure 3 .
Figure 3. Review of key agreement phase of Chen et al.'s scheme [11].

Figure 4 .
Figure 4. Steps and computations in the key agreement phase of Abbasinezhad et al.'s scheme [12].
Finally, using the received values R 1 , C and the computed values P A , SK, the hash function H 4 (R 1 C P A SK) is computed and verified if it corresponds with the actual received S 1 value.SP confirmation: If the verification of the SP is positive, a key confirmation is sent by the SP.Therefore, the hash S 2 = H 5 (ID A ID B R 1 R 2 P A P B SK) is computed and M 2 = {S 2 } is sent to the SM.

Figure 5 .
Figure 5. Steps and computations in the key agreement phase of proposed scheme.

Figure 7 .
Figure 7. Security simulation verification results of the proposed scheme.

Figure 8 .
Figure 8.Total traffic volume at the SP from smart meters.
is possible.In the CK security model, a secure session reveal on the SM and SP, i.e., SSReveal(SM) and SSReveal(SP), is possible.As a result, the local states r 1 + d A from SM and r 2 + d B from SP are leaked.Since, SK = H 4 ((r 1 + d A )(r 2 + d B )P), the security of the session key is broken.(B) Late detection of MITM: Lead to DoS: The same issue regarding the late detection of a MITM attack also holds in this scheme.After receiving MSG 1 , the SP is unable to check if this request is coming from a registered SM.Only after receiving the last message MSG 3 and verifying the hash value A 3 , the SP can decide if the key negotiation has been successfully executed.As a result, this weakness could lead to DoS threat.
Then,P A = H 0 (cert A ID A )cert A + P TTP is derived.Next, h 1 = H 2 (ID A ID B R 1 R 2 P A P B ) and h 2 = H 2 (ID B ID A R 2 R 1 P B P A ) are computed, to find SK = H 3 ((r 2 h 2 + d B )(h 1 R 1 + P A ))and check H 4 (R 1 C P A SK) against S 1 .If the verification is unsuccessful, the session can stop, otherwiseS 2 = H 5 (ID A ID B R 1 R 2 P A P B SK) is computed and M 2 = {S 2 } is the output of the query.-Send(M 2 ,SP).If S 2 = H 5 (ID A ID B R 1 R 2 P A P B SK) is not valid, then the session is terminated.Otherwise, both SP and SM have successfully negotiated a common secret key SK.

Table 1 .
Summary of the results in AVISPA tool.

Table 2 .
Comparison of security features of other identity-based mutual authentication schemes.

Table 4 .
Comparison of communication complexity.