Abstract
Introduction
Smart grid (SG) is designed to replace traditional electric power infrastructure and used to manage electricity demand in a sustainable, reliable, and economic manner. There are bi-directional flows of power and communication between the provider and consumers of electronic power in SG. Figure 1 shows the communication architecture for SG, which includes home area network (HAN), building area network (BAN), and neighborhood area network (NAN). There is a control center (CC) in each NAN which is designed to manage NAN. The building gateways collect electricity consumption and customers’ requirements and then transmit to CC. CC allows customers to control their own electricity situation and further adjustment of electricity consumption at any time, which save energy and money.1–3 The SG can also detect power outages before it becomes large-scale black out, which helps electricity to recover quickly after an emergency. The security and privacy of information which exchanges between customers and the CC has become important and challenging topics in the SG. SG is vulnerable to a variety of malicious attacks, such as man-in-the-middle (MIMT), denial of service (DOS), impersonation, brute-force, and replay. 1 The impact of these attacks can cause a significant loss and harm on society. As a result, a security protocol should be provided in SG.1,4–13

Communication architecture for smart grid.
In order to complete the bi-directional communication, an advanced metering infrastructure (AMI) which contains a key component (smart meter (SM)) should be used in SG. SM is a rather limited resource with low memory and computational capacity. The privacy of SMs need to be considered1,14 since the SG requires a lightweight secure authentication and key agreement framework.
The security of SG has gained substantial attention. In 2011, a key distribution and management scheme for AMI was proposed by Kamto et al. 15 The aim of the protocol is to provide communication security between group of devices and SMs in HAN. Fouda et al. 16 proposed a message authentication scheme between HAN gateway (GW) and BAN GW. Wu and Zhou 17 presented a key management scheme for SG based on symmetric key and elliptic curve public key technique. The scheme contains three major mutual authentication schemes, and it includes a trusted third party. However, the scheme is vulnerable to MIMT attack. 18 The researchers proposed a secure key distribution protocol for the SMs in a non-public key infrastructure (PKI) environment which includes a trusted third party. 18 Based on the concept of certificateless public key cryptography (CL-PKC), Seo et al. 19 proposed a key management scheme for securing end-to-end communication in the AMI. Li et al. 20 proposed an authentication scheme for SG based on Merkle hash tree. Nicanfar et al. 21 proposed an authentication and key management mechanisms for SG which includes key refreshment mechanism, multicast and broadcast mechanism.
In this article, we propose an authentication and key agreement scheme for SG. Based on hash-based message authentication code, the proposed scheme allows SMs and BAN GW to make mutual authentication and key agreement in a lightweight. Compared to related scheme, the proposed protocol provides lower computation cost and better security without the trust third party. The scheme also provides secure and efficient mechanisms for key updates.
In our scheme, we use the Dolev–Yao threat model. 22 Two communicating parties communicate over an insecure public channel. All participants are not to be trusted in our scheme. Moreover, an adversary can obtain sensitive information stored in smart card, then he or she can launch attack.
The rest of this article is organized as follows. Section “AMI communication architecture” describes the communication architecture about the AMI. We present the scheme in section “The proposed scheme.” The security and performance analysis are given in sections “Security analysis” and “Performance analysis.” Finally, we draw our conclusion in the last section.
AMI communication architecture
AMI is one of the critical parts in SG system. Figure 2 shows our considered SG communication architecture for AMI. It consists of the following components: a BAN GW, several SMs, and electronic household appliances. The BAN GW is responsible for gathering, analyzing, and storing data from SMs, then transmitting to NAN GW. It also receives instructions from NAN GW and sends to SMs. To facilitate the communication, WIFI will be adopted. Meantime, a SM comprising MSP430-F4270 which memory size is up to 8 KB random access memory (RAM) and 120 KB Flash memory. The BAN GW is also a SM which is equipped with a high-power server, 160 MHz CPU, 128 KB RAM, and 1 MB flash memory is considered. 23

Smart grid architecture for AMI.
In this article, we focus on secure mutual communication between the BAN GW and SM in HAN. Since SM has limited computing power and storage resources, BAN GW has to mange thousands of SMs. The computational efficiency should be considered in the proposed protocol.
The proposed scheme
When a SM joins the SG, it must first register with the BAN GW. After successful registration, the SM builds a session key with BAN GW. Then, they communicate with the help of the session key. The proposed scheme has four phases: Registration, Authentication and Key agreement phase, Key refreshment, and Multicast key generation. The notations used throughout the article are shown in Table 1.
Notations used in the article.
Registration phase
When a new

