Charging data-oriented traceable access authorization and recovery method and system

Through attribute encryption and blockchain technology, combined with dynamic puncture algorithm, the transparency and permission recovery efficiency of charging data are solved in cross-platform access, fine-grained access control and full life cycle management are realized, and the security and efficiency of the system are improved.

CN120378168APending Publication Date: 2025-07-25STATE GRID JIANGSU ELECTRIC POWER CO LTD RESEARCH INSTITUTE +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510535117.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In cross-platform scenarios, the access authorization of charging data is insufficient, the permission recovery mechanism is inefficient, and the access control life cycle management is insufficient, resulting in abuse of user permissions, frequent authorization disputes and increased risk of data leakage.

Method used

Attribute encryption technology is used to generate ciphertexts containing access policies, and authorization information is recorded through blockchain, and fine-grained permission management is achieved in combination with dynamic puncture algorithms to ensure transparency of the authorization process and traceability of permission recovery.

Benefits of technology

It realizes the transparency of cross-platform charging data access, efficient permission recovery and full life cycle management, reduces computing and communication overhead, and improves the security and resource utilization efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378168A_ABST
    Figure CN120378168A_ABST
Patent Text Reader

Abstract

The invention discloses a traceable access authorization and recovery method and system for charging data, and the method comprises the steps: firstly, initializing system parameters and a secret key, and constructing a safety basic environment supporting multi-party cooperation; secondly, encrypting and storing the charging data based on an attribute encryption technology, generating a ciphertext containing an access strategy, and uploading the ciphertext to cloud storage; secondly, authorizing the user through a fine-grained key generation mechanism, and recording authorization information in combination with the block chain to realize transparent tracing; then, performing fine-grained permission recovery operation on the ciphertext through a dynamic puncture algorithm to ensure high efficiency and consistency of permission change; and finally, realizing safe decryption and access of the charging data of the user based on multi-level verification. According to the method provided by the invention, the transparency, high efficiency and full-life-cycle management capability of data access authorization and recovery in a cross-platform cooperation scene are effectively guaranteed, and the security and resource utilization efficiency of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power data access control, and relates to a method for traceable access authorization and recovery of charging data. Background Art

[0002] With the rapid development of new energy vehicles, the charging piles and smart grid infrastructure have been gradually popularized, and the grid charging data has become the focus of attention of multiple stakeholders such as research institutions, charging operators, and private enterprises. In cross-platform scenarios, the demand for sharing and accessing grid charging data is increasing day by day. At the same time, there are also key problems such as insufficient transparency of access authorization, bottlenecks in the user permission recovery mechanism, and insufficient access control lifecycle management. Specifically, it is manifested in:

[0003] (1) Insufficient transparency of access authorization. In current charging data sharing applications, each participating party (such as a research institution or an enterprise platform) usually adopts an independent data management mechanism. This decentralized management mode faces significant obstacles in cross-platform data sharing. For example, the user authorization process lacks transparency, and it is difficult to trace the authorization information between platforms, resulting in problems such as abuse of user permissions or authorization disputes. In addition, the centralized permission management mode in the existing system is difficult to achieve dynamic monitoring and full-process recording, and there are relatively large trust risks in multi-party collaboration scenarios.

[0004] (2) There are bottlenecks in the permission recovery mechanism. In the multi-platform charging data scenario, the need to revoke user permissions frequently occurs, such as changes in user identity, upgrade of access policy protection policies, etc. Traditional permission recovery methods usually achieve this by re-encrypting or key updating. However, this method requires global modification of all related data or keys, resulting in a significant increase in computing and communication overhead, and at the same time, it will interfere with the access of normal users. In addition, the transparency and credibility of the permission recovery operation are insufficient, which easily leads to the inability to effectively supervise the user behavior after the permission is changed.

[0005] (3) Insufficient access control lifecycle management. The needs of different platforms and users for data access are becoming more and more diverse. Existing access control methods are difficult to balance fine-grainedness and efficiency in permission management and cannot flexibly adapt to changes in user identity, data sensitivity, and dynamic scenarios. For example, in some scenarios, precise permission restrictions need to be implemented according to specific user attributes or tags, but traditional methods often adopt coarse-grained access policies, resulting in low data usage efficiency and even data leakage risks. In the entire lifecycle of charging data from generation, encryption, storage to access, revocation, existing solutions cannot provide full-process traceability and management capabilities. Especially in a cross-platform collaboration environment, the permission operations of all parties cannot be uniformly recorded and tracked, making it difficult to meet the increasingly strict data compliance and security requirements. Summary of the Invention

[0006] Technical problems to be solved by the invention: Solve the problems of transparency, efficiency and accuracy in cross-platform access control of charging data. On the premise of realizing fine-grained access control, how to trace the access authorization process and authorization recovery process of charging data.

[0007] To solve the above technical problems, the present invention provides a traceable access authorization and recovery method for charging data, including:

[0008] The smart grid data center uses the public key PK of the key generation center according to the plaintext data M and access policy P generated by the charging service K and the public key PK of the cloud storage server S to perform attribute encryption on the plaintext data and access policy, generating a ciphertext CT containing the access policy; wherein the access policy P is used to specify the combination of user attributes that can access the charging data; the key generation center generates a conversion key and a decryption key for a specific user according to the user's attribute set and label set, and the generation process is synchronously recorded on the blockchain;

[0009] After receiving the signature σ generated by the cloud storage administrator, the smart grid data center uses the public key PK of the cloud storage administrator M to verify the correctness of the ciphertext puncturing process, and check the authorization records and recovery records of users on the blockchain. By associating the user identity with the permission change history, comprehensive traceability of different users is carried out; the process of the cloud storage administrator generating the signature σ is as follows: the cloud storage administrator uses the public key PK of the key generation center K and the permission recovery policy PP K to run the policy puncturing algorithm, perform label puncturing operation on the ciphertext CT, generating an updated ciphertext CT′; use the private key MK M to sign the result of the updated ciphertext CT′, generating the signature σ, and upload the permission recovery operation record and result to the blockchain for archiving.

[0010] The aforementioned traceable access authorization and recovery method for charging data further includes: initializing the access control parameters of the grid charging data, including:

[0011] Inputting the security parameter λ and an attribute label set with the number d, defining the bilinear mapping e: G0×G0→G1 and the hash function H: {0,1} * →G0 for subsequent access control authorization and recovery, where G0 is a bilinear group with a generator g and order p, and G1 is the target group of the bilinear group G0; the hash function H: {0,1} * →G0 is a function that maps binary strings of any length to a specific mathematical structure G0;

[0012] ​The key generation center defines the complete set of attributes U = {1, 2, …, n}, and randomly selects an exponent for each attribute i ∈ U Z p as the integer field of order p; then the key generation center selects exponents α and β, where α, β ∈ Z p , and calculates g1 = g a and g2 = g β ; n indicates that there are n tuples in the complete set of attributes U, and the set interval is from 1 to n; g1 and g2 are the calculation results of g a and g β ;

[0013] The key generation center constructs a polynomial q(x) that satisfies q(0) = β, and defines Q(x) = g q(x) , and at the same time sets a label t0 for subsequent permission revocation; q(0) is the result of the polynomial q(x) when x takes the value 0; x represents the input value of the polynomial q(.), and Q(x) is the calculation result of g q(x) ;

[0014] The public and private key pair output by the key generation center is (PK K , MK k ):

[0015]

[0016] MK K = (α, g α )

[0017] h |U| is the calculation result, e(g, g) α is the pairing mapping of g and the result of the α power;

[0018] For the power grid cloud storage server, randomly select an exponent γ ∈ Z p , and calculate the proxy public key PK S :

[0019] PK S = g γ

[0020] Combined with the server identifier ID S of the cloud storage server, generate the proxy private key MK S through the hash function:

[0021] MK S = H(ID S ) γ

[0022] For the cloud storage administrator, randomly select an exponent υ ∈ ZP , set the public-private key pair for signature as (PK M , MK M ):

[0023] PK M = g υ

[0024] MK M = υ

[0025] The public-private key pair is used for tracing permission changes.

[0026] The aforementioned traceable access authorization and recovery method for charging data includes, in the process of generating the ciphertext CT containing the access policy:

[0027] 21) The smart grid data center selects random exponents five s and random exponent six ρ, s, ρ ∈ Z p , for encrypting the plaintext data M ∈ G1 generated by the charging service; calculate g ρ and g3 = g s , and further calculate the session key K S = e((g γ ) ρ , H(ID S ))), where the subscript S represents the key for data sharing under the attribute set , and the key for data sharing is used for the sharing operation between the smart grid data center and the cloud storage server; represents the subset of mathematical symbols;

[0028] 22) The smart grid data center selects a random exponent seven r0 ∈ Z p , and generates an encryption key SK0 = {t0, K0, L0, Q0} that supports ciphertext puncturing, where:

[0029]

[0030] Embed the encryption key SK0 as the second layer of access control and restriction measures into the encrypted ciphertext;

[0031] 23) The smart grid data center converts the access policy P into a logical access tree and constructs the ciphertext CT = (SK0, P, C, C1, C2, C3, C y ), where:

[0032] C = M · K S

[0033]

[0034] q y(0) represents q(0) corresponding to the leaf node y, h1 - h |U| is the public key parameter, and the public key parameter is assigned to the leaf node y, denoted as h y .

[0035] The aforementioned traceable access authorization and recovery method for charging data includes, during the process of generating the conversion key and decryption key for a specific user:

[0036] 31) The key generation center randomly selects exponent eight r and randomly selects exponent nine z for user u t , r, z ∈ Z p ;

[0037] 32) The key generation center receives the attribute set S and label set T = {t1, t2, …, t d} from multiple platform users, and combines the public and private key pairs (PK K , MK k ) of the key generation center to generate an exclusive conversion key t and decryption private key for user u

[0038]

[0039] where D (1) = (g α ·g ar+aβ ) 1 / z , D (2) = (g r ) 1 / z ,

[0040] t i is an element in the label set T = {t1, t2, …, t d};

[0041] 33) The key generation center records the process of generating the user key into the blockchain, and defines the key generation transaction as:

[0042]

[0043] where The || symbol represents the concatenation operation. The key generation center uses its private key MK K to sign the user identity, attribute set, and label set; S respectively represent the user ID, user signature, and user attribute set;

[0044] Broadcast the key generation transaction TX KeyGen as a new transaction to the blockchain network and write it into the block B:

[0045] B = {PrevHash, TX KeyGen , Nonce, Hahs(B)}

[0046] Among them, PrevHash represents the hash value of the previous block; Nonce represents a nonce; Hash(B) represents the hash value of the current block content. The verification nodes in the blockchain network receive the key to generate the transaction TX KeyGen , and verify its legality through the following formula:

[0047]

[0048] If the verification is successful, the transaction TX KeyGen is added to the transaction pool to be packaged.

[0049] The aforementioned traceable access authorization and recycling method for charging data includes, in the process of generating the updated ciphertext CT':

[0050] 41) The cloud storage administrator converts the permission revocation policy PP K into an access policy AP K , including:

[0051] Converting the logic gates of the non-leaf nodes in the permission revocation policy PP K : converting the OR gate to an AND gate; converting the AND gate to an OR gate; converting the k-of-n gate to an (n - k + 1)-of-n gate; negating the label t of the leaf node to generate a new label is a mathematical symbol representing negation;

[0052] 42) Randomly select two exponents lambda k and exponent eleven r k , lambda k , r k ∈Z p , and perform a puncturing operation on the ciphertext puncturing encryption key to calculate a new puncturing key sk'0 = (t0, K'0, L'0, Q'0), where:

[0053]

[0054] Based on the converted access policy AP K , assign polynomials to each tree node, and assign the value of the exponent lambda k to the leaf nodes to generate the distributed exponent lambda value k ; randomly select an exponent eleven r for each label of the leaf node k ∈Zp , calculate the new key component sk k = (t k , K k , L k , Q t ), where t k,j is the new leaf node label after randomly selecting an exponent r k,j ;

[0055]

[0056] 43) The updated key is represented as: SK K = (sk′0, sk1, …, sk k ), where sk′0 and sk k are the new punctured key and the new key component respectively;

[0057] The cloud storage administrator signs the update result using the private key MK M to generate a signature The cloud storage administrator combines the updated key SK K with the ciphertext CT and outputs the puncture-updated ciphertext CT′ = (SK K , P, C, C1, C2, C3, C y );

[0058] 44) Upload the permission revocation operation record and result to the blockchain for archiving.

[0059] For the aforementioned traceable access authorization and revocation method for charging data, in step 44), the permission revocation operation record and result include the puncture policy identifier ID PPK , the ciphertext identifier ID after puncture update CT′ , and the signature σ of the updated key component; pack the generated permission revocation record and upload it to the chain, denoted as REC = {ID PPK , ID CT′ , σ, Timestamp},

[0060] where Timestamp is the timestamp of the operation for tracking records;

[0061] and write the operation hash H REC = H(ID PPK || ID CT′ || σ || Timestamp) to the storage unit of the blockchain;

[0062] The cloud storage administrator submits the record to the blockchain and writes it to the block through Tx REC = {H Rec , MerkleProof}, where H Rec is the operation hash, and TxREC Represents a complete record ready to be submitted, where MerkleProof is the Merkle proof associated with the permission revocation record, used to verify the validity of the record in the blockchain.

[0063] For the aforementioned traceable access authorization and revocation method for charging data, after the smart grid data center receives the signature σ, it uses the public key PK of the cloud storage administrator M To verify the correctness of the ciphertext puncturing process, check the authorization records and revocation records of users on the blockchain, and comprehensively trace different users by associating user identities with permission change histories, including:

[0064] Cross-platform access authorization tracing: The TX stored in the blockchain KeyGen Through To achieve multi-party verification and tracing, where Represents calling the query interface to return the key generation record TX related to user u t , and uses the signature verification formula KeyGen To confirm the legality of the record;

[0065] Cross-platform authorization revocation tracing: After the permission revocation is completed, the cloud storage administrator generates the signature σ and uploads the signature σ and related information to the blockchain. Each platform user obtains the signature record from the blockchain and uses the signature PK sign = g v The public key to verify whether the ciphertext is correctly updated according to the puncturing strategy:

[0066]

[0067] PK M Represents the signature public key, Is a construction operation, representing the power of g to the H(SK K ), Indicates whether it is equal.

[0068] If the verification passes, it means that the ciphertext has been correctly processed according to the puncturing strategy. Each platform user can access the permission revocation record through the blockchain and trace it through the query interface:

[0069] Query(ID PPK , ID CT′ ) → Rec.

[0070] For a traceable access authorization method for charging data, the user uses the updated ciphertext CT' generated by the cloud storage administrator, the conversion key holding their own authorization And the decryption private key Verify the user's authority through the decryption algorithm and access the charging data. The process of the cloud storage administrator generating the updated ciphertext CT' includes:

[0071] The plaintext data M and access policy P generated by the smart grid data center according to the charging service are used to generate the public key PK of the key generation center K and the public key PK of the cloud storage server S to perform attribute encryption on the plaintext data and access policy, generating a ciphertext CT containing the access policy; where the access policy P is used to specify the combination of user attributes that can access the charging data; the transformation key and decryption key are generated by the key generation center according to the user's attribute set and label set, and the generation process is synchronously recorded in the blockchain; the cloud storage administrator uses the public key PK of the key generation center K and the permission revocation policy PP K to run the policy piercing algorithm, perform a label piercing operation on the ciphertext CT, and generate the updated ciphertext CT'.

[0072] The aforementioned traceable access authorization method for charging data includes, in the process of generating the updated ciphertext CT':

[0073] The cloud storage administrator converts the permission revocation policy PP K into an access policy AP K , including:

[0074] Convert the logic gates of the non-leaf nodes in the permission revocation policy PP K : convert the OR gate to an AND gate; convert the AND gate to an OR gate; convert the k-of-n gate to an (n-k+1)-of-n gate; perform a negation operation on the label t of the leaf node to generate a new label is a mathematical symbol representing negation;

[0075] Randomly select two exponents ten λ k and exponent eleven r k , λ k , r k ∈Z p , perform a piercing operation on the ciphertext piercing encryption key, and calculate the new piercing key sk′0 = (t0, K′0, L′0, Q′0), where:

[0076]

[0077]

[0078] Based on the converted access policy AP K , assign polynomials to each tree node, and the exponent ten λ kAllocate values to leaf nodes to generate the exponential decimal value λ after distribution k ; For the label of each leaf node Randomly select an exponential eleven r k ∈Z p , calculate the new key component sk k =(t k ,K k ,L k ,Q k ), where t k,j is the new leaf node label after randomly selecting an exponential r k,j ;

[0079]

[0080] The updated key is represented as: SK K =(sk′0,sk1,…,sk k ), where sk′0 and sk k are the new punctured key and the new key component respectively;

[0081] The cloud storage administrator uses the private key MK M to sign the update result and generate a signature The cloud storage administrator combines the updated key SK K with the ciphertext CT and outputs the puncture-updated ciphertext CT′=(SK K ,P,C,C1,C2,C3,C y );

[0082] Upload the permission revocation operation record and result to the blockchain for archiving.

[0083] In the above-mentioned traceable access authorization method for charging data, when the user verifies the user's permission and accesses the charging data through the decryption algorithm according to the updated ciphertext CT′ generated by the cloud storage administrator and the held conversion key and the decryption private key , it includes:

[0084] By interacting with the power grid cloud storage server, the cloud storage server constructs a message for response using the proxy public-private key pair (PK S ,MK S ), partially decrypts the ciphertext and delivers the result to the user. The user completes the final decryption according to the result returned by the server, and at the same time verifies whether the attribute set in the conversion key meets the access policy P of the ciphertext CT′. If it meets, further check whether the user's label set conforms to the revocation policy PP KIf the user label set is in the revocation policy, the algorithm is aborted, and even if the decryption operation is performed, the correct plaintext cannot be obtained; if the user label set is not in the revocation policy, the user can run a partial decryption algorithm to generate a partially decrypted ciphertext CT out ;

[0085] The user gives the conversion key to the cloud storage server, and the cloud server outputs the partially decrypted ciphertext CT out , after obtaining the partially decrypted ciphertext CT out , the user locally calculates and obtains the charging plaintext data M.

[0086] In the aforementioned traceable access authorization and recovery method for charging data, when the cloud server outputs the partially decrypted ciphertext CT out , and after obtaining the partially decrypted ciphertext CT out , during the process where the user locally calculates and obtains the charging plaintext data M, it includes:

[0087] The cloud storage server receives the conversion key t provided by the user u and checks whether the attribute set S in the conversion key satisfies the access policy P embedded in CT'; secondly, checks whether the label set {t1, t2,..., t } in the conversion key d complies with the puncturing policy PP K ; if the puncturing label in the ciphertext CT' conflicts with the label in the conversion key , the decryption request is rejected; otherwise, the partial decryption operation continues.

[0088] In the aforementioned traceable access authorization and recovery method for charging data, during the partial decryption operation, the cloud storage server sequentially processes the nodes x in the access tree P and performs the following steps:

[0089] (521) Decryption of leaf nodes. If x ∈ S, then calculate:

[0090]

[0091] If then output

[0092] DecryptNode is the decryption algorithm for leaf nodes, C x represents the ciphertext obtained by the user during decryption, the subscript x represents the leaf node, and according to the Lagrange interpolation method, when the number of leaf nodes x meets the threshold, the polynomial secret value can be recovered to complete the decryption, q x (0) is the value of the leaf node polynomial at 0 during decryption;

[0093] (522) Decryption of non - leaf nodes. For non - leaf node x, the cloud storage server recursively executes the algorithm to calculate F x :

[0094]

[0095] △ i,S (0) is the Lagrange coefficient, and F x is the result of recursive calculation;

[0096] (523) Decryption of the root node. For the access tree root node R, the cloud storage server calculates:

[0097]

[0098] W is the intermediate value calculated by the server;

[0099] Calculate the session key K S and the intermediate result C′ as well as A:

[0100] K S =e(g ρ ,MK S )=e(g ρ ,H(ID S ) γ )

[0101] C′=C / K S =M·e(g,g) αs

[0102]

[0103] According to the leaf nodes in the puncturing strategy Use the Lagrange interpolation coefficient to calculate β=q(0) for each puncturing strategy AP K Calculate Z i is the result calculated for the puncturing strategy;

[0104] Calculate Merge the above - calculated results into CT out =(A,B,C′), and send it to the user; User u t After receiving CT sent by the cloud storage server out calculate M=(C′·B) / A to recover the plaintext.

[0105] A traceable access authorization method for charging data. The key generation center generates a conversion key and a decryption key for a specific user according to the user's attribute set and label set, and records the generation process synchronously to the blockchain;

[0106] The key generation center makes the generated transformation key and decryption key available to users via the blockchain. The users, based on the updated ciphertext CT' generated by the cloud storage administrator and holding their own authorized transformation key and the decryption private key verify user permissions and access charging data through the decryption algorithm. The process by which the cloud storage administrator generates the updated ciphertext CT' includes:

[0107] Based on the plaintext data M and access policy P generated by the smart grid data center for charging services, using the public key PK of the key generation center K and the public key PK of the cloud storage server S perform attribute encryption on the plaintext data and access policy to generate a ciphertext CT containing the access policy; where the access policy P is used to specify the combination of user attributes that can access the charging data. The cloud storage administrator, based on the public key PK of the key generation center K and the permission revocation policy PP K run the policy puncturing algorithm to perform a tag puncturing operation on the ciphertext CT to generate the updated ciphertext CT'.

[0108] The aforementioned traceable access authorization method for charging data, in the process of generating the updated ciphertext CT', includes:

[0109] The cloud storage administrator converts the permission revocation policy PP K into an access policy AP K , including:

[0110] Convert the logic gates of the non-leaf nodes in the permission revocation policy PP K : convert the OR gate to an AND gate; convert the AND gate to an OR gate; convert the k-of-n gate to an (n-k+1)-of-n gate; perform a negation operation on the label t of the leaf node to generate a new label is a mathematical symbol representing negation;

[0111] Randomly select two exponents ten λ k and exponent eleven r k , λ k , r k ∈Z p , perform a puncturing operation on the ciphertext puncturing encryption key, and calculate the new puncturing key sk′0 = (t0, K′0, L′0, Q′0), where:

[0112]

[0113] Based on the transformed access policy AP K , assign polynomials to each tree node, and the exponent ten λk Allocate the value to the leaf nodes to generate the exponential decimal value λ after distribution k ; For the label of each leaf node Randomly select an exponential eleven r k ∈Z p , calculate the new key component sk k =(t k ,K k ,L k ,Q k ), where t k,j is the new leaf node label after randomly selecting an exponential r k,j ;

[0114]

[0115] The updated key is represented as: SK K =(sk′0,sk1,…,sk k ), where sk′0 and sk k are the new punctured key and the new key component respectively;

[0116] The cloud storage administrator uses the private key MK M to sign the update result to generate a signature The cloud storage administrator combines the updated key SK K with the ciphertext CT and outputs the puncture-updated ciphertext CT′=(SK K ,P,C,C1,C1,C3,C y );

[0117] Upload the permission revocation operation record and result to the blockchain for archiving.

[0118] In the aforementioned traceable access authorization method for charging data, when the user verifies the user's permission and accesses the charging data through the decryption algorithm based on the updated ciphertext CT′ generated by the cloud storage administrator and the conversion key and the decryption private key held by the user, it includes:

[0119] By interacting with the power grid cloud storage server, the cloud storage server constructs a message for response using the proxy public and private key pair (PK S ,MK S ), partially decrypts the ciphertext and delivers the result to the user. The user completes the final decryption based on the result returned by the server, and at the same time verifies whether the attribute set in the conversion key satisfies the access policy P of the ciphertext CT′. If it is satisfied, further check whether the user's label set conforms to the revocation policy PP K, if the user label set is in the revocation policy, the algorithm is aborted, and even if the decryption operation is performed, the correct plaintext cannot be obtained; if the user label set is not in the revocation policy, the user can run a partial decryption algorithm to generate a partially decrypted ciphertext CT put ;

