| With the construction and development of the power Internet of Things,the number of intelligent terminal devices in the power system continues to grow,which makes more and more terminal applications exposed to the monitoring site.These intelligent terminals have a wide deployment range,limited computing and storage capabilities,and insufficient physical environment security guarantees.They are easy to become the main target and springboard for attacking the power grid,and there is a risk that the terminal will be damaged by malicious control.In the current power system,the communication between nodes is mostly realized by centralized broadcast and multicast,and the problem of single-point failure is particularly serious.Therefore,it is very important to solve the problem of identity authentication in the access process of a large number of heterogeneous terminal devices..This paper studies the establishment of a trusted authentication mechanism for power IoT terminals with lightweight storage,efficient authentication and strong security.The main research work is as follows:(1)In view of the huge number of terminal nodes in the power Internet of Things,a large number of terminal nodes lead to access authentication and other work that cannot use dynamic methods to track permissions,which will bring huge burden to storage.The terminal authentication data storage method.The external database Inter Planetary File System(IPFS)is used to realize the decoupling of transaction data and transaction data in the blockchain,and the HPACK protocol is used to compress the transaction information of the blockchain.Only the data pointing to this data is stored in the blockchain.In order to prevent a block from increasing indefinitely,a period field is introduced in the block header,which defines the maximum capacity of a block,and a new block is generated when it expires;in order to adapt to the power system environment,the area used The block chain transaction structure is adjusted to support the data generated by the power IoT terminal sensors,and the business type field,authority level field and weight field are added to the block body.(2)Aiming at the security problem caused by directly exposing data to the whole network while realizing trusted authentication based on blockchain,a terminal authentication smart contract based on Ellipse Curve Cryptography(ECC)is proposed.In order to protect the identity anonymity and communication security of terminals and blockchain nodes,an asymmetric cryptographic algorithm based on elliptic curve cryptography is used to generate key pairs and calculate digital signatures.Improve the service level of the system;in order to make the algorithm more resistant to quantum decryption,the key is regularly updated on the basis of the ECC algorithm,and each node will recalculate the key pair according to the average time the key is stolen,and then Broadcast between them,which not only saves storage space,but also prevents malicious nodes from identifying terminal devices.(3)Aiming at the problems of high probability of abnormal nodes acting as master nodes based on trusted authentication of blockchain,high communication overhead in the consensus process,and low efficiency of view exchange,a Practical Byzantine Fault Tolerance(PBFT)is proposed.The terminal authentication consensus algorithm.Firstly,the node hierarchical model is introduced,and the node level and consensus domain are divided based on the power system load node partition strategy,and the master node and consensus node are selected in a targeted manner;after that,the voting model and reward and punishment mechanism are introduced in the preprocessing stage of PBFT to provide each Nodes set voting weights,and in each round of consensus,each consensus node updates its voting weights according to the voting results and communication status.In order to mobilize the enthusiasm of each node,the priority of generating new blocks is increased by the well-behaved nodes.This adjustment mechanism can reduce the probability of communication with malicious nodes and optimize the consensus performance. |