A blockchain-based bilateral fine-grained access control and privacy protection method

CN122372173APending Publication Date: 2026-07-10BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING UNIV OF POSTS & TELECOMM
Filing Date
2026-04-10
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

In digital twin scenarios, existing technologies struggle to achieve privacy protection and fine-grained access control for cross-domain data interaction. Especially in large-scale, dynamic networks, the security and efficiency of data exchange face challenges, including privacy leaks, data source verification, and excessive computational and storage overhead.

Method used

A blockchain-based bilateral fine-grained access control method is adopted. System parameters and keys are generated through an authorization center, and bidirectional matching, encryption and decryption operations are performed using attribute authorization agencies and edge servers. Combined with symmetric encryption and attribute anonymity mechanisms, the security and transparency of data sharing are achieved.

Benefits of technology

It implements distributed, bilateral, fine-grained access control to ensure the privacy and security of data sharing, supports batch updates by users, reduces computational overhead, provides trusted anonymous access and transparency, and ensures the security and auditability of the data sharing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122372173A_ABST
    Figure CN122372173A_ABST
Patent Text Reader

Abstract

The application discloses a kind of bilateral fine-grained access control and privacy protection method based on block chain, applied to privacy protection technical field.The application includes the following steps: system initialization, attribute authorization agency, data owner and data user initiate identity registration request;Authorization center generates verification key and uploads to block chain;Attribute authority calculates encryption key and sends to data owner, calculates decryption key and sends to data user, and data user generates decryption component and uploads to block chain;Data owner encrypts data ciphertext and uploads to interstellar file system, encrypts symmetric key, generates attribute ciphertext component and uploads to block chain;Execute bilateral matching algorithm to verify two-way fine-grained matching mechanism;Matched data user restores symmetric key, obtains and decrypts shared data.The application can realize comprehensive management to access permission, and only when the bilateral access strategy of data user and data owner is satisfied, cross-domain data sharing is realized through block chain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of privacy protection technology, and more specifically to a blockchain-based bilateral fine-grained access control and privacy protection method. Background Technology

[0002] Digital twin technology has become a key pillar of the era of intelligent systems, widely used in industries such as manufacturing, healthcare, and transportation. A digital twin is a real-time digital representation of a physical entity, capable of simulating and predicting its state, behavior, and entire lifecycle in digital space. This capability heavily relies on the trusted interaction of massive amounts of data to accurately model and predict physical systems. However, the accuracy of predictive analytics is often limited by the quality, source, and integrity of the data. Unreliable data interaction can significantly undermine the reliability of digital twin simulations and applications. Data exchange in digital twin systems is characterized by bidirectional interaction and closed-loop control. Furthermore, digital twin data sharing often spans multiple organizations, involving inter-organizational collaboration and cross-domain data exchange, raising concerns about data confidentiality and the compliance of exchange protocols. Match-based encryption combines encryption with privacy protection technologies, facilitating bidirectional matching and interaction of encrypted data. Existing identity-based matching encryption schemes provide data privacy protection and source authentication, but these schemes often face the problem of identity privacy leakage. Moreover, most identity matching methods employ a one-to-one communication model, which significantly increases computational and communication overhead, especially when users frequently revoke or join, drastically increasing the computational burden. Attribute-based matching encryption methods are naturally suitable for one-to-many data sharing models. However, these schemes face challenges in ensuring metadata privacy, which is typically composed of attributes that constitute access policies. Another limitation of the methods mentioned above is the assumption that the data sending and receiving devices are within a single trust domain. In complex, large-scale digital twin scenarios, data owners and service providers may not share the same trust domain. Device identities are diverse and complex, requiring a balance between ensuring trusted authentication of distributed data source identities and protecting the privacy of these identities. In dynamic digital twin networks, multiple users may simultaneously enter or exit specific areas. Implementing batch revocation of users can significantly reduce the computational cost of revoking individual users. Overall, cross-domain data interaction in digital twin scenarios requires highly complex shared identities, time-sensitive data sharing mechanisms, robust privacy protection, and seamless parallel integration of distributed sharing processes, constituting a multi-dimensional and challenging problem.