[0120] The user gives the conversion key to the cloud storage server, and the cloud server outputs the partially decrypted ciphertext CT out , after obtaining the partially decrypted ciphertext CT out , the user locally calculates to obtain the charging plaintext data M.

[0121] A computer system includes a memory, a processor, and a computer program stored on the memory. The processor executes the computer program to implement the steps of the above method.

[0122] A computer-readable storage medium stores computer programs / instructions thereon. When the computer programs / instructions are executed by a processor, the steps of the above method are implemented.

[0123] The beneficial effects achieved by the present invention: An innovative solution based on blockchain and dynamic puncturing algorithm is proposed for the problems of insufficient transparency, low efficiency of permission recovery, and lack of life cycle management in the cross-platform access scenario of charging data. Compared with the prior art, by combining blockchain technology, the present invention records the user authorization information and the key generation process in a distributed ledger, realizing the credibility, transparency, and immutability of authorization information. In a cross-platform scenario, authorization records can be shared across multiple platforms, effectively solving the problems of untraceable traditional authorization processes and frequent authorization disputes, and providing a reliable trust basis for multi-party collaboration scenarios.

[0124] At the same time, the present invention designs a permission recovery mechanism based on the dynamic puncturing algorithm, performs fine-grained puncturing operations on ciphertexts, and realizes the precise revocation of permissions for specific users or groups. Uploading the permission recovery operation and results to the blockchain for archiving ensures the transparency and consistency of the permission change process. Compared with the high-overhead solutions that require global re-encryption or key update in traditional methods, the efficiency of permission recovery is significantly improved, and the impact on system performance is reduced.

[0125] The present invention realizes the precise limitation of data access permissions by constructing a fine-grained access control model that combines user attributes and labels, meeting the requirements of diverse scenarios. By adopting an efficient key generation and update mechanism, when the user's permissions change, only local operations need to be performed on specific ciphertexts, without the need to re-encrypt all data or update the global key. This not only reduces the computational and communication overhead but also enhances the flexibility of the system and significantly improves the access control efficiency.

[0126] While realizing cross - platform data sharing and collaboration, the present invention ensures the transparency of the authorization process, the traceability of permission revocation, and the efficiency of access control, providing an innovative and efficient technical solution for charging data sharing and management, with important application value and promotion prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0127] Figure 1 It is a flowchart of a traceable access authorization and recovery method for charging data in Embodiment 1 of the present invention;

[0128] Figure 2 It is a scenario flowchart of charging data access control authorization and recovery related to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0129] To describe in detail the technical solution disclosed by the present invention, the following further elaboration is made in combination with the specification drawings and specific embodiments.

[0130] As Figure 1 and Figure 2 shown, this embodiment provides a traceable access authorization and recovery method for charging data, including:

[0131] Step 1. In the cross - platform scenario of grid charging data, there are multiple stakeholders, including research institutions, private enterprises, charging operators, etc. To achieve fine - grained access control, it is necessary to build a secure basic environment for multiple users and platforms, and set necessary security parameters, including an attribute tag set, secure public - private key pairs, etc., providing a unified security foundation for multi - party collaboration and ensuring the consistency and security of subsequent operations.

[0132] Perform initialization of grid charging data access control parameters, including:

[0133] Input security parameters and an attribute tag set for subsequent access control authorization and recovery;

[0134] Set the public - private key pair of the key generation center as (PK K , MK k );

[0135] Set the proxy public - private key pair of the grid cloud storage server as (PK S , MK S );

[0136] Set the public - private key pair of the cloud storage administrator as (PK M , MK M ).

[0137] Step 2. The smart grid data center generates plaintext data M and access policy P according to the charging service, and uses the public key PKK and PK S Perform attribute encryption on the plaintext data and the access policy to generate a ciphertext CT containing the access policy. The generated ciphertext is uploaded by the smart grid data center to the grid cloud storage. The access policy P is used to specify the combination of user attributes that can access the charging data and serves as the basis for encryption and decryption.

[0138] Step 3. The key generation center generates a conversion key and a decryption key for a specific user based on the user's attribute set and label set, and the generation process of the authorization key is synchronously recorded on the blockchain to ensure the transparency and traceability of the authorization process.

[0139] In the access authorization stage of grid charging data, to achieve cross-platform and multi-user secure access control, a fine-grained access authorization key for charging data for cross-platform users is generated. The key generation center supports fine-grained permission management by generating a user-specific key pair.

[0140] Step 4. The cloud storage administrator runs a policy piercing algorithm according to the public key PK K and the permission revocation policy PP K to perform a label piercing operation on the ciphertext CT, generating an updated ciphertext CT'. The cloud storage administrator signs the update result with the private key MK M to generate a signature σ, and uploads the permission revocation operation record and result to the blockchain for archiving.

[0141] In the cross-platform usage scenario of grid charging data, user permissions may need to be adjusted in real time due to changes in data sensitivity or user status changes, and cross-platform fine-grained permission dynamic revocation of grid charging data is performed.

[0142] Step 5. In the cross-platform scenario, the user verifies the user's permissions and accesses the charging data through a decryption algorithm based on the updated ciphertext CT' and the conversion key held by the user and the decryption private key .

[0143] Step 6. The data access authorization and revocation in the cross-platform scenario require a transparent and efficient traceability mechanism. After receiving the signature σ, the smart grid data center uses the public key PK M of the cloud storage administrator to verify the correctness of the ciphertext piercing process, and checks the user's authorization record and revocation record on the blockchain. By associating the user identity with the permission change history, a comprehensive traceability of specific users on different platforms such as research institutions and private enterprises is carried out, so as to realize the full life cycle management and responsibility tracking of data access and meet the high-efficiency collaboration requirements in the cross-platform scenario.

[0144] In step 1, it includes:

[0145] 11) Input the security parameter λ and a set of d attribute tags. Define the bilinear mapping e: G0×G0→G1 and the hash function H: {0,1} * →G0 for subsequent access control authorization and revocation, where G0 is a bilinear group with generator g and order p, and G1 is the target group of the bilinear group G0; the hash function H: {0,1} * →G0 is a function that maps binary strings of arbitrary length to a specific mathematical structure G0;

[0146] 12) To support attribute management in the system, the key generation center defines the attribute universe U = {1, 2,..., n}, and randomly selects an exponent Z p for each attribute i ∈ U, where Z is the integer domain of order p; then the key generation center selects exponents α and β, α, β ∈ Z p , and calculates g1 = g a and g2 = g β ; n indicates that there are n tuples in the attribute universe U, and the set interval is from 1 to n; g1 and g2 are the calculation results of g a and g β ;

[0147] 13) The key generation center constructs a polynomial q(x) that satisfies q(0) = β, and defines Q(x) = g q(x) , and also sets a tag t0 for subsequent permission revocation; q(0) is the result of the polynomial q(x) when x takes the value 0; x represents the input value of the polynomial q(.), and Q(x) is the calculation result of g q(x) ;

[0148] 14) Output the public-private key pair of the key generation center as (PK K , MK k ):

[0149]

[0150] MK K = (α, g α )

[0151] h |U| is the calculation result, e(g, g) α is the pairing mapping of g and the result of the α power;

[0152] For the power grid cloud storage server, randomly select an exponent γ ∈ Z p , and calculate the proxy public key PK S :

[0153] PK S = gγ

[0154] and combine with the server identifier ID of the cloud storage server S , generate the proxy private key MK through a hash function S :

[0155] MK S = H(ID S ) γ

[0156] For the cloud storage administrator, randomly select an exponent υ ∈ Z p , and set the public-private key pair for signature as (PK M , MK M ):

[0157] PK M = g v

[0158] MK M = υ

[0159] The public-private key pair is used for tracing permission changes.

[0160] Performing the public-private key pair initialization operation on the entities in the charging data access control scenario ensures data security and operation consistency in subsequent multi-party collaboration.

[0161] In step 2, for the access requirements of cross-platform users to grid charging data, this embodiment provides an encryption algorithm that supports multi-party collaboration. In the encryption stage of grid charging data, to ensure the security and flexibility of multi-user and multi-platform access control, policy attribute information for fine-grained authorization is embedded in the ciphertext, ensuring that precise access control can be achieved for data on multiple research institutions and enterprise platforms, and at the same time realizing centralized management and distributed access of data.

