Trusted and controlled sharing method, access method and system of privacy data based on blockchain

By using pre-acquisitioned system public parameters and attribute encryption algorithms in blockchain and IPFS distributed storage systems, combined with pre-decryption calculations of smart contracts and PBFT consensus mechanisms, the problems of insufficient security and low efficiency of private data in data sharing are solved, and efficient and secure data sharing is achieved.

CN118296648BActive Publication Date: 2025-04-29PANORAMA ZHILIAN (TIANJIN) TECH CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410493623.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-23
Publication Date
2025-04-29
Estimated Expiration
2044-04-23

AI Technical Summary

Technical Problem

In the process of data sharing, the existing technology has problems such as insufficient security of privacy data, low storage and computing efficiency, and high resource occupancy of computer equipment.

Method used

The trusted and controlled sharing method of privacy data based on blockchain is adopted, and the pre-acquisitioned system public parameters and preset symmetric keys are encrypted. Combined with attribute encryption algorithms and hierarchical simplified access strategies, it is stored in the blockchain and IPFS distributed storage system, and pre-decrypted calculations are performed through smart contracts and PBFT consensus mechanisms.

Benefits of technology

It improves the privacy data security during data sharing, improves storage and computing efficiency, reduces the resource occupancy rate of computer equipment, and improves the accuracy and effectiveness of the encryption and decryption process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118296648B_ABST
    Figure CN118296648B_ABST
Patent Text Reader

Abstract

The present application provides a trusted and controlled sharing method, access method and system for privacy data based on blockchain, which relates to the field of blockchain technology. The sharing method includes: storing the ciphertext of privacy data outside the blockchain; encrypting the access path and symmetric key of the ciphertext of privacy data with a hierarchical simplified access strategy based on the attribute encryption algorithm of multiple attribute authorization agencies, and storing the access path ciphertext and key information ciphertext in the blockchain, so that when the edge node as the blockchain endorsement node receives the blinded attribute key of the data user for the privacy data, if it is determined that the data user meets the minimum access attribute level corresponding to the hierarchical simplified access strategy, the key information ciphertext is pre-decrypted and calculated based on the smart contract and PBFT consensus mechanism, and the pre-decryption result is sent to the data user. The present application can improve the security of privacy data in the process of data sharing, improve the storage and computing efficiency in the process of data sharing, and reduce the occupancy rate of device resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a trusted and controlled sharing method, access method and system for privacy data based on blockchain. Background Art

[0002] In recent years, information and communication technologies such as mobile Internet, Internet of Things, and 6G have set off a new round of scientific and industrial revolutions. Emerging information and communication technologies have been deeply integrated with traditional industries such as industrial manufacturing, agricultural production, and transportation. The explicit and implicit value brought by the explosive growth of various industrial, transportation, agricultural, and medical data continues to increase, and data assets have become the focus of scientific and technological innovation and industrial reform. However, problems such as illegal data access and data privacy leakage encountered in the process of data sharing seriously restrict the digital and intelligent transformation of all industries. Data access control technology achieves the purpose of controlling specific users' access to resource data by setting access policies, which can effectively prevent unauthorized users from accessing data and prevent data privacy leakage. The important challenge facing digital transformation is to take into account both the availability and security of data.

[0003] At present, although there have been studies on realizing data sharing based on attribute encryption, there are still problems such as user privacy leakage and low storage and computing efficiency in the data sharing process. In addition, the limited local computing power and storage space of computer devices make it difficult to effectively analyze and process data, which requires a large amount of computing and storage resources, thus affecting the operating stability of computer devices.

[0004] Based on this, there is an urgent need to design a privacy data sharing method that can improve the security of privacy data, improve the storage and computing efficiency in the data sharing process, and reduce the computing and storage resource occupancy rate of computer equipment. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a trusted and controlled sharing method, access method and system for privacy data based on blockchain to eliminate or improve one or more defects existing in the prior art.

[0006] One aspect of the present application provides a trusted and controlled sharing method of privacy data based on blockchain, comprising:

[0007] Using the pre-acquired system public parameters and the preset symmetric key, a symmetric encryption algorithm is used to generate a private data ciphertext corresponding to the private data, and the private data ciphertext is stored outside the blockchain;

[0008] Based on the attribute encryption algorithm, the access path of the private data ciphertext outside the blockchain and the symmetric key are encrypted with a predefined hierarchical simplified access strategy to obtain the access path ciphertext corresponding to the access path and the key information ciphertext corresponding to the symmetric key;

[0009] The access path ciphertext and the key information ciphertext are stored in the blockchain, so that when the edge node in the blockchain, which is currently a blockchain endorsement node, receives the blinded attribute key of the data user for the private data, if it is determined that the data user meets the minimum access attribute level corresponding to the hierarchical simplified access policy, a pre-decryption calculation is performed on the key information ciphertext based on the smart contract and the PBFT consensus mechanism, and the obtained pre-decryption result is sent to the data user, so that the data user can perform trusted and controlled access to the private data according to the pre-decryption result.

[0010] In some embodiments of the present application, before adopting the pre-acquired system public parameters and the preset symmetric key, the method further includes:

[0011] The system public parameters sent by the authorization center are received, wherein the authorization center executes a system initialization algorithm to generate the system public parameters and the system private key based on part of the system parameters sent by multiple attribute authorization agencies in advance.

[0012] In some embodiments of the present application, the blinded attribute key is generated in advance by the data user according to the system public parameters and the user attribute key sent by the authorization center;

[0013] Among them, the authorization center sets the public-private key pair of the data user in advance according to the identity information and user attribute set of the data user and based on the system public parameters, and generates the user attribute key of the data user according to the initial user attribute keys sent by multiple attribute authorization agencies respectively, and then sends the public-private key pair and the user attribute key of the data user to the data user, so that the data user generates a blinded attribute key corresponding to the user attribute key.

[0014] In some embodiments of the present application, the authorization center is also used to verify the identity of the data user based on the blinded attribute key generated by the data user for the private data before the edge node receives the blinded attribute key of the data user, and forward the blinded attribute key to the edge node if the verification passes.

[0015] In some embodiments of the present application, after receiving the pre-decryption result, the data user extracts the access path ciphertext based on the pre-decryption result, and obtains the symmetric key based on the user private key in the user public and private keys, and then decrypts the access path ciphertext according to the symmetric key to obtain the access address of the private data ciphertext outside the blockchain, and obtains the private data ciphertext according to the access address and performs data decryption processing to obtain the corresponding plaintext and hash value of the private data.

[0016] In some embodiments of the present application, the method of using the pre-acquired system public parameters and the preset symmetric key to generate the private data ciphertext corresponding to the private data by a symmetric encryption algorithm, and storing the private data ciphertext outside the blockchain includes:

[0017] Using the pre-acquired system public parameters and the preset symmetric key, a symmetric encryption algorithm is used to generate a private data ciphertext corresponding to the private data, and verification data corresponding to the private data is generated;

[0018] The private data ciphertext is stored in the IPFS distributed storage system outside the blockchain, so that the IPFS distributed storage system returns the access path of the private data ciphertext;

[0019] And, the verification data is stored in the blockchain, so that when the edge node in the blockchain currently serves as the blockchain endorsement node receives the hash value sent by the data user, it verifies the accuracy of the hash value according to the verification data, and broadcasts it to the entire blockchain network after the verification passes.

[0020] In some embodiments of the present application, the attribute-based encryption algorithm encrypts the access path of the private data ciphertext outside the blockchain and the symmetric key with a predefined hierarchical simplified access strategy to obtain the access path ciphertext corresponding to the access path and the key information ciphertext corresponding to the symmetric key, including:

[0021] Receive auxiliary encryption calculation results generated by each edge node in the blockchain after performing auxiliary encryption calculations on the privacy data based on smart contracts and the PBFT consensus mechanism in advance;

[0022] Based on the attribute encryption algorithm, the access path of the private data ciphertext outside the blockchain and the symmetric key are encrypted with a predefined hierarchical simplified access strategy and the auxiliary encryption calculation result to obtain the access path ciphertext corresponding to the access path and the key information ciphertext corresponding to the symmetric key.

[0023] In some embodiments of the present application, it also includes:

[0024] If change data for the hierarchical simplified access policy is received, the user attribute specified by the change data is revoked based on the pre-constructed subset cover tree, and the key information data ciphertext is re-encrypted to obtain the corresponding re-encrypted key information data ciphertext, wherein each of the subset cover trees corresponds to an attribute, and the attribute tree corresponding to each attribute is managed by multiple attribute authorization agencies;

[0025] The re-encrypted key information data ciphertext is stored in the blockchain.

[0026] Another aspect of the present application provides a trusted controlled access method for privacy data based on blockchain, comprising:

[0027] Send its own identity information and user attribute set to the authorization center, so that the authorization center sets the user public-private key pair based on the preset system public parameters, and generates a user attribute key according to the initial user attribute keys sent by multiple attribute authorization agencies, and then returns the user public-private key pair and the user attribute key;

