Privacy information retrieval system and method based on blockchain and function secret sharing
By combining blockchain and functional secret sharing (FSS), using Bloom filters and MAC verification mechanisms, an encrypted data index table is constructed and distributedly stored, which solves the problems of malicious server attacks and lack of permission control in the FSS system, and realizes efficient, privacy-secure data retrieval.
Patent Information
- Application Number
- CN202510932944.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-07-08
AI Technical Summary
Existing Function Secret Sharing (FSS) systems struggle to effectively protect data privacy and integrity in the face of malicious server attacks and lack of control over data owners' permissions, especially in multi-user or multi-tenant environments that lack dynamic authorization and access control.
Combining blockchain and functional secret sharing (FSS), an index table of encrypted data is constructed and distributedly stored through Bloom filter and blockchain MAC verification mechanism. Trapdoor function is used to protect keyword privacy, and key share and MAC verification are used to ensure the integrity and legitimacy of query results.
It achieves efficient, privacy-safe, and verifiable data retrieval in a malicious server environment, ensures the privacy protection of keywords and access patterns, and reduces the risk of abuse and query overhead.
Smart Images

Figure CN120429305B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field related to information retrieval, and specifically to a privacy information retrieval system and method based on blockchain and function secret sharing. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] With the rapid development of data-intensive applications, the demand for outsourced storage of sensitive data is growing. To protect data privacy, data is often encrypted and stored on third-party platforms, with scalable access enabled through remote retrieval. However, traditional encrypted data retrieval solutions often have significant shortcomings in terms of user privacy, query security, and data integrity, making it difficult to balance security and system performance.
[0004] Existing technologies primarily employ cryptographic methods such as searchable encryption, fully homomorphic encryption, and obfuscated access memory (ORAM) for encrypted retrieval. While searchable encryption offers high retrieval efficiency, it can easily leak access patterns. Fully homomorphic encryption offers strong privacy protection but carries significant computational overhead, making it unsuitable for large-scale applications. While ORAM can conceal access behavior, its implementation is complex and resource-intensive.
[0005] Function Secret Sharing (FSS) has emerged in recent years. FSS supports private queries on encrypted data without revealing the query content. It also offers advantages such as no public key calculations and high computational efficiency. Compared to traditional solutions, FSS strikes a better balance between query privacy protection and computational complexity, and is considered a powerful tool for solving sensitive data retrieval problems. However, existing FSS solutions still face the following challenges in practical deployment:
[0006] 1) Limited resistance to malicious servers: Existing FSS systems typically assume that servers are "honest but curious," meaning they only attempt to snoop on data but do not actively tamper with or interfere with operations. However, in real-world environments, servers may engage in active attacks, such as tampering with query results, modifying data, or replaying old responses, rendering query results unreliable. Because FSS relies on the collaboration of multiple servers, if some of these server nodes actively attack, the privacy and integrity of the system could be compromised. Most current FSS solutions struggle to protect against this type of malicious behavior.
[0007] 2) Lack of data owner permission control: Traditional FSS solutions primarily focus on query privacy protection but often lack dynamic authorization and access control mechanisms. Once a user obtains query permissions or keys, they gain unrestricted access to the data, and the data owner cannot monitor, restrict, or revoke permissions. This lack of control poses significant risks in multi-user or multi-tenant environments. FSS systems are unable to effectively identify abusive behavior (such as frequent queries or dictionary attacks), resulting in insufficient access control and traceability. Summary of the Invention
[0008] To solve the above problems, the present invention proposes a privacy information retrieval system based on blockchain and functional secret sharing. By organically combining functional secret sharing (FSS), Bloom filter and blockchain MAC verification mechanism, the integrity of outsourced stored data and the privacy of retrieved data content and pattern are ensured, thus achieving efficient, privacy-secure and verifiable data retrieval.
[0009] In order to achieve the above object, the present invention adopts the following technical solutions:
[0010] The first aspect of the present invention provides a privacy information retrieval method based on blockchain and function secret sharing, including data uploading and data query. The data storage in the data uploading stage includes the following steps:
[0011] Encrypt data documents and extract keywords;
[0012] Perform trapdoor calculation on the keywords, generate a Bloom filter-based mapping index between the keywords and documents based on the keyword trapdoor, and obtain a Bloom filter index table;
[0013] Upload the encrypted file and Bloom filter index table to the DSSP end, and the DSSP end transfers the encrypted file hash value and Bloom filter index table to the blockchain for on-chain storage; the encrypted file is stored off-chain in the distributed storage nodes of the DSSP end according to the divided shares;
[0014] The blockchain calculates the data of each column of the Bloom filter index table through consensus, obtains the message authentication code MAC, and stores it on the blockchain.
[0015] A second aspect of the present invention provides a privacy information retrieval method based on blockchain and function secret sharing, which is configured to be executed on a data owner terminal and includes the following steps:
[0016] The data owner's terminal encrypts the data document and extracts keywords;
[0017] The data owner terminal performs trapdoor calculation on the keywords, generates a Bloom filter-based mapping index between the keywords and documents based on the keyword trapdoor, and obtains a Bloom filter index table;
[0018] The data owner terminal uploads the encrypted file and Bloom filter index table to the DSSP terminal.
[0019] A third aspect of the present invention provides a privacy information retrieval method based on blockchain and function secret sharing, which is configured to be executed on a data user terminal and includes the following steps:
[0020] The data user terminal splits the keyword search trapdoor obtained based on the query request into multiple FSS key shares and sends them to the blockchain nodes on the DSSP side respectively; so that each blockchain node uses its own stored Bloom filter index table and the obtained FSS key shares to calculate the function share corresponding to the query target;
[0021] The data user terminal obtains the function share corresponding to the query target, compares the MAC of the function share with the MAC stored on the blockchain, and if they are consistent, calculates the aggregated query result through the FSS decryption algorithm, and obtains the encrypted file stored off-chain based on the query result.
[0022] A fourth aspect of the present invention is a privacy information retrieval method based on blockchain and function secret sharing, which is configured to be executed on a DSSP end and includes the following steps:
[0023] Data storage stage:
[0024] The DSSP transmits the encrypted file hash value and Bloom filter index table to the blockchain for on-chain storage; the encrypted file is stored off-chain in the distributed storage nodes of the DSSP according to the divided shares;
[0025] The blockchain calculates the data of each column of the Bloom filter index table through consensus, obtains the message authentication code MAC, and stores it on the blockchain;
[0026] Data query phase:
[0027] The blockchain node on the DSSP side obtains the FSS key share sent by the data user terminal;
[0028] Each blockchain node uses its own stored Bloom filter index table and the obtained FSS key share to calculate the function share corresponding to the query target and return it to the data user terminal.
[0029] A fifth aspect of the present invention is a privacy information retrieval system based on blockchain and function secret sharing, comprising a data owner terminal, a data user terminal, and a DSSP terminal;
[0030] A data owner terminal is configured to execute the privacy information retrieval method based on blockchain and function secret sharing according to the second aspect of the present invention;
[0031] A data user terminal, configured to execute the privacy information retrieval method based on blockchain and function secret sharing according to the third aspect of the present invention;
[0032] The DSSP end is configured to execute the privacy information retrieval method based on blockchain and function secret sharing described in the fourth aspect of the present invention.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] This invention addresses the data storage process using Functional Secret Sharing (FSS). To effectively protect keyword privacy, it uses keyword trapdoors to construct an index table. The data owner controls access to the keyword trapdoor using a secret key, ensuring that only legitimate data users can obtain keywords and perform queries. The use of trapdoors ensures control over keywords by the data owner and mitigates the risk of deciphering the original text. Furthermore, blockchain technology ensures that the Bloom filter index table maintains a unified version, effectively preventing malicious server activity. Query results are verified and aggregated by calculating a message authentication code (MAC) for each column of the Bloom filter matrix and storing it on the blockchain. The integrity of the FSS results is ensured through consensus verification published on the blockchain.
[0035] The advantages of the present invention and its additional aspects will be described in detail in the following specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their description are used to explain the present invention but do not constitute a limitation of the present invention.
[0037] Figure 1 is a flow chart of a data storage method of a privacy information retrieval method according to embodiment 1 of the present invention;
[0038] Figure 2 is a schematic structural diagram of a privacy information retrieval system according to embodiment 1 of the present invention; DETAILED DESCRIPTION
[0039] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0040] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.
[0041] It should be noted that the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof. It should be noted that, in the absence of conflict, the various embodiments of the present invention and the features in the embodiments can be combined with each other. The embodiments will be described in detail below with reference to the accompanying drawings.
[0042] Example 1
[0043] In the technical solutions disclosed in one or more embodiments, Figures 1 to 2 As shown in the figure, a privacy information retrieval system based on blockchain and functional secret sharing adopts the FSS system architecture. It includes a data owner (DO) terminal, a data user (DU) terminal, and a distributed storage service provider (DSSP) terminal. The distributed storage service provider terminal includes a blockchain and multiple off-chain distributed storage nodes. These parts work together to achieve key functions such as encrypted data upload, search index construction, search authorization and private query.
[0044] A DSSP is typically a distributed system that combines data storage, encryption, and access control technologies to securely store and protect the privacy of sensitive data. It uses secret sharing techniques (such as FSS, or Functional Secret Sharing) to ensure data privacy during storage and retrieval, while also supporting secure data query and access.
[0045] The above-mentioned privacy information retrieval system architecture can collaboratively implement key functions such as encrypted data uploading, search index construction, search authorization, and private query. The privacy information retrieval method based on blockchain and function secret sharing provided in this embodiment includes data uploading and data querying. The data storage in the data upload stage includes the following steps:
[0046] Step 1: The data owner terminal encrypts the data document and extracts keywords;
[0047] Step 2: The data owner terminal performs trapdoor calculation on the keyword, generates a Bloom filter-based mapping index between the keyword and the document based on the keyword trapdoor, and obtains a Bloom filter index table;
[0048] Step 3: The data owner terminal uploads the encrypted file and Bloom filter index table to the DSSP terminal. The DSSP terminal transmits the encrypted file hash value and Bloom filter index table to the blockchain for on-chain storage; the encrypted file is stored off-chain in the distributed storage nodes of the DSSP terminal according to the divided shares;
[0049] Step 4: The blockchain calculates the data of each column of the Bloom filter index table through consensus, obtains the message authentication code MAC, and stores it on the blockchain;
[0050] This implementation, based on blockchain and the Function Secret Sharing (FSS) mechanism, first ensures the confidentiality of the original data document by symmetric encryption. Next, the system extracts keywords from the document and performs a trapdoor function calculation on each keyword, generating a trapdoor value that prevents reverse derivation of the keyword's content. Leveraging the mapping between the trapdoor value and the target document, a Bloom filter is used to construct a keyword index, resulting in a Bloom filter index table, improving index construction and retrieval efficiency. For storage, the encrypted document and index table are first uploaded to a trusted Distributed Storage Service Provider (DSSP). The DSSP transfers the document's cryptographic hash digest and Bloom filter index table to the blockchain, where they are recorded and verified on-chain through smart contracts, ensuring the immutability of the index information. Simultaneously, the encrypted document is partitioned and distributed across multiple off-chain nodes of the DSSP according to a pre-defined FSS partitioning algorithm, enhancing data availability and tamper resistance. To further verify the integrity and correctness of the Bloom filter index table, the blockchain uses a consensus mechanism to calculate the index table column by column and generate a corresponding message authentication code (MAC). The MAC value is then permanently recorded in the blockchain to support subsequent index audits and query verification.
[0051] The above steps in this embodiment implement data storage using Functional Secret Sharing (FSS). To effectively protect keyword privacy during storage, a keyword trapdoor is used to construct an index table. The data owner controls access to the keyword trapdoor using a key, ensuring that only legitimate data users can obtain keywords and perform queries. The use of trapdoors ensures control over keywords by the data owner and avoids the risk of inferring the original text. Furthermore, blockchain technology ensures that the Bloom filter index table maintains a unified version, effectively preventing malicious server activity. Query results are verified and aggregated by calculating a message authentication code (MAC) for each column of the Bloom filter matrix and storing it on the blockchain. The integrity of the FSS results is ensured through consensus verification published on the blockchain.
[0052] Traditional function secret sharing (FSS) can protect keyword privacy but cannot hide access patterns or verification results. This embodiment protects keyword privacy by using keyword trapdoors to construct an index table, but cannot hide access patterns or verification results. By combining function secret sharing (FSS) with a Bloom filter, it can simultaneously achieve privacy protection for keywords and access patterns. The Bloom filter maps the search bits and cooperates with the FSS key share to improve the efficiency of privacy computing. At the same time, the blockchain is used to provide a tamper-proof storage MAC for data, which can achieve dynamic verification of the integrity of the results.
[0053] In step 1, the data document to be stored is encrypted and executed in the data owner's terminal, including:
[0054] Step 11: Initialize the common system parameter pp;
[0055] Set the security parameter λ and the data document set size N, and execute the initialization algorithm to generate the public system parameter pp. This parameter is used for subsequent keyword encryption and private query to ensure that the system operates at the set security level. Suppose there are p server nodes in DSSP:
[0056] The common system parameters constructed are:
[0057] ;
[0058] ;
[0059] ;
[0060] in, ; is a set integer less than N; It is a rounding operation; is a random number generator (PRG), M is the length of the Bloom filter; represents k hash functions, H is the selected secure hash function;
[0061] Step 12: Based on the initialized public system parameters, a key generation algorithm is used to obtain a secret key sk, and the data document is symmetrically encrypted;
[0062] This step is performed by the data owner. The data owner executes the key generation algorithm based on the public parameter pp to obtain his own secret key. , the key is used for subsequent index construction and query authorization.
[0063] 1) Select a random number , l is the key length, Indicates random selection.
[0064] Get λ and key length from the shared system parameters pp l Greater than λ, λ is the set value;
[0065] 2) The user's private key is ;
[0066] In step 1, keyword extraction is performed on the data document, including but not limited to word frequency analysis (TF-IDF), topic modeling, named entity recognition and other methods, to identify the most representative words from the data document as keywords.
[0067] In step 2, the data owner terminal constructs a Bloom filter index table based on the keyword trapdoor, including the following steps:
[0068] Step 21: For each keyword of the extracted data document, a secret key is used based on a pseudo-random generator. The key in Encrypt and generate keyword ciphertext;
[0069] Step 22: Use the set secure hash function H to calculate the hash value of the keyword ciphertext as a keyword trapdoor;
[0070] Step 23: Target the keyword trapdoor, i.e. the hash value of the keyword ciphertext , using for each Bloom filter Set the hash function to calculate the corresponding The keyword trapdoor is stored in the Bloom filter of row i. In the constructed Bloom filter index table, ;
[0071] It should be noted that the Bloom filter index table It includes multiple rows and columns, and each table position is a Bloom filter; each row corresponds to the Bloom filter of a file, such as the i-th row is the Bloom filter corresponding to the i-th file.
[0072] Specifically, for the keyword trapdoor, use the corresponding Bloom filter The set hash function then calculates the hash value to obtain the hash value of each keyword trapdoor, and then modulo the length M of the Bloom filter to obtain the position in the Bloom filter;
[0073] Existing indexes for keywords are mostly based on the original text of the keywords or deterministic encryption of the keywords, which does not provide sufficient privacy protection for the keywords. The deterministic ciphertext corresponding to the keywords is easily inferred and its integrity cannot be verified. In order to effectively protect the privacy of keywords, this embodiment uses a pseudo-random generator to generate ciphertext, calculates the ciphertext hash, and inserts it into the index table as a keyword trapdoor. The data owner controls access rights to the trapdoor through a key to ensure that only legitimate data users can obtain keywords and perform queries. The use of trapdoors ensures the data owner's control over the keywords and avoids the risk of inferring the original text. Data users can verify the integrity of the trapdoor after obtaining it, but cannot infer the corresponding keyword original text;
[0074] The specific implementation process of steps 21 to 23 above is as follows:
[0075] Assume that there are files in the data document collection D , there are keywords in the keyword set W ; The private key is ; Encrypt the file in D to get ;
[0076] 1) Create an empty array , and the empty matrix BF, the size of the empty matrix BF can be set to N×M;
[0077] 2) For each keyword in the keyword set W , perform the following processing:
[0078] 2.1) Use the key in the private key , calculate keywords based on pseudo-random generator Ciphertext , the formula is:
[0079] ;
[0080] 2.2) Use the set secure hash function H to calculate the hash value of the keyword ciphertext , as a keyword trapdoor;
[0081] 2.3) Store keyword trapdoors into the constructed array middle: ,in, Create a keyword trapdoor for each file;
[0082] 3) Use the selected hash function , for the array Each data file Each keyword ciphertext hash value , calculate k Bloom filters The keyword trapdoor is stored in the corresponding position of the Bloom filter index table. , the position calculation formula is:
[0083] ;
[0084] in, , % is the modulo operation.
[0085] The keyword trapdoor is stored in the corresponding position of the Bloom filter index table. The specific operation is to set the corresponding position of the Bloom filter to ,return BF, thus storing the keyword trapdoor in the position marked as 1, and obtaining the Bloom filter index table Uploaded to the blockchain together with the encrypted document, each server node on the blockchain stores the same version of the Bloom filter index table .
[0086] In step 3, off-chain storage uses IPFS off-chain distributed storage;
[0087] Among them, IPFS: InterPlanetary File System is translated as Interstellar File System, which is the distributed storage database used by DSSP;
[0088] Furthermore, in step 4, the blockchain calculates the data of each column of the Bloom filter index table through consensus to obtain the implementation method of the message authentication code (MAC). Each column of the Bloom index , Indicates the columns, and Calculate message authentication code , the formula is:
[0089] ;
[0090] Among them, KMAC is the shared key used for MAC calculation, ,HMAC is a key-based message authentication code function, such as HMAC-SHA256, which is a traditional algorithm.
[0091] In the above implementation, keywords are inserted into each file to generate an N×M Bloom filter matrix. To improve retrieval efficiency, keyword traps are inserted into each data document to obtain N Bloom filters, which are then constructed into an N×M binary matrix. If the subsequent FSS only searches each bit of the N Bloom filters, the retrieval complexity is O(N). After forming the matrix, it only needs to search each column of the matrix and then perform an intersection and union operation, resulting in a retrieval complexity of O(M). M is usually much smaller than N. Therefore, by constructing the matrix, the query complexity is reduced, thereby significantly improving query efficiency.
[0092] By storing the index table on the blockchain, we ensure that all distributed server nodes access and operate on the index table based on a consistent version of the data, thus avoiding retrieval issues caused by inconsistent versions. The immutability and consensus mechanism of blockchain technology ensure that all nodes use the same, verified index data, improving the system's data consistency and query reliability.
[0093] Furthermore, the data retrieval method in the data query phase includes the following steps:
[0094] Step S5: The data user (DU) terminal splits the keyword search trapdoor obtained from the query request into multiple FSS key shares and sends them to the blockchain node on the DSSP side respectively;
[0095] Step S6: Each blockchain node uses its own stored Bloom filter index table and the obtained FSS key share to calculate the function share corresponding to the query target and returns it to the data user (DU) terminal;
[0096] Step S7: The data user (DU) terminal compares the MAC of the function share with the MAC stored on the blockchain to see if they are consistent. If they are consistent, the aggregated query result is calculated using the FSS decryption algorithm, and the encrypted file stored off-chain is obtained based on the query result.
[0097] This implementation utilizes the FSS and blockchain to implement a secure and private data retrieval mechanism. After a data user (DU) submits a query, their terminal first generates a corresponding search trapdoor based on the query keyword. Using a functional secret sharing algorithm, the trapdoor is split into multiple key shares, each of which is information-unidentifiable. These shares are then sent to multiple DSSP blockchain nodes, preventing any single node from obtaining the complete query information and enhancing privacy. Each blockchain node combines its locally stored Bloom filter index table with the received key shares to calculate its corresponding function share result and return it to the data user (DU) terminal. Upon receiving all function shares, the DU terminal first compares the message authentication code (MAC) corresponding to each share with the MAC of the original record in the blockchain to verify the integrity and authenticity of the node's response. If verification is successful, the DU terminal uses the FSS decryption mechanism to aggregate all function shares and recover the complete query result. Finally, based on this result, the corresponding encrypted file in the off-chain DSSP node is retrieved and decrypted to securely extract the data content.
[0098] This implementation effectively addresses the vulnerability of traditional FSS to malicious server attacks during the data query phase. Through the distributed processing of key shares and the MAC verification mechanism, the system significantly enhances the ability to verify DSSP end-point behavior, preventing response results from being tampered with or forged. Blockchain nodes can only process a portion of the key shares and lack the ability to restore the query content, thereby protecting the privacy of query intent. The MAC comparison mechanism ensures the authenticity and consistency of the response function shares, making query results more trustworthy. The query result decryption process does not rely on a central node, improving system robustness. Furthermore, after the query is completed, data users only need to index the corresponding encrypted file based on the query result, achieving precise access control and reducing the risk of abuse.
[0099] In step S5, the data user (DU) terminal obtains the keyword trapdoor through the query request. The specific process is as follows:
[0100] Step S51: The data user (DU) terminal sends a data query request including an access permission (Perm) to the data owner (DO) terminal;
[0101] The information in the data query request includes the query keyword and the authorization token Perm for access permission;
[0102] When a data user wants to When initiating a query request, you need to initiate an authorization request to the data owner. The data owner will use the authorization token Perm and the request keyword to In this embodiment, the query request includes access permissions, which can provide fine-grained access control for the data owner.
[0103] Access permission, specifically: the permission certificate given by the data owner to the data user, which can be a secret value known only to both parties;
[0104] Step S52: The data owner (DO) terminal generates a search trap for the keyword q that is used to allow the user to query based on the data query request content using the keyword trap calculation method: Return ,in, They represent the hash key of DO and the current blockchain version respectively, and q is a keyword;
[0105] The calculation method for keyword search trapdoors can be the same as the calculation method in step 2 above, and the formula is:
[0106] ;
[0107] ;
[0108] Among them, the key and is the key in the private key; is a random number generator, is the selected secure hash function;
[0109] Data owner (DO) returns a keyword search trap , perform private searches without exposing the original text of keywords.
[0110] Step S5: The data user (DU) terminal splits the keyword search trapdoor obtained by the request into multiple FSS key shares and sends them to the blockchain node on the DSSP side respectively;
[0111] Specifically, to avoid leaking keyword position indexes The real location of the keyword position index is obtained by using the distributed point function secret sharing (FSS) distribution method. Hidden in multiple FSS key shares;
[0112] Data users have keyword search traps Initiate a query request to the blockchain nodes of p DSSP terminals, and each blockchain node uses its locally stored Bloom filter index table to Conduct distributed private retrieval and return the query results to the data user. Throughout the query content and indexing process, except for the data user terminal, all server nodes, including DSSP server nodes, blockchain nodes, and off-chain nodes, remain private, ensuring the privacy of keywords and search behavior.
[0113] Calculate the Bloom filter index table to access The number of columns, that is, the positions of the k Bloom filters corresponding to the hash values , the calculation formula is:
[0114] ;
[0115] in, , represents a hash function, is the keyword search trapdoor, M is the length of the Bloom filter;
[0116] For each bloom filter position , all positions can be determined by their position index i. In order to hide the position index i, a distributed point function is constructed to represent the index i , the distributed point function Split into multiple FSS key shares; among them, the distributed point function The value at position index i is 1, and the value elsewhere is 0;
[0117] Optional Each random vector After XOR operation with the pseudo-random expansion result of the random sequence, the distributed point function secret sharing (FSS) distribution method is used to distribute the distributed point function. Split into multiple FSS key shares, the process is as follows:
[0118] Step S51: Initialize the position index i and use a two-dimensional form to represent the keyword position index i:
[0119] Initialize position index ;
[0120] in, , realizing the position index decomposition;
[0121] Step S52: Based on the number of split parts p, construct p×2 p-1 Random matrix, so that the target row of the keyword position index The corresponding random matrix Belongs to p×2 with an even number of columns set to 1 p-1 Random Matrix , rather than the random matrix corresponding to the target row (γ′≠γ) A random matrix with an odd number of columns set to 1 ;
[0122] Specifically, choose random p×2 p-1 matrix , so that for all , and ,in, is a p×2 matrix with an odd number of columns set to 1 p-1 Random matrix; is a p×2 matrix containing an even number of columns containing 1s p-1 Random matrix;
[0123] Step S53: Build Random sequence ;
[0124] Step S54: Build The length is The result of the overall XOR of all random vectors constructed is exactly equal to the unit vector , so that the target position is 1 and other positions are 0;
[0125] Constructed random vector Expressed as:
[0126] ;
[0127] in, Indicates the number of columns in the index table as the column of the constructed random vector;
[0128] The conditions that the constructed random vector must meet are:
[0129] ;
[0130] in, is the exclusive OR operation; For the bits are 1 and the other bits are 0 dimensional vector, The random sequence constructed The random sequence generated in the first bit of the row, Represents a generate operation for a pseudo-random generator.
[0131] Step S55: Construct the intermediate share corresponding to each position index: Take the element of the jth row of the random matrix constructed in step S52, multiply it by the random sequence constructed in step S53 on each column of the random matrix, and then splice it to generate a pseudo-random share row. , the formula is:
[0132] ;
[0133] in, , ,|| is the concatenation operation, is the random sequence generated in step 53 The i-th bit of the row, is a matrix The jth row of Column elements;
[0134] In this embodiment, the subscript Indicates the target row, subscript Indicates non-target row, subscript Includes target and non-target rows;
[0135] Step S56: Concatenate the share rows of each position γ to construct the complete σ share of the current j-th server node , corresponding to the combination of all index positions γ, ensuring that it has global position independence and unpredictability; the calculation formula is:
[0136] ;
[0137] Step S57: Concatenate the complete σ share of each server node obtained with the random vector constructed in step 54 to obtain the complete key share distributed to each server node, and obtain the final FSS key share. , the calculation formula is:
[0138] ;
[0139] What you will eventually get Key shares Send to p server nodes respectively.
[0140] The above random processing steps convert the query request of location index i into multiple key shares kj, which are distributed to each FSS server node. Each node can only see its own share and cannot infer the target location independently, but all nodes can cooperate to restore the correct query; first, the location index is broken up into two-dimensional coordinates, and a pseudo-random matrix is constructed to mask the bit positions. Then, an XOR perturbation is introduced to make the final position of the shares consistent but unrecognizable. Combined with the Bloom filter arrangement, secure index query is achieved.
[0141] Step S6: Each blockchain node uses its own stored Bloom filter index table and the obtained multiple FSS key shares to calculate the function share corresponding to the query target. The process is as follows:
[0142] Step 61: traverse the Bloom filter index table BF D All columns in ;
[0143] The index position of each column is represented as: ;
[0144] in, Indicates the row index;
[0145] Represents the column index;
[0146] Step 62: Bloom filter index table BF D Each column , the server node uses the FSS key share calculation function to output :
[0147] , ;
[0148] in, is the FSS key share Random vectors in ;
[0149] is the FSS key share The bit corresponding to the γth row and the i-th column in the random sequence of ;
[0150] Represents the generation operation of the pseudo-random generator;
[0151] Step 63: Aggregate the calculation results of each column: Calculate the function output based on the FSS key share, and the function output for all columns t and the bloom value of the corresponding column Multiply and XOR aggregate to calculate function shares;
[0152] Then calculate ,in, Is the Bloom filter index table The value of column t in . The server node's response result for the FSS function share currently queried;
[0153] In the above implementation scheme, each server in the FSS system uses the key share and the Bloom filter matrix to calculate the function share result through multiple rounds of XOR and selective mapping, thereby realizing the collaborative completion of encrypted queries without knowing the query content.
[0154] The data user (DU) terminal collects p and calculate , that is, to obtain the corresponding The value of the column is the aggregate result of all current FSS function shares;
[0155] The data user (DU) terminal compares the MAC of the FSS function share with the MAC stored on the blockchain. If they are consistent, the aggregated query result is calculated using the FSS decryption algorithm. Based on the query result, the encrypted file stored off-chain is obtained and decrypted to obtain the data document.
[0156] Traditional FSS systems cannot inherently verify results or hide access patterns; they only protect keywords. Blockchains can store data but lack automated search verification. Bloom filters enable fast retrieval, but they alone cannot provide privacy or integrity verification. This embodiment combines the privacy protection of FSS systems with the indexing efficiency of Bloom filters, improving both efficiency and privacy, resolving the trade-off between efficiency and privacy in traditional solutions. MAC on-chain verification transforms blockchains into not only a data recording medium but also a security verification mechanism, achieving dynamic tamper resistance. During the query process, encrypted keywords and their access patterns are fragmented and encrypted, ensuring that no single server can access the complete query content, thereby strictly protecting the privacy of the querying party. Compared to traditional searchable encryption schemes, this invention achieves stronger access pattern concealment without relying on a trusted execution environment. This reduces query overhead and communication burden. Querying parties can efficiently access target keywords, and the overall system response latency is low, making it suitable for large-scale data outsourcing scenarios.
[0157] Example 2
[0158] Based on Example 1, this embodiment provides a privacy information retrieval method based on blockchain and function secret sharing, which is configured to be executed on the data owner's terminal and includes the following steps:
[0159] The data owner's terminal encrypts the data document and extracts keywords;
[0160] The data owner terminal performs trapdoor calculation on the keywords, generates a Bloom filter-based mapping index between the keywords and documents based on the keyword trapdoor, and obtains a Bloom filter index table;
[0161] The data owner terminal uploads the encrypted file and Bloom filter index table to the DSSP terminal.
[0162] It should be noted that the steps executed by the data owner terminal in this embodiment are the same as those in the embodiment, and will not be repeated in this embodiment.
[0163] Example 3
[0164] Based on Example 1, this embodiment provides a privacy information retrieval method based on blockchain and function secret sharing, which is configured to be executed on a data user terminal and includes the following steps:
[0165] The data user terminal splits the keyword search trapdoor obtained based on the query request into multiple FSS key shares and sends them to the blockchain nodes on the DSSP side respectively; so that each blockchain node uses its own stored Bloom filter index table and the obtained FSS key shares to calculate the function share corresponding to the query target;
[0166] The data user terminal obtains the function share corresponding to the query target, compares the MAC of the function share with the MAC stored on the blockchain, and if they are consistent, calculates the aggregated query result through the FSS decryption algorithm, and obtains the encrypted file stored off-chain based on the query result.
[0167] It should be noted that the steps executed by the data user terminal in this embodiment are the same as those in the embodiment, and will not be repeated in this embodiment.
[0168] Example 4
[0169] Based on Example 1, this embodiment provides a privacy information retrieval method based on blockchain and function secret sharing, which is configured to be executed on the DSSP side and includes the following steps:
[0170] Data storage stage:
[0171] The DSSP transmits the encrypted file hash value and Bloom filter index table to the blockchain for on-chain storage; the encrypted file is stored off-chain in the distributed storage nodes of the DSSP according to the divided shares;
[0172] The blockchain calculates the data of each column of the Bloom filter index table through consensus, obtains the message authentication code MAC, and stores it on the blockchain;
[0173] Data query phase:
[0174] The blockchain node on the DSSP side obtains the FSS key share sent by the data user terminal;
[0175] Each blockchain node uses its own stored Bloom filter index table and the obtained FSS key share to calculate the function share corresponding to the query target and return it to the data user terminal.
[0176] It should be noted that the steps performed by the DSSP end in this embodiment are the same as those in the embodiment, and will not be repeated in this embodiment.
[0177] Example 5
[0178] Based on Example 1, this embodiment provides a privacy information retrieval system based on blockchain and function secret sharing, including a data owner terminal, a data user terminal, and a DSSP terminal;
[0179] A data owner terminal is configured to execute the privacy information retrieval method based on blockchain and function secret sharing described in Example 2;
[0180] A data user terminal is configured to execute the privacy information retrieval method based on blockchain and function secret sharing described in Example 3;
[0181] The DSSP end is configured to execute the privacy information retrieval method based on blockchain and function secret sharing described in Example 4.
[0182] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
[0183] Although the above describes the specific embodiments of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without any creative work are still within the scope of protection of the present invention.
Claims
1. A privacy information retrieval method based on blockchain and function secret sharing, including data uploading and data query, is characterized in that: The data storage in the data upload phase includes the following steps: Encrypt data documents and extract keywords; Perform trapdoor calculation on the keywords, generate a Bloom filter-based mapping index between the keywords and documents based on the keyword trapdoor, and obtain a Bloom filter index table; After inserting the keyword trapdoor for each document, a Bloom filter matrix is generated; The encrypted file and Bloom filter index table are uploaded to the DSSP. The DSSP transmits the encrypted file hash value and Bloom filter index table to the blockchain for on-chain storage. The encrypted file is stored off-chain in the distributed storage nodes of the DSSP according to the divided shares. The blockchain calculates the data of each column of the Bloom filter index table through consensus, obtains the message authentication code (MAC), and stores it on the blockchain. The data retrieval method in the data query phase includes the following steps: Split the keyword search trapdoor obtained based on the query request into multiple FSS key shares and send them to the blockchain node on the DSSP side respectively; Each blockchain node uses its own stored Bloom filter index table and the obtained FSS key share to calculate the function share corresponding to the query target; Compare the message authentication code of the function share with the message authentication code stored on the blockchain. If they are consistent, calculate the aggregated query result through the FSS decryption algorithm and obtain the encrypted file stored off-chain based on the query result; The keyword search trapdoor is split into multiple FSS key shares. Specifically, a distributed point function secret sharing distribution method is adopted to hide the keyword position index i in multiple FSS key shares, including the following steps: Use two-dimensional form to represent the keyword position index i , ; Based on the number of splits p, construct p×2 p-1 Random matrix, so that the target row of the keyword position index The corresponding random matrix Belongs to p×2 with an even number of columns set to 1 p-1 Random Matrix , the random matrix corresponding to the non-target rows A random matrix with an odd number of columns set to 1 ; Build Random sequence ; Build The length is A random vector of Multiply the random sequence by position on each column of the random matrix and then splice it to generate a pseudo-random share row; Concatenate the share rows at each position γ to construct the complete FSS key share of the current server node.
2. The privacy information retrieval method based on blockchain and function secret sharing according to claim 1, characterized in that: Constructing a Bloom filter index table based on keyword trapdoors includes the following steps: For each keyword of the extracted data document, a key of the secret key sk is used based on the pseudo-random generator Encrypt and generate keyword ciphertext; Use the set secure hash function H to calculate the hash value of the keyword ciphertext as the keyword trapdoor; For keyword trapdoors, each bloom filter is used Set the hash function to calculate the corresponding The keyword trapdoor is stored in each Bloom filter In the example, the constructed Bloom filter index table is obtained.
3. The method for private information retrieval based on blockchain and function secret sharing according to claim 2, characterized in that: For keyword trapdoors, use the corresponding Bloom filter The set hash function then calculates the hash value to obtain the hash value of each keyword trapdoor, and the position in the Bloom filter is obtained by taking the modulo of the length M of the Bloom filter.
4. The privacy information retrieval method based on blockchain and function secret sharing according to claim 1, characterized in that: Obtain keyword trapdoors through query requests. The specific process is as follows: The data user terminal sends a data query request including access permission to the data owner terminal; The data owner terminal generates a search trap for keywords that are permitted to be queried by the user according to the data query request content and by using a keyword trap calculation method.
5. The privacy information retrieval method based on blockchain and function secret sharing according to claim 1 is configured to be executed on the data owner's terminal, characterized in that: The steps include: The data owner's terminal encrypts the data document and extracts keywords; The data owner terminal performs trapdoor calculation on the keywords, generates a Bloom filter-based mapping index between the keywords and documents based on the keyword trapdoor, and obtains a Bloom filter index table; The data owner terminal uploads the encrypted file and Bloom filter index table to the DSSP terminal.
6. The privacy information retrieval method based on blockchain and function secret sharing according to claim 1 is configured to be executed on a data user terminal, characterized in that: The steps include: The data user terminal splits the keyword search trapdoor obtained based on the query request into multiple FSS key shares and sends them to the blockchain nodes on the DSSP side respectively; so that each blockchain node uses its own stored Bloom filter index table and the obtained FSS key shares to calculate the function share corresponding to the query target; The data user terminal obtains the function share corresponding to the query target, compares the MAC of the function share with the MAC stored on the blockchain, and if they are consistent, calculates the aggregated query result through the FSS decryption algorithm, and obtains the encrypted file stored off-chain based on the query result.
7. The privacy information retrieval method based on blockchain and function secret sharing according to claim 1 is configured to be executed on the DSSP side, characterized in that: The steps include: Data storage stage: The DSSP transmits the encrypted file hash value and Bloom filter index table to the blockchain for on-chain storage; the encrypted file is stored off-chain in the distributed storage nodes of the DSSP according to the divided shares; The blockchain calculates the data of each column of the Bloom filter index table through consensus, obtains the message authentication code MAC, and stores it on the blockchain; Data query phase: The blockchain node on the DSSP side obtains the FSS key share sent by the data user terminal; Each blockchain node uses its own stored Bloom filter index table and the obtained FSS key share to calculate the function share corresponding to the query target and return it to the data user terminal.
8. A privacy information retrieval system based on blockchain and function secret sharing, characterized by: Including data owner terminal, data user terminal and DSSP terminal; A data owner terminal, configured to execute the privacy information retrieval method based on blockchain and function secret sharing according to claim 5; A data user terminal, configured to execute the privacy information retrieval method based on blockchain and function secret sharing according to claim 6; The DSSP end is configured to execute the privacy information retrieval method based on blockchain and function secret sharing as described in claim 7.
Citation Information
Patent Citations
Dynamic searchable encryption method and device based on block chain
CN114048448A