[0162] 21) The smart grid data center selects random exponent five s and random exponent six ρ, s, ρ ∈ Z p , for encrypting the plaintext data M ∈ G1 generated by the charging service; calculate g ρ and g3 = g s , and further calculate the session key K S = e((g γ ) ρ , H(ID S ))), where the subscript S represents the key for data sharing under the attribute set , and the key for data sharing is used for the sharing operation between the smart grid data center and the cloud storage server; represents the subset of mathematical symbols;

[0163] 22) The smart grid data center selects a random exponent seven \(r_0\in Z\) p , and generates an encryption key \(SK_0 = \{t_0, K_0, L_0, Q_0\}\) for supporting ciphertext puncturing in combination with the public parameters of the system, where:

[0164]

[0165] Embed the encryption key \(SK_0\) as the second-layer access control and restriction measure into the encrypted ciphertext to strengthen the precise constraint on user access;

[0166] 23) The smart grid data center transforms the access policy \(P\) into a logical access tree, and constructs a ciphertext \(CT=(SK_0, P, C, C_1, C_2, C_3, C\) y ), where:

[0167] \(C = M\cdot K\) S

[0168]

[0169] q y (0) represents \(q(0)\) corresponding to the leaf node \(y\), \(h_1 - h\) |U| are public key parameters, and distribute the public key parameters to the leaf node \(y\), denoted as \(h\) y .

[0170] The construction of the ciphertext \(CT\) contains the relevant information of all leaf node sets in the access structure tree, where the leaf nodes represent attributes, that is, the policy attribute information with fine-grained authorization is embedded, which is used to verify the user attributes one by one during the decryption phase to ensure precise access control of data on multiple research institutions and enterprise platforms. Finally, the generated ciphertext \(CT\) is uploaded to the power grid cloud storage system. This encryption mechanism combines the access structure and the ciphertext puncturing label to achieve fine-grained control and secure sharing of data, providing reliable security guarantees for cross-platform user access.

[0171] In step 3. To adapt to various user identities and access requirements in the cross-platform scenario, a fine-grained authorization key generation method is designed, including:

[0172] 31) The key generation center randomly selects an exponent eight \(r\) and a random exponent nine \(z\) for user \(u\) t , \(r,z\in Z\) p , ensuring the uniqueness and non-reusability of each user's key, which can effectively prevent key conflicts and at the same time support user identity differentiation and management in a multi-platform environment.

[0173] 32) The key generation center receives the attribute set \(S\) and the label set \(T=\{t_1,t_2,\cdots,t\) from multiple platform users d}, combined with the public and private key pairs (PK K , MK k ) of the key generation center, generate exclusive conversion keys t and decryption private keys for user u

[0174]

[0175] Among them, D (1) =(g α ·g ar+aβ ) 1 / z , D (2) =(g r ) 1 / z ,

[0176] t i is an element in the tag set T={t1, t2,..., t d}.

[0177] During the generation process of the conversion key , combined with the user's attribute set S and the system public key PK K , enabling it to support partial decryption of encrypted data. This key supports the flexibility of cross-platform access for users and is only used by users who comply with the access policy.

[0178] During the generation process of the decryption private key , through the attribute set S and the tag set T, use the system private key MK K to construct the user-exclusive decryption key. The user-exclusive decryption key is closely bound to the user's identity and access rights, ensuring that the data can only be decrypted and accessed by authorized users. The complete authorization key of user u t is composed of and . The authorization key of each user is bound to specific attributes and tags, which can accurately describe the user's access scope and permission level, jointly realizing fine-grained decryption access to encrypted data and providing an efficient authorization mechanism for cross-platform and multi-user charging data access control.

[0179] 33) To ensure the transparency and verifiability of operations, the key generation center records the user key generation process in the blockchain and defines the key generation transaction as:

[0180]

[0181] Among them, The || symbol represents the concatenation operation. The key generation center uses its private key MK K to sign the user identity, attribute set, and tag set for verifying the authenticity and integrity of the record.

[0182] S respectively represent the user ID, user signature, and user attribute set.

[0183] Broadcast the key generation transaction TX KeyGen as a new transaction to the blockchain network and write it into block B:

[0184] B = {PrevHash, TX KeyGen , Nonce, Hahs(B)}

[0185] where PrevHash represents the hash value of the previous block; Nonce represents the random number; Hash(B) represents the hash value of the current block content, which is used to ensure the integrity of the block. The verification nodes in the blockchain network receive the key generation transaction TX KeyGen , and verify its legality through the following formula:

[0186]

[0187] If the verification is successful, then add the transaction TX KeyGen to the transaction pool to be packaged. Through the distributed ledger technology of the blockchain, realize the traceability and cross-platform sharing of authorization records, and ensure the transparency and security of access control for multiple users.

[0188] In step 4, it includes:

[0189] 41) The cloud storage administrator converts the permission revocation policy PP K into an access policy AP K , including:

[0190] Convert the logic gates of non-leaf nodes in the permission revocation policy PP K : convert the OR gate to an AND gate; convert the AND gate to an OR gate; convert the k-of-n gate to an (n - k + 1)-of-n gate; perform a negation operation on the label t of the leaf node to generate a new label is a mathematical symbol representing negation;

[0191] 42) Randomly select two exponents λ k and exponent r k , λ k , r k ∈ Z p , and perform a puncturing operation on the ciphertext puncturing encryption key to calculate a new puncturing key sk′0 = (t0, K′0, L′0, Q′0), where:

[0192]

[0193] Based on the transformed access policy AP K , assign polynomials to each tree node, and assign the exponent ten λ k to the leaf nodes to generate the distributed exponent ten value λ k ; for the label of each leaf node randomly select an exponent eleven r k ∈Z p , calculate the new key component sk k =(t k ,K k ,L k ,Q k ), where t k,j is the new leaf node label after randomly selecting an exponent r k,j ,

[0194]

[0195] 43) The updated key can be expressed as: SK K =(sk′0,sk1,…,sk k ), where sk′0 and sk k are the new punctured key and the new key component respectively. After the ciphertext is punctured, the original key cannot decrypt the new ciphertext, thus realizing the revocation of permissions for specific users or groups.

[0196] To ensure cross-platform collaboration consistency, the cloud storage administrator uses the private key MK M to sign the update result and generate a signature Finally, the cloud storage administrator combines the updated key SK K with the ciphertext CT and outputs the punctured updated ciphertext CT′=(SK K ,P,C,C1,C2,C3,C y ).

[0197] 44) After the ciphertext update is completed, upload the permission revocation operation record and result to the blockchain archive for real-time verification and sharing by all platforms, including the puncturing policy identifier ID PPK , the identifier ID of the punctured and updated ciphertext CT′ , and the signature σ of the updated key component;

[0198] Package the generated permission revocation record and upload it to the chain, denoted as REC={ID PPK ,ID CT′ ,σ,Timestamp}, where Timestamp is the timestamp of the operation for tracking records; and calculate the operation hash H REC =H(ID PPK||ID CT′ ||σ|| The storage unit written to the blockchain by the (Timestamp) ensures the integrity and immutability of the record. The cloud storage administrator submits the record to the blockchain through Tx REC = {H Rec , MerkleProof} is written to the block, where H Rec is the operation hash, and Tx REC represents the complete record ready to be submitted. Among them, MerkleProof is the Merkle proof associated with the permission revocation record to verify the validity of the record in the blockchain.

[0199] The blockchain network can verify the legality of the transaction through the signature σ and verify the integrity of the record through the Merkle proof. Each platform can verify through the distributed ledger of the blockchain, that is, Query(ID PPK , ID CT′ ) → Rec. The query result includes information such as the revocation policy, the updated ciphertext identifier, the signature, and the timestamp, ensuring cross-platform sharing and transparency.

[0200] In step 5, it includes:

[0201] 51) By interacting with the grid cloud storage server, the cloud storage server constructs a message for response using the proxy public-private key pair (PK S , MK S ), partially decrypts the ciphertext and delivers the result to the user. The user completes the final decryption based on the result returned by the server. At the same time, verify whether the attribute set in the above result delivery process satisfies the access policy P of the ciphertext CT′. If it is satisfied, further check whether the user's label set conforms to the revocation policy PP K K . If the user label set is in the revocation policy, abort the algorithm, and even if the decryption operation is performed, the correct plaintext cannot be obtained; if the user label set is not in the revocation policy, the user can run the partial decryption algorithm to generate the partially decrypted ciphertext CT out ;

