Anti-semi-honest opponent double-server keyword private information retrieval method based on function secret sharing, electronic equipment and medium
Through the dual-server keyword private information retrieval method based on secret sharing of functions, the problem that the existing technology is difficult to protect user requested content and access mode under the semi-honest rival model is solved, and efficient privacy protection and low traffic query performance are achieved.
Patent Information
- Application Number
- CN202411615328.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-07
AI Technical Summary
The existing private information retrieval schemes have shortcomings in protecting user requested content and access modes. Especially under the semi-honest enemy model, it is difficult to effectively resist the attacks of malicious opponents, resulting in the leakage of private information.
The dual-server keyword private information retrieval method based on secret sharing of functions is adopted. Through the pre-set hash function group and random query key, the client and the dual-server conduct private set interchange to ensure that the semi-honest opponent cannot obtain the information of the query entry and index.
Effectively protect user requested content and access mode, prevent private information leakage caused by access mode, reduce communication volume and computing complexity, and is suitable for application scenarios where large data volume and communication bandwidth are limited.
Smart Images

Figure CN119577827A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information security technology, and in particular relates to a dual-server keyword private information retrieval method based on function secret sharing, electronic equipment, and medium. Background Art
[0002] In the era of big data, users have a growing need to access files securely and privately over the Internet. However, it is difficult for content providers to guarantee the privacy and security of user requests, leading to a crisis of trust. This problem can be solved by private information retrieval protocols, which are important cryptographic primitives that allow clients to securely retrieve data objects from remote databases without revealing specific query indexes to the server that controls the database. Private information retrieval protocols have a wide range of application scenarios, including private communications, sensitive information database queries, etc.
[0003] Keyword private information retrieval can be considered a variant of private information retrieval. The query that the user has is no longer a specific index in the database, but a keyword. The user needs to construct a query based on the keyword to obtain the data item corresponding to the keyword in the database. The processing of keywords is the main difference between the keyword private information retrieval protocol and the ordinary private information retrieval protocol.
[0004] To date, most private information retrieval schemes are based on cryptographic complexity assumptions, which introduce large amounts of computation and complexity and are not feasible for deployment. Recent studies have introduced the probability of preprocessing in private information retrieval protocols to reduce online overhead on the server side; however, the preprocessing process can also exacerbate data leakage on the server side, making it possible for the client to obtain data items other than the query target.
[0005] In the semi-honest adversary model, the adversary will faithfully follow and execute the process of the communication protocol, will not tamper with the sent messages when interacting with other nodes, but will try to infer more information based on the received messages. Existing research mainly designs privacy protection schemes based on the semi-honest adversary assumption. In cryptographic protocols such as secure multi-party computing, resisting malicious adversaries often requires a lot of additional computing and communication overhead, making it difficult to ensure the efficiency and practicality of the scheme.
[0006] In view of the shortcomings of the prior art, the present invention provides a dual-server keyword private information retrieval method, electronic device and medium based on function secret sharing and resistant to semi-honest adversaries.
[0007] In a first aspect, an embodiment of the present invention provides a dual-server keyword private information retrieval method based on function secret sharing and resistant to semi-honest adversaries, which acts on a client and includes:
[0008] When the client queries the entry of a keyword in the database, based on the preset hash function group h 1 ,…,h i ,…,h p Get the corresponding index I 1 ,…,I i ,…,I p ;
[0009] Randomly initiate a query for each index; when the client queries the i-th index I i When a query is initiated, a pair of query keys is generated are transmitted to the first server and the second server respectively; at the same time, a mask m is generated i , and the mask m i transmitting to a first server;
[0010] The client performs a privacy set intersection with the second server. If the keyword exists in the database, the query result received by the client is If the keyword does not exist in the database, the query result received by the client is empty;
[0011] Among them, the first query result The first server is based on the first query key Traverse the hash table to get the query results Reuse the mask m i The mask m after shuffling j For query results Obtained after covering up;
[0012] Among them, a semi-honest adversary on any server cannot obtain information about the client's query items and indexes based on the information it receives. A semi-honest adversary on the client cannot obtain information about other items in the database on the server based on the information it receives.
[0013] Second query result The second server uses the second query key Obtained by traversing the hash table.
[0014] In a second aspect, an embodiment of the present invention provides a dual-server keyword private information retrieval method based on function secret sharing, which acts on a first server, and the method includes:
[0015] Receive the first query key generated by the client and mask m i ;
[0016] According to the first query key Traverse the hash table to get the query results Reuse the mask m i The mask m after shuffling j For query results Mask to get the first query result
[0017] In a third aspect, an embodiment of the present invention provides a dual-server keyword private information retrieval method based on function secret sharing, which acts on the second server, and the method includes:
[0018] Receiving a first query result generated by a first server Among them, the first query result The first server is based on the first query key Traverse the hash table to get the query results Reuse the mask m i The mask m after shuffling j For query results The first query key is obtained after masking and mask m i It is generated by the client;
[0019] Receive the second query key generated by the client And according to the second query key Traverse the hash table to get the second query result
[0020] Intersect the private set with the client. If the keyword exists in the database, the query result will be Sent to the client; if the keyword does not exist in the database, set the query result to empty before sending it to the client.
[0021] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-mentioned dual-server keyword private information retrieval method based on function secret sharing.
[0022] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned dual-server keyword private information retrieval method based on function secret sharing.
[0023] In a sixth aspect, an embodiment of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the above-mentioned dual-server keyword private information retrieval method based on function secret sharing.
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] The present invention provides a dual-server keyword private information retrieval method based on function secret sharing. While protecting the user's request content, the present invention can also protect the user's access mode to the database, shield the user's real access mode from possible malicious databases, thereby preventing the leakage of private information caused by the access mode;
[0026] The present invention does not involve complex public key cryptographic calculations in the preprocessing and query processes, and most cryptographic primitives can be accelerated by hardware;
[0027] The communication volume of the present invention is low during the execution process, and the query key size during the query process is O(λlog 2 N), where λ is a security parameter; the communication volume in other processes is independent of the number of database entries, because this invention is more suitable for applications with large amounts of data and limited communication bandwidth;
[0028] The present invention adopts the cuckoo hash algorithm to convert the query using keywords into the query using indexes, thereby simplifying the situation of processing different types of query keywords, reducing the calculation complexity of the algorithm, and improving the query performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0030] Figure 1 A schematic diagram of a dual-server keyword private information retrieval method based on function secret sharing provided by an embodiment of the present invention;
[0031] Figure 2 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.
[0033] It should be noted that, in the absence of conflict, the features in the following embodiments and implementations may be combined with each other.
[0034] like Figure 1 As shown, an embodiment of the present invention provides a dual-server keyword private information retrieval method based on function secret sharing, and the method includes the following steps:
[0035] Step S1: When the client queries the entry of keyword x in the database BD, based on the preset hash function group h 1 ,…,h i ,…,h p Calculate the corresponding index I 1 ,…,I i ,…,I p ; Where p is the number of elements in the hash function group.
[0036] Specifically, the database DB stores N data items, each of which is a key-value pair. The first server and the second server each have a backup of the same database DB. The client, the first server, and the second server first agree on a set of hash functions h to be used. 1 ,…,h p Then, the first server and the second server calculate the appropriate cuckoo hash table size M according to the set hash failure rate, the number of hash function group elements and the database size.
[0037] The first server and the second server use the same random number seed to construct a pseudo-random number generator, and insert all data items in the database into the cuckoo hash table accordingly; each time a data item is inserted, the server randomly selects a hash function h i Use to get the corresponding index I of the data item i , and insert the data item into the index position; if other data items already exist at this position, then re-execute the insertion process of the replaced data item; this loop is executed until all data items have been inserted into the hash table or a certain insertion exceeds the maximum number of retries.
[0038] When the number of elements in the hash function group is p=3, the expression of the security parameter λ of the hash table is as follows:
[0039]
[0040] Where M is the size of the hash table and N is the size of the database.
[0041] Step S2: The client initiates a query for each index; when the client is the i-th index I i When a query is initiated, a pair of query keys is generated are transmitted to the first server and the second server respectively. At the same time, the client is the i-th index I i The query generates a mask mi , and the mask m i Transmitted to the first server, then the first server masks m i The order of the scrambled codes is shuffled, and the shuffled mask is recorded as m j .
[0042] Among them, the client is I 1 ,…,I p The order in which the indexes generate queries should be randomized.
[0043] Step S3: The first server queries the first key Use the evaluation function of the function secret sharing to traverse the hash table, calculate the secret sharing share vector corresponding to each position in the hash table, and perform the inner product of the secret sharing share vector and the hash table to obtain the key Corresponding query results Then use the shuffled mask m j For query results After masking, it is transmitted to the second server.
[0044] It should be noted that in order to prevent the client from obtaining additional parts other than the correct query result, that is, data items corresponding to other possible indexes. The first server scrambles the p masks and then masks the query result of the first server, and then sends the masked first query result to the client. The query keyword is transmitted to the second server for subsequent calculation, so that the client cannot know the specific index of its query keyword in the hash table.
[0045] Step S4: The second server queries the second key Use the evaluation function of the function secret sharing to traverse the hash table, calculate the secret sharing share vector corresponding to each position in the hash table, and perform the inner product of the secret sharing share vector and the hash table to obtain the key Corresponding query results And the query results masked by the shuffled order Merge to get the query results
[0046] Step S5: The second server performs a privacy set intersection protocol with the client. If the query keyword x exists in the database BD, the client obtains the query result. If no such entry exists, the client gets an empty query result; in both cases, the second server gets no output;
[0047] It should be noted that when there are query results, the data item corresponding to the query keyword must be masked by one of the masks. Therefore, the set of p query results held by the second server must have an intersection with the set of query keywords masked by p masks. After that, the client executes a privacy set intersection protocol with the second server, and the client can obtain the query results. If the query keyword does not exist in the database, the two sets will not have an intersection, so the client can also know the correct result.
[0048] like Figure 2 As shown, an embodiment of the present application provides an electronic device, which includes a memory 101 for storing one or more programs and a processor 102. When the one or more programs are executed by the processor 102, any method in the first aspect described above is implemented.
[0049] The memory 101, the processor 102 and the communication interface 103 are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The memory 101 can be used to store software programs and modules, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 101. The communication interface 103 can be used to communicate signaling or data with other node devices.
[0050] Among them, the memory 101 can be, but is not limited to, a random access memory 101 (Random Access Memory, RAM), a read only memory 101 (Read Only Memory, ROM), a programmable read-only memory 101 (Programmable Read-Only Memory, PROM), an erasable read-only memory 101 (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable read-only memory 101 (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
[0051] The processor 102 may be an integrated circuit chip with signal processing capability. The processor 102 may be a general-purpose processor 102, including a central processing unit 102 (CPU), a network processor 102 (NP), etc.; it may also be a digital signal processor 102 (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0052] In the embodiments provided in the present application, it should be understood that the disclosed method and system can also be implemented in other ways. The method and system embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the method and system, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0053] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0054] On the other hand, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by the processor 102, a method as in any one of the first aspects described above is implemented. If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory 101 (ROM, Read-Only Memory), a random access memory 101 (RAM, RandomAccess Memory), a disk or an optical disk.
[0055] Those skilled in the art will readily appreciate other embodiments of the present application after considering the description and practicing the contents disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application. The description and examples are intended to be exemplary only.
[0056] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A dual-server keyword private information retrieval method based on function secret sharing and resistant to semi-honest adversaries, characterized in that: Acting on the client, the method includes: When the client queries the entry of a keyword in the database, based on the preset hash function group h1,…,h i ,…,h p Get the corresponding index I1,…,I i ,…,I p ; Randomly initiate a query for each index; when the client queries the i-th index I i When a query is initiated, a pair of query keys is generated are transmitted to the first server and the second server respectively; at the same time, a mask m is generated i , and the mask m i transmitting to a first server; The client performs a privacy set intersection with the second server. If the keyword exists in the database, the query result received by the client is If the keyword does not exist in the database, the query result received by the client is empty; Among them, the first query result The first server uses the first query key Traverse the hash table to get the query results Reuse the mask m i The mask m after shuffling j For query results Obtained after covering up; Second query result The second server uses the second query key Obtained by traversing the hash table.
2. According to claim 1, a dual-server keyword private information retrieval method based on function secret sharing and resistant to semi-honest adversaries is characterized in that: The hash table is generated by sharing a pseudo-random sequence according to a hash function group.
3. A dual-server keyword private information retrieval method based on function secret sharing against semi-honest adversaries according to claim 1 or 2, characterized in that: When the number of elements in the hash function group is p=3, the expression of the security parameter λ of the hash table is as follows: Where M is the size of the hash table and N is the size of the database.
4. A dual-server keyword private information retrieval method based on function secret sharing and resistant to semi-honest adversaries according to claim 1, characterized in that: The first server queries the first key Traverse the hash table to get the query results The process includes: Use the first lookup key at each position in the hash table As the evaluation function of the secret sharing algorithm of the input calculation function, the output result is obtained to form the result vector of the output function secret sharing, and the inner product of the result vector and the hash table is performed to obtain the query result corresponding to the first query key 5. The dual-server keyword private information retrieval method based on function secret sharing and resistant to semi-honest adversaries according to claim 1 is characterized in that: The second server queries the second key The second query result obtained by traversing the hash table The process includes: Use the second lookup key at each position in the hash table As the evaluation function of the input calculation function secret sharing algorithm, the output result is the result vector of the output function secret sharing, the result vector is inner-producted with the hash table to obtain the query result corresponding to the second query key 6. A dual-server keyword private information retrieval method based on function secret sharing and resistant to semi-honest adversaries, characterized in that: Acting on a first server, the method comprises: Receive the first query key generated by the client and mask m i ; According to the first query key Traverse the hash table to get the query results Reuse the mask m i The mask m after shuffling j For query results Mask to get the first query result 7. A dual-server keyword private information retrieval method based on function secret sharing and resistant to semi-honest adversaries, characterized in that: Acting on the second server, the method comprises: Receiving a first query result generated by a first server Among them, the first query result The first server uses the first query key Traverse the hash table to get the query results Reuse the mask m i The mask m after shuffling j For query results The first query key is obtained after masking and mask m i It is generated by the client; Receive the second query key generated by the client And according to the second query key Traverse the hash table to get the second query result Intersect the private set with the client. If the keyword exists in the database, the query result will be Sent to the client; if the keyword does not exist in the database, set the query result to empty before sending it to the client.
8. An electronic device, comprising a memory and a processor, characterized in that: The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the dual-server keyword private information retrieval method based on function secret sharing and resistant to semi-honest adversaries as described in any one of claims 1-7 above.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the dual-server keyword private information retrieval method based on function secret sharing and resistant to semi-honest adversaries as described in any one of claims 1 to 7 is implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the dual-server keyword private information retrieval method based on function secret sharing and resistant to semi-honest adversaries as described in any one of claims 1-7 is implemented.