[0028] Generate a blinded attribute key corresponding to the user attribute key, and send the blinded attribute key to the authorization center, so that the authorization center performs user identity verification according to the blinded attribute key. If the verification passes, forward the blinded attribute key to the edge node currently serving as the blockchain endorsement node in the blockchain, so that when the edge node receives the blinded attribute key, if it is determined that the user information corresponding to the blinded attribute key meets the minimum access attribute level corresponding to the preset hierarchical simplified access policy, pre-decryption calculation is performed on the key information ciphertext based on the smart contract and PBFT consensus mechanism, and the obtained pre-decryption result is returned; wherein the key information ciphertext and the access path ciphertext are pre-stored in the blockchain by the data owner; the data owner pre-uses the pre-acquired system public parameters and the preset symmetric key to generate the private data ciphertext corresponding to the private data by a symmetric encryption algorithm, and stores the private data ciphertext outside the blockchain; then, based on the attribute encryption algorithm, encrypt the access path of the private data ciphertext outside the blockchain and the symmetric key by a pre-defined hierarchical simplified access policy to obtain the access path ciphertext corresponding to the access path and the key information ciphertext corresponding to the symmetric key;

[0029] Receive the pre-decryption result, extract the access path ciphertext based on the pre-decryption result, obtain the symmetric key based on the user private key in the user public and private keys, decrypt the access path ciphertext according to the symmetric key to obtain the access address of the private data ciphertext outside the blockchain, obtain the private data ciphertext according to the access address and perform data decryption processing to obtain the corresponding plaintext and hash value of the private data;

[0030] The hash value is sent to the edge node so that the edge node verifies the accuracy of the hash value according to the pre-acquired verification data, and broadcasts the hash value to the entire blockchain network after the verification passes.

[0031] The third aspect of the present application provides a trusted controlled shared access system for privacy data based on blockchain, including:

[0032] A blockchain with multiple edge nodes, an authorization center, multiple attribute authorization agencies, various computer devices, and an IPFS distributed storage system;

[0033] Each computer device is respectively connected to the blockchain and the IPFS distributed storage system in communication, and the authorization center is respectively connected to the blockchain, each attribute authorization agency and the computer device in communication;

[0034] Wherein, the role status of the computer device includes data user and data owner;

[0035] When the current role status of the computer device is the data owner, the computer device is used to execute the blockchain-based trusted controlled sharing method for private data;

[0036] When the current role status of the computer device is the data user, the computer device is used to execute the blockchain-based trusted controlled access method for privacy data.

[0037] The fourth aspect of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the blockchain-based trusted controlled sharing method for private data, and / or implements the blockchain-based trusted controlled access method for private data.

[0038] The fifth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it implements the blockchain-based trusted controlled sharing method for private data and / or implements the blockchain-based trusted controlled access method for private data.

[0039] The sixth aspect of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the blockchain-based trusted controlled sharing method for private data, and / or implements the blockchain-based trusted controlled access method for private data.

[0040] The trusted and controlled sharing method of private data based on blockchain provided by the present application uses a pre-acquired system public parameter and a preset symmetric key to generate a private data ciphertext corresponding to the private data with a symmetric encryption algorithm, and stores the private data ciphertext outside the blockchain; based on an attribute encryption algorithm, the access path of the private data ciphertext outside the blockchain and the symmetric key are encrypted with a predefined hierarchical simplified access policy to obtain an access path ciphertext corresponding to the access path and a key information ciphertext corresponding to the symmetric key; the access path ciphertext and the key information ciphertext are stored in the blockchain, so that when the edge node in the blockchain, which is currently a blockchain endorsement node, receives the blinded attribute key of the data user for the private data, if it is determined that the data user meets the minimum access attribute level corresponding to the hierarchical simplified access policy, a pre-decryption calculation is performed on the key information ciphertext based on the smart contract and the PBFT consensus mechanism, and the obtained pre-decryption result is sent to the data user, so that the data user can obtain the key information ciphertext according to the pre-decryption The encrypted result can be used to perform trusted and controlled access to the private data; by adopting attribute encryption algorithm and hierarchical simplified access strategy, the present application can effectively solve the problem that complex access strategy leads to large encryption and decryption calculation overhead and access strategy is easy to leak user privacy information, and can improve the security of privacy data in the data sharing process, and can improve the storage and computing efficiency in the data sharing process; by adopting the edge node as the blockchain endorsement node to perform pre-decryption calculation on the key information ciphertext based on smart contract and PBFT consensus mechanism, it can effectively reduce the possibility of the incompletely trusted edge server returning the wrong encryption and decryption result in the data encryption and decryption process in the distributed data sharing environment, and can reduce the resource occupancy rate of the computer equipment for decryption calculation, thereby effectively improving the accuracy and effectiveness of the encryption and decryption process; by adopting the combination of on-chain and off-chain method to realize private data storage, it can solve the problem that the on-chain storage overhead is large and the large file private data cannot be efficiently shared in the distributed data sharing scenario, and can reduce the storage resource occupancy rate of the blockchain and computer equipment.

[0041] Additional advantages, purposes, and features of the present application will be partially described in the following description, and will become partially apparent to those skilled in the art after studying the following, or may be learned from the practice of the present application. The purposes and other advantages of the present application can be achieved and obtained by the structures specifically pointed out in the specification and the drawings.

[0042] Those skilled in the art will understand that the purposes and advantages that can be achieved by the present application are not limited to the above specific description, and the above and other purposes that can be achieved by the present application will be more clearly understood based on the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The drawings described herein are used to provide a further understanding of the present application, constitute a part of the present application, and do not constitute a limitation of the present application. The components in the drawings are not drawn to scale, but are only for the purpose of illustrating the principles of the present application. In order to facilitate the illustration and description of some parts of the present application, the corresponding parts in the drawings may be enlarged, that is, they may become larger relative to other components in the exemplary device actually manufactured according to the present application. In the drawings:

[0044] Figure 1 This is a first flow chart of a blockchain-based trusted and controlled sharing method of privacy data in one embodiment of the present application.

[0045] Figure 2 This is a second flow chart of a blockchain-based trusted and controlled sharing method for privacy data in one embodiment of the present application.

[0046] Figure 3 This is a flowchart of a blockchain-based trusted controlled access method for privacy data in one embodiment of the present application.

[0047] Figure 4 This is a structural diagram of a blockchain-based trusted controlled shared access system for privacy data in one embodiment of the present application.

[0048] Figure 5 This is a schematic diagram of the execution logic of a blockchain-based trusted and controlled sharing and access method for privacy data in an application example of the present application.

[0049] Figure 6 This is a schematic diagram of multi-terminal interaction in a blockchain-based trusted and controlled sharing and access method for privacy data in an application example of the present application.

[0050] Figure 7 This is a schematic diagram of the structure of a subset cover tree in an application example of the present application. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the implementation modes and the accompanying drawings. Here, the illustrative implementation modes and descriptions of the present application are used to explain the present application, but are not intended to limit the present application.

[0052] It should also be noted here that in order to avoid obscuring the present application due to unnecessary details, only the structures and / or processing steps closely related to the scheme according to the present application are shown in the accompanying drawings, while other details that are not very relevant to the present application are omitted.

[0053] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.

[0054] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.

[0055] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0056] In recent years, trusted data controlled shared access products have been applied in data-intensive industries such as finance, medical care, and logistics. However, the traditional centralized data storage model and key distribution technology have caused single-point computing bottlenecks, which can easily increase the risk of privacy leakage. Data security controlled shared access in a distributed environment has attracted widespread attention from the scientific research and business communities. In addition, there is a lack of fair and effective incentive and regulatory mechanisms in the scenario of controlled shared access to data, and the goal of collaboratively aggregating the forces of multiple parties to establish a good data sharing ecosystem is still a long way to go.

[0057] Traditional access control technology cannot meet the requirements of fine-grained access control of data. Attribute encryption technology can achieve fine-grained access control of private data. Some researchers have proposed attribute encryption. Attribute encryption technology uses a series of user attributes as identity identifiers and formulates access policies that match the attribute set to achieve one-to-many data sharing and fine-grained data access control. According to the different objects associated with the access policy, attribute encryption is divided into Ciphertext Policy Attribute-Based Encryption (CP-ABE) and Key Policy Attribute-Based Encryption (KP-ABE). In the ciphertext access control scheme based on CP-ABE, the access control structure is embedded in the ciphertext data, and the user decrypts the ciphertext data according to the private key with attribute characteristics. In the ciphertext retrieval scheme based on KP-ABE, the access control structure is embedded in the user's key, and the user uses the key to decrypt the ciphertext containing the attribute set. However, most of the existing attribute-based data controlled shared access methods still have problems such as user privacy leakage and low storage and computing efficiency. Unhidden attribute access policies may leak user identity information, the correctness of outsourced encryption and decryption calculations cannot be guaranteed, user attribute revocation cannot be implemented, and most existing access control schemes rely on a single trusted key center to issue attribute keys. Controlled shared access to data based on attribute encryption still faces many challenges.