[0003] Blockchain technology, as a decentralized, transparent, traceable, and trustworthy distributed infrastructure, provides a solid foundation for secure and reliable distributed cross-domain data exchange in digital twin networks. By maintaining a tamper-proof ledger, blockchain enables transparent and secure interaction between untrusted parties. Using blockchain, a distributed digital twin data-sharing architecture can be built across organizational boundaries, ensuring the integrity and traceability of interactions. However, blockchain-based trusted data exchange solutions for digital twins still face several challenges, including privacy breaches, data source verification, and excessive storage and computational overhead. When data is outsourced to edge servers, the data owner loses physical control, making it vulnerable to leakage or interception by cyber attackers during transmission. Furthermore, data tampering during transmission can lead to inaccurate reasoning results, significantly impacting the decisions of physical entities. Attacking entities may also forge digital twin identities to maliciously participate in interactions, and information exchanged through public channels should avoid revealing the true identities of participants. Large-scale digital twin deployments involve massive bidirectional data transmission, computation, and frequent user dynamic changes (such as joining and revoking), all of which place high demands on storage and computational performance. Therefore, how to provide a blockchain-based bilateral fine-grained access control and privacy protection method is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] In view of this, the present invention provides a blockchain-based bilateral fine-grained access control and privacy protection method to achieve trusted, anonymous, and controlled shared access to privacy-preserving cross-domain data in digital twin scenarios.

[0005] To achieve the above objectives, the present invention provides the following technical solution: A blockchain-based bilateral fine-grained access control and privacy protection method includes the following steps: S1. The authorization center executes the system initialization algorithm, generates and publishes public system parameters, and secretly stores the system master key; S2. Multiple attribute authorization agencies, data owners, and data users initiate identity registration requests. The authorization center completes the identity registration of the attribute authorization agencies, while the identity registration of data owners and data users is completed by the attribute authorization agencies. S3. The authorization center executes the user management algorithm based on the private keys of legitimate users. Calculate and generate the verification key And upload parameters To the blockchain; S4. Each attribute authority calculates the encryption key based on the set of data owner attributes they manage. And send it to the data owner; S5. Each authoritative authority calculates the decryption key based on the managed set of user attributes. It is then sent to the data user; upon receiving it, the data user generates a decryption component and uploads it to the blockchain; S6. The data owner encrypts the data ciphertext using a symmetric encryption algorithm and uploads it to the InterPlanetary File System, using an encryption key. Encryption symmetric key Generate attribute ciphertext components and upload them to the blockchain; S7. The edge server executes a two-sided matching algorithm to verify the two-way fine-grained matching mechanism and uploads the matching results to the blockchain; S8. For successfully matched data, the user executes the decryption algorithm to recover the symmetric key. This allows them to retrieve and decrypt shared data from the InterPlanetary File System; S9. The authorization center executes a batch update algorithm to update the verification key for users. Users whose verification keys have been revoked will not be able to obtain the updated verification key. New users can obtain updated verification keys. .

[0006] Optionally, S1 is as follows: ; In the formula, This represents the initialization algorithm, and the input to the initialization process. These are security parameters given by the authorization center. The authorization center constructs a bilinear mapping. and a collision-resistant hash function and publish public parameters on the chain. ,in It is a large prime number. p Multiplication cyclic group, It is a class that is also p Multiplication cyclic group, It is a cyclic group and of the order of large prime numbers, It is a cyclic group generator, The master key is secretly stored by the authorized center (CA).

[0007] Optionally, S2 is as follows: During the identity registration process, the attribute sets of the data owner and the data user are anonymous to the attribute authorization agency, which only possesses the attribute parameters corresponding to the attribute values. Each attribute authorization agency Some attributes in the management system, It is the number of attribute licensing authorities, among which , Managed by attribute licensing authorities Each attribute parameter, the authorization center uses the accumulated value and witness value Verify whether the attribute authority possesses the attribute parameters it manages; the attribute authority uses accumulated values. and witness value and accumulated value and verification value Verify the authenticity of the data user and data owner's identities separately, that is, verify whether they possess legitimate attribute parameters and identity information.

[0008] Optionally, S3 specifically refers to: The input to the user management algorithm is the private key of a legitimate user. The authorization center selects the verification key. And calculate based on the Chinese Remainder Theorem. , , and ,in and satisfy , , , and These are all parameters used in the calculation process. The final calculated verification public key is then uploaded to the blockchain by the authorization center. This refers to the number of legitimate data users. Only legitimate users can calculate the verification key using their private key. Unauthorized users cannot calculate the verification key. .