[0202] 52) The user gives the conversion key to the cloud storage server, and the cloud server outputs the partially decrypted ciphertext CT out . After obtaining the partially decrypted ciphertext CT out , the user locally calculates to obtain the charging plaintext data M, including:

[0203] The cloud storage server receives the conversion key t provided by the user u and checks whether the attribute set S in the conversion key satisfies the access policy P embedded in CT′; secondly, check the conversion key Whether the set of tags {t1, t2, …, t d} in K complies with the puncturing strategy PP ; if the punctured tags in the ciphertext CT′ conflict with the tags in the transformation key

[0204] In the partial decryption operation of step 52), the cloud storage server processes the nodes x in the access tree P in sequence:

[0205] (521) Decryption of leaf nodes. If x ∈ S, then calculate:

[0206]

[0207] If then output

[0208] DecryptNode is the decryption algorithm for leaf nodes, C x represents the ciphertext obtained by the user during decryption. In step 23), the subscript y is used to represent the leaf node used during encryption. The decrypting user may not satisfy the access structure, and the user may not obtain all the ciphertexts of the encrypted nodes. In this step, to distinguish it from step 23), the subscript x is used to represent the leaf node. According to the Lagrange interpolation method, when the number of leaf nodes x meets the threshold, the polynomial secret value can be recovered to complete the decryption, q x (0) is the value of the leaf node polynomial at 0 during decryption.

[0209] (522) Decryption of non - leaf nodes. For non - leaf node x, the cloud storage server recursively executes the algorithm to calculate F x :

[0210]

[0211] △ i,S (0) is the Lagrange coefficient, and F x is the result of recursive calculation;

[0212] (523) Decryption of the root node. For the root node R of the access tree, the cloud storage server calculates:

[0213]

[0214] W is the intermediate value calculated by the server;

[0215] Calculate the session key K S and the intermediate result C′ as well as A:

[0216] K S = e(g ρ , MKS ) = e(g ρ , H(ID S ) γ )

[0217] C′ = C / K S = M·e(g, g) αs

[0218]

[0219] According to the leaf nodes in the puncturing strategy Calculate β = q(0) using the Lagrange interpolation coefficient for each puncturing strategy AP K Calculate Z i is the result calculated for the puncturing strategy;

[0220] Calculate Merge the above calculation results into CT out = (A, B, C′), and send it to the user; user u t After receiving CT sent by the cloud storage server out calculate M = (C′·B) / A to recover the plaintext.

[0221] Through multi-level verification, this algorithm effectively reduces unnecessary decryption calculations in cross-platform scenarios, improving the system's access efficiency and resource utilization rate.

[0222] In step 6, it includes:

[0223] Cross-platform access authorization traceability: The TX stored in the blockchain KeyGen Through realize multi-party verification and traceability, where represents calling the query interface to return the key generation record TX related to user u t , and use the signature verification formula KeyGen to confirm the legality of the record. The traceability record of the access control key generation process realizes the transparency, immutability, and cross-platform sharing of the distributed ledger, providing a trustworthy guarantee for the multi-user access control of power grid charging data.

[0224] Cross-platform authorization recovery traceability: After the permission recovery is completed, the cloud storage administrator generates a signature σ and uploads the signature σ and related information to the blockchain. Each platform user obtains the signature record from the blockchain and uses the signature PK sign v = gpublic key to verify whether the ciphertext is correctly updated according to the puncturing strategy:

[0225] ​

[0226] PK M represents the signature public key, is a construction operation, representing the power of g to the H(SK K ). represents whether it is equal to.

[0227] If the verification passes, it means that the ciphertext has been correctly processed according to the puncturing strategy. Each platform user can access the permission revocation record through the blockchain and trace it through the query interface:

[0228] Query(ID PPK , ID CT′ ) → Rec.

[0229] Through the distributed characteristics of the blockchain, each platform user can access and verify the permission revocation record in real time, realizing the transparent management of charging data. Any user can query the relevant records according to the needs and verify whether the operation is legal.

[0230] Based on the above calculation and processing process, the following is the evaluation and analysis of the present invention.

[0231] The construction of the present invention's solution is based on the bilinear Diffie-Hellman (DBDH) assumption. If any probabilistic polynomial-time attacker A attempts to attack the solution with an advantage ∈, then the simulator B can participate in the chosen-plaintext attack game with an advantage of ∈ / 2, indicating that the solution has strong anti-attack capabilities and can ensure data security. Secondly, the present patent solution has good performance in terms of data confidentiality, user revocation efficiency, and forward security.

[0232] Analysis of data confidentiality. If unauthorized users cannot meet the access policy and the attribute set cannot match the root node value of the access tree, they cannot decrypt the ciphertext. The mechanism of the present invention ensures that only users who meet the policy can access the data. The key generation center randomly selects independent random numbers for each user attribute to generate the secret key, making each user's attribute key unique. Even if multiple users collude, they cannot crack the encrypted data by combining their respective keys, thus enhancing the system's ability to resist collusion attacks.

[0233] Analysis of the efficiency of user revocation. When a user revokes, the present invention's solution uses dynamic puncturing operations to replace the traditional re-encryption and key update processes, significantly reducing the system's computational and communication overhead, making the user revocation operation more flexible and efficient. Introducing a cloud storage server to assist in processing computational tasks reduces the computational burden on the user side and improves the overall system operation efficiency, especially in multi-user and cross-platform scenarios, where the user revocation operation can be completed more efficiently.

[0234] Forward security analysis. When the data storage manager punctures the ciphertext according to the puncturing policy, the tags in all user secret keys that meet the puncturing policy will not be able to match the new access policy. Therefore, the revoked users cannot decrypt the punctured ciphertext, thus ensuring forward security. Secondly, it conforms to refined policy revocation. The revocation mechanism is policy-based and only affects users who meet the puncturing policy, and the access rights of the remaining users are not affected, ensuring the normal operation of the system and the continuity of data access.

[0235] Embodiment 2

[0236] A computer system includes a memory, a processor, and a computer program stored on the memory. The processor executes the computer program to implement the steps of the above method.

[0237] Embodiment 3

[0238] A computer-readable storage medium stores a computer program / instructions. When the computer program / instructions are executed by a processor, the steps of the above method are implemented.

[0239] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A traceable access authorization and recycling method for charging data, characterized in that, including: The smart grid data center uses the public key PK of the key generation center for the plaintext data M and access policy P generated according to the charging service K and the public key PK of the cloud storage server S to perform attribute encryption on the plaintext data and access policy to generate a ciphertext CT containing the access policy; wherein the access policy P is used to specify the combination of user attributes that can access the charging data; the key generation center generates a conversion key and a decryption key for a specific user according to the user's attribute set and label set, and the generation process is synchronously recorded on the blockchain; After receiving the signature σ generated by the cloud storage administrator, the smart grid data center uses the public key PK of the cloud storage administrator M to verify the correctness of the ciphertext puncturing process, check the authorization records and revocation records of users on the blockchain, and comprehensively trace different users by associating the user identities with the permission change history; the process for the cloud storage administrator to generate the signature σ is as follows: The cloud storage administrator runs the policy puncturing algorithm according to the public key PK of the key generation center K and the permission revocation policy PP K to perform a tag puncturing operation on the ciphertext CT, generating an updated ciphertext CT'; use the private key MK M to sign the result of the updated ciphertext CT', generating the signature σ, and upload the permission revocation operation record and result to the blockchain for archiving.