[0058] In the data controlled access method based on attribute encryption, the limited computing power and storage space of local devices make it difficult to effectively analyze and process data. Data is usually uploaded to the cloud by the data owner for outsourced storage and computing. However, the centralized data processing and storage in the cloud server architecture will put a lot of pressure on the network bandwidth, forming a security and performance bottleneck. Edge computing is a new distributed computing model. In the distributed edge computing architecture, the network edge nodes close to the user terminal store and process part of the data and quickly respond to data user needs, effectively reducing the storage and computing pressure of the cloud server. Edge computing can achieve low latency and highly intelligent processing of the entire process of data sharing in a distributed environment, but semi-trusted edge servers may return erroneous or forged calculation results due to laziness and dishonesty, and data users need to verify the returned calculation results.

[0059] Based on this, in order to solve the problems existing in the existing data sharing methods, such as the inability to guarantee the security of privacy data, low storage and computing efficiency in the data sharing process, and high computing and storage resource occupancy rate of computer devices, the embodiments of the present application respectively provide a trusted controlled sharing method for privacy data based on blockchain, a trusted controlled access method for privacy data based on blockchain, a trusted controlled shared access system for privacy data based on blockchain, a computer device for executing the trusted controlled sharing method for privacy data based on blockchain and / or the trusted controlled access method for privacy data, a computer-readable storage medium and a program product, which can improve the security of privacy data in the data sharing process, improve the storage and computing efficiency in the data sharing process, as well as the accuracy and effectiveness of the encryption and decryption process, and reduce the computing and storage resource occupancy rate of the computer device.

[0060] Among them, the emergence of blockchain technology is expected to reshape the data sharing access model. The blockchain consists of a series of interconnected blocks. Each block contains a block header and a block body. The block body stores transaction records containing information such as transaction input, output address and transfer number. Transactions can generate a Merkle tree from the bottom up. The hash value of the Merkle tree root node will be stored in the block header to ensure that the transaction data cannot be tampered with. Blockchain technology is a feasible solution for achieving multi-party trust and collaboration. It integrates cryptographic algorithms, consensus mechanisms, point-to-point transmission, smart contracts and other technologies, and has the advantages of decentralization, high transparency and non-tamperability. Each transaction in the chain is broadcast through a point-to-point network. The network nodes that do not need to trust each other jointly maintain the chain structure of the blockchain under the action of the incentive mechanism. The consensus mechanism can be used to add newly generated blocks to the blockchain. Smart contracts are script codes agreed upon by multiple nodes and stored in the blockchain after verification. Users can call smart contracts after obtaining the contract address through application layer service calls. At present, the blockchain field includes two main research directions, one is the public chain research direction represented by Bitcoin and Ethereum, and the other is the consortium chain research direction represented by Hyperledger. The consortium chain is between the public chain and the private chain. It uses a distributed ledger to provide a user access mechanism and establish multi-party trust. The members of the chain are responsible for maintenance and governance. The operation of enterprises can use the consortium chain to reduce costs and risks while improving efficiency and scale. The development of the consortium chain has set off a wave of enterprise reform, and a more harmonious data sharing ecosystem is about to be born. The consortium chain technology has the advantages of decentralization and can meet the regulatory needs of various institutions. It is very suitable for a trusted data controlled shared access environment.

[0061] Blockchain technology uses distributed decentralized ledgers to build a decentralized, open and transparent data interaction model, which provides new ideas for solving the authenticity and integrity verification problems of data and the compliance verification problems of data in the process of confirmation and transfer. Attribute encryption technology can achieve fine-grained flexible access control of privacy data. The integration of blockchain and privacy protection technologies such as attribute encryption can effectively solve the technical barriers in traditional data controlled access solutions and improve the trust of data sharing. Therefore, designing a trusted data controlled shared access method that supports blockchain is of great significance for achieving efficient data sharing, completing scientific supervision of the entire process of data sharing, establishing fair and effective incentive mechanisms and regulatory mechanisms, and synergizing the forces of multiple parties to establish a good data sharing ecology.

[0062] The details are described in detail through the following examples.

[0063] Based on this, the embodiment of the present application provides a blockchain-based trusted and controlled sharing method for private data that can be implemented by a computer device as a data owner, see Figure 1The blockchain-based trusted and controlled sharing method for privacy data specifically includes the following contents:

[0064] Step 100: Using the pre-acquired system public parameters and the preset symmetric key, a symmetric encryption algorithm is used to generate a private data ciphertext corresponding to the private data, and the private data ciphertext is stored outside the blockchain.

[0065] In one or more embodiments of the present application, the data owner is used to encrypt private data and define an access policy for the private data. When the attribute policy changes or attribute key abuse occurs, the data owner can revoke the user attribute key and re-encrypt the attribute-related ciphertext.

[0066] It is understandable that storing the private data ciphertext outside the blockchain means storing the private data ciphertext off-chain, for example, it can be stored in a distributed system, so as to solve the problem that the on-chain storage overhead is large and the private data of large files cannot be shared efficiently in the distributed data sharing scenario. The embodiment of the present application adopts a method of combining on-chain and off-chain to realize private data storage, and the subsequent step 300 stores the key information ciphertext corresponding to the symmetric key and the private data access path ciphertext on the blockchain. When the data owner only shares data in part of the time period, off-chain storage can also realize data sharing revocation.

[0067] In an example of step 100, the symmetric encryption algorithm may specifically adopt the AES (Advanced Encryption Standard) symmetric encryption algorithm. And the symmetric key in step 100 may be selected by the data owner.

[0068] Step 200: Based on the attribute encryption algorithm, the access path of the private data ciphertext outside the blockchain and the symmetric key are encrypted with a predefined hierarchical simplified access strategy to obtain the access path ciphertext corresponding to the access path and the key information ciphertext corresponding to the symmetric key.

[0069] In one or more embodiments of the present application, a plurality of edge nodes (such as edge servers or cloud servers, etc.) are provided in the blockchain, and the blockchain may also adopt a consortium chain, or be written as an edge blockchain.

[0070] It should be noted that the hierarchical simplified access policy is a hierarchically simplified access policy or attribute access policy, in which an attribute hierarchical mechanism is introduced. The access rights of high-order attributes are higher than those of low-order attributes and the attribute levels are open to all users. The data owner encrypts the private data using the lowest-order attributes that satisfy the access policy. When the data user's access attribute level is higher than or equal to the lowest access attribute level corresponding to the hierarchical simplified access policy, the data user has the right to access the private data.

[0071] Furthermore, the hierarchical simplified access strategy may only include the lowest access attribute level in the above-mentioned attribute classification mechanism, so that data owners, edge nodes or other malicious attackers cannot determine the user attributes corresponding to data users through the hierarchical simplified access strategy, thereby solving the problem that complex access strategies in data controlled access methods lead to large encryption and decryption calculation overhead and access strategies are prone to leaking user privacy information.

[0072] In other words, the data owner uses the hierarchically simplified access policy to encrypt the symmetric key. Simplifying the data access policy before encryption can effectively reduce the data encryption overhead and the decryption overhead of the data user. The access policy only contains the lowest-order attributes that satisfy the access policy. The data owner, edge nodes, and malicious attackers cannot determine the specific user attributes through the access policy. Data users with high attribute levels can achieve anonymous access and supervision of private data.

[0073] Step 300: Store the access path ciphertext and the key information ciphertext in the blockchain, so that when the edge node in the blockchain, which is currently a blockchain endorsement node, receives the blinded attribute key of the data user for the private data, if it is determined that the data user meets the minimum access attribute level corresponding to the hierarchical simplified access policy, a pre-decryption calculation is performed on the key information ciphertext based on the smart contract and PBFT consensus mechanism, and the obtained pre-decryption result is sent to the data user, so that the data user can perform trusted and controlled access to the private data based on the pre-decryption result.

[0074] It should be noted that the endorsement nodes in the blockchain are composed of edge nodes, each of which is responsible for executing smart contracts and reaching consensus on the execution results based on the PBFT consensus. The execution results are broadcast to all nodes for verification and synchronized on the chain. Each peer node in the system is a bookkeeping node, which is responsible for verifying blocks and synchronizing the chain.

[0075] In step 300, the data owner designates some edge nodes as endorsement nodes to execute the outsourced computing smart contract. The edge nodes perform encryption and decryption calculations on the chain. The Practical Byzantine Fault Tolerance (PBFT) consensus mechanism is used to ensure the correctness of the edge node calculation results, thereby solving the problem that the edge servers that are not fully trusted in the distributed data sharing environment may return incorrect encryption and decryption results during the outsourced encryption and decryption process.

[0076] In step 300, the data user can first send his own attribute set to the authorization center CA to obtain his own attribute key. The data user then uses his own user private key to blind the attribute key and sends the obtained blinded attribute key to the edge node. The edge node deploys a smart contract to pre-decrypt the private data. After the data user receives the pre-decrypted data sent by the edge node and the private data ciphertext stored outside the blockchain, it calculates the symmetric key and uses the symmetric key to decrypt the private data ciphertext to read the private data.

