Efficient data sharing method based on blockchain

By combining blockchain and IPFS technologies, and employing an authorization mechanism based on the discrete logarithm problem and an improved searchable encryption algorithm, the problems of low storage efficiency and security risks in data sharing systems are solved, achieving efficient and secure decentralized data sharing.

CN116760840BActive Publication Date: 2026-05-12JIANGSU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGSU UNIV
Filing Date
2023-06-15
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing data sharing systems, centralized data storage leads to inefficient search algorithms, poses security risks, and makes centralized servers vulnerable to DDoS attacks. Furthermore, existing searchable encryption schemes experience performance degradation in high-frequency search scenarios.

Method used

Decentralized data storage is achieved using blockchain and IPFS technologies. Combined with the authorization mechanism for the discrete logarithm problem, permission authorization and secure sharing are realized in an untrusted environment through smart contracts and cryptographic algorithms. The searchable cryptographic algorithm is improved to enhance search efficiency.

Benefits of technology

It enables secure and efficient data sharing in untrusted environments, improves search efficiency, ensures data immutability and privacy, and avoids the security risks of centralized servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116760840B_ABST
    Figure CN116760840B_ABST
Patent Text Reader

Abstract

The application discloses a kind of efficient data sharing methods based on block chain, can solve the problems, such as data storage concentration, search algorithm inefficiency existing in current data sharing process, realize safe and efficient decentralized data sharing.The encrypted data is stored in interstellar file system (IPFS) to obtain content identifier (CID);Key words are hashed, form keyword index with CID, and are stored on blockchain.Finally, searchable encryption algorithm based on inverted index is used, and the query operation on related data is realized by generating search trapdoor.Data users initiate query request based on discrete logarithm problem, and data owners can realize authorization operation without the participation of trusted third party.The application can maintain good search efficiency when the number of indexes is large, and realize decentralized data sharing without the supervision of trusted third party, so that the data sharing of each organization is safer, more efficient and convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of blockchain technology, specifically relating to an efficient data sharing method based on blockchain. Background Technology

[0002] With the explosive growth of network data, data has transformed into a crucial factor of production comparable to physical assets and human capital. Furthermore, data sharing has evolved into a vital link in economic, social, and technological development, possessing enormous growth potential in creating value for businesses and consumers. Despite the rapid development of various data management technologies, several security and efficiency issues remain to be addressed regarding privacy in data sharing. Traditional data sharing models involve centralized data storage, with users entrusting their data to trusted third parties. However, this model, reliant on centralized institutions, is prone to security bottlenecks and potential single points of failure. Currently, with the development of big data, cloud computing, and the Internet of Things, enterprises and government departments are collecting increasingly more information, resulting in exponential growth in data volume, which presents certain challenges to data sharing.

[0003] To address this issue, several privacy-preserving data-sharing schemes have been proposed to improve search efficiency. Specifically, Huang et al. proposed a secure data-sharing scheme based on ciphertext policy attributes and re-encryption by an online social network proxy. To support data sharing among multiple users, Shen et al. proposed a key protocol based on a symmetric balanced incomplete block design. Unfortunately, these solutions all rely on a central server, making them vulnerable to distributed denial-of-service (DDoS) attacks.

[0004] Blockchain is a decentralized, public, verifiable, and secure distributed ledger technology. This technology records transaction information in immutable blocks created by multiple nodes, forming a chain-like structure. Due to its multi-node participation and distributed storage characteristics, blockchain cannot be controlled by a single node or institution, thus possessing advantages such as immutability, decentralization, transparency, and high reliability. Wang et al. proposed a decentralized framework based on blockchain for building information sharing, which does not rely on any trusted third-party institution, enhancing the usability of the solution. However, it still has some limitations. The scheme is only suitable for data sharing in one-to-one scenarios and does not support keyword search, which significantly limits its practicality.

[0005] Searchable encryption is a technique that combines various cryptographic primitives with information retrieval to encrypt data and its keyword index in a certain way. It allows users to search conveniently, flexibly, and efficiently by submitting keywords, while ensuring that the cloud server responsible for storage is completely unaware of the encrypted data and related keyword information. To address different data sharing needs, some scholars have proposed relevant searchable encryption schemes. Zeng et al. proposed a searchable encryption scheme supporting Boolean queries with sublinear search complexity, suitable for cloud applications. Regarding medical data sharing, Li et al. proposed a novel scheme to address the key-sharing problem prevalent in KNN-based searchable encryption schemes.

