Data sharing method, device and system
By introducing regulatory centers and blockchain technologies in data sharing, and using encryption and re-encryption technologies, privacy leakage and data satisfaction problems in data sharing are solved, safe, efficient and supervised data sharing are achieved, and data is ensured. integrity and reliability.
Patent Information
- Application Number
- CN202411273596.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-09-12
AI Technical Summary
In the large-scale data sharing scenario, data sharing faces the risk of privacy leakage, data users cannot ensure that the data shared by the data provider meets their own needs, and may contain sensitive information that requires permission from regulatory authorities.
Introduce regulatory centers and blockchain technology to encrypt data and generate re-encryption keys, use interstellar file system for distributed storage, ensure the security and integrity of the data, and ensure the effectiveness of the data through smart contracts and zero-knowledge proofs. and rights.
It realizes safe, efficient and supervisable data sharing in restricted environments, avoids single point of failure, ensures data reliability and accountability, and protects the interests of data providers and users.
Smart Images

Figure CN118802147B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a data sharing method, device and system. Background Art
[0002] Data sharing can effectively promote data circulation and value release, breaking the phenomenon of information islands. However, some data not only contains a large amount of private information, but may also contain sensitive data in the work of the data provider, such as basic database data, economic data, etc. At present, there are many difficulties in sharing this type of data: first, data sharing faces the risk of privacy leakage; second, data users cannot guarantee that the data shared by the data provider meets their own research needs; third, the data may contain some sensitive information, which requires permission from the regulatory authorities before it can be shared and circulated. Therefore, how to achieve safe and efficient sharing of such data in large-scale data sharing scenarios has become a technical problem that needs to be solved. Summary of the invention
[0003] The present invention provides a data sharing method, device and system to enable data to be shared safely and efficiently.
[0004] To this end, the present invention provides the following technical solutions:
[0005] In one aspect, the present invention provides a data sharing method, the method comprising:
[0006] The data provider encrypts the data to obtain data ciphertext, saves the data ciphertext to the InterPlanetary File System, and obtains the ciphertext index address; the InterPlanetary File System is a distributed storage system composed of one or more consensus nodes on the blockchain;
[0007] Obtain data demand information of the data user from the blockchain, and send application materials and signatures to the regulatory center so that the regulatory center can verify the validity of the signature and review whether the application materials comply with relevant regulations on data sharing;
[0008] After receiving the review confirmation sent by the regulatory center, the data provider uses its own private key and the public key of the data user to generate a re-encryption key, and sends the re-encryption key to the InterPlanetary File System, so that the InterPlanetary File System uses the received re-encryption key to generate a re-encrypted ciphertext and send it to the data user.
[0009] Optionally, encrypting the data to obtain data ciphertext includes: encrypting the data using an asymmetric public key encryption algorithm or a symmetric encryption algorithm to obtain data ciphertext.
[0010] Optionally, the application materials include: the data requirement information, the data provider address, the data user address, and the ciphertext index address.
[0011] Optionally, the method further comprises:
[0012] After receiving the application materials and signature, the regulatory center verifies the validity of the signature and reviews whether the application materials comply with relevant regulations on data sharing based on the application materials;
[0013] If the signature is valid and the application materials comply with the relevant regulations on data sharing, a data sharing authorization token and token signature are generated;
[0014] The data sharing authorization token and token signature are sent to the data user.
[0015] Optionally, the data provider generating the re-encryption key fragment includes: the data provider using its own private key and the public key of the data user to generate the re-encryption key.
[0016] Optionally, the re-encryption key includes: n re-encryption key fragments, n>1;
[0017] The method further comprises:
[0018] The interplanetary file system stores the data ciphertext on n consensus nodes respectively;
[0019] The n consensus nodes respectively generate re-encrypted ciphertext segments using the received re-encryption key segments, and send the re-encrypted ciphertext segments to the data user.
[0020] The data sharing authorization token includes: the authorized entity address;
[0021] The method further comprises:
[0022] The data user sends the data sharing authorization token and token signature to the InterPlanetary File System;
[0023] The InterPlanetary File System verifies the validity of the token signature and verifies whether the authorized entity address in the data sharing authorization token is consistent with the data user account address;
[0024] If the verification is successful, the re-encrypted ciphertext segment corresponding to the ciphertext index address is sent to the data user.
[0025] Optionally, the method further includes: after the data user receives t re-encrypted ciphertext fragments, the data user combines them into a ciphertext, and uses its own private key and the data provider's public key to decrypt the ciphertext to obtain decrypted data.
[0026] Optionally, the method further comprises:
[0027] The data provider generates a hash value for the data and saves the hash value on the blockchain;
[0028] The data user calculates the hash value of the decrypted data, compares the hash value with the hash value stored on the blockchain, and determines whether the data is complete.
[0029] Optionally, the method further comprises:
[0030] The data user generates a zero-knowledge proof key pair using a key generation algorithm, sets up a smart contract for verifying zero-knowledge proof on the blockchain, and publishes the data demand information, public string, and generated proof key on the blockchain;
[0031] After the data provider obtains the data demand information of the data user from the blockchain, it determines whether the data demand information meets the requirements;
[0032] If the requirements are met, a zero-knowledge proof is generated according to the public string, the generation proof key, and the data requirement information, and the zero-knowledge proof is submitted to the smart contract;
[0033] The smart contract verifies the validity of the zero-knowledge proof;
[0034] If valid, a reward is sent to the data provider;
[0035] After receiving the reward sent by the smart contract, the data provider sends the application materials and signature to the supervision center.
[0036] On the other hand, the present invention also provides a data sharing device, the device comprising:
[0037] A data processing module, used to encrypt the data to obtain data ciphertext, save the data ciphertext to the InterPlanetary File System, and obtain the ciphertext index address; the InterPlanetary File System is a distributed storage system composed of one or more consensus nodes on the blockchain;
[0038] A request module, used to obtain data demand information of data users from the blockchain, and send application materials and signatures to the supervision center so that the supervision center can verify the validity of the signature and review whether the application materials comply with relevant regulations on data sharing;
[0039] The response module is used to generate a re-encryption key using its own private key and the public key of the data user after receiving the review confirmation sent by the regulatory center, and send the re-encryption key to the InterPlanetary File System, so that the InterPlanetary File System uses the received re-encryption key to generate a re-encrypted ciphertext and send it to the data user.
[0040] On the other hand, the present invention further provides a data sharing system, the system comprising: a data center, a blockchain, an interplanetary file system, and a supervision center; the data center comprises the data sharing device;
[0041] The data center is used to provide data to data users;
[0042] The regulatory center, as a trusted third-party entity, is responsible for reviewing whether the data provided by the data center complies with relevant regulations on data sharing;
[0043] The InterPlanetary File System includes one or more consensus nodes on the blockchain for storing encrypted data and verifying token validity;
[0044] The blockchain is used to provide re-encryption operations and store data transaction records.
[0045] On the other hand, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program executes the steps of the data sharing method when executed by a processor.
[0046] The data sharing method, device and system provided by the present invention set up a supervision center. The data provider saves the data ciphertext to the interplanetary file system. After obtaining the data demand information of the data user from the blockchain, the application materials and signature are first sent to the supervision center, so that the supervision center can verify the validity of the signature and review whether the application materials comply with the relevant regulations on data sharing. After the supervision center reviews and confirms, the data provider uses its own private key and the public key of the data user to generate a re-encryption key and sends it to the interplanetary file system. The interplanetary file system uses the received re-encryption key to generate a re-encrypted ciphertext and sends it to the data user. The scheme of the present invention introduces a supervision center to realize the supervision of data sharing, and uses blockchain technology to fully guarantee the integrity and accountability of the data. The scheme of the present invention can provide safe, efficient and controllable data sharing in some restricted environments.
[0047] Furthermore, by utilizing the InterPlanetary File System and re-encryption technology, data ciphertext can be stored on multiple consensus nodes of the InterPlanetary File System. When generating a re-encryption key, multiple re-encryption key fragments are also generated accordingly, so that multiple consensus nodes can re-encrypt the data ciphertext they store respectively and generate re-encrypted ciphertext fragments. This allows data sharing to be achieved in a completely decentralized scenario, effectively avoiding data loss or damage caused by single point failures and other problems, and improving the reliability of data storage.
[0048] Furthermore, the use of smart contracts and zero-knowledge proofs ensures the validity of data, thereby protecting the rights and interests of data users. By setting up an incentive mechanism and sending rewards to data providers, the interests of data providers can be better protected. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0050] Figure 1 is a flow chart of a data sharing method provided by an embodiment of the present invention;
[0051] Figure 2 is another flow chart of the data sharing method provided by an embodiment of the present invention;
[0052] Figure 3 It is a structural schematic diagram of a data sharing device provided by an embodiment of the present invention;
[0053] Figure 4 It is a structural schematic diagram of a data sharing system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.
[0055] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0056] In view of the problems of centralization, difficulty in supervision and data security in some current data sharing, the present invention proposes a data sharing method, device and system. The scheme introduces a regulatory agency to control the issuance of authorization tokens to ensure the security and controllability of data sharing activities. Combining proxy re-encryption and blockchain technology, the system initialization and re-encryption tasks are assigned to consensus nodes to complete, reducing the system computing overhead.
[0057] It should be noted that data users and data providers need to authenticate their identities and generate account addresses on the corresponding data sharing platform, and then use system parameters to generate corresponding public and private key pairs. There can be one or more data providers and data users, and they need to register on the data sharing platform.
[0058] like Figure 1 FIG. 1 is a flow chart of a data sharing method provided by the present invention, comprising the following steps:
[0059] Step 101: The data provider encrypts the data to obtain data ciphertext, saves the data ciphertext to the Interplanetary File System (IPFS), and obtains the ciphertext index address.
[0060] Before data sharing, the data provider encrypts the data using an encryption algorithm. For example, an asymmetric public key encryption algorithm or a symmetric encryption algorithm can be used, such as but not limited to any of the following: the AES (Advanced Encryption Standard), including but not limited to DES (Data Encryption Standard), IDEA (International Data Encryption Algorithm), SM4 (National Secret SM4 Block Cipher Algorithm), etc.
[0061] The InterPlanetary File System is a distributed storage system composed of one or more consensus nodes on the blockchain. In the case of multiple consensus nodes, one consensus node can be used as a master node and the other consensus nodes can be used as slave nodes; the master node can send messages to the slave nodes, such as by broadcasting.
[0062] For example, for data data, an asymmetric public key encryption algorithm is used to encrypt data data and generate data ciphertext CT. The data ciphertext is saved to the Interstellar File System and the ciphertext index address is obtained. ct ipfs_addr .
[0063] The interplanetary file system can store the data ciphertext CT on a consensus node; or store the data ciphertext CT on multiple consensus nodes to play a role of redundant backup. Accordingly, if it is stored on multiple consensus nodes, the index address of each data ciphertext segment can be provided to the data provider; or the master node of the interplanetary file system records the index address of each data ciphertext segment and provides the index address of the record to the data provider; or each data ciphertext segment can be stored at the same index address of different slave nodes, which is not limited in this embodiment of the present invention.
[0064] Step 102, obtain the data user's data demand information from the blockchain, and send the application materials and signature to the regulatory center so that the regulatory center can verify the validity of the signature and review whether the application materials comply with relevant regulations on data sharing.
[0065] The data demand information may include, for example: data information (such as title, keywords, abstract, date, etc.), demand background (such as why this batch of data is needed, what problem is expected to be solved or what goal is expected to be achieved, etc.), data delivery format (such as Excel / Word / PPT, etc.), data quality requirements (such as the accuracy, completeness, timeliness, etc. of the data), etc. The specific content and format of the data demand information can be set according to actual needs, and this embodiment of the present invention is not limited to this.
[0066] After obtaining the data demand information of the data user, the data provider can also make a preliminary judgment on whether the data stored by the data provider meets the requirements. For example, the data provider can check whether the data stored by the data provider meets the above requirements and whether the corresponding data can be shared. There is no restriction on this either.
[0067] If the requirements are met, the application materials and signatures are sent to the regulatory center; if the requirements are not met, the data demand information can be discarded, or corresponding feedback information can be sent to the data user. For example, the feedback information may include: information used to prompt that there is no matching data.
[0068] The application materials sent by the data provider to the supervision center may include but are not limited to the following information: the data requirement information, the data provider address, the data user address, and the ciphertext index address, etc.
[0069] The data information refers to the relevant information of the data to be shared by the data provider, such as the file name, summary, title, etc., which can be set according to actual needs and is not limited in the embodiment of the present invention.
[0070] The ciphertext index address refers to the storage address of the ciphertext of the data to be shared in the InterPlanetary File System. If the data ciphertext is stored on multiple consensus nodes of the InterPlanetary File System, the application materials may also include multiple ciphertext index addresses; or a virtual address is used, and a corresponding relationship table between the virtual address and the ciphertext index address storing the data ciphertext on each slave node is established and saved on the master node.
[0071] Accordingly, after receiving the application materials and signature sent by the data provider, the regulatory center verifies the validity of the signature and reviews whether the application materials comply with relevant regulations on data sharing based on the application materials.
[0072] For example, the data provider uses his or her own private key to sign and sends the signature and application materials to the supervision center. After receiving the signature, the supervision center uses the data provider's public key to verify the validity of the signature, which can effectively achieve the non-repudiation of the data provider's signature.
[0073] If the signature is valid and the application materials comply with the relevant regulations on data sharing, a data sharing authorization token and token signature are generated, and the data sharing authorization token and token signature are sent to the data user. Otherwise, corresponding feedback information can be returned to the data provider, such as invalid signature or prohibition of data sharing.
[0074] The supervision center can determine the identity of the data provider and the data user, data information and other information based on the data provider address and the data user address in the application materials, and review whether to allow the application. The specific review standards may be based on the relevant regulations of the relevant industry or department, etc., and this embodiment of the present invention is not limited to this.
[0075] For example, in one non-limiting embodiment, the data sharing authorization token and token signature may be generated and sent according to the following process:
[0076] 1) Authorization review: After verifying the identity of the data user, the regulatory center reviews the data user's authorization request, which may include checking their permission level and data access policy, to ensure that the request meets the sharing requirements.
[0077] 2) Token generation: Once the authorization review is completed and approved, the regulatory center generates a data sharing authorization token, which can be an encrypted string that includes information such as access rights and validity timestamp.
[0078] 3) Signature algorithm: To ensure the integrity and authenticity of the token, the regulatory center can digitally sign the token using a secure hash algorithm (such as SHA-256) and a private key.
[0079] 4) Token distribution: The regulatory center distributes the generated token and its digital signature to data users through a secure communication protocol.
[0080] The data user receives the data sharing authorization token and token signature sent by the supervision center, and sends the data sharing authorization token and token signature to the Interstellar File System. The data sharing authorization token may include: the authorized entity address T.auth_addr, the ciphertext index address ct ipfs_addr .
[0081] Step 103, after receiving the review confirmation sent by the regulatory center, the data provider uses its own private key and the public key of the data user to generate a re-encryption key, and sends the re-encryption key to the InterPlanetary File System, so that the InterPlanetary File System uses the received re-encryption key to generate a re-encrypted ciphertext and sends it to the data user.
[0082] To ensure data security, after receiving the authorization token and token signature provided by the data user, the InterPlanetary File System can use the public key of the regulatory center to verify the validity of the token signature and verify whether the authorized entity address T.auth_addr in the authorization token is consistent with the data user's account address. If the signature is valid and the address is consistent, the InterPlanetary File System uses the received re-encryption key to generate a re-encrypted ciphertext and send it to the data user.
[0083] It should be noted that the verification of the authorization token and token signature can be completed by the master node. After the verification is successful, a unicast, multicast or broadcast message is sent according to the ciphertext index address (corresponding to the case where the data ciphertext is stored in a single / multiple / all slave nodes, respectively). The message may include the ciphertext index address to notify the corresponding slave node, so that the slave node uses the re-encryption key to generate a re-encrypted ciphertext and send it to the data user.
[0084] As mentioned above, in order to avoid the impact of single point failure on data reliability, the data provider can also save the data ciphertext on n (n>1) consensus nodes. Specifically, the master node of the InterPlanetary File System can decide on which slave nodes to save the data ciphertext.
[0085] Accordingly, when the data provider generates the re-encryption key, it needs to generate n re-encryption key fragments KF=(kF 1 ,kF 2 ,…,kF n ), and send these n re-encryption key fragments to n consensus nodes. Specifically, they can be sent to the master node of the InterPlanetary File System, and then distributed by the master node to the corresponding slave nodes.
[0086] Correspondingly, the n consensus nodes re-encrypt the ciphertext fragments they store respectively and send the generated re-encrypted ciphertext fragments to the data user.
[0087] Correspondingly, after receiving the re-encrypted ciphertext fragments sent by t (t<=n) consensus nodes, the data user uses its own private key skB and the data center public key pkA to decrypt the ciphertext CT. Among them, t can be used as a threshold and published on the blockchain.
[0088] Furthermore, in order to ensure the integrity of the data received by the data user, the data provider can also generate a hash value for the data and save the hash value to the blockchain. Accordingly, after decrypting the data, the data user calculates the hash value of the data and compares it with the hash value on the blockchain to determine the integrity of the data. If they are the same, it means that the data is complete; if they are different, it means that the data is incomplete.
[0089] The data sharing method provided by the present invention realizes the supervision of data sharing by introducing a supervision center, and fully guarantees the integrity and accountability of data by using blockchain technology. By using the scheme of the present invention, safe, efficient and controllable data sharing can be provided in some restricted environments. Furthermore, by using the InterPlanetary File System and re-encryption technology, data ciphertext can be stored on multiple consensus nodes of the InterPlanetary File System, realizing data sharing in a completely decentralized scenario, and fully guaranteeing the security and reliability of data storage.
[0090] In another embodiment, in order to ensure that the data shared by the data provider meets the needs of the data user and protect the rights and interests of the data user and / or the interests of the data provider, zero-knowledge proof and smart contract mechanism can also be used. Figure 2 This is explained in detail.
[0091] Reference Figure 2 FIG. 2 is another flow chart of a data sharing method provided by an embodiment of the present invention, comprising the following steps:
[0092] In step 201, the data user generates a zero-knowledge proof key pair using a key generation algorithm, sets up a smart contract for verifying the zero-knowledge proof on the blockchain, and publishes the data demand information, the public string, and the generated proof key to the blockchain.
[0093] Step 202: The data provider encrypts the data to obtain data ciphertext, saves the data ciphertext to the InterPlanetary File System, and obtains the ciphertext index address.
[0094] For example, for data data, generate a hash value H(data), and use an asymmetric public key encryption algorithm to encrypt data data to generate data ciphertext CT. Save the hash value H(data) on the blockchain, and save the data ciphertext CT on the Interstellar File System.
[0095] In step 203, the data provider obtains the data demand information of the data user from the blockchain, generates a zero-knowledge proof based on the public string published by the data user, generates a proof key, and the data to be shared, and submits the zero-knowledge proof to the smart contract on the blockchain.
[0096] For example, the data user publishes a public string x, Generate the proof key EKC, the generated zero-knowledge proof key pair is (EKC, VKC)←KeyGen(1 λ ).
[0097] The data provider can index the address based on the ciphertext ct ipfs_addr , public string x , Generate the proof key EKC, and generate the zero-knowledge proof as: π←ZKProof(EKC, x , ct ipfs_addr ), submit the generated zero-knowledge proof π to the smart contract SCproof on the blockchain.
[0098] Accordingly, the smart contract SCproof will automatically verify the validity of the zero-knowledge proof π, and return a message to the data provider based on the verification result. For example, if the data provided by the data provider meets the needs of the data user, 1 is returned to the data provider, indicating that the data provider needs to provide the corresponding data. If it does not meet the needs of the data user, 0 is returned to the data provider, indicating that the data provider does not need to provide the corresponding data.
[0099] Furthermore, in order to protect the interests of the data provider, when it is determined that the data provided by the data provider meets the needs of the data user, a reward may be sent to the data provider, for example, a certain amount of reward may be sent to the account of the data provider. The specific form of the reward is not limited in the embodiment of the present invention, for example, it may be virtual or real currency.
[0100] Step 204: The data provider sends the application materials and signature to the supervision center, so that the supervision center verifies the validity of the signature and examines whether the application materials comply with relevant regulations on data sharing.
[0101] Specifically, the data provider can send application materials and signatures to the supervision center after receiving a response message sent by the smart contract (such as a message indicating that the data provider is required to provide corresponding data) or receiving the reward.
[0102] Step 204: Send the application materials and signature to the supervision center so that the supervision center can verify the validity of the signature and review whether the application materials comply with relevant regulations on data sharing.
[0103] Step 205, after receiving the review confirmation sent by the regulatory center, the data provider uses its own private key and the public key of the data user to generate a re-encryption key, and sends the re-encryption key to the InterPlanetary File System, so that the InterPlanetary File System uses the received re-encryption key to generate a re-encrypted ciphertext and sends it to the data user.
[0104] The specific implementation of the above steps 204 and 205 can be found in the previous Figure 1 Step 102 and step 103 shown in FIG. 1 are not described in detail here.
[0105] The data sharing method provided by the present invention can not only realize safe, efficient and controllable data sharing, but also, by using smart contracts and zero-knowledge proofs, can better protect the interests of data providers and the rights and interests of data users.
[0106] Accordingly, an embodiment of the present invention further provides a data sharing device, such as Figure 3 Shown is a structural schematic diagram of the device.
[0107] Reference Figure 3 An embodiment of the data sharing device 30 may include the following modules:
[0108] The data processing module 301 is used to encrypt the data to obtain data ciphertext, save the data ciphertext to the InterPlanetary File System, and obtain the ciphertext index address; the InterPlanetary File System is a distributed storage system composed of one or more consensus nodes on the blockchain;
[0109] The request module 302 is used to obtain the data demand information of the data user from the blockchain, and send the application materials and signature to the supervision center so that the supervision center can verify the validity of the signature and review whether the application materials comply with the relevant regulations on data sharing;
[0110] The response module 303 is used to generate a re-encryption key using its own private key and the public key of the data user after receiving the review confirmation sent by the regulatory center, and send the re-encryption key to the InterPlanetary File System, so that the InterPlanetary File System uses the received re-encryption key to generate a re-encrypted ciphertext and send it to the data user.
[0111] The specific implementation of each of the above modules can refer to the description in the previous embodiment of the method of the present invention, which will not be repeated here.
[0112] The data sharing device 300 provided in the embodiment of the present invention can be used as a data provider or a data center to share data with a data user. For other related descriptions of the data sharing device 300, reference can be made to the related descriptions in the above embodiments, which will not be repeated here.
[0113] Accordingly, an embodiment of the present invention also provides a data sharing system, such as Figure 4 The figure shows a structural diagram of the system.
[0114] The data sharing system includes: a data center 401, a blockchain 402, an interplanetary file system 403, and a supervision center 404; the data center 401 includes the above-mentioned data sharing device 300. Among them:
[0115] As a data provider, the data center 401 can provide data to the data user 500;
[0116] The supervision center 404, as a trusted third-party entity, is used to review whether the data provided by the data center 401 complies with relevant regulations on data sharing;
[0117] The InterPlanetary File System 403 includes one or more consensus nodes on the blockchain for storing encrypted data and verifying token validity;
[0118] Blockchain 402 is used to provide re-encryption operations and store data transaction records.
[0119] Combine the following Figure 4 The interaction relationship between the entities and the data sharing process are described in detail. A non-limiting embodiment of the data sharing process is as follows:
[0120] In step (1), before data sharing, data center 401 encrypts government data based on an asymmetric public key encryption algorithm. data The data ciphertext CT is obtained, and then the data ciphertext CT is saved in IPFS403.
[0121] Accordingly, in step (2), the ciphertext index address is obtained from IPFS 403 ct ipfs_addr .
[0122] In step (3), the data user 500 generates a zero-knowledge proof key pair (EKC, VKC)←KeyGen(1 λ ). In addition, the data user 500 will also deploy a smart contract 40 for verifying zero-knowledge proof on the blockchain 402, and send the data demand information, public string x , generate the proof key EKC and publish it to the blockchain.
[0123] In step (4), after the data center 401 obtains the data demand information of the data user 500 from the blockchain 402, it first preliminarily determines whether the data meets the requirements. If it meets the requirements, the data center 401 uses the public string x , Generate the proof key EKC and ciphertext index address ct ipfs_addr , a zero-knowledge proof π←ZKProof(EKC, x , ctipfs_addr ), and submit the proof π to the smart contract 40, which will automatically verify the validity of π. If the smart contract 40 returns 1, it means that the data provided by the data center 401 can meet the needs of the data user 500, and the reward will be automatically sent to the account address addrA of the data center 401. If the smart contract 40 returns 0, it means that the data provided by the data center 401 does not meet the needs of the data user 500 and cannot share the data with the data user 500.
[0124] In step (5), after receiving the reward, the data center 401 sends the application materials M and signature δ to the supervision center 404. M , M contains data information info, data center address addrA, data user address addrB and ciphertext index address ct _ipfs_addr .
[0125] In step (6), the supervisory center 404 verifies the signature δ M The validity of the application materials M is reviewed to see if they comply with relevant data sharing regulations. After both are verified, a data sharing authorization token T and a token signature δ are generated. T , sent to the data user 500.
[0126] In step (7), the data user 500 receives the data sharing authorization token T and the token signature δ T After that, T and δ T Send it to IPFS403, which will use the public key of the supervision center 404 to verify the signatureδ T The validity of the data sharing authorization token is verified, and the authorized entity address T.auth_addr in the data sharing authorization token is verified to be consistent with the data user's account address. If both are verified, IPFS403 uses the ciphertext index address in the data sharing authorization token T ct _ipfs_addr The corresponding data file, namely the data ciphertext CT, is found and sent to the data user 500 .
[0127] Correspondingly, after the data user 500 obtains the data ciphertext CT, it uses its own private key skB and the data center public key pkA to decrypt the data ciphertext CT to obtain the required data.
[0128] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0129] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0130] In several embodiments provided by the present invention, it should be understood that the disclosed device can be implemented in other ways.
[0131] The present invention also provides a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and the computer program can be executed when it is run. Figure 1 or Figure 2 The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. The storage medium may also include a non-volatile memory (non-volatile) or a non-transitory memory, etc.
[0132] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data provider to another website site, a computer, a server or a data provider by wired or wireless means.
[0133] The embodiments of the present invention are described in detail above. The present invention is described in detail using specific implementation methods herein. The description of the above embodiments is only used to help understand the method and system of the present invention. It is only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should belong to the scope of protection of the present invention, and the content of this specification should not be understood as limiting the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A data sharing method, characterized in that: The method comprises: The data provider encrypts the data to obtain data ciphertext, saves the data ciphertext to the InterPlanetary File System, and obtains the ciphertext index address; the InterPlanetary File System is a distributed storage system composed of one or more consensus nodes on the blockchain; Obtain data demand information of the data user from the blockchain, and send application materials and signatures to the regulatory center so that the regulatory center can verify the validity of the signature and review whether the application materials comply with relevant regulations on data sharing; After receiving the review confirmation sent by the supervision center, the data provider generates a re-encryption key using its own private key and the public key of the data user, and sends the re-encryption key to the InterPlanetary File System, so that the InterPlanetary File System generates a re-encrypted ciphertext using the received re-encryption key and sends it to the data user; Wherein, the method further comprises: After receiving the application materials and signature, the regulatory center verifies the validity of the signature and reviews whether the application materials comply with relevant regulations on data sharing based on the application materials; If the signature is valid and the application materials comply with the relevant regulations on data sharing, a data sharing authorization token and a token signature are generated, wherein the data sharing authorization token includes: the address of the authorized entity; Sending the data sharing authorization token and token signature to the data user; The data provider generates a re-encryption key fragment including: The data provider generates a re-encryption key using its own private key and the public key of the data user; The re-encryption key includes: n re-encryption key fragments, n>1; The interplanetary file system stores the data ciphertext on n consensus nodes respectively; The n consensus nodes respectively generate re-encrypted ciphertext segments using the received re-encryption key segments, and send the re-encrypted ciphertext segments to the data user.
2. The data sharing method according to claim 1, characterized in that: The encrypting the data to obtain the data ciphertext comprises: The data is encrypted by an asymmetric public key encryption algorithm or a symmetric encryption algorithm to obtain a data ciphertext.
3. The data sharing method according to claim 1, characterized in that: The application materials include: the data requirement information, the data provider address, the data user address, and the ciphertext index address.
4. The data sharing method according to claim 3, characterized in that: The method further comprises: The data user sends the data sharing authorization token and token signature to the InterPlanetary File System; The InterPlanetary File System verifies the validity of the token signature and verifies whether the authorized entity address in the data sharing authorization token is consistent with the data user account address; If the verification is successful, the re-encrypted ciphertext segment corresponding to the ciphertext index address is sent to the data user.
5. The data sharing method according to claim 4, characterized in that: The method further comprises: After receiving t re-encrypted ciphertext fragments, the data user combines them into ciphertext, and uses its own private key and the data provider's public key to decrypt the ciphertext to obtain decrypted data.
6. The data sharing method according to claim 5, characterized in that: The method further comprises: The data provider generates a hash value for the data and saves the hash value on the blockchain; The data user calculates the hash value of the decrypted data, compares the hash value with the hash value stored on the blockchain, and determines whether the data is complete.
7. The data sharing method according to any one of claims 1 to 6, characterized in that: The method further comprises: The data user generates a zero-knowledge proof key pair using a key generation algorithm, sets up a smart contract for verifying zero-knowledge proof on the blockchain, and publishes the data demand information, public string, and generated proof key on the blockchain; After the data provider obtains the data demand information of the data user from the blockchain, it determines whether the data demand information meets the requirements; If the requirements are met, a zero-knowledge proof is generated according to the public string, the generation proof key, and the data requirement information, and the zero-knowledge proof is submitted to the smart contract; The smart contract verifies the validity of the zero-knowledge proof; If valid, a reward is sent to the data provider; After receiving the reward sent by the smart contract, the data provider sends the application materials and signature to the supervision center.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the data sharing method according to any one of claims 1 to 7 are executed.
Citation Information
Patent Citations
Supervisable cross-chain private data sharing method and device
CN115242555A
Electronic medical data sharing method, system, equipment and medium
CN115996151A
System and Method for Securing a Non-Fungible Digital Asset
US20240249289A1