2. The traceable access authorization and recycling method for charging data according to claim 1, characterized in that, also including initializing power grid charging data access control parameters, including: Input the security parameter λ and a set of d attribute tags, define the bilinear mapping e: G0×G0→G1 and the hash function H: {0,1} * →G0 for subsequent access control authorization and revocation, where G0 is a bilinear group with a generator g and order p, and G1 is the target group of the bilinear group G0; the hash function H: {0,1} * →G0 is a function that maps binary strings of any length to a specific mathematical structure G0; The key generation center defines the complete set of attributes U = {1, 2, …, n}, and randomly selects an exponent for each attribute i ∈ U Z p which is the integer field of order p; then the key generation center selects exponent α and exponent β, α, β ∈ Z p , and calculates g1 = g a and g2 = g β ; n indicates that there are n tuples in the complete set of attributes U, and the set interval is from 1 to n; g1 and g2 are the calculation results of g a and g β ; The key generation center constructs a polynomial q(x) that satisfies q(0) = β and defines Q(x) = g q(x) , and at the same time sets a tag t0 for subsequent permission recovery; q(0) is the result of the polynomial q(x) when x takes the value 0; x represents the input value of the polynomial q(.), and Q(x) is the calculation result of g q(x) ; The public and private key pairs of the output key generation center are (PK K , MK k ): MK K =(a,g α ) h |U| is the calculation result, e(g, g) α is the pairing mapping of g and the result of the α power; For the power grid cloud storage server, randomly select an exponent γ ∈ Z p , and calculate the proxy public key PK S : PK S = g γ Combine with the server identification ID of the cloud storage server S , generate the proxy private key MK through the hash function S : MK S = H(ID S ) γ For the cloud storage administrator, randomly select an exponent υ ∈ Z p , and set the public-private key pair for signature as (PK M , MK M ): PK M = g υ MK M = v the public-private key pair is used for tracing permission changes.

3. The traceable access authorization and recycling method for charging data according to claim 2, wherein, In the process of generating the ciphertext CT containing the access policy, including: 21) The smart grid data center selects random exponents s and ρ, s, ρ ∈ Z p , for encrypting the plaintext data M ∈ G1 generated by the charging service; calculate g ρ and g3 = g s , and further calculate the session key K S = e((g γ )) ρ , H(ID S ))), where the subscript S represents the key for data sharing under the attribute set , and the key for data sharing is used for the sharing operation between the smart grid data center and the cloud storage server; represents a subset of mathematical symbols; 22) The smart grid data center selects a random exponent r0 ∈ Z p , and generates an encryption key SK0 = {t0, K0, L0, Q0} that supports ciphertext puncturing, where: embedding the encryption key SK0 as the second-layer access control and restriction measure into the encrypted ciphertext; 23) The smart grid data center converts the access policy P into a logical access tree and constructs the ciphertext CT = (SK0, P, C, C1, C2, C3, C y ), where: C = M·K S q y (0) represents q(0) corresponding to the leaf node y, h1 - h |U| are public key parameters, and the public key parameters are assigned to the leaf node y, denoted as h y .

4. A traceable access authorization and recovery method for charging data according to claim 3, characterized in that, In the process of generating the transformation key and decryption key for a specific user, including: 31) The key generation center generates for user u t randomly selects exponent r and randomly selects exponent z, where r, z ∈ Z p ; 32) The key generation center receives the attribute set S and the tag set T = {t1, t2, …, t d} from multiple platform users, and combines the public-private key pair (PK K , MK k ) of the key generation center to generate a dedicated transformation key t and a decryption private key for user u where D (1) = (g α · g ar+aβ ), 1 / z D (2) = (g r ), 1 / z , t i is an element in the tag set T = {t1, t2, …, t d}; (6) The key generation center records the user key generation process in the blockchain, and defines the key generation transaction as: Among them, The || symbol represents a concatenation operation. The key generation center uses its private key MK K to sign the user identity, attribute set, and label set; S represents the user ID, user signature, and user attribute set respectively; Broadcast the key generation transaction TX KeyGen to the blockchain network as a new transaction and write it into block B: B = {PrevHash, TX KeyGen , Nonce, Hahs(B)} Among them, PrevHash represents the hash value of the previous block; Nonce represents the nonce; Hash(B) represents the hash value of the current block content. The verification nodes in the blockchain network receive the key generation transaction TX KeyGen , and verify its legality through the following formula: If the verification is successful, the transaction TX KeyGen will be added to the transaction pool to be packaged.

5. The traceable access authorization and recycling method for charging data according to claim 4, characterized in that, In the process of generating the updated ciphertext CT′, including: 41) The cloud storage administrator converts the permission revocation policy PP into an access policy AP according to De Morgan's law K including: K , including: Convert the logical gates of non-leaf nodes in the permission revocation policy PP K Convert the OR gate to an AND gate; convert the AND gate to an OR gate; convert the k-of-n gate to an (n - k + 1)-of-n gate; negate the label t of the leaf node to generate a new label is a mathematical symbol representing negation; 42) Randomly select two exponents λ k and exponent r k , λ k , r k ∈Z p , perform a puncturing operation on the ciphertext puncturing encryption key, and calculate the new puncturing key sk′0 = (t0, K′0, L′0, Q′0), where: Based on the transformed access policy AP K , assign polynomials to each tree node, and assign the exponent λ k value to the leaf nodes to generate the distributed exponent λ value k ; for the label of each leaf node randomly select an exponent r k ∈ Z p , and calculate the new key component sk k = (t k , K k , L k , Q k ), where t k,j is the new leaf node label after randomly selecting an exponent r k,j ​ 43) The updated key is represented as: SK K =(sk′0, sk1, …, sk k ), where sk′0 and sk k are the new puncturing key and new key components respectively; The cloud storage administrator uses the private key MK M to sign the update result and generate a signature The cloud storage administrator combines the updated key SK K with the ciphertext CT and outputs the punctured updated ciphertext CT′ = (SK K , P, C, C1, C2, C3, C y ); (8) Upload the permission revocation operation record and result to the blockchain for archiving.

6. The traceable access authorization and recovery method for charging data according to claim 5, wherein, In step 44), the permission revocation operation record and result include the puncturing strategy identification ID PPK , the ciphertext identification ID updated after puncturing CT′ , the updated key component signature σ; Package the generated permission recovery record and upload it to the blockchain, denoted as REC = {ID PPK , ID CT′ , σ, Timestamp}, where Timestamp is the timestamp of the operation for tracking records; And write the operation hash H REC = H(ID PPK || ID CT′ || σ || Timestamp) into the storage unit of the blockchain; The cloud storage administrator submits the record to the blockchain. Through Tx REC ={H Rec , MerkleProof} is written into the block. H Rec is the operation hash. Tx REC represents the complete record to be submitted. Among them, MerkleProof is the Merkle proof associated with the permission revocation record, which is used to verify the validity of the record in the blockchain.

7. A traceable access authorization and recovery method for charging data according to claim 1, characterized in that After the smart grid data center receives the signature σ, it uses the public key PK of the cloud storage administrator M Verify the correctness of the ciphertext piercing process, check the user's authorization records and recovery records on the blockchain, and comprehensively trace different users by associating the user identity with the permission change history, including: Cross-platform access authorization tracing: TX stored in the blockchain KeyGen pass Realize multi-party verification and traceability, including: Represents the query interface call to return the user u t Related key generation record TX KeyGen , using the signature verification formula Confirm the legitimacy of the records; Cross-platform authorization recovery and traceability: After the permission recovery is completed, the cloud storage administrator generates a signature σ and uploads the signature σ along with relevant information to the blockchain. Each platform user retrieves the signature record from the blockchain and uses the signature PK sign = g v Verify whether the ciphertext is correctly updated according to the puncturing policy: PK M represents the signature public key, is a construction operation, representing the power of g to the H(SK K ), represents whether it is equal to. If the verification passes, it means that the ciphertext has been correctly processed according to the puncturing policy. Each platform user can access the permission revocation record through the blockchain and trace it through the query interface: Query(ID PPK ,ID CT′ )→Rec。 8. A traceable access authorization method for charging data, characterized in that, The user generates an updated ciphertext CT′ according to the cloud storage administrator and holds the conversion key authorized by himself / herself and the decryption private key Verifies the user's permission through the decryption algorithm and accesses the charging data.

