Abstract:Smart grid is a new power system framework that combines bidirectional communication technology and various electrical devices. The business data in the smart grid contains sensitive and private information, and thus fine-grained access control needs to be directly implemented at the data level. This paper proposes a Ciphertext-Policy Attribute-Based Encryption (CP-ABE) scheme for smart grid data based on Chinese national cryptography. By adding attribute related components to the system master key, system public key, and user secret key of the SM9-IBE algorithm, and introducing an access structure in the form of threshold tree to the ciphertext, the SM9-IBE algorithm is extended to support fine-grained access control in the CP-ABE scheme, which thereby encrypts the SM4 block cipher key. Only users who comply with the access policy can decrypt and obtain this symmetric key. Moreover, the scheme can resist collusion attacks.