[0009] Optionally, S4 specifically refers to: The input to the encryption key generation algorithm is each attribute authorization authority. The set of data owner attributes managed ,in It is a set of data owner attributes The number of elements, For the set of data owner attributes The Middle i One element, To manage the number of attribute authorities for all attributes of the data owner, Calculate the encryption key And send To the data owner.

[0010] Optional, S5 specifically includes: The input to the decryption key generation algorithm is each Managed data user attribute set ,in It is the number of elements in the attribute set. To manage the number of attribute authorities for all attributes of a data user, Calculate the decryption key Send the decryption key to the data user. After receiving the decryption key, the data user calculates the blind decryption key. Matching keys Decryption component and And upload it to the blockchain.

[0011] Optional, S6 specifically includes: The input to the encryption algorithm is a symmetric key. key and encryption key EK The data owner uses a symmetric key. key The original data to be shared is encrypted, and the ciphertext is uploaded to the InterPlanetary File System for storage; the data owner uses the encryption key. EK The symmetric key is encrypted using an attribute-based matching encryption algorithm. key Generate attribute ciphertext component And upload it to the blockchain.

[0012] Optional, S7 specifically includes: The input to the bilateral matching algorithm is ciphertext. and decryption components The edge server verifies whether the data user's attribute set meets the access policy defined by the data owner, and whether the data owner's attribute set meets the access policy defined by the data user. When both access policies are met, the edge server calculates the pre-decryption result. The system then sends the results to the data user, uploading successful results to the blockchain; otherwise, it uploads failed results to the blockchain.

[0013] Optional, S8 specifically includes: The input to the decryption algorithm is ciphertext. and pre-decryption results After a data user is successfully matched, they use their private key. Parameters obtained from the blockchain Recover the verification key Combined with the pre-decryption results returned by the edge server And encrypted components obtained from the blockchain Perform local decryption calculations to recover the symmetric key. key Finally, the encrypted data obtained from the InterPlanetary File System is decrypted to obtain the original shared data.

[0014] Optional, S9 specifically includes: When a batch of users need to be revoked or added, the authorization center executes a batch user update algorithm, recalculates and updates the verification key based on the Chinese Remainder Theorem. Then calculate the parameters for uploading and updating. In the blockchain, users whose accounts have been revoked will not be able to access new ones. Recover the valid verification key Therefore, access is lost; newly joined users can recover a new verification key using their private key. Grant permissions; existing users whose keys have not changed can continue to use them without updating.

[0015] As can be seen from the above technical solutions, compared with the prior art, the present invention provides a blockchain-based bilateral fine-grained access control and privacy protection method, which has the following beneficial effects: The present invention uses an attribute authority cluster to realize distributed bilateral fine-grained access control. The key is generated by the attribute authority cluster to avoid the single point of failure problem. Both data users and data owners can define attribute access policies. When the access policies of both data users and data owners are satisfied, data users can obtain the data shared by data owners. By utilizing accumulator technology to anonymize attribute values ​​and real identities, this invention effectively ensures the privacy of cross-domain data sharing even in the event of collusion by authoritative institutions. The attribute-based bilateral matching encryption complements the attribute anonymity and identity anonymity mechanisms of the scheme, achieving fine-grained access control and privacy protection. Based on the Chinese Remainder Theorem, this invention supports batch updates for legitimate users, providing batch user addition and removal functions without complex computational overhead. Multiple encryption methods are employed to balance the efficiency and security of data sharing; shared data uses symmetric encryption, and the symmetric key uses attribute-based bilateral matching encryption. Ciphertext data is stored in IPFS, and user registration and bilateral matching results are uploaded to the blockchain. The immutability and traceability of the blockchain ensure the security, transparency, and auditability of the data sharing process even under the anonymous access control model. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0017] Figure 1 This is a flowchart of the blockchain-based bilateral fine-grained access control and privacy protection method of the present invention; Figure 2 This is a timing diagram of the blockchain-based bilateral fine-grained access control and privacy protection method of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] This invention discloses a blockchain-based method for bilateral fine-grained access control and privacy protection, such as... Figure 1 and Figure 2 As shown, it includes the following steps: S1. The authorization center executes the system initialization algorithm, generates and publishes public system parameters, and secretly stores the system master key; S2. Multiple attribute authorization agencies, data owners, and data users initiate identity registration requests. The authorization center completes the identity registration of the attribute authorization agencies, while the identity registration of data owners and data users is completed by the attribute authorization agencies. S3. The authorization center executes the user management algorithm based on the private keys of legitimate users. Calculate and generate verification key And upload the parameters to the blockchain. ; S4. Each attribute authority calculates the encryption key based on the set of data owner attributes they manage. And send it to the data owner; S5. Each authoritative authority calculates the decryption key based on the managed set of user attributes. It is then sent to the data user; upon receiving it, the data user generates a decryption component and uploads it to the blockchain; S6. The data owner encrypts the data ciphertext using a symmetric encryption algorithm and uploads it to the InterPlanetary File System, using an encryption key. Encryption symmetric key Generate attribute ciphertext components and upload them to the blockchain; S7. The edge server executes a two-sided matching algorithm to verify the two-way fine-grained matching mechanism and uploads the matching results to the blockchain; S8. For successfully matched data, the user executes the decryption algorithm to recover the symmetric key. This allows them to retrieve and decrypt shared data from the InterPlanetary File System; S9. The authorization center executes a batch update algorithm to update the verification key for users. Users whose verification keys have been revoked will not be able to obtain the updated verification key. New users can obtain updated verification keys. .