[0077] From the above description, it can be seen that the trusted and controlled sharing method of privacy data based on blockchain provided by the embodiment of the present application can effectively solve the problem that complex access strategies lead to large encryption and decryption calculation overhead and access strategies are easy to leak user privacy information by adopting attribute encryption algorithm and hierarchical simplified access strategy, and can improve the security of privacy data in the data sharing process, and can improve the storage and computing efficiency in the data sharing process; by adopting the edge node as the blockchain endorsement node to perform pre-decryption calculation on the key information ciphertext based on the smart contract and PBFT consensus mechanism, it can effectively reduce the possibility of the incompletely trusted edge server in the distributed data sharing environment returning the wrong encryption and decryption result in the data encryption and decryption process, and can reduce the resource occupancy rate of the computer device for decryption calculation, thereby effectively improving the accuracy and effectiveness of the encryption and decryption process; by adopting the combination of on-chain and off-chain methods to realize privacy data storage, it can solve the problem that the on-chain storage overhead is large in the distributed data sharing scenario and the privacy data of large files cannot be efficiently shared, and can reduce the storage resource occupancy rate of the blockchain and computer devices.

[0078] In order to further solve the problem of single-point computing bottleneck of single-attribute authorization agency in data controlled access scheme, in a blockchain-based trusted controlled sharing method of private data provided in the embodiment of the present application, see Figure 2 , the step 100 of the blockchain-based trusted controlled sharing method of privacy data further specifically includes the following contents:

[0079] Step 010: receiving system public parameters sent by an authorization center, wherein the authorization center executes a system initialization algorithm to generate system public parameters and a system private key based on partial system parameters sent by multiple attribute authorization agencies in advance.

[0080] It should be noted that the authorization center CA runs the system initialization algorithm and generates some system public parameters. After receiving the other part of the system parameters sent by the attribute authorization agency, the authorization center calculates and generates the system public parameters containing these two parts and the corresponding system private key. The authorization center stores the system private key and then sends the system public parameters to the blockchain, data users and data owners. Among them, the attribute authorization agencies can be written as , Indicates the first attribute authority, Indicates Attribute authority, represents the Ith attribute authority, is a positive integer from 1 to I.

[0081] In one or more embodiments of the present application, each attribute authority is responsible for managing some attributes and generating attribute trees corresponding to the attributes, and sending some system parameters and some attribute keys (or called initial attribute keys) of data users to the authorization center CA.

[0082] Specifically, the authority CA and I attribute authority Execute the system initialization algorithm to generate common system parameters and the system private key . System initialization algorithm The formal definition of is as follows:

[0083]

[0084] The authorization center defines some system public parameters ,in , For two stages The multiplicative cyclic group of For the group The generator of For the group , The order of For the group The elements in is a collision-resistant hash function, e is a group-based , The bilinear map of It is a public parameter calculated by the authorization center. Calculate the six public parameters separately , is a positive integer between 1 and 1. Then calculate the system common parameters And disclose the complete system public parameters In addition, the CA selects a random number And keep the system private key secretly .

[0085] In order to further solve the problem of single-point computing bottleneck of single-attribute authorization agency in data controlled access scheme, in a blockchain-based trusted controlled sharing method of privacy data provided in an embodiment of the present application, the blinded attribute key is generated in advance by the data user based on the system public parameters and user attribute keys sent by the authorization center.

[0086] Among them, the authorization center sets the public-private key pair of the data user in advance according to the identity information and user attribute set of the data user and based on the system public parameters, and generates the user attribute key of the data user according to the initial user attribute keys sent by multiple attribute authorization agencies respectively, and then sends the public-private key pair and the user attribute key of the data user to the data user, so that the data user generates a blinded attribute key corresponding to the user attribute key.

[0087] Specifically, the authorization center CA and The attribute authority executes the key generation algorithm to distribute the user's public and private key pairs And user attribute key ak. The key generation algorithm The formal definition of is as follows:

[0088]

[0089] The input of the key generation algorithm is the identity information of the data user DU and a collection of user attributes ,in represents the identity information of the jth data user, j is a positive integer from 1 to I, and n represents the number of data users. The output of the key generation algorithm is the public and private key pair of data user DU and the user attribute key ,in is the private key of the data user, is the public key of the data user, The three components of the user attribute key. The authorization center CA calculates the user public key and sends the corresponding user public and private key pair to the data user. The attribute authority calculates and sends the partial attribute key To CA, is a positive integer between 1 and I, where I represents the number of attribute authorities. Indicates The CA receives the three partial attribute key components calculated by the attribute authority. After that, calculate and send the user attribute key To data users.

[0090] That is, the system public parameters, data user public and private keys, and user attribute keys are provided by the CA and The setting of multiple attribute authorization agencies reduces the computational overhead on the CA side and solves the single-point computing bottleneck problem.

[0091] In order to further solve the problem of not supporting user attribute update and user attribute abuse in data controlled access schemes, in a blockchain-based trusted controlled sharing method of private data provided in an embodiment of the present application, the authorization center is also used to verify the identity of the data user according to the blinded attribute key generated by the data user for the private data before the edge node receives the blinded attribute key of the data user for the private data, and if the verification passes, forward the blinded attribute key to the edge node.

[0092] Specifically, the data user DU performs a blinded attribute key generation algorithm To ensure the privacy of attribute keys, the formal definition of the blinded attribute key generation algorithm is as follows:

[0093]

[0094] Enter system common parameters , two components in the user attribute key and public parameters , data user DU uses the user's private key Compute blinded attribute keys and public parameters , and upload , and To the edge node. In addition, the authorization center CA verifies the equation If the user attribute key is abused, the user attribute key of the data user DU is revoked.

[0095] That is to say, in order to achieve data outsourcing decryption without leaking user privacy, the data user uses his own private key to blind the user attribute key and only sends the blinded user attribute key to the blockchain edge node, which can then perform outsourcing decryption using the blinded attribute key. In addition, the authorization center can also verify whether the user attribute key has been abused, and can ensure the authenticity of the identity of the user accessing the data.

[0096] In order to further solve the problem of single-point computing bottleneck of single-attribute authorization agency in data controlled access scheme, in a blockchain-based trusted controlled sharing method of private data provided in an embodiment of the present application, after receiving the pre-decryption result, the data user extracts the access path ciphertext based on the pre-decryption result, and obtains the symmetric key based on the user private key in the user public and private keys, and then decrypts the access path ciphertext according to the symmetric key to obtain the access address of the private data ciphertext outside the blockchain, and obtains the private data ciphertext according to the access address and performs data decryption processing to obtain the corresponding plaintext and hash value of the private data.

[0097] Specifically, after the data user receives the pre-decryption result calculated by the edge node and obtains the ciphertext of the private data storage path, he runs the data decryption algorithm to perform decryption calculations to obtain the symmetric key and the storage path of the private data ciphertext on IPFS. The data user verifies the authenticity of the plaintext of the private data through the blockchain. Data decryption algorithm The formal definition of is as follows:

[0098]

[0099] Input pre-decryption result and private data ciphertext , Is the private data ciphertext data The user performs decryption calculation to obtain the symmetric key and privacy data Finally, the data user computes the private data as plaintext The hash value of the decrypted private data can be verified by the edge nodes on the chain Is it true.

[0100] In order to further solve the problem of high storage overhead on the chain and inefficient sharing of large file privacy data in distributed data sharing scenarios, in a blockchain-based trusted and controlled sharing method for privacy data provided in an embodiment of the present application, see Figure 2 , the step 100 specifically includes the following contents:

[0101] Step 110: using the pre-acquired system public parameters and the preset symmetric key, a symmetric encryption algorithm is used to generate a private data ciphertext corresponding to the private data, and verification data corresponding to the private data is generated.

[0102] Step 120: Store the private data ciphertext in an IPFS distributed storage system outside the blockchain, so that the IPFS distributed storage system returns an access path to the private data ciphertext.

[0103] And, step 130: store the verification data in the blockchain, so that when the edge node in the blockchain currently serves as the blockchain endorsement node receives the hash value sent by the data user, it verifies the accuracy of the hash value according to the verification data, and broadcasts it to the entire blockchain network after the verification passes.

[0104] That is, the data owner executes the data encryption algorithm, encrypts the private data using the AES symmetric encryption algorithm, and generates verification data , upload To the blockchain, and store the private data ciphertext in the IPFS distributed storage system.

[0105] In this way, in step 300, if the edge node receives the hash value sent by the data user, it can verify the accuracy of the hash value based on the verification data, and broadcast it to the entire blockchain network after the verification passes. The data user calculates the decrypted plaintext privacy data The hash value is uploaded to the edge node on the chain to verify the decrypted plaintext data Whether it is authentic. The data storage and computational verification mode that combines on-chain and off-chain is adopted. On-chain computational verification can realize the safe and controlled sharing of data, and off-chain can realize the revocation of shared data.

[0106] In order to further solve the problem that an incompletely trusted edge server in a distributed data sharing environment may return an erroneous encryption and decryption result in the outsourced encryption and decryption process, in a trusted and controlled sharing method of private data based on blockchain provided in an embodiment of the present application, see Figure 2 , the step 200 specifically includes the following contents:

[0107] Step 210: Receive the auxiliary encryption calculation results generated by each edge node in the blockchain after performing auxiliary encryption calculations on the privacy data based on the smart contract and the PBFT consensus mechanism.

[0108] Among them, the blockchain edge nodes perform data encryption auxiliary calculations based on PBFT to ensure the authenticity of the auxiliary calculation results while reducing the encryption calculation overhead on the user side.