[0006] Most existing searchable encryption algorithms store shared data files on centralized servers, with users obtaining file indexes by searching trapdoors. In these searchable encryption schemes, the execution time of the search algorithm is generally linearly dependent on the database size, with a time complexity of O(n). However, in many data sharing scenarios, the frequency of search operations often exceeds that of data updates. In these cases, the aforementioned searchable encryption schemes often suffer from a significant performance degradation due to excessive file indexing during the search process, severely reducing the efficiency of data sharing with large datasets. Therefore, for such scenarios, a highly efficient decentralized data sharing system is needed to improve sharing efficiency. Summary of the Invention

[0007] To address the aforementioned issues in data sharing, such as centralized data storage, inefficient search algorithms, and security vulnerabilities, this invention proposes a blockchain-based efficient data sharing method, BEDShare (Blockchain-Based Efficient Data Sharing Scheme). This method uses blockchain and IPFS to replace centralized servers, achieving complete decentralization of the data sharing process to ensure data immutability and privacy. Based on the discrete logarithm problem, an authorization mechanism without a trusted third party is introduced, allowing two data users to authorize access to shared data in an untrusted environment, thus guaranteeing the security of the information sharing process.

[0008] To achieve the above-mentioned objectives, the present invention adopts the following technical solution: a blockchain-based efficient data sharing method, comprising the following steps:

[0009] 1) System initialization, establishing common parameters for data sharing This includes data owners, data users, blockchain, and IPFS; the data owner uploads encrypted information files to IPFS and publishes encrypted keyword indexes to smart contracts deployed on the blockchain; the data user sends a data request to the data owner, and after obtaining authorization, generates a search trap based on the authorization relationship, calls the smart contract to obtain the keyword index, and searches for and downloads the data file through IPFS;

[0010] Generate a Cyclic group of prime multiplication of order , It is a group Generators; select two secure hash functions ,satisfy:

[0011] ,

[0012] ;

[0013] in, For safety parameters;

[0014] Obtain and publish public parameters ;

[0015] 2) The data user generates a private key and uses it to send data requests and generate search trapdoors. From the group of q-order integers Select a random number from the middle ;

[0016] 3) The data owner uploads the data file to IPFS and obtains a Content Identifier (CID) pointing to the data file;

[0017] 4) The data owner updates the data keyword index;

[0018] 5) The data user requests data from the data owner, and the data user performs an exponentiation operation to obtain the data request. And send it to the data owner:

[0019]

[0020] in, The inverse of the data user's private key;

[0021] 6) The data owner processes the received request, verifies its validity, and then sends the data back to the data user;

[0022] 7) Data users use exponentiation to calculate and search for trapdoors, which are then used to invoke parameters of the smart contract and perform exponentiation operations. Find the search trap ;

[0023] 8) Data users invoke smart contracts to obtain shared data indexes;

[0024] 9) Data users obtain data files and view and download data on IPFS based on the obtained Content Identifier (CID);

[0025] 10) The data sharing process ends.

[0026] Furthermore, step 4) above includes the following:

[0027] 4.1) From the group of q-order integers Select a random number from the middle Perform exponentiation operation Get the version information of the data file. ;

[0028] 4.2) Calculate and update the trapdoor Perform hash and XOR operations to obtain the indexes respectively. and encrypted content identifiers Specifically:

[0029] ,

[0030] ,

[0031] ;

[0032] in, It is the version information of the data file. It is a keyword index. It is an encrypted content identifier;

[0033] 4.3) Determine the index Does it exist, if If it did not exist previously, proceed to step 4.4); otherwise, proceed to step 4.5).

[0034] 4.4) Create a linked list , mapping relationship Stored in a smart contract and recorded on the blockchain, that is:

[0035] ;

[0036] 4.5) By index Search for and store items containing keywords Content Identifier Linked List ,Will Inserting into a linked list .

[0037] Furthermore, step 6) above includes the following:

[0038] 6.1) The data owner verifies the requester's identity and determines whether the received data usage request is legitimate. If legitimate, proceed to step 6.2); otherwise, proceed to step 10).

[0039] 6.2) The data owner performs an exponentiation operation to obtain the authorization relationship. Send it back to the data user:

[0040]

[0041] in, It is an authorization relationship generated by the data owner. It is a received data request. These are generated random numbers.

[0042] Furthermore, step 8) above includes the following:

[0043] 8.1) Smart contracts perform hash calculations Get the index ;

[0044] 8.2) Smart contracts are based on Get Linked lists in Matches are obtained by traversing the linked list. Perform an XOR operation. This process yields a matching file content identifier (CID).

[0045] The present invention, by adopting the above technical solution, has the following beneficial effects:

[0046] (1) By using an authorization protocol based on the discrete logarithm problem, two users are allowed to grant access rights in an untrusted environment, thus ensuring the security of information sharing;

[0047] (2) By using blockchain and IPFS technologies, shared data is stored in a distributed network, ensuring the authenticity of the data in the absence of a trusted third party, and achieving complete decentralization;

[0048] (3) Improve the index-based searchable encryption algorithm to effectively improve the search efficiency in the data sharing process. Attached Figure Description

[0049] Figure 1 This is a flowchart of an efficient data sharing method based on blockchain.

[0050] Figure 2 This is a schematic diagram of a data sharing system.

[0051] Figure 3 Flowchart for updating the data file index for the data owner.

[0052] Figure 4 A diagram illustrating the process of requesting authorization from the data owner. Detailed Implementation

[0053] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be noted that the technical solution and design principle of the present invention will be described in detail below with reference to only one optimized technical solution, but the protection scope of the present invention is not limited thereto.

[0054] This invention was experimentally analyzed in an Ubuntu 20.04 environment, using Python and Solidity as the development languages.

[0055] like Figure 1 As shown, the efficient data sharing method based on blockchain includes the following steps:

[0056] 1) System initialization, establishing common parameters for data sharing The data sharing system is as follows Figure 2 As shown, this includes a data owner, data users, a blockchain, and IPFS. The data owner uploads encrypted information files to IPFS and publishes an encrypted keyword index to a smart contract deployed on the blockchain. The data user, by sending a data request to the data owner and receiving authorization, generates a search trapdoor based on the authorization relationship, calls the smart contract to obtain the keyword index, and searches for and downloads the data file through IPFS. During the initialization phase, a... Cyclic group of prime multiplication of order , It is a group The generator. In addition, two secure hash functions are chosen. ,satisfy:

[0057] ,

[0058] .

[0059] in, These are safety parameters. Finally, the public parameters are obtained and published. .

[0060] 2) The data user generates a private key, which will be used in subsequent steps to send data requests and generate search trapdoors. At this stage, the data user selects from a group of integers of order q. Select a random number from the middle As its private key .

[0061] 3) The data owner uploads the shared data file to IPFS and obtains the Content Identifier (CID) pointing to the file.

[0062] 4) The data owner updates the data file index;

[0063] As a preferred embodiment of the present invention, the process for updating the data file index is as follows: Figure 3 As shown, it includes the following steps:

[0064] 4.1) From the group of q-order integers Select a random number from the middle Perform exponentiation operation Get the version information of the data file. ;

[0065] 4.2) Calculate and update the trapdoor Then, perform hash and XOR operations to obtain the indices. and encrypted content identifiers Specifically:

[0066] ,

[0067] ,

[0068] ;

[0069] in, It is the version information of the data file. It is a keyword index. It is an encrypted content identifier.

[0070] 4.3) Determine the index Does it exist, if If it did not exist previously, proceed to step 4.4); otherwise, proceed to step 4.5).

[0071] 4.4) Create a linked list , mapping relationship Stored in a smart contract and recorded on the blockchain, that is:

[0072] ;

[0073] 4.5) By index Search for and store items containing keywords Content Identifier Linked List ,Will Inserting into a linked list .

[0074] 5) Data users request data from data owners; the authorization request process is as follows: Figure 4 Data users perform exponentiation to obtain data requests. And send it to the data owner:

[0075]

[0076] in, This is the inverse of the data user's private key.