[0020] In this embodiment, the technical solution includes seven types of entities: Data User (DU), Data Owner (DO), InterPlanetary File System (IPFS), Edge Server (ES), Center Authority (CA), Attribute Authorities (AAs), and the blockchain. The Center Authority is a trusted entity in the cross-domain service network. Within each domain, the Center Authority is responsible for system initialization, generating public and private key pairs for entities within the domain, and managing batch user updates. Furthermore, the Center Authority is responsible for registering Attribute Authorities within the domain. Once registration is successful, the Attribute Authorities are responsible for managing anonymous attributes within the domain. Each domain contains multiple Attribute Authorities, which manage several attributes, while user attributes are jointly managed by multiple Attribute Authorities. Attribute Authorities generate attribute keys for Data Owners and Data Users and upload their registration information to the blockchain. Data Owners initiate registration requests to the Center Authority and Attribute Authorities in the cross-domain service network. After successful registration, Data Owners use a symmetric key to encrypt shared data and upload it to IPFS. Subsequently, the data owner defines an attribute-based access policy and uses this to encrypt a symmetric key, generating attribute ciphertext which is then uploaded to the blockchain. Data users refer to the twin devices in the digital twin network that need to acquire and analyze data. Data users initiate registration requests to the authorization center and attribute authority. After successful registration, the data user formulates an access policy and calculates a matching key, then initiates a data access request to the cross-domain service network. When both parties meet the fine-grained attribute matching conditions, the data user receives partial decryption results from the edge server. By performing lightweight decryption operations, the data user can retrieve plaintext data. The edge server honestly performs the matching calculation, and once a bidirectional match is successfully established, the attribute-based ciphertext is returned to the corresponding data user. The blockchain is responsible for storing critical cross-domain data. Data stored on the blockchain is immutable, and fair and reliable cross-domain access can be achieved by utilizing smart contracts and the underlying blockchain infrastructure. IPFS is used to store the ciphertext of shared data. The file structure in IPFS is based on a Merkel directed acyclic graph. Files are divided into multiple blocks, each containing partial data and its corresponding hash value. The encrypted data access path is uploaded to the blockchain by the data owner, and the data stored on IPFS can be retrieved using the file storage path.

[0021] Furthermore, S1 specifically refers to: ; In the formula, This represents the initialization algorithm, and the input to the initialization process. These are security parameters provided by the authorization center, which constructs a bilinear mapping. and a collision-resistant hash function and publish public parameters on the chain. ,in It is a large prime number. p Multiplication cyclic group, It is a class that is also p Multiplication cyclic group, It is a cyclic group and of the order of large prime numbers, It is a cyclic group generator, The master key is secretly stored by the authorized center (CA).