[0109] Step 220: Based on the attribute encryption algorithm, with the predefined hierarchical simplified access strategy and the auxiliary encryption calculation result, the access path of the private data ciphertext outside the blockchain and the symmetric key are encrypted to obtain the access path ciphertext corresponding to the access path and the key information ciphertext corresponding to the symmetric key.

[0110] That is to say, the data owner uses the attribute encryption algorithm and the symmetric encryption algorithm to encrypt the storage path of the symmetric key and the private data ciphertext. The formal definition of is as follows:

[0111]

[0112] Enter system common parameters , privacy data m and hierarchical simplified access strategy , the data owner DO generates and uploads the private data ciphertext To IPFS, using symmetric keys Generate access path ciphertext , using collision-resistant hash functions Calculate verification data , Generate key data ciphertext based on attribute encryption algorithm i is a positive integer from 1 to l, where l represents the access policy. The number of attributes in represents the access policy matrix, is the mapping function, Indicates access policy The three key data ciphertext components corresponding to the i-th attribute in . The data owner DO uploads and To blockchain.

[0113] Correspondingly, in step 300, the data owner DO specifies the endorsement policy to determine the edge nodes in the blockchain that participate in the pre-decryption calculation. Each edge node in the blockchain participates in the data pre-decryption algorithm and outputs the pre-decryption result to the data user DU. The formal definition of is as follows:

[0114]

[0115] The input of the data pre-decryption algorithm is the attribute key after DU blinding and key data ciphertext If the user attribute set Meet the hierarchical simplified access strategy And the user attributes have not been revoked, the edge node outputs the pre-decryption result To data user DU.

[0116] Based on the RSA difficulty assumption, the high-level attributes satisfy the ciphertext access policy composed of low-level attributes, and the pre-decryption results related to the ciphertext of the private data can be obtained. The data access users with low attribute levels cannot obtain the access rights of the users with high attribute levels through reverse calculation, and cannot obtain the pre-decryption results related to the ciphertext of the private data, which ensures the security of controlled access to the data. In addition, the edge nodes involved in the pre-decryption calculation are the endorsement nodes in the blockchain, and the authenticity of the pre-decryption results can be guaranteed.

[0117] In order to further solve the problem that an incompletely trusted edge server in a distributed data sharing environment may return an erroneous encryption and decryption result in the outsourced encryption and decryption process, in a trusted and controlled sharing method of private data based on blockchain provided in an embodiment of the present application, see Figure 2 , the step 300 further specifically includes the following contents:

[0118] Step 400: If change data for the hierarchical simplified access policy is received, the user attributes specified by the change data are revoked based on a pre-constructed subset cover tree, and the key information data ciphertext is re-encrypted to obtain the corresponding re-encrypted key information data ciphertext, wherein each of the subset cover trees corresponds to an attribute, and the attribute tree corresponding to each attribute is managed by multiple attribute authorization agencies.

[0119] That is, by constructing a subset cover tree, the data owner can revoke the abused user attribute key and the data re-encryption computational overhead is low, which can ensure the flexibility of private data sharing.

[0120] Step 500: Store the re-encrypted key information data ciphertext in the blockchain.

[0121] Specifically, when the access policy defined by the data owner changes, the data owner executes the user attribute revocation algorithm to revoke the user attributes and re-encrypt the key information data ciphertext. The formal definition of is as follows:

[0122]

[0123] Enter key data ciphertext , the data owner and edge node re-encrypt the key data ciphertext Finally, the data owner uploads the re-encrypted key data ciphertext To the blockchain, l represents the access policy The number of attributes in Indicates access policy The three re-encrypted key data ciphertext components corresponding to the i-th attribute in .

[0124] In summary, the trusted and controlled sharing method of private data based on blockchain provided in the embodiments of the present application aims to achieve trusted and controlled shared access to private data. The edge node performs auxiliary calculations as the endorsement node of the alliance chain, which reduces the data encryption and decryption calculation overhead on the user side and ensures the correctness of the outsourced encryption and decryption calculations. Based on attribute encryption technology, access users and regulatory agencies with high attribute levels can achieve anonymous supervision of private data. In the event of illegal access or abuse of attribute keys, the data owner can revoke user attributes and update attribute ciphertexts. The trusted and controlled sharing method of private data based on blockchain has the following beneficial effects:

[0125] 1. It can solve the problem that complex access policies in data controlled access methods lead to high encryption and decryption computation overhead and access policies are easy to leak user privacy information. Introduce an attribute classification mechanism, the access rights of high-order attributes are higher than those of low-order attributes, and the attribute levels are open to all users. The data owner uses the lowest-order attributes that meet the access policy to encrypt the outsourced data. When the attribute level of the data user is higher than or equal to the attributes included in the access policy, the data user has the right to access the outsourced data. In addition, the access policy only contains the lowest-order attributes that meet the access policy, and the data owner, edge nodes, and malicious attackers cannot judge the user attributes through the access policy.

[0126] 2. It can solve the single-point computing bottleneck problem of a single attribute authorization agency in a data controlled access solution. Each attribute authorization agency only manages part of the attributes, and multiple attribute authorization agencies jointly generate attribute keys for data users, avoiding the single point of failure that may exist in a single attribute authorization center.

[0127] 3. It can solve the problem of not supporting user attribute updates and user attribute abuse in data controlled access schemes. In data sharing scenarios, the attribute information of data users may change dynamically and malicious attackers may abuse user attribute keys. By constructing a subset cover tree for each attribute, the abused user attributes can be revoked and only some related attribute ciphertexts need to be updated.

[0128] 4. It can solve the problem that the incompletely trusted edge servers in the distributed data sharing environment may return wrong encryption and decryption results in the outsourced encryption and decryption process. The data owner designates some edge nodes as endorsement nodes to execute the outsourced computing smart contract. The edge nodes perform encryption and decryption calculations on the chain, and the Practical Byzantine Fault Tolerance (PBFT) consensus mechanism is used to ensure the correctness of the edge node calculation results.

[0129] 5. It can solve the problem of high on-chain storage overhead and inefficient sharing of large file privacy data in distributed data sharing scenarios. The on-chain and off-chain methods are used to realize privacy data storage. The privacy data is encrypted with a symmetric key and stored in the InterPlanetary File System. The symmetric key and the ciphertext of the privacy data access path are stored on the blockchain. When the data owner only shares the data in part of the time period, the off-chain storage can realize the revocation of data sharing.

[0130] Based on the above-mentioned embodiment of the trusted controlled sharing method of private data based on blockchain, the present application also provides an embodiment of a trusted controlled access method of private data based on blockchain that can be implemented by a computer device as a data user, see Figure 3 The blockchain-based trusted controlled access method for privacy data specifically includes the following contents:

[0131] Step 10: Send its own identity information and user attribute set to the authorization center, so that the authorization center sets the user public-private key pair based on the preset system public parameters, and generates a user attribute key according to the initial user attribute keys sent by multiple attribute authorization agencies, and then returns the user public-private key pair and the user attribute key;

[0132] Step 20: Generate a blinded attribute key corresponding to the user attribute key, and send the blinded attribute key to the authorization center, so that the authorization center performs user identity verification according to the blinded attribute key. If the verification passes, the blinded attribute key is forwarded to the edge node in the blockchain that is currently the blockchain endorsement node, so that when the edge node receives the blinded attribute key, if it is determined that the user information corresponding to the blinded attribute key meets the minimum access attribute level corresponding to the preset hierarchical simplified access policy, the key information ciphertext is pre-decrypted based on the smart contract and PBFT consensus mechanism, and the pre-decryption result is returned; wherein the key information ciphertext and the access path ciphertext are pre-stored in the blockchain by the data owner; the data owner pre-uses the pre-acquired system public parameters and the preset symmetric key to generate the private data ciphertext corresponding to the private data by a symmetric encryption algorithm, and stores the private data ciphertext outside the blockchain; then, based on the attribute encryption algorithm, the access path of the private data ciphertext outside the blockchain and the symmetric key are encrypted by the pre-defined hierarchical simplified access policy to obtain the access path ciphertext corresponding to the access path and the key information ciphertext corresponding to the symmetric key;

[0133] Step 30: Receive the pre-decryption result, extract the access path ciphertext based on the pre-decryption result, obtain the symmetric key based on the user private key in the user public and private keys, decrypt the access path ciphertext based on the symmetric key to obtain the access address of the private data ciphertext outside the blockchain, obtain the private data ciphertext based on the access address and perform data decryption processing to obtain the corresponding plaintext and hash value of the private data;

[0134] Step 40: Send the hash value to the edge node so that the edge node verifies the accuracy of the hash value based on the pre-acquired verification data, and broadcasts the hash value to the entire blockchain network after the verification passes.

[0135] The implementation functions and execution processes of each subject in the blockchain-based trusted controlled access method for privacy data mentioned in this embodiment can be executed by referring to the implementation functions and execution processes of each subject in the blockchain-based trusted controlled sharing method for privacy data in the above embodiment. That is to say, the subject role executing the blockchain-based trusted controlled access method for privacy data is the data user, and the subject role executing the blockchain-based trusted controlled sharing method for privacy data is the data owner. The two are interacting parties to each other, and the content of their interaction will not be repeated here. Please refer to the detailed description of the above-mentioned blockchain-based trusted controlled sharing method embodiment for privacy data.

