| With the development of national grid facilities,smart grid not only has the advantages of sustainability,efficiency and reliability,but also can improve the security and stability of the grid.Therefore,it has become an irreversible trend for smart grid to replace the traditional grid.The smart grid uses terminal equipment to collect data in real time,so that a large number of grid data can be transmitted and stored through the smart grid.If these power grid data are leaked,hackers may use these information to attack the power grid,destroy the power grid facilities or interfere with the energy supply,resulting in large-scale power outages and energy shortages,and seriously affecting the country’s energy security.Therefore,effective measures must be taken to protect the security of power grid data.Data encryption is one of the means to ensure data security.However,with the explosive growth of data volume,traditional encryption algorithms have been unable to meet the requirements of efficient encryption of large-scale smart grid data.In order to solve the above problems,this paper analyzes the data collected by the smart grid,classifies the data into three different security levels: A,B,and C according to the nature and significance of the data fields collected by the smart grid,and combines the encryption mode of the optimized packet encryption algorithm to realize the data encryption system based on the optimized encryption mode.This system proposes a Tree-CBC(TCBC)packet encryption mode considering the data security level.In this mode,the clear text is preprocessed according to the security level of the data to complete the data segmentation and completion;Secondly,the CBC data block encryption tree is constructed,in which the CBC encryption mode adopts the chain-like encryption architecture,that is,the second plaintext block can be encrypted only after the first plaintext block is encrypted,and the encryption of the next plaintext block requires the participation of the previous plaintext block ciphertext,so the blocks are closely connected.The higher the security level of the data block,the deeper its position in the encryption tree,thus ensuring that the data with high security level is more difficult to be cracked.Because the overall security and encryption time of TCBC encryption mode depend on the number of forks in the encryption tree,an algorithm for determining the optimal number of forks of TCBC based on the block encryption time and security weight is proposed.This system effectively improves the encryption efficiency of large-scale data in the field of data encryption.In order to build an encryption system with application value and high efficiency,this paper first studies the composition of the encryption system,obtains the functional and non-functional requirements of the system according to the analysis of user needs,and then carries out a detailed analysis and design of the system functions and databases.In order to improve the encryption efficiency,this paper proposes an improved encryption mode,which optimizes the chained encryption architecture to the tree-like encryption architecture to achieve parallel encryption.In terms of improving the security of the system key,users can change the key irregularly according to their needs,and the user’s key needs to be encrypted with the administrator’s key to store the obtained ciphertext.When encrypting and decrypting a file,you need to query the administrator key bound by the default key first,and then decrypt the key before encrypting and decrypting the file.Thus,a data encryption system with higher encryption efficiency,wider scope of application and higher security is realized,which provides an efficient encryption method for smart grid to encrypt large amount of grid data,and greatly reduces the time of data encryption. |