###### Abstract  
In smart grids, the access verification of a large number of intelligent gateways and terminal devices has become one of the main concerns to ensure system security. This means that smart grids need a new key management method that is safe and efficient and has a low computational cost. Although a large number of scholars have conducted relevant research, most of these schemes cannot balance the computational overhead and security. Therefore, we propose a lightweight and secure key management method, having a low computational overhead, based on blockchain for smart grids. Firstly, we redesigned the architecture of the smart grid based on blockchain and completed the division of various entities. Furthermore, we designed a pairing-free certification authenticated group key agreement method based on blockchain under the architecture. Finally, we achieved higher security attributes, and lower authentication delay and computational overhead, compared to the traditional schemes, as shown in performance analysis and comparison. s mart grid; certificateless public key; group key; blockchain; key management Article  
A Lightweight Certificateless Group Author  
communication security of smart grids; however, this was not operable in practice. [PERSON] and [PERSON] et al. [2] proposed an identity-based encryption algorithm in cryptography to complete anonymous key distribution. However, if the key is leaked in this distribution process, it leads to the insecurity of the whole system. In addition, some scholars [3; 4; 5; 6] completed the key distribution process by introducing Elliptic Curve Cryptography (ECC), and realized anonymity on the basis of ensuring the security of distribution. Some scholars introduced other encryption means, such as certificates [7], signatures [8] or hash functions [9] to further ensure security and anonymity. The complexity of calculation is a common problem in the above schemes. In addition, these schemes cannot resist inside attackers. In smart grid systems, the aim is to deploy more miniaturized intelligent gateways, so that power transactions can be completed more flexibly. Intelligent gateways are generally provided by third parties, so that the key distribution channels are exposed to the outside. Although these key management schemes based on public key infrastructure are quite mature, these schemes cannot guarantee the security of these channels. In practice, there are two main solutions in the research of smart grids for a large number of distributed devices. First, blockchain technology is a potential solution to this problem. [PERSON] et al. [10] proposed a blockchain-based secure and lightweight authentication protocol for smart grids (blockSLAP). This scheme solves the problem of centralized registration authority, and has higher performance compared to the common ECC scheme; however, it cannot solve the problems of batch verification and registration. Second, certificateless public key cryptography is another potential solution to this problem. [PERSON] et al. [11] proposed a secure and effective anonymous certification signature for a key distribution scheme for smart grids. This scheme allows authorized users to generate their private key using partial keys from the key generation center. In addition, the proposed scheme also realizes the elasticity of key escrow. However, the existing solutions based on blockchain require the terminal equipment to have high computing power to complete relevant calculations. At the same time, although the traditional certificateless key scheme avoids the elasticity of key escrow, the users' partial private keys still come from third-party institutions, and this distribution process cannot be supervised by users. In addition, the bilinear pairing operation in the process of certificateless cryptography also requires that the terminal equipment has high computing power. Therefore, it is necessary to design a trusted, efficient, and secure key management method for lightweight devices.