[0136] From the above description, it can be seen that the trusted controlled access method for privacy data based on blockchain provided by the embodiment of the present application can effectively solve the problem that complex access strategies lead to large encryption and decryption calculation overhead and access strategies are easy to leak user privacy information by adopting attribute encryption algorithm and hierarchical simplified access strategy, and can improve the security of privacy data in the data sharing process, and can improve the storage and computing efficiency in the data sharing process; by adopting the edge node as the blockchain endorsement node to perform pre-decryption calculation on the key information ciphertext based on smart contracts and PBFT consensus mechanism, it can effectively reduce the possibility of the incompletely trusted edge server in the distributed data sharing environment returning erroneous encryption and decryption results in the data encryption and decryption process, and can reduce the resource occupancy rate of the computer device for decryption calculation, thereby effectively improving the accuracy and effectiveness of the encryption and decryption process; by adopting a combination of on-chain and off-chain methods to realize privacy data storage, it can solve the problem that the on-chain storage overhead is large in the distributed data sharing scenario and the privacy data of large files cannot be efficiently shared, and can reduce the storage resource occupancy rate of the blockchain and computer devices.

[0137] Based on the above method embodiment, this application also provides a trusted controlled shared access system for private data based on blockchain, see Figure 4 The blockchain-based trusted controlled shared access system for privacy data specifically includes the following contents:

[0138] A blockchain with multiple edge nodes, an authorization center, multiple attribute authorization agencies, various computer devices, and an IPFS distributed storage system;

[0139] Each computer device is respectively connected to the blockchain and the IPFS distributed storage system in communication, and the authorization center is respectively connected to the blockchain, each attribute authorization agency and the computer device in communication;

[0140] Wherein, the role status of the computer device includes data user and data owner;

[0141] When the current role status of the computer device is the data owner, the computer device is used to execute the contents recorded in the embodiment of the aforementioned blockchain-based trusted controlled sharing method for private data;

[0142] When the current role status of the computer device is the data user, the computer device is used for the contents recorded in the aforementioned blockchain-based trusted controlled access method for privacy data.

[0143] Specifically, the blockchain-based trusted controlled shared access system for private data can include six types of entities: data users, data owners, Inter Planetary File System (IPFS), authorization center, attribute authorization agency, and alliance chain. The data owner encrypts the private data and defines the access policy for the private data. When the attribute policy changes or the attribute key is abused, the data owner can revoke the user attribute key and re-encrypt the attribute-related ciphertext. Various types of data access users define their own attribute sets, and data users who meet the access policy can access private data. The InterPlanetary File System stores the private data ciphertext uploaded by the data owner, effectively reducing the storage overhead on the chain. The trusted authorization center entity generates system public parameters, sends user attribute keys to data users, and verifies whether user attribute abuse occurs. In order to avoid the bottleneck problem of single-point computing, each attribute authorization agency is responsible for managing part of the attribute tree and generating part of the attribute key to the authorization center. The accounting nodes in the alliance chain verify the blocks and synchronize them on the chain. The endorsement nodes in the alliance chain are composed of edge nodes. The data owner deploys a smart contract to enable the edge nodes to perform data encryption and decryption auxiliary calculations, and each edge node performs encryption and decryption auxiliary calculations through PBFT consensus. The data controlled shared access method built on blockchain effectively reduces the possibility of edge nodes returning untrue encryption and decryption calculation results and supports verifying the authenticity and integrity of data shared by data owners.

[0144] In order to further illustrate the above multiple embodiments, this application also provides a specific application example of a trusted and controlled sharing and access method of private data based on blockchain, see Figure 5 and Figure 6 The roles involved in the blockchain-based trusted and controlled sharing and access method of privacy data mainly include the following six categories: data owner, data user, authorization center, attribute authorization agency, IPFS and alliance chain, among which each role undertakes the following tasks:

[0145] (1) Data owner: In the scenario of controlled access sharing of private data, the data owner uses a symmetric encryption algorithm to encrypt the private data and stores the private data ciphertext in the IPFS distributed storage system. Then, the data owner defines the access policy for the private data and uses an attribute encryption algorithm to encrypt the symmetric key and the access path of the private data ciphertext in IPFS. The access policy contains the minimum level of attributes that meet the access requirements, and the symmetric key key ciphertext is stored in the blockchain.

[0146] (2) Data user: The data user sends his or her attribute set to the authorization center to obtain the attribute key. The data user uses his or her own private key to blind the attribute key and sends the blinded attribute key to the edge node, deploying the smart contract to outsource the decryption of private data. After receiving the pre-decrypted data sent by the edge server and the private data ciphertext stored in IPFS, the symmetric key is calculated and used to decrypt the private data ciphertext.

[0147] (3) Authorization Center: The trusted authorization center runs the system initialization algorithm and generates system public parameters. After receiving the partial attribute key sent by the attribute authorization agency, the authorization center calculates and sends the user attribute key to the data user. In addition, the authorization center is responsible for verifying whether user attribute abuse occurs.

[0148] (4) Attribute authority: Each attribute authority is responsible for managing some attributes and generating attribute trees corresponding to the attributes, and sending some attribute keys of data users to the authorization center CA.

[0149] (5) IPFS: IPFS is responsible for storing the ciphertext of private data and returning the ciphertext access path to the data owner. When the edge node returns the access policy match success information, the data user obtains the private data ciphertext from IPFS according to the access path.

[0150] (7) Edge blockchain (or consortium chain): The endorsement nodes in the edge blockchain are composed of edge nodes. Each edge node is responsible for executing smart contracts and reaching consensus on the execution results based on the PBFT consensus. The execution results are broadcast to all nodes for verification and synchronized on the chain. Each peer node in the system is a bookkeeping node, which is responsible for verifying blocks and synchronizing the chain. The edge node performs pre-decryption calculations and auxiliary encryption calculations based on smart contracts, and verifies the authenticity and integrity of the data shared by the data owner.

[0151] Based on the above subjects, the blockchain-based trusted and controlled sharing and access method of private data provided by this application example specifically includes the following contents:

[0152] Step 1. Authorization Center CA and Attribute Authority Execute the system initialization algorithm to generate public system parameters and system private key.

[0153]

[0154] The input of the system initialization algorithm is the security parameter , the output is the public system parameters and the system private key ; To describe this step in an instantiated manner, this application example gives a specific algorithm description of this step:

[0155] S11: Authorization center CA selects security parameters , the two stages are The multiplicative cyclic group of , and bilinear mapping , define a collision-resistant hash function , and , For the group The generator of For the stage The finite field that is formed.

[0156] S12: I attribute authority is randomly selected , Represents six random numbers selected by the i-th attribute authority, where i is a positive integer from 1 to 1. , , , , and , and , , , , and Send to CA.

[0157] S13: Authorization Center CA calculation , , , , and ,in , , , , , . CA random selection and ,calculate , secretly save the system private key , public system parameters .

[0158] Step 2. Authorization Center CA and Attribute authorization Execute the key generation algorithm to distribute user private keys and attribute keys to data users DU.

[0159]

[0160] The input of the key generation algorithm is the identity information of the data user DU and a collection of user attributes , the output is the public and private keys of the data user DU and attribute keys To illustrate this step, this application example provides a specific algorithm description of this step:

[0161] S21: CA random selection As identity information The user's private key is used to calculate the user's public key . CA sends the public-private key pair To DU.

[0162] S22: If the identity in the attribute tree is The depth of user DU is , the traversal path of DU ,in is the root node of the attribute tree. It is the leaf node of the attribute tree. I attribute organization is the attribute selection for management ,definition , i is a positive integer from 1 to I. Attribute authority recursively calculates , , and send To CA. CA receives all attribute authority sent After that, calculate .

[0163] S23: I attribute authority selects the attribute to be managed and ,in , for The finite field formed by for The finite field formed by is the random number selected by the i-th attribute authority. , , , , and send some attribute key components To the authorization center CA.

[0164] S24: Authorization Center CA calculation , and ,send Give DU as the attribute key.

[0165] Step 3. The data owner uses the AES (Advanced Encryption Standard) symmetric encryption algorithm to encrypt the private data and the access path of the private data ciphertext in IPFS , the ciphertext of private data is stored in the IPFS distributed storage system, and the ciphertext of access path is stored on the blockchain. The data owner encrypts the symmetric key according to the private data access policy, and the ciphertext of the symmetric key generated after attribute encryption is stored in the blockchain. In order to simplify the access policy structure, the data owner uses the hierarchically simplified access policy to encrypt the symmetric key. For example, in the scenario of controlled shared access to power privacy data, if the access policy of a certain private data is defined as {individual user OR (indicates: or) property center OR dispatching supervision center} and the access attribute level is individual user < property center < power dispatching supervision center. Before data encryption, the data owner simplifies the access policy {individual user OR property center OR dispatching supervision center} to {individual user}, which can effectively reduce the data encryption overhead, and the property center and dispatching supervision center with higher identity attribute levels can access the private data. Since the identity information of the property center and the power dispatching center does not appear when the access policy is used to encrypt the private data access key, the data access process of the property center and the power dispatching center is anonymous to the data owner and the blockchain edge node, and the property center and the power dispatching center can achieve anonymous access to private data.

