## 3 Five-Tier Architecture of Smart Grid Based on Blockchain  
As shown in Figure 2, we divide the smart grid into five layers based on the structure of the smart grid: management layer, power layer, perceptual layer, user layer and blockchain layer. Here, we introduce these five layers. (1) Management Layer  
In the management layer, the main entity is the dispatching center, which undertakes the dispatching of the whole power system. The dispatching center includes the network control centers for energy management and distribution management systems. It can also be used for scheduling and trading purposes; information about the availability of power (transfer power, operating reserve) or order information is transmitted to or from the power layer. Therefore, the entity can control all entities of the power layer, the perceptual layer, and the user layer. In addition, as the center of the smart grid, the dispatching center is responsible for the responsibilities of KGC. KGC acts as a third party between the power layer, perceptual layer, and user layer. A certifiateless scheme is used to avoid the key escrow problem by allowing KGC to only provide a partial key. Figure 1: An example of a logical key tree. (2) Power Layer  
The power layer mainly includes three entities: power plants, transmission stations, and transformer substations. The power plants convert bulk energy into electrical energy and are usually directly connected to the transmission stations. The transmission stations transmit electrical energy from generation sources over longer distances. The transformer substations distribute the electric energy delivered by the transmission stations to power consumers. In order to reduce fault clearing times by faster fault identification, the transformer substations need to be atomized. The transmission stations and the transformer substations are typically remotely controlled and supervised by an operator of the dispatching center. They transmit metering information and equipment condition information. In this layer, these entities jointly complete the distribution process of power for the user layer. In the process of key distribution, the channel between the power layer and the management layer is in the internal private network of the power system, which is generally considered to be trusted. (3) Perceptual Layer  
In the perceptual layer, the main entity is the intelligent gateway, which may comprise a variety of sensing devices, such as smart meters and smart car charging piles. The smart gateway collects the power usage and relevant information in its responsible area. The management receives the information returned by the intelligent gateway and reschedules the whole power system by analyzing the data. (4) User Layer  
In the user layer, electricity consumers are the main entity. These consumers may be residents and factories, which apply process automation to control and supervise manufacturing processes and energy consumption or generation. As users, they receive power directly from the power layer, but the relevant power use will be uniformly dispatched by the management. (5) Blockchain Layer  
The management and power layers jointly form the blockchain layer. The blockchain mainly stores the key distribution process in the dispatching center to realize the supervi  
Figure 2: The five-tier architecture of the smart grid based on blockchain. sion of the key distribution process. At the same time, the public key parameters are stored in the blockchain to prevent malicious attackers from tampering with system parameters. A Lightweight Certificateless Group Key Agreement Method without Pairing Based on Blockchain for a Smart Grid  
In this section, we propose a lightweight certificateless group key agreement method without pairing based on blockchain for a smart grid. This method enables the management layer to distribute the key based on a certificateless key without pairing under supervision in the initialization and registration phase.