The registration phase of the SM.
The administrator uses
Authentication and key agreement phase
During the registration phase, the SM joins in the BAN. Before it exchanges data with GW, they need to verify each other and establish a session key.
During the verification phase,
Randomly selects
Then sends <
After receiving the message < Checks if ( Chooses the If Computes Randomly selects Then BAN GW sends the message <
The GW and

The authentication and key agreement phase.
The SM and BAN GW mutual authenticate to each other and establish a session key.
Key refreshment
In order to protect the session key, the scheme presents a key refreshment mechanism. The system sets the values of two times FR and LR which are saved in SMs and BAN GW as system parameters. FR is a short-term refreshment process, and LR is a long-term refreshment process.
In the short-term refreshment process, the
In the long-term refreshment process, the
Multicast key generation
Sometimes BAN GW needs to send multicast messages to SMs. For example when peak energy consumption, BAN GW sends a command to a group of SMs asking them to temporarily turn off or switch to lower power level. Furthermore, the security of multicast message is also important. In the scheme, we present a mechanism about multicast key.
Establishing a multicast group
When establishing a communication group, BAN GW first sends an message <
Joining multicast group
When receiving the message <
BAN GW verifies the message, records the

The multicast key generation phase.
Security analysis
The section shows the security analysis of our proposed protocol, and we refer to the discussion about the most well-known attacks such as integrity, replay, impersonation, and MIMT attack. The main security features of the protocol are given as follows:
Table 2 shows the comparison of security features among different works.
Security comparison of proposed protocol and related works.
MIMT: man-in-the-middle.
In summary, our scheme provides the password update phase, session key agreement, multicast key generation, and mutual authentication and achieves more security features. The proposed scheme is secure and suitable for SG environment.
Performance analysis
In this section, we summarize performance analysis of our proposed protocol. We first compare our proposed protocol with the protocol in Nicanfar et al. 21 In our scheme, the SMs and BAN GW only perform hash computation and EXCLUSIVE-OR operation. The computation complexity of EXCLUSIVE-OR operation is negligible, so we focus on hash computation. Every SM needs seven hashes and BAN GW costs seven hashes for every SM in our protocol during the authentication and key agreement phase. In Nicanfar et al., 21 every SM costs eight hashes and two modular exponentiation computation, and BAN GW also needs eight hashes and two modular exponentiation computation for every SM.
In communication overload, compared with Nicanfar et al.,
21
the number of packets needed for authentication and key agreement is from three to two. To estimate the required communication bits, the bit lengths of parameters are assumed as follows.24,25 The nonce, identity
On the other hand, rivest-shamir-adleman (RSA) algorithm was suggested to secure SG. 21 RSA is one of the fist practical public key algorithms, and it is widely used for secure data transmission. We compare our protocol with RSA-based authentication and key agreement scheme. In computation complexity, we mainly consider RSA and hash computations. In RSA-based protocol, at least every SM performs a RSA encryption to encrypt data and a RSA signature to sign messages. And BAN GW performs a RSA decryption to decrypt the package and a RSA signature verification to verify the signature for every SM.
Experiments have been conducted to study the execution. We adopt the benchmarks of the modular exponentiation computation, hash computation, and RSA-based cryptography26,27 as shown in Table 3. The implementation was executed on an Intel(R) Core(TM) i5-4300M 2.6 GHz machine.
Benchmarks of cryptographic operations.
Figure 6 shows the computation time in our scheme, RSA-based scheme, and the protocol in Nicanfar et al. 21 Figure 6(a) shows the computation cost of BAN GW and Figure 6(b) shows the computation cost of SMs. According to Figure 6, with the increasing number of SMs, the total computation cost significantly increases in RSA-based scheme. On the contrary, the computation cost is constantly low in the proposed scheme. Therefore, the proposed scheme achieves more computation efficient than RSA-based scheme and protocol in Nicanfar et al. 21

The computation time of smart meters and BAN GW in related protocol: (a) computation cost of the BAN gateway and (b) computation cost of smart meters.
Conclusion
In this article, we have proposed a secure and efficient scheme for SG. The proposed scheme provides mutual authentication, key agreement, key refreshment, and multicast mechanism. Detailed security analysis has demonstrated that the proposed protocol meets the security and privacy requirements for SG. Extensive performance evaluation further shows that its efficiency in terms of computation complexity and communication overhead. Our protocol is suitable for resource-constrained SG applications.