[0077] 6) The data owner processes the received request, verifies its validity, and then sends the data back to the data user;

[0078] In a preferred embodiment of the present invention, step 6) includes the following steps:

[0079] 6.1) The data owner receives the request, verifies the requester's identity, and determines whether the received request is valid. If valid, proceed to step 6.2); otherwise, proceed to step 10).

[0080] 6.2) The data owner performs an exponentiation operation to obtain the authorization relationship. Send it back to the data user:

[0081]

[0082] in, It is an authorization relationship generated by the data owner. It is a received data request. It is a previously generated random number.

[0083] 7) Data users compute search trapdoors to invoke parameters from smart contracts and perform exponentiation operations. Find the search trap .

[0084] 8) Data users invoke smart contracts to obtain shared data indexes;

[0085] As a preferred embodiment of the present invention, step 8) includes the following steps:

[0086] 8.1) Smart contracts perform hash calculations Get the index ;

[0087] 8.2) Smart contracts are based on Get Linked lists in Matching can be obtained by traversing the linked list. Perform an XOR operation. This process yields a matching file content identifier (CID).

[0088] 9) Data users obtain data files and view and download data on IPFS based on the obtained CID.

[0089] 10) The data sharing process ends.

Claims

1. A blockchain-based method for efficient data sharing, characterized in that, Includes the following steps: 1) System initialization, establishing common parameters for data sharing This includes data owners, data users, blockchain, and IPFS; the encrypted keyword index is published to a smart contract deployed on the blockchain; the data user sends a data request to the data owner, and after obtaining authorization, generates a search trap based on the authorization relationship, calls the smart contract to obtain the keyword index, and searches and downloads the data file through IPFS; Generate a Cyclic group of prime multiplication of order , It is a group Generators; Choose two secure hash functions ,satisfy: , ; in, For safety parameters; Obtain and publish public parameters ; 2) The data user generates a private key and uses it to send data requests and generate search trapdoors. From the group of q-order integers Select a random number from the middle ; 3) The data owner uploads the data file to IPFS and obtains a Content Identifier (CID) pointing to the data file; 4) The data owner updates the data keyword index; Step 4) includes the following: 4.1) From the group of q-order integers Select a random number from the middle Perform exponentiation operation Get the version information of the data file. ; 4.2) Calculate and update the trapdoor Perform hash and XOR operations to obtain the indexes respectively. and encrypted content identifier Specifically: , , ; in, It is the version information of the data file. It is a keyword index. It is an encrypted content identifier; 4.3) Determine the index Does it exist, if If it did not exist previously, proceed to step 4.4); otherwise, proceed to step 4.5). 4.4) Create a linked list , mapping relationship Stored in a smart contract and recorded on the blockchain, that is: ; 4.5) By index Search for and store items containing keywords Content Identifier Linked List ,Will Inserting into a linked list ; 5) The data user requests data from the data owner, and the data user performs an exponentiation operation to obtain the data request. And send it to the data owner: ; in, The inverse of the data user's private key; 6) The data owner processes the received request, verifies its validity, and then sends the authorization relationship generated by the data owner back to the data user; 7) Data users use exponentiation to calculate and search for trapdoors, which are then used to invoke parameters of the smart contract and perform exponentiation operations. Find the search trap ,in, Authorization relationships generated for data owners Keywords; 8) Data users invoke smart contracts to obtain shared data indexes; Step 8) includes the following: 8.1) Smart contracts perform hash calculations Get the index ; 8.2) Smart contracts are based on Get Linked lists in Matches are obtained by traversing the linked list. Perform an XOR operation. This will yield the matching file content identifier (CID). 9) Data users obtain data files: View and download data on IPFS based on the obtained Content Identifier (CID); 10) The data sharing process ends.

2. The efficient data sharing method based on blockchain as described in claim 1, characterized in that, Step 6) includes the following: 6.1) The data owner verifies the requester's identity and determines whether the received data usage request is legitimate. If legitimate, proceed to step 6.2); otherwise, proceed to step 10). 6.2) The data owner performs an exponentiation operation to obtain the authorization relationship. Send it back to the data user: ; in, It is an authorization relationship generated by the data owner. It is a received data request. These are generated random numbers.