[0166]

[0167] The input of the data encryption algorithm is the system public parameters , privacy data m and data access policy ,in yes matrix, for The output of the data encryption algorithm is the ciphertext of the private data. and key data ciphertext To illustrate this step, this application example provides a specific algorithm description of this step:

[0168] S31: The data owner DO selects a symmetric key , using symmetric encryption algorithm to encrypt private data Get data ciphertext In addition, DO calculation , upload To the alliance chain.

[0169] S32: The data owner DO selects a random number ,definition Indicates access policy Let the vector , calculate the secret value component ,in is a positive integer from 1 to 1, Representation Matrix The i-th row of .

[0170] S33: Order Represents an attribute revocation list, Represents the smallest subset of user nodes that covers all non-revoked attributes in the attribute tree. Figure 7 In the attribute tree containing 8 leaf nodes shown in Represents the root node of the property tree, Represents the leaf node of the attribute tree, and the leaf node represents the data user who owns the corresponding attribute of the attribute tree. Represents the associated node of the leaf node in the attribute tree. ,but For user nodes whose attributes have not been revoked , . User nodes whose attributes have been revoked , Therefore, for the element , the data owner DO can design smart contracts to enable edge nodes to calculate and ,in , , The auxiliary calculation results of the edge node are sent to the data owner DO.

[0171] S34: DO calculation , , upload the encrypted file data Go to IPFS. DO obtain the access address of private data in IPFS , use the symmetric key ck to encrypt the access address Get the access path ciphertext Then, DO calculates the three key data ciphertext components , upload and To blockchain.

[0172] Step 4. To prevent the user attribute key from being leaked during the pre-decryption process at the edge node, the user DU executes the blinded attribute key generation algorithm to blind part of the user attribute key. The authorization center CA executes the blinded attribute key generation algorithm to verify the authenticity of the data user DU's identity.

[0173]

[0174] Attribute key generation algorithm input system public parameters And user attribute key, output the blinded user attribute key and user identity verification result. To instantiate this step, this application example gives its specific algorithm description:

[0175] S41: User DU uses private key calculate , and , Indicates the blinded user attribute key, which DU sends To CA.

[0176] S42: CA Verification Equation If the equation is not true, the user's attribute key has been abused, and step 7 is executed to run the user attribute revocation algorithm to revoke the attribute key of user DU; if the equation is true, upload the blinded user attribute key , and to the edge node.

[0177] Step 5.DO specifies the endorsement policy to determine the edge nodes that can perform pre-decryption calculations, and the designated edge nodes execute the ciphertext data pre-decryption algorithm. The edge nodes in the blockchain reach a consensus on the pre-decryption results based on the PBFT consensus. The PBFT consensus algorithm can ensure the correctness of the pre-decryption results when the number of malicious edge nodes does not exceed 1 / 3 of the total number. The data pre-decryption calculations performed by the edge nodes in the blockchain effectively reduce the decryption overhead of the data user end.

[0178]

[0179] The input of the data pre-decryption algorithm is the blinded attribute key of the user DU and key information ciphertext , the algorithm outputs the pre-decryption result to the data user DU. To instantiate this step, this application example gives a specific algorithm description:

[0180] S51: If the user attribute Satisfy the ciphertext access policy and the user attribute has not been revoked, then there is a node in the attribute tree , the edge nodes can calculate , positive integer , = and . Representation Node The depth in the property tree, d represents the depth of the property tree.

[0181] S52: In the pre-calculation process, the edge node as the endorsement node only performs data pre-decryption calculation and cannot obtain any information related to the symmetric key and the storage address of the private data ciphertext. The edge node selects a set of constants Satisfy the equation , calculate the pre-decryption result of the ciphertext data .

[0182] In the given access strategy example, the property center and the dispatch supervision center can obtain the pre-decryption result through pre-decryption calculation. Taking the data access process of the dispatch supervision center and individual users as an example, a random number is randomly selected. ,satisfy , generate key shares for the scheduling supervision center and individual users , The edge node can perform calculations in the following steps during the data pre-decryption phase:

[0183]

[0184] According to the RSA difficulty assumption, if , users cannot calculate , and thus cannot be calculated When a user only has the identity attribute {individual user}, it is impossible to obtain the access rights of the higher-order identity attribute {dispatching supervision center} through reverse calculation, which ensures the security of outsourced data.

[0185] Step 6. After the data user receives the pre-decrypted data calculated by the edge node and obtains the ciphertext of the private data storage path on the chain, he uses the private key to perform decryption calculations to obtain the symmetric key. The data user can use the symmetric key to decrypt the storage path of the private data ciphertext on IPFS, thereby obtaining and decrypting the private data ciphertext. After obtaining the private data plaintext, the data user verifies the authenticity of the private data plaintext.

[0186]

[0187] The input of the data decryption algorithm is the pre-decrypted data and private data ciphertext , the algorithm outputs a symmetric key and privacy data plaintext To illustrate this step, this application example gives a specific algorithm description:

[0188] S61: Data user DU uses his own private key The symmetric key is calculated as follows: .

[0189]

[0190] S62: Data user DU uses symmetric key Decrypt file ciphertext data get . Data user calculation decryption plaintext data Hash value , confirmed by the edge nodes on the chain Is it true? , the data owner will be held accountable.

[0191] Step 7. The access policy defined by the data owner may change at any time. In this application example, the data owner executes the user attribute revocation algorithm to dynamically revoke the user attributes and re-encrypt the key information data ciphertext, thereby realizing the dynamic update of the access rights of the private data.

[0192]

[0193] The input of the user attribute revocation algorithm is the ciphertext of the key information data that has not been updated , the algorithm output is the updated key information data ciphertext To illustrate this step, this application example gives a specific algorithm description:

[0194] S71: Order Represents a new user revocation list, and When the data owner needs to revoke the data user's attributes ,like , data owner calculation .

[0195] S72: If yes , then . Edge Node Selection ,calculate , And send To the data owner. The data owner randomly selects ,calculate , upload To the alliance chain.

[0196] That is to say, this application example specifies the edge node as the blockchain endorsement node and performs outsourced encryption and decryption calculations based on the PBFT consensus mechanism, ensuring the correctness of the outsourced data encryption and decryption calculations. A data storage method that combines on-chain and off-chain is used to solve the problem that large file privacy data cannot be efficiently shared. Key information such as symmetric key ciphertext and access path ciphertext is stored on the blockchain, and the privacy data ciphertext is stored in IPFS. When the data owner only shares data part of the time, the off-chain storage of the privacy data ciphertext can realize the revocation of data sharing. The present invention constructs multiple attribute authorization agencies to jointly generate user attribute keys, avoiding the single point failure problem that may exist in a single attribute authorization agency. In order to solve the problem that data access policies are complex and may leak user privacy, the data owner in the present invention only uses the lowest-order attributes that meet the access policy to encrypt the outsourced data. When the attribute level of the data user is higher than or equal to the attribute included in the access policy, the data user has the right to access the outsourced data. Since the access policy only contains the lowest-order attributes that satisfy the access policy, data owners, edge computing nodes in the blockchain, and malicious external attackers cannot determine user attributes through the access policy. Access users with high attribute levels and regulatory agencies can implement anonymous access supervision of private data. In the private data sharing scenario, user attribute information may change dynamically and malicious attackers may abuse user attribute keys. By constructing a subset cover tree for each attribute, the data owner can revoke the abused data user attributes and only needs to update the relevant key information ciphertext.

[0197] The embodiment of the present application also provides a computer device, which may include a processor, a memory, a receiver and a transmitter, wherein the processor is used to execute the trusted controlled sharing method of private data based on blockchain and / or the trusted controlled access method of private data based on blockchain mentioned in the above embodiment, wherein the processor and the memory may be connected via a bus or other means, such as by bus connection. The receiver may be connected to the processor and the memory via wired or wireless means.

[0198] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0199] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as the program instructions / modules corresponding to the trusted controlled sharing method for privacy data based on blockchain and / or the trusted controlled access method for privacy data based on blockchain in the embodiments of the present application. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, realizing the trusted controlled sharing method for privacy data based on blockchain and / or the trusted controlled access method for privacy data based on blockchain in the above method embodiments.

[0200] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0201] The one or more modules are stored in the memory, and when executed by the processor, execute the blockchain-based trusted controlled sharing method for privacy data and / or the blockchain-based trusted controlled access method for privacy data in the embodiment.

[0202] In some embodiments of the present application, the user equipment may include a processor, a memory, and a transceiver unit, which may include a receiver and a transmitter. The processor, memory, receiver, and transmitter may be connected through a bus system. The memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to control the transceiver unit to send and receive signals.

[0203] As an implementation method, the functions of the receiver and the transmitter in the present application can be considered to be implemented through a transceiver circuit or a dedicated chip for transceiver, and the processor can be considered to be implemented through a dedicated processing chip, a processing circuit or a general chip.

[0204] As another implementation method, it is possible to use a general-purpose computer to implement the server provided in the embodiment of the present application, that is, to store the program code for implementing the functions of the processor, receiver, and transmitter in a memory, and the general-purpose processor implements the functions of the processor, receiver, and transmitter by executing the code in the memory.