[0022] Furthermore, S2 specifically refers to: During the identity registration process, the attribute sets of the data owner and the data user are anonymous to the attribute authorization agency, which only possesses the attribute parameters corresponding to the attribute values. Each attribute authorization agency Some attributes in the management system, It is the number of attribute licensing authorities, among which , Managed by attribute licensing authorities Each attribute parameter, the authorization center uses the accumulated value and witness value Verify whether the attribute authority possesses the attribute parameters it manages; the attribute authority uses accumulated values. and witness value and accumulated value and verification value Verify the authenticity of the data user and data owner's identities separately, that is, verify whether they possess legitimate attribute parameters and identity information.

[0023] In this embodiment of the invention, the formal definition of the identity registration algorithm is as follows: ; ; ; Specifically, the input to the Attribute Authorization Authority's Identity Registration Algorithm (AAs-Registration) yes The attribute parameters are given, and the output is a cumulative value. Public key and witness value The authorization center selects prime numbers. ,calculate public key And send public and private key pairs Give , Calculate the cumulative value and witness value And send it to the CA, which performs the following calculation to verify the equation. : ; ; The user registration algorithm DU-Registration takes as input the attribute parameters possessed by the DU. DU defines real identity information and fake identity information The algorithm outputs a cumulative value. Public key and witness value CA calculates the public key of DU And send public and private key pairs Calculate the cumulative value for DU. Witness value and And send to , Perform the following calculations to verify the equation. and ,in, The verification process is similar to the identity registration algorithm verification process of attribute authorization agencies. The verification is as follows: ; The data owner's (DO) registration algorithm process is similar to that of the data user's registration algorithm process. The CA calculates the DO's public key and sends the public-private key pair to the DO. The DO then calculates the accumulated value and the witness value and sends them to the CA. , verify To verify the legitimacy of the DO's identity. Equation The verification process is similar to the identity registration algorithm verification process of attribute authorization agencies.

[0024] Furthermore, the user management algorithm in S3 is as follows: ; In the formula, This represents a user management algorithm, whose input is a valid user's private key. The authorization center selects the verification key. And calculate based on the Chinese Remainder Theorem. , , and ,in and satisfy , , , and These are all parameters used in the calculation process. The final calculated verification public key is then uploaded to the blockchain by the authorization center. This refers to the number of legitimate data users. Only legitimate users can calculate the verification key using their private key. Unauthorized users cannot calculate the verification key.

[0025] Furthermore, S4 specifically refers to: The input to the encryption key generation algorithm is each attribute authorization authority. The set of data owner attributes managed ,in It is a set of data owner attributes The number of elements, For the set of data owner attributes The Middle i One element, The number of attribute authorities that manage all attributes of the data owner. Calculate the encryption key And send To the data owner.

[0026] In an embodiment of the present invention, Constructing Lagrange polynomials ,make satisfy and , calculate and As an encryption key .

[0027] Furthermore, S5 specifically refers to: The input to the decryption key generation algorithm is each Managed data user attribute set ,in It is the number of elements in the attribute set. To manage the number of attribute authorities for all attributes of a data user, Calculate the decryption key Send the decryption key to the data user. After receiving the decryption key, the data user calculates the blind decryption key. Matching keys , and decryption components and And upload it to the blockchain.

[0028] In an embodiment of the present invention, Constructing Lagrange polynomials ,make satisfy and , calculate and As the decryption key Data user computing ,choose Obtain the blind decryption key And calculate Define the set of access policies that data owners should satisfy. Calculate the matching key .

[0029] Furthermore, S6 specifically refers to: The input to the encryption algorithm is a symmetric key. key and encryption key EK The data owner uses a symmetric key. key The original data to be shared is encrypted, and the ciphertext is uploaded to the InterPlanetary File System for storage; the data owner uses the encryption key. EK The symmetric key is encrypted using an attribute-based matching encryption algorithm. key Generate attribute ciphertext component And upload it to the blockchain.

[0030] In this embodiment of the invention, DO receives the key. EK Then, select ,calculate , Then, DO defines the set of access policies that data users should satisfy. ,calculate , , , , .

[0031] Furthermore, S7 specifically refers to: The input to the bilateral matching algorithm is ciphertext. and decryption components The edge server verifies whether the data user's attribute set meets the access policy defined by the data owner, and whether the data owner's attribute set meets the access policy defined by the data user. When both access policies are met, the edge server calculates the pre-decryption result. The system then sends the results to the data user, uploading successful results to the blockchain; otherwise, it uploads failed results to the blockchain.