9. The traceable access authorization method for charging data according to claim 8, wherein In the process of generating the updated ciphertext CT′, including: The cloud storage administrator converts the permission revocation policy PP into the access policy AP according to De Morgan's law K including: K including: Convert the logic gates of non-leaf nodes in the permission revocation policy PP K : convert OR gates to AND gates; convert AND gates to OR gates; convert k-of-n gates to (n - k + 1)-of-n gates; negate the label t of leaf nodes to generate a new label is a mathematical symbol representing negation; Randomly select two exponents λ k and exponent r k , λ k , r k ∈Z p , perform a puncturing operation on the ciphertext puncturing encryption key, and calculate the new puncturing key sk′0 = (t0, K′0, L′0, Q′0), where: Based on the transformed access policy AP K , assign polynomials to each tree node, and assign the exponent ten λ k to the leaf nodes to generate the distributed exponent ten value λ k ; for the label of each leaf node randomly select an exponent eleven r k ∈ Z p , calculate the new key component sk k = (t k , K k , L k , Q k ), where t k,j is the new leaf node label after randomly selecting an exponent r k,j ​ The updated key is represented as: SK K =(sk′0, sk1, …, sk k ), where sk′0 and sk k are the new puncturing key and the new key components respectively; The cloud storage administrator uses the private key MK M to sign the update result and generate a signature The cloud storage administrator combines the updated key SK K with the ciphertext CT and outputs the punctured updated ciphertext CT′ = (SK K , P, C, C1, C2, C3, C y ); Upload the permission revocation operation record and result to the blockchain for archiving.

10. A traceable access authorization method for charging data according to claim 8, characterized in that, When the user generates the updated ciphertext CT′ according to the cloud storage administrator and holds the converted key and the decryption private key in the process of verifying the user's permission and accessing the charging data through the decryption algorithm, it includes: By interacting with the power grid cloud storage server, the cloud storage server uses the proxy public-private key pair (PK S , MK S ) to construct a message for response, partially decrypt the ciphertext and deliver the result to the user. The user completes the final decryption according to the result returned by the server, and at the same time verifies whether the attribute set in the above result delivery process satisfies the access policy P of the ciphertext CT′. If it is satisfied, further check whether the user's label set conforms to the revocation policy PP . If the user label set is in the revocation policy, the algorithm is aborted, and even if the decryption operation is performed, the correct plaintext cannot be obtained; if the user label set is not in the revocation policy, the user can run the partial decryption algorithm to generate the partial decrypted ciphertext CT K ; out ; The user submits the conversion key to the cloud storage server, and the cloud server outputs the partially decrypted ciphertext CT out . After obtaining the partially decrypted ciphertext CT out , the user locally calculates and obtains the charging plaintext data M 11. A traceable access authorization and recovery method for charging data according to claim 10, characterized in that Decrypt the ciphertext CT partially at the output of the cloud server out After obtaining the partially decrypted ciphertext CT out During the process of the user locally calculating to obtain the charging plaintext data M, it includes: The cloud storage server receives the transformation key provided by user u t and checks whether the set of attributes S in the transformation key satisfies the access policy P embedded in CT′; secondly, checks whether the set of tags {t1, t2, …, t } in the transformation key conforms to the puncturing policy PP ; if the puncturing tag in the ciphertext CT′ conflicts with the tag in the transformation key d it rejects the decryption request; otherwise, continues with the partial decryption operation K . ​ 12. A traceable access authorization and recovery method for charging data according to claim 11, characterized in that, In the partial decryption operation, the cloud storage server processes the node x in the access tree P in sequence and performs the following steps: (521) Leaf node decryption. If x ∈ S, then calculate: If then output DecryptNode is the decryption algorithm for leaf nodes, C x represents the ciphertext obtained by the user during decryption. The subscript x represents the leaf node. According to the Lagrange interpolation method, when the number of leaf nodes x meets the threshold, the polynomial secret value can be recovered to complete the decryption, q x (0) is the value of the leaf node polynomial at 0 during decryption; (522) Decryption of non-leaf nodes. For non-leaf node x, the cloud storage server recursively executes the algorithm to calculate F x : △ i,S (0) is the Lagrange coefficient, F x is the result of recursive calculation; (523) Root node decryption. For the root node R of the access tree, the cloud storage server calculates: W is the intermediate value calculated by the server; Calculate the session key K S , the intermediate result C′, and A: K S = e(g ρ , MK S ) = e(g ρ , H(ID S ) γ ) C′ = C / K S = M·e(g,g) αs According to the leaf nodes in the puncture strategy Calculate β = q(0) using the Lagrange interpolation coefficient for each puncture strategy AP K Calculate Z i Is the result calculated for the puncture strategy; Calculation Merge the above calculation results into CT out =(A, B, C'), and send it to the user; user u t After receiving the CT sent by the cloud storage server out calculate M = (C'·B) / A to recover the plaintext.

13. A traceable access authorization method for charging data, characterized in that, The key generation center generates the transformation key and decryption key for a specific user according to the user's attribute set and label set, and synchronously records the generation process in the blockchain; The key generation center makes the generated transformation key and decryption key available to users through the blockchain. The users, based on the updated ciphertext CT' generated by the cloud storage administrator and holding their own authorized transformation key and decryption private key verify the user's permissions through a decryption algorithm and access the charging data.

14. The traceable access authorization method for charging data according to claim 13, characterized in that In the process of generating the updated ciphertext CT′, including: The cloud storage administrator converts the permission revocation policy PP into the access policy AP according to De Morgan's law K including: K ,including: Convert the logic gates of non-leaf nodes in the permission revocation policy PP K Convert the OR gate to an AND gate; convert the AND gate to an OR gate; convert the k-of-n gate to an (n - k + 1)-of-n gate; negate the label t of the leaf node to generate a new label is a mathematical symbol representing negation; Randomly select two exponents λ k and exponent r k , λ k , r k ∈Z p , perform a puncturing operation on the ciphertext puncturing encryption key, and calculate the new puncturing key sk′0 = (t0, K′0, L′0, Q′0), where: Based on the transformed access policy AP K , assign polynomials to each tree node and assign the value of exponent ten λ k to the leaf nodes to generate the distributed exponent ten value λ k ; for the label of each leaf node randomly select an exponent eleven - r k ∈Z p , calculate the new key component sk k =(t k ,K k ,L k ,Q k ), where t k,j is the new leaf node label after randomly selecting an exponent r k,j ​ The updated key is represented as: SK K =(sk′0, sk1, …, sk k ), where sk′0 and sk k are the new puncturing key and the new key components, respectively; The cloud storage administrator uses the private key MK M to sign the update result and generate a signature The cloud storage administrator combines the updated key SK K with the ciphertext CT and outputs the punctured updated ciphertext CT′ = (SK K , P, C, C1, C2, C3, C y ); Upload the permission revocation operation record and result to the blockchain for archiving.

15. A traceable access authorization method for charging data according to claim 13, characterized in that When the user generates the updated ciphertext CT' according to the cloud storage administrator and holds the converted key and the decryption private key During the process of verifying the user's permission and accessing the charging data through the decryption algorithm, it includes: By interacting with the power grid cloud storage server, the cloud storage server uses the proxy public-private key pair (PK S , MK S ) to construct a message for response, partially decrypt the ciphertext and deliver the result to the user. The user completes the final decryption according to the result returned by the server, and at the same time verifies the conversion key through the above result delivery process to check whether the attribute set in it satisfies the access policy P of the ciphertext CT′. If it is satisfied, further check whether the user's label set conforms to the revocation policy PP K . If the user label set is in the revocation policy, the algorithm is aborted and the correct plaintext cannot be obtained even if the decryption operation is performed; if the user label set is not in the revocation policy, the user can run the partial decryption algorithm to generate the partially decrypted ciphertext CT out ; The user submits the conversion key to the cloud storage server, and the cloud server outputs the partially decrypted ciphertext CT out . After obtaining the partially decrypted ciphertext CT out , the user locally calculates and obtains the charging plaintext data M.

16. A computer system, comprising a memory, a processor, and a computer program stored on the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-15.

17. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1-15.

Citation Information

Patent Citations

  • Puncture-capable attribute-based matching encryption scheme

    CN113346991A

  • Fine-grained extensible identity-based broadcast encryption method and system

    CN116318951A

  • Power data privacy security protection system, method and application based on ciphertext policy attribute-based encryption

    CN119892452A

  • Method for creating a blockchain digital identity, based on an electronic signature

    US20220060335A1