[0205] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned trusted controlled sharing method of private data based on blockchain and / or the trusted controlled access method of private data based on blockchain are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0206] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the blockchain-based trusted controlled sharing method for private data and / or the blockchain-based trusted controlled access method for private data.

[0207] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.

[0208] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0209] In the present application, features described and / or illustrated for one embodiment may be used in the same manner or in a similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.

[0210] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the embodiments of the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A trusted and controlled sharing method of private data based on blockchain, characterized in that: include: Using the pre-acquired system public parameters and the preset symmetric key, a symmetric encryption algorithm is used to generate a private data ciphertext corresponding to the private data, and the private data ciphertext is stored outside the blockchain; Based on the attribute encryption algorithm, the access path of the private data ciphertext outside the blockchain and the symmetric key are encrypted with a predefined hierarchical simplified access strategy to obtain the access path ciphertext corresponding to the access path and the key information ciphertext corresponding to the symmetric key; The access path ciphertext and the key information ciphertext are stored in the blockchain, so that when the edge node in the blockchain currently serving as the blockchain endorsement node receives the blinded attribute key of the data user for the private data, if it is determined that the access attribute level of the data user is higher than or equal to the minimum access attribute level corresponding to the hierarchical simplified access policy, the data user is determined to have the right to access the private data, and a pre-decryption calculation is performed on the key information ciphertext based on the smart contract and the PBFT consensus mechanism, and the obtained pre-decryption result is sent to the data user, so that the data user can perform trusted and controlled access to the private data according to the pre-decryption result; The blinded attribute key is generated in advance by the data user according to the system public parameters and user attribute key sent by the authorization center; the authorization center sets the user public-private key pair of the data user in advance according to the identity information and user attribute set of the data user, based on the system public parameters, and generates the user attribute key of the data user according to the initial user attribute keys sent by multiple attribute authorization agencies, and then sends the user public-private key pair and the user attribute key of the data user to the data user, so that the data user generates the blinded attribute key corresponding to the user attribute key; If change data for the hierarchical simplified access policy is received, the user attribute specified by the change data is revoked based on the pre-constructed subset cover tree, and the key information data ciphertext is re-encrypted to obtain the corresponding re-encrypted key information data ciphertext, wherein each of the subset cover trees corresponds to an attribute, and the attribute tree corresponding to each attribute is managed by multiple attribute authorization agencies; The re-encrypted key information data ciphertext is stored in the blockchain.

2. The method for trusted and controlled sharing of private data based on blockchain according to claim 1 is characterized in that: Before adopting the pre-acquired system public parameters and the preset symmetric key, the method further includes: The system public parameters sent by the authorization center are received, wherein the authorization center executes a system initialization algorithm to generate the system public parameters and the system private key based on part of the system parameters sent by multiple attribute authorization agencies in advance.

3. The blockchain-based trusted and controlled sharing method for privacy data according to claim 1 is characterized in that: The authorization center is also used to verify the identity of the data user according to the blinded attribute key generated by the data user before the edge node receives the blinded attribute key for the private data, and forward the blinded attribute key to the edge node if the verification passes.

4. The method for trusted and controlled sharing of private data based on blockchain according to claim 1 is characterized in that: After receiving the pre-decryption result, the data user extracts the access path ciphertext based on the pre-decryption result, and obtains the symmetric key based on the user private key in the user public and private keys, and then decrypts the access path ciphertext according to the symmetric key to obtain the access address of the private data ciphertext outside the blockchain, and obtains the private data ciphertext according to the access address and performs data decryption processing to obtain the corresponding plaintext and hash value of the private data.

5. The method for trusted and controlled sharing of private data based on blockchain according to claim 4 is characterized in that: The method uses the pre-acquired system public parameters and the preset symmetric key to generate the private data ciphertext corresponding to the private data by a symmetric encryption algorithm, and stores the private data ciphertext outside the blockchain, including: Using the pre-acquired system public parameters and the preset symmetric key, a symmetric encryption algorithm is used to generate a private data ciphertext corresponding to the private data, and verification data corresponding to the private data is generated; The private data ciphertext is stored in the IPFS distributed storage system outside the blockchain, so that the IPFS distributed storage system returns the access path of the private data ciphertext; And, the verification data is stored in the blockchain, so that when the edge node in the blockchain currently serves as the blockchain endorsement node receives the hash value sent by the data user, it verifies the accuracy of the hash value according to the verification data, and broadcasts it to the entire blockchain network after the verification passes.

6. The method for trusted and controlled sharing of private data based on blockchain according to claim 1 is characterized in that: The attribute-based encryption algorithm encrypts the access path of the private data ciphertext outside the blockchain and the symmetric key with a predefined hierarchical simplified access strategy to obtain the access path ciphertext corresponding to the access path and the key information ciphertext corresponding to the symmetric key, including: Receive auxiliary encryption calculation results generated by each edge node in the blockchain after performing auxiliary encryption calculations on the privacy data based on smart contracts and the PBFT consensus mechanism in advance; Based on the attribute encryption algorithm, the access path of the private data ciphertext outside the blockchain and the symmetric key are encrypted with a predefined hierarchical simplified access strategy and the auxiliary encryption calculation result to obtain the access path ciphertext corresponding to the access path and the key information ciphertext corresponding to the symmetric key.

7. A trusted and controlled access method for private data based on blockchain, characterized in that: include: Send its own identity information and user attribute set to the authorization center, so that the authorization center sets the user public-private key pair based on the preset system public parameters, and generates a user attribute key according to the initial user attribute keys sent by multiple attribute authorization agencies, and then returns the user public-private key pair and the user attribute key; Generate a blinded attribute key corresponding to the user attribute key, and send the blinded attribute key to the authorization center, so that the authorization center performs user identity verification according to the blinded attribute key. If the verification passes, forward the blinded attribute key to the edge node in the blockchain that currently serves as the blockchain endorsement node, so that when the edge node receives the blinded attribute key, if it is determined that the access attribute level of the user information corresponding to the blinded attribute key is higher than or equal to the minimum access attribute level corresponding to the hierarchical simplified access policy, it is determined that the data user has the right to access the private data, and pre-decryption calculation is performed on the key information ciphertext based on the smart contract and the PBFT consensus mechanism, and the obtained pre-decryption result is returned; wherein the key information ciphertext and the access path ciphertext are pre-stored in the blockchain by the data owner; the data owner pre-uses the pre-acquired system public parameters and the preset symmetric key to generate the private data corresponding to the private data by a symmetric encryption algorithm ciphertext, and store the private data ciphertext outside the blockchain; then based on the attribute encryption algorithm, encrypt the access path of the private data ciphertext outside the blockchain and the symmetric key with a predefined hierarchical simplified access strategy to obtain the access path ciphertext corresponding to the access path and the key information ciphertext corresponding to the symmetric key; wherein the blinded attribute key is generated in advance by the data user according to the system public parameters and user attribute key sent by the authorization center; the authorization center sets the user public-private key pair of the data user based on the system public parameters according to the identity information and user attribute set of the data user in advance, and generates the user attribute key of the data user according to the initial user attribute keys sent by multiple attribute authorization agencies respectively, and then sends the user public-private key pair and the user attribute key of the data user to the data user, so that the data user generates the blinded attribute key corresponding to the user attribute key; Receive the pre-decryption result, extract the access path ciphertext based on the pre-decryption result, obtain the symmetric key based on the user private key in the user public and private keys, decrypt the access path ciphertext according to the symmetric key to obtain the access address of the private data ciphertext outside the blockchain, obtain the private data ciphertext according to the access address and perform data decryption processing to obtain the corresponding plaintext and hash value of the private data; Send the hash value to the edge node, so that the edge node verifies the accuracy of the hash value according to the pre-acquired verification data, and broadcasts the hash value to the entire blockchain network after the verification passes; Among them, if the data owner receives change data for the hierarchical simplified access policy, the user attributes specified by the change data are revoked based on the pre-constructed subset cover tree, and the key information data ciphertext is re-encrypted to obtain the corresponding re-encrypted key information data ciphertext, and the re-encrypted key information data ciphertext is stored in the blockchain, wherein each of the subset cover trees corresponds to an attribute, and the attribute tree corresponding to each attribute is managed by multiple attribute authorization agencies.

8. A trusted and controlled shared access system for privacy data based on blockchain, characterized in that: include: A blockchain with multiple edge nodes, an authorization center, multiple attribute authorization agencies, various computer devices, and an IPFS distributed storage system; Each computer device is respectively connected to the blockchain and the IPFS distributed storage system in communication, and the authorization center is respectively connected to the blockchain, each attribute authorization agency and the computer device in communication; Wherein, the role status of the computer device includes data user and data owner; When the current role status of the computer device is the data owner, the computer device is used to execute the blockchain-based trusted controlled sharing method for privacy data as described in any one of claims 1 to 6; When the current role status of the computer device is the data user, the computer device is used to execute the blockchain-based trusted controlled access method for privacy data as described in claim 7.

Citation Information

Patent Citations

  • Block chain privacy data access control method and system

    CN114679271A

  • On-chain and off-chain cooperative medical data hierarchical access control and sharing method

    CN117155644A