A Fuzzy Privacy Information Retrieval Method with Access Control Permissions
Through the combination of BGV homomorphic encryption and Bloom filter, the problems of fuzzy matching and privacy leakage in existing privacy information retrieval are solved, and the combination of fuzzy query and database privacy protection is realized, ensuring the accuracy and privacy of the query.
Patent Information
- Application Number
- CN202411419730.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-10-12
AI Technical Summary
Existing privacy information retrieval methods cannot achieve fuzzy matching, and there is a risk of database privacy leakage, especially when users enter keywords or query scope is too wide.
Using a combination of BGV homomorphic encryption scheme and Bloom filter, encrypted query requests are generated through user permission levels and query keywords. The server uses tag privacy set interleaving technology to generate a virtual database and perform homomorphic multiplication calculation to ensure the query results. Privacy and precision.
It realizes the ability to fuzzy queries, can handle spelling errors and similar data queries, and at the same time limits the user's query scope and ensures the privacy of other data in the database.
Smart Images

Figure CN118965442B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information security technology, and in particular relates to a fuzzy privacy information retrieval method with access control authority. Background Art
[0002] With the development of Internet technology, data privacy has become particularly important to all parties. Among them, information retrieval is a very important part of daily life. As the amount of data increases, the amount of information that people need to protect also increases, which leads to the study of privacy information retrieval. Privacy information retrieval is a method that allows users to query data in the database of the server without letting the server know the content of the queried data.
[0003] In the existing technical solutions, in most practical cases, the data is stored in the database in the form of key-value pairs, such as contact lists and hospital patient records. Therefore, keyword privacy information retrieval is a more practical solution in the privacy information retrieval solution. The core idea of this solution is: use some existing technologies to map keywords to a table, the content of which can correspond to the index information of the data in the database, such as using cuckoo hash function, constant weight code, binary fuse filter and other technologies, and perform inner product between the mapped table and the query vector to obtain a vector, and perform homomorphic multiplication between the vector and the database to obtain the final result. This type of solution can only be used for exact matching, but not for fuzzy matching. The reality is that users may make spelling errors when typing keywords in queries, or there may be related keywords in the database. Secondly, a privacy-enhanced privacy information retrieval method was proposed in the paper "Privacy-enhanced attribute-based private information retrieval" published in Information Sciences in 2018. This paper makes a union of all attributes of the data in the database, namely keywords, and publishes them. Users select keywords from the union as the query attribute set, and generate corresponding query attribute sets for the query attribute set. ,Should Contains information about the attributes (keywords) in the query attribute set. The server receives After that, each piece of data and its attribute set are encrypted. The principle is to use Lagrange difference to retain the data that meets the query attribute set, and the result is returned to the user. The user can decrypt it to obtain the query content. However, this solution has the risk of leaking other data in the database. In other words, the user can select and concentrate all the attributes as the query attribute set, so that the user can query all the data in the database. For those data in the database that have different levels of importance, this situation is not conducive to the database.
[0004] In the prior art, privacy information retrieval schemes are divided into index privacy information retrieval and keyword privacy information retrieval under the computing security level, depending on whether the user knows the index of the data in the database. However, both of these situations are suitable for exact matching. If there is a situation where multiple related data are allowed to be obtained or the keyword is typed incorrectly, such as querying the relevant information of a content in the browser, this approach may lead to the privacy leakage of data in the database. Therefore, there is an urgent need for an effective solution that can realize fuzzy query and ensure database privacy. Summary of the invention
[0005] In view of the above problems, the present invention proposes a fuzzy privacy information retrieval method with access control authority.
[0006] The technical solution adopted by the present invention is:
[0007] A fuzzy privacy information retrieval method with access control authority includes the following steps:
[0008] S1. Generate the required public parameters based on the encryption scheme adopted by the user and the server;
[0009] S2. The user obtains his or her own permission level from the server;
[0010] S3. The user generates a query request based on the query keyword, public parameters and his / her own authority level and sends it to the server;
[0011] S4. The server obtains a restricted encrypted answer based on the received query request by intersecting the privacy sets and feeds it back to the user.
[0012] S5. The user decrypts the received encrypted answer to obtain the search information.
[0013] Furthermore, the specific method of step S1 is:
[0014] The method uses the initialization algorithm of the BGV homomorphic encryption scheme based on the input security parameters Get the required public parameters ,At the same time, the data in the database is packaged as a polynomial of BGV plaintext.
[0015] Furthermore, the specific method of step S2 is:
[0016] The user sends his or her ID to the server for verification and to obtain permissions. If the verification is successful, the server returns the permissions corresponding to the user ID, otherwise an error message is returned.
[0017] Furthermore, the specific method of step S3 is:
[0018] The user converts the query keyword into a uni-gram set, and then converts the uni-gram set into a 160-bit vector. The length of the vector is because the set is composed of 26×5 letters and 30 numbers. The uni-gram vector is mapped to In a Bloom filter of 1 bit, the Bloom filter is equivalent to a Finally, the Bloom filter is encrypted using the public parameters of the encryption scheme to obtain an encrypted query. The encrypted query and the user's own permission level constitute the final query request.
[0019] Furthermore, the specific method of step S4 is:
[0020] The server extracts the user authority level from the query request, performs label privacy set intersection on the user authority level and the authority level of the data in the database, and obtains the corresponding query virtual database;
[0021] Convert all keywords in the query virtual database into uni-gram vectors, and map the uni-gram vectors to Bloom filters in the same way as in the encrypted query generation phase, thus forming an index table;
[0022] Calculate the inner product of the encrypted query and each Bloom filter in the index table to obtain an inner product vector;
[0023] The homomorphic comparison algorithm is used to calculate the comparison value of each dimension in the inner product vector with the set threshold value. If it is greater than or equal to the threshold value, it is a dense "1", otherwise it is a dense "0", thereby obtaining a dense query vector;
[0024] Calculate the homomorphic multiplication of the secret query vector and the query virtual database to get the final encrypted answer.
[0025] Beneficial effects of the present invention: General privacy information retrieval methods achieve precise matching, but in actual situations, there will be some similar data in the database, and the user only knows some keywords, but is not clear about the index address of the data in the database, which makes the general privacy information retrieval method not practical. The method of the present invention can not only solve the above problem, but also limit the user's query scope, thus ensuring the privacy of other data in the database. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a schematic diagram of the overall logic of the method of the present invention.
[0027] Figure 2 It is a schematic diagram of the process of the present invention.
[0028] Figure 3Schematic diagram of the implementation process from query keyword to Bloom filter. DETAILED DESCRIPTION
[0029] The technical solution of the present invention is described in detail below with reference to the accompanying drawings.
[0030] like Figure 1 As shown, it is an overall logic diagram of the present invention. The method of the present invention can be generally divided into an initialization phase and a query response phase.
[0031] During the initialization phase: input is a safety parameter , the output is the public parameters required by the method Specifically, the method selects appropriate security parameters In order to meet the security requirements of the method, the present invention adopts BGV homomorphic encryption technology Algorithm generation parameters ,in is the coefficient modulus of the ciphertext polynomial, is the degree of the polynomial, Both represent dimensions, but they represent different lengths. It is used to select the random distribution of noise. At the same time, in this stage, the data in the database needs to be packed into polynomials, because the calculation of BGV homomorphic encryption is based on polynomials.
[0032] The query response phase is divided into the user request permission level phase, the user query generation phase, the server answer generation phase and the user parsing answer phase. Specifically:
[0033] User request permission level stage: The user sends a permission level application to the server, which contains the user's identity , the server returns the permission level Specifically, the user sends his or her identity to the server. The server verifies the identifier and returns the permission level if the verification is successful. To the user, otherwise it will return an illegal prompt. The permission level can be simply divided into three types: low, medium, and high. If more levels are required, they can be divided according to the actual situation.
[0034] User query generation phase: The user end processes the user's query keyword set , generate encrypted query and compare it with the permission level Specifically, first, the user needs to send the query keyword set Each keyword in the query keyword set is converted into a uni-gram set, which needs to be represented by a 160-bit vector, which contains 26*5 letters and 30 numbers. The conversion process from keywords in the query keyword set to uni-gram vectors is as follows Figure 3 As shown: First, split a keyword into individual letters, and then connect each letter with the number of times the letter appears in the keyword. For example, the keyword " ”, splitting it into , and then transform this uni-gram set into a 160-bit uni-gram vector, which is a 0 / 1 vector, that is, if the element in the set exists in the vector, it is "1", otherwise it is "0". Then, each uni-gram vector is mapped to the Bloom filter using a local sensitive hash function, such as Figure 3 The three locality sensitive hash functions selected are , a Bloom filter is initialized to all 0s A fixed number of locality-sensitive hash functions are selected to calculate the hash function value of each uni-gram vector. Each hash function value corresponds to a position in the Bloom filter. The value of the corresponding position is modified to 1, thereby realizing a query keyword to the Bloom filter. Secondly, the Bloom filter is encrypted with the public key generated by the BGV homomorphic encryption technology to obtain an encrypted query. Finally, the encrypted query and permission levels Send to the server.
[0035] Server answer generation phase: The server receives the information sent by the user and calculates it to generate an encrypted answer Specifically, first, the server extracts the permission level from the user's sent information. , and the database The permission level of the data in the table is calculated by the intersection of the two through the label privacy set intersection technology, that is, the virtual database used to participate in the query calculation. Then, the keywords in the generated virtual database are converted into uni-gram vectors, and each uni-gram vector is mapped to the Bloom filter through the local sensitive hash function. Each piece of data corresponds to a Bloom filter, and all Bloom filters are packaged into plaintext polynomials in the BGV homomorphic encryption technology, and finally an index table is formed. . Second, calculate the encrypted query and index table The inner product result of , the inner product result Threshold value set by the method Use the homomorphic comparison algorithm to calculate the Boolean circuit and get the comparison result , is a dense 0 / 1 vector, that is, for the inner product result If each value in is greater than the threshold value , then compare the results The value of the corresponding position is "1" in the ciphertext state, otherwise it is "0" in the ciphertext state. Finally, calculate the comparison result Homomorphic multiplication with the virtual database yields an encrypted answer , and returns it to the user.
[0036] User parsing answer stage: The user responds to the encrypted answer received Decrypt it and get the final query result R. Specifically, the user uses the private key generated by BGV homomorphic encryption technology to encrypt the answer Decrypt and get the final query result R.
[0037] like Figure 2 As shown, it is a schematic diagram of the process of the present invention, and the present invention can be implemented in the following steps:
[0038] Step 1: Initialization phase, using BGV homomorphic encryption technology Parameters in the algorithm generation method, i.e. input security parameters , the algorithm randomly generates Modulus of bits and
[0039] ,
[0040] in They are all pseudo-random functions used to generate corresponding parameters.
[0041] The plaintext space of BGV homomorphic encryption technology is , so the data in the database needs to be packaged into BGV plain text. Store as a In matrix form, we have The length of each row of the matrix is , packing each line into A polynomial of the form
[0042]
[0043] Step 2: User permission level request stage, the user sends a message to the server to apply for permission level. If the user's identity is legal, the permission level will be obtained, otherwise an error message will be received. Specifically:
[0044] 1) The user sends a request to the server, which contains the user's identity .
[0045] 2) The server receives the request and identifies the user Verify and assign permission level if qualified , such as "low level", if the verification fails, an error prompt is returned.
[0046] 3) Users can perform query operations after receiving the assigned permission level. Otherwise, they cannot proceed to the next stage if they receive an error message.
[0047] Step 3: User query generation stage. In this stage, the user converts the query keyword into a uni-gram set and uses a vector to represent a keyword in order to map the keyword to the Bloom filter. The Bloom filter is then encrypted with the public key generated by the BGV homomorphic encryption technology. This ensures that the server does not know the content of the user's query when generating the answer. Finally, the user sends the encrypted query and permission level to the server. This stage enables the generation of user queries. Specifically, it includes:
[0048] 1) Convert keywords into uni-gram sets and their vector representations, such as the keyword " The uni-gram set of " is , the length of its uni-gram vector is 160 bits, expressed as (1,0,0,…,1,…,0,1,0), that is, the position vector value of the element in the uni-gram set is 1, otherwise it is 0.
[0049] 2) Using the locality sensitive hash function family Mapping uni-gram vectors to Bloom filter Among them It means hash function value, Represents a collection of elements. is the number of hash functions, such as " ”, its uni-gram vector The hash values are , , the hash value corresponds to the position of the Bloom filter, and the values of these positions in the Bloom filter are modified to 1, that is, .
[0050] 3) Common parameters in the initialization phase As BGV homomorphic encryption technology The input of the algorithm, which samples the vector , output the private key , and secondly, using public parameters and private key As BGV homomorphic encryption technology The input to the algorithm produces a matrix and a vector , and set ,set up is a A column matrix consisting of column vectors Right Connect Matrix Composition, output public key , then the public key And public parameters As BGV homomorphic encryption technology The input of the algorithm randomly selects a 0\1 vector , for Bloom filter Encryption, calculation , output encrypted query .
[0051] 4) The user sets the permission level and encrypted queries Send to the server.
[0052] Step 4: Server answer generation stage, this stage can realize the server's response to the user's query, that is, generate the corresponding answer, and at the same time ensure that the server does not know the specific content of the user's query. Specifically include:
[0053] 1) The server extracts the user's permission level from the information sent by the user , and use the label privacy set intersection technique to calculate the data range that the user can query, thus forming a new virtual database ,This database is only generated for the subsequent calculation of the query answer. For the next query user, the server will regenerate the virtual database for the query based on the user’s authority level.
[0054] 2) Virtual database All keywords in the data are converted into uni-gram vectors, and the uni-gram vectors are mapped to the Bloom filter in the same way as in the query generation phase, except that the Bloom filter does not need to be encrypted, thus forming an index table
[0055] .
[0056] 3) Compute encrypted queries With index table The inner product of each Bloom filter in is , the value of each inner product is less than The ciphertext value of all inner product values forms an inner product result , the inner product result is a dimensional vector.
[0057] 4) Calculate the inner product result using the homomorphic comparison algorithm Each dimension in the method has a threshold value set by The comparison value is obtained , the comparison result is a dense 0 / 1 vector, where if the inner product result is The value in is greater than or equal to the threshold value , it is a secret "1", otherwise it is a secret "0".
[0058] 5) Finally calculate and compare the results With Virtual Database Homomorphic multiplication of , we get the final encrypted answer .
[0059] Step 5: User parsing answer stage, in this stage the user receives the server's answer and uses the private key to decrypt the received encrypted answer , you can get the content you want to query.
[0060] The fuzzy privacy information retrieval method with access control authority of the present invention can realize the user's fuzzy query, that is, similar data can be queried when a keyword has a spelling error. At the same time, the method ensures the privacy of other data in the database through the label privacy set intersection technology while ensuring the user's fuzzy query.
Claims
1. A fuzzy privacy information retrieval method with access control authority, characterized in that: The following steps are involved: S1. Generate the required public parameters based on the encryption scheme adopted by the user and the server; the specific method is: The method uses BGV homomorphic encryption based on the input security parameters Get the required public parameters ,At the same time, the data in the database is packaged as a polynomial of BGV plaintext; S2. The user obtains his own permissions from the server; the specific method is: The user sends his or her ID to the server for verification and to obtain permissions. If the verification is successful, the server returns the permissions corresponding to the user ID, otherwise an error message is returned; S3. The user generates a query request based on the query keyword, public parameters and own permissions and sends it to the server. The specific method is: The user converts the query keyword into a uni-gram set, then converts the uni-gram set into a 160-bit uni-gram vector, and hashes the uni-gram vector to Finally, the Bloom filter is encrypted using the public parameters of the encryption scheme to obtain an encrypted query. The encrypted query and the user's own permissions constitute the final query request. S4. The server obtains a restricted encrypted answer based on the received query request by means of privacy intersection and feeds it back to the user; The specific method is: The server extracts the user authority level from the query request, performs label privacy set intersection on the user authority level and the authority level of the data in the database, and obtains the corresponding query virtual database; Convert all keywords in the query virtual database into uni-gram vectors, and hash the uni-gram vectors to the Bloom filter in the same way as the encrypted query generation phase to form an index table; Calculate the inner product of the encrypted query and each Bloom filter in the index table, and obtain a query vector based on all inner product results; The comparison value of each dimension in the query vector and the set threshold value is calculated using the homomorphic comparison algorithm. If it is greater than or equal to the threshold value, it is a dense "1", otherwise it is a dense "0", thereby obtaining a dense vector; Calculate the homomorphic multiplication of the secret state vector and the query virtual database to obtain the final encrypted answer; S5. The user decrypts the received encrypted answer to obtain the search information.