[0032] Edge servers retrieve attribute ciphertext components uploaded by data owners from the blockchain. Decryption component uploaded by data user The edge server verifies whether the data user's attribute set meets the access policy defined by the data owner, and whether the data owner's attribute set meets the access policy defined by the data user, i.e., the attribute set. Included in the access policy set There exist elements that satisfy Attribute set Included in the access policy set There exist elements that satisfy When both access policies are satisfied, the edge server calculates the pre-decryption result. The system then sends the results to the data user, uploading successful results to the blockchain; otherwise, it uploads failed results to the blockchain.

[0033] In this embodiment of the invention, edge server computing... , And verify according to the following calculations Is it true or false? ; ; If the equation is true, the match is successful.

[0034] Furthermore, S8 specifically refers to: The input to the decryption algorithm is ciphertext. and pre-decryption results After a data user is successfully matched, they use their private key. Parameters obtained from the blockchain Recover the verification key Combined with the pre-decryption results returned by the edge server and encrypted components obtained from the blockchain Perform local decryption calculations to recover the symmetric key. key Finally, the encrypted data obtained from the InterPlanetary File System is decrypted to obtain the original shared data.

[0035] In this embodiment of the invention, the local decryption calculation specifically involves: .

[0036] Furthermore, S9 specifically refers to: When a batch of users need to be revoked or added, the authorization center executes a batch user update algorithm, recalculates and updates the verification key based on the Chinese Remainder Theorem. Then calculate the parameters for uploading and updating. In the blockchain, users whose accounts have been revoked will not be able to access new ones. Recover the valid verification key Therefore, access is lost; newly joined users can recover a new verification key using their private key. Grant permissions; existing users whose keys have not changed can continue to use them without updating.

[0037] In this embodiment of the invention, when it is necessary to cancel v When there are multiple users, the authorization center recalculates based on the Chinese Remainder Theorem. Users whose accounts were revoked Already from Removed from the middle, cannot be removed from the new Recover the valid verification key When it is necessary to add v When there are multiple users, the authorization center recalculates based on the Chinese Remainder Theorem. New users Already In this process, a new verification key can be recovered using the private key. .

[0038] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0039] Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A blockchain-based bilateral fine-grained access control and privacy protection method, characterized in that, Includes the following steps: S1. The authorization center executes the system initialization algorithm, generates and publishes public system parameters, and secretly stores the system master key; S2. Multiple attribute authorization agencies, data owners, and data users initiate identity registration requests. The authorization center completes the identity registration of the attribute authorization agencies, while the identity registration of data owners and data users is completed by the attribute authorization agencies. S3. The authorization center executes the user management algorithm based on the private keys of legitimate users. Calculate and generate the verification key And upload parameters To the blockchain; S4. Each attribute authority calculates the encryption key based on the set of data owner attributes they manage. And send it to the data owner; S5. Each authoritative authority calculates the decryption key based on the managed set of user attributes. It is then sent to the data user; upon receiving it, the data user generates a decryption component and uploads it to the blockchain; S6. The data owner encrypts the data ciphertext using a symmetric encryption algorithm and uploads it to the InterPlanetary File System, using an encryption key. Encryption symmetric key Generate attribute ciphertext components and upload them to the blockchain; S7. The edge server executes a two-sided matching algorithm to verify the two-way fine-grained matching mechanism and uploads the matching results to the blockchain; S8. For successfully matched data, the user executes the decryption algorithm to recover the symmetric key. This allows them to retrieve and decrypt shared data from the InterPlanetary File System; S9. The authorization center executes a batch update algorithm to update the verification key for users. Users whose verification keys have been revoked will not be able to obtain the updated verification key. New users can obtain updated verification keys. .

2. The blockchain-based bilateral fine-grained access control and privacy protection method according to claim 1, characterized in that, S1 specifically refers to: Input to the initialization process These are security parameters provided by the authorization center, which constructs a bilinear mapping. and a collision-resistant hash function and publish public parameters on the chain. ,in It is a large prime number. p Multiplication cyclic group, It is a class that is also p Multiplication cyclic group, It is a cyclic group and of the order of large prime numbers, It is a cyclic group generator, The master key is secretly stored by the authorized center (CA).

3. The blockchain-based bilateral fine-grained access control and privacy protection method according to claim 1, characterized in that, S2 specifically refers to: During the identity registration process, the attribute sets of the data owner and the data user are anonymous to the attribute authorization agency, which only possesses the attribute parameters corresponding to the attribute values. Each attribute authorization agency Some attributes in the management system, It is the number of attribute licensing authorities, among which , Managed by attribute licensing authorities Each attribute parameter, the authorization center uses the accumulated value and witness value Verify whether the attribute authority possesses the attribute parameters it manages; the attribute authority uses accumulated values. and witness value and accumulated value and verification value Verify the authenticity of the data user and data owner's identities separately, that is, verify whether they possess legitimate attribute parameters and identity information.

4. The blockchain-based bilateral fine-grained access control and privacy protection method according to claim 1, characterized in that, S3 specifically refers to: The input to the user management algorithm is the private key of a legitimate user. The authorization center selects the verification key. And calculate based on the Chinese Remainder Theorem. , , and ,in and satisfy , , , and These are all parameters used in the calculation process. The final calculated verification public key is then uploaded to the blockchain by the authorization center. It refers to the number of legitimate data users; only legitimate users can calculate the verification key using their private key. Unauthorized users cannot calculate the verification key. .

5. The blockchain-based bilateral fine-grained access control and privacy protection method according to claim 1, characterized in that, S4 specifically refers to: The input to the encryption key generation algorithm is each attribute authorization authority. The set of data owner attributes managed ,in It is a set of data owner attributes The number of elements, For the set of data owner attributes The Middle i One element, To manage the number of attribute authorities for all attributes of the data owner, Calculate the encryption key And send To the data owner.

6. The blockchain-based bilateral fine-grained access control and privacy protection method according to claim 1, characterized in that, S5 specifically refers to: The input to the decryption key generation algorithm is each Managed data user attribute set ,in It is the number of elements in the attribute set. To manage the number of attribute authorities for all attributes of a data user, Calculate the decryption key The decryption key is sent to the data user, who then calculates the blind decryption key. Matching keys Decryption component and And upload it to the blockchain.

7. The blockchain-based bilateral fine-grained access control and privacy protection method according to claim 1, characterized in that, S6 specifically refers to: The input to the encryption algorithm is a symmetric key. key and encryption key EK The data owner uses a symmetric key. key The original data to be shared is encrypted, and the ciphertext is uploaded to the InterPlanetary File System for storage; the data owner uses the encryption key. EK The symmetric key is encrypted using an attribute-based matching encryption algorithm. key Generate attribute ciphertext component And upload it to the blockchain.

8. The blockchain-based bilateral fine-grained access control and privacy protection method according to claim 1, characterized in that, S7 specifically refers to: The input to the bilateral matching algorithm is ciphertext. and decryption components The edge server verifies whether the data user's attribute set meets the access policy defined by the data owner, and whether the data owner's attribute set meets the access policy defined by the data user. When both access policies are met, the edge server calculates the pre-decryption result. And send it to the data user, and upload the successful result to the blockchain; Otherwise, the failure result will be uploaded to the blockchain.

9. A blockchain-based bilateral fine-grained access control and privacy protection method according to claim 1, characterized in that, S8 specifically refers to: The input to the decryption algorithm is ciphertext. and pre-decryption results After a data user is successfully matched, they use their private key. Parameters obtained from the blockchain Recover the verification key Combined with the pre-decryption results returned by the edge server And encrypted components obtained from the blockchain Perform local decryption calculations to recover the symmetric key. key Finally, the encrypted data obtained from the InterPlanetary File System is decrypted to obtain the original shared data.

10. A blockchain-based bilateral fine-grained access control and privacy protection method according to claim 1, characterized in that, S9 specifically refers to: When a batch of users need to be revoked or added, the authorization center executes a batch user update algorithm, recalculates and updates the verification key based on the Chinese Remainder Theorem. Then calculate the parameters for uploading and updating. In the blockchain, users whose accounts have been revoked will not be able to access new ones. Recover the valid verification key Therefore, access is lost; newly joined users can recover a new verification key using their private key. Grant permissions; existing users whose keys have not changed can continue to use them without updating.