A method and system for efficient retrieval of private information
By converting multiple multiplications in fully homomorphic encryption into a single matrix operation, fitting a polynomial function, and generating a ciphertext coefficient vector, the inefficiency problem in existing technologies is solved, achieving efficient and secure private information retrieval and supporting independent queries by multiple users.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
- Filing Date
- 2022-09-13
- Publication Date
- 2026-05-08
AI Technical Summary
Existing private information retrieval schemes based on fully homomorphic encryption are inefficient when performing multiple multiplication operations and cannot effectively protect user information from being leaked.
By fitting a polynomial function and converting multiple multiplications of the ciphertext into a single matrix operation, homomorphic encryption technology is used to generate ciphertext coefficient vectors and query key vectors, thereby achieving a single matrix operation to improve efficiency while protecting private information from leakage.
It significantly improves the efficiency of private information retrieval and ensures that query results and user information are not known to the server, supporting independent queries by multiple users without increasing computational costs.
Smart Images

Figure CN115642999B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to computer technology, and more particularly to a method and system for retrieving private information. Background Technology
[0002] With the application and development of computer technology in various fields, privacy computing, which enables data to be available but not visible, is becoming increasingly important in protecting data privacy, especially in confidential fields such as healthcare, military, and financial services.
[0003] Private information retrieval (PIR) is a crucial issue in privacy computing. The technical challenge of PIR is how to complete a query without disclosing the user's private information when the user submits a query to the database. This disclosing includes preventing the information from being shared with third parties and with the server.
[0004] In existing technologies, there are several known solutions for retrieving private information. For example, private information retrieval is based on fully homomorphic encryption. However, private information retrieval based on fully homomorphic encryption requires multiple multiplication operations, which significantly reduces the efficiency of private information retrieval.
[0005] Therefore, we seek a new private information retrieval scheme that can significantly improve the efficiency of private information retrieval while protecting private information from being leaked. Summary of the Invention
[0006] One of the objectives of this invention is to provide a method for efficient retrieval of private information. This method transforms multiple multiplications of encrypted text into a single matrix operation during private information retrieval, thereby significantly improving information retrieval efficiency while protecting private information from leakage.
[0007] Based on the above-mentioned objective, this invention proposes a method for efficient retrieval of private information, comprising the following steps:
[0008] Based on the data stored on the server, a polynomial function is fitted, where each data point includes a query key and a private information value. The function takes the query key as input and outputs the private information value corresponding to the input query key.
[0009] The coefficients of each term in the function are combined into a vector, which is then used as the coefficient vector.
[0010] Generate a pair of private and public keys, and perform homomorphic encryption on the coefficient vector based on the public key to obtain the ciphertext coefficient vector;
[0011] When a encrypted query key vector sent by a user is received, a encrypted query result is calculated based on the encrypted query key vector and the encrypted coefficient vector; wherein, the encrypted query key vector is obtained by homomorphically encrypting the query key vector based on the authorization key sent by the server to the user; the query key vector is obtained based on the query key and the exponent information of the function;
[0012] The encrypted query result is sent to the user, who then uses a decryption key to decrypt the encrypted query result to obtain the plaintext result of the private information value corresponding to the query key.
[0013] In this invention, for n data entries stored in the server (each data entry includes a query key and a private information value corresponding to the query key), a polynomial function of highest degree n can be fitted, which can be expressed as f(x) = a n x n +a n-1 x n-1 +…+a1x+a0. From this, we can see that the function contains coefficient information a. n a n-1 ..., a1, a0 and the frequency information n, n-1, ..., 1, 0.
[0014] Based on the above coefficient information, a coefficient vector X can be obtained, and based on the above exponent information, a query key vector K can be obtained. Unlike existing fully homomorphic encryption technologies, this invention uses a server-generated public key to homomorphically encrypt the coefficient vector X to obtain the ciphertext coefficient vector X. c And the ciphertext query key vector K obtained based on the query key vector K c and ciphertext coefficient vector X c Calculate the ciphertext query result V c =K c ×X c This transforms the multiple multiplication operations of fully homomorphic encryption into a single matrix operation, significantly improving computational efficiency.
[0015] Furthermore, in some implementations, the authorization key is obtained based on the following steps:
[0016] Users send their identity information to the server to register;
[0017] The server randomly generates pairs of invertible matrices;
[0018] The server generates an authorization key based on the invertible matrix pair and the private key, and sends the authorization key to the user.
[0019] Furthermore, in some implementations, the randomly generated invertible matrix pair by the server can be represented as... I represents the identity matrix;
[0020] The authorization key SK is generated based on this invertible matrix pair and the private key SK. u It can be represented as
[0021]
[0022] The authorization key is sent to the user by the server for use in subsequent steps.
[0023] Furthermore, in some embodiments, the decryption key is generated based on a generated random matrix and a randomly generated invertible matrix pair.
[0024] Furthermore, in some implementations, the generated random matrices can be represented as T′ and A′; the randomly generated invertible matrix pair can be represented as P′. s ·P′ m =I, where I represents the identity matrix; then the generated decryption key S K′ It can be represented as S K′ = [I,T′]×P′ s .
[0025] Furthermore, in some embodiments, the ciphertext query key vector is obtained based on the following steps:
[0026] Randomly generate pairs of invertible matrices;
[0027] Generate a random matrix;
[0028] Based on the invertible matrix pair, the random matrix, the query key vector, and the authorization key, a ciphertext query key vector is generated.
[0029] Furthermore, in some implementations, the generated random matrices can be represented as T′ and A′; the randomly generated invertible matrix pair can be represented as P′. s ·P′ m =I, where I represents the identity matrix; then the ciphertext query key vector K c It can be represented as Where K represents the query key vector, SK u This represents the authorization key.
[0030] Furthermore, in some implementations, when a single user wishes to query multiple pieces of private information at once, i.e., when batch processing is desired, the query key vector consists of the frequency information of the function and multiple query keys, such as k1, k2, ..., k m The query key vector matrix is constructed.
[0031] Furthermore, in some implementations, the query key vector matrix can be represented as
[0032]
[0033] Furthermore, in some implementations, the function is obtained by least squares fitting.
[0034] Of course, in other implementations, the function can also be obtained in other ways known to those skilled in the art, such as interpolation or similar methods.
[0035] Another objective of this invention is to provide a system for efficient retrieval of private information. When using this system to retrieve private information, multiple multiplication calculations of encrypted text can be converted into a single matrix operation, thereby significantly improving information retrieval efficiency while protecting private information from leakage.
[0036] To achieve the above objectives, the present invention also provides a system for efficient retrieval of private information, comprising a server and a user-end processing module for data communication with the server, wherein:
[0037] The server fits a polynomial function based on the data stored within it, where each data item includes a query key and a private information value. The function takes the query key as input and outputs the value corresponding to the input query key. The coefficients of each term in the function are combined into a vector as a coefficient vector. The server generates pairs of private and public keys and performs homomorphic encryption on the coefficient vector based on the public key to obtain a ciphertext coefficient vector.
[0038] The user-side processing module obtains a query key vector based on the query key and the number of times the function is sent by the server; the user-side processing module also performs homomorphic encryption on the query key vector based on the authorization key sent by the server to obtain a ciphertext query key vector, and sends it to the server.
[0039] When the server receives the encrypted query key vector sent by the user terminal processing module, it calculates the encrypted query result based on the encrypted query key vector and the encrypted coefficient vector, and sends the encrypted query result to the user terminal processing module.
[0040] The user-side processing module uses a decryption key to decrypt the encrypted query result to obtain the plaintext result of the private information value corresponding to the query key.
[0041] Furthermore, in some embodiments, when the user terminal processing module sends user identity information to the server for registration, the server randomly generates an invertible matrix pair, generates an authorization key based on the invertible matrix pair and the private key, and sends the authorization key to the user terminal processing module.
[0042] Furthermore, in some implementations, the randomly generated invertible matrix pair by the server can be represented as... I represents the identity matrix; then the authorization key SK is generated based on this invertible matrix and the private key SK. u It can be represented as
[0043] Furthermore, in some embodiments, the user-end processing module randomly generates invertible matrix pairs and generates a random matrix, and then generates the decryption key based on the invertible matrix pairs and the random matrix.
[0044] Furthermore, in some implementations, the random matrices generated by the user-side processing module can be represented as T′ and A′; the pair of invertible matrices randomly generated by the user-side processing module can be represented as P′. s ·P′ m =I, where I represents the identity matrix; then the decryption key S generated by the user-side processing module K′ It can be represented as S K′ = [I,T′]×P′ s .
[0045] Furthermore, in some embodiments, the user-end processing module randomly generates an invertible matrix pair and a random matrix, and then generates a ciphertext query key vector based on the invertible matrix pair, the random matrix, the query key vector, and the authorization key.
[0046] Furthermore, in some embodiments, the random matrices generated by the user-side processing module can be represented as T′ and A′; the pair of invertible matrices randomly generated by the user-side processing module can be represented as P′. s ·P′ m =I, where I represents the identity matrix; then the ciphertext query key vector K c It can be represented as Where K represents the query key vector, SK u This represents the authorization key.
[0047] The system described in this invention can not only perform single-user, single-record queries, but in some embodiments, it can also perform batch queries, allowing the same user to simultaneously query multiple pieces of private information. In this case, the user-side processing module is based on multiple query keys, such as k1, k2, ..., k mThe query key vector matrix is constructed using the function's exponent information, and is used as the query key vector.
[0048] Furthermore, in some embodiments, the above-mentioned query key vector matrix can be represented as follows:
[0049]
[0050] Furthermore, in some embodiments, the server uses the least squares method to fit the function.
[0051] Of course, in other embodiments, the server may also be obtained in other ways known to those skilled in the art, such as interpolation or similar methods, to fit the function.
[0052] Another object of the present invention is to provide a server for efficient retrieval of private information.
[0053] To achieve the above objectives, the present invention also provides a server for efficient retrieval of private information, which is configured to perform the following steps:
[0054] Based on the data stored on the server, a polynomial function is fitted, where each data point includes a query key and a private information value. The function takes the query key as input and outputs the private information value corresponding to the input query key.
[0055] The coefficients of each term in the function are combined into a vector, which is then used as the coefficient vector.
[0056] Generate a pair of private and public keys, and perform homomorphic encryption on the coefficient vector based on the public key to obtain the ciphertext coefficient vector;
[0057] The ciphertext query result is calculated based on the ciphertext coefficient vector and the received ciphertext query key vector, and then the ciphertext query result is sent out. The ciphertext query key vector is generated by homomorphically encrypting the query key vector using an authorization key generated by the server. The query key vector is obtained based on the query key and the exponent information of the function.
[0058] Furthermore, in some implementations, when the server receives user identity information sent from an external source, it randomly generates an invertible matrix pair, generates the authorization key based on the invertible matrix pair and the private key, and sends the authorization key out.
[0059] Furthermore, in some embodiments, the invertible matrix pair randomly generated by the server can be represented as... I represents the identity matrix; then the authorization key SK is generated based on this invertible matrix and the private key SK. u It can be represented as
[0060] Furthermore, in some embodiments, the server uses the least squares method to fit the function.
[0061] Of course, in other embodiments, the server may also be obtained in other ways known to those skilled in the art, such as interpolation or similar methods, to fit a polynomial of the highest degree n.
[0062] Another objective of this invention is to provide a client processing module for efficient retrieval of private information.
[0063] To achieve the above objectives, the present invention also provides a client-side processing module for efficient retrieval of private information, which is configured to perform the following steps:
[0064] The query key vector is obtained based on the query key and the degree information of the received polynomial function.
[0065] Based on the received authorization key, the query key vector is homomorphically encrypted to obtain a ciphertext query key vector, which is then sent out.
[0066] The encrypted query result obtained based on the encrypted query key vector is received, and the encrypted query result is decrypted using a decryption key to obtain the plaintext result of the private information value corresponding to the query key.
[0067] Furthermore, in some embodiments, the user-side processing module generates the decryption key based on the generated random matrix and the randomly generated invertible matrix pair.
[0068] Furthermore, in some embodiments, the random matrices generated by the user-side processing module can be represented as T′ and A′; the pair of invertible matrices randomly generated by the user-side processing module can be represented as P′. s ·P′ m =I, where I represents the identity matrix; then the decryption key S generated by the user-side processing module K′ It can be represented as S K′ = [I,T′]×P′ s .
[0069] Furthermore, in some embodiments, the user-end processing module randomly generates an invertible matrix pair and a random matrix, and then generates a ciphertext query key vector based on the invertible matrix pair, the random matrix, the query key vector, and the authorization key.
[0070] Furthermore, in some embodiments, the random matrices generated by the user-side processing module can be represented as T′ and A′; the pair of invertible matrices randomly generated by the user-side processing module can be represented as P′.s ·P′ m =I, where I represents the identity matrix; then the ciphertext query key vector K c It can be represented as Where K represents the query key vector, SK u This represents the authorization key.
[0071] In some embodiments, the user-side processing module of this invention can also allow a single user to simultaneously query multiple pieces of private information. In this case, the user-side processing module is based on multiple query keys, such as k1, k2, ..., k m The query key vector matrix is constructed using the function's exponent information, and is used as the query key vector.
[0072] Furthermore, in some embodiments, the above-mentioned query key vector matrix can be represented as follows:
[0073] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the steps performed by the server described in the present invention.
[0074] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the steps performed by the user-end processing module described in the present invention.
[0075] The present invention also provides a computing device including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it performs the steps performed by the server described in the present invention.
[0076] The present invention also provides a computing device including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it performs the steps performed by the user terminal processing module described in the present invention.
[0077] The method and system for efficient retrieval of private information described in this invention have the following beneficial effects:
[0078] First, this invention obtains a polynomial function by fitting stored data and extracts its degree and coefficient information to obtain a coefficient vector and a query key vector. Then, the coefficient vector is homomorphically encrypted to obtain a ciphertext coefficient vector. Based on the ciphertext coefficient vector and the ciphertext query key vector obtained from the query key vector, the ciphertext query result is calculated. This invention can convert multiple multiplication operations of fully homomorphic encryption into a single matrix operation, thereby significantly improving computational and retrieval efficiency.
[0079] Secondly, compared to traditional private information retrieval which can only protect the private information queried by users from being leaked to the server, this invention can not only protect the user's query from being leaked to the server, but also ensure that the query results are not leaked to the server, that is, the server does not know what the query results are.
[0080] Furthermore, since the server can communicate and connect with different users separately, and each user has their own authorization key and decryption key, this invention supports any number of users to perform covert queries on the same database, and the server's other data, the query data of different users, and the results are all independent of each other.
[0081] In some embodiments of the present invention, when a user has a need for batch querying, the present invention also supports a single user to perform multiple queries simultaneously, and the batch processing does not significantly increase the computational cost or reduce the efficiency of private information querying. Attached Figure Description
[0082] Figure 1 This is a flowchart illustrating one implementation of the method for efficient retrieval of private information described in this invention.
[0083] Figure 2 An exemplary diagram of the system architecture for efficient retrieval of private information according to one embodiment of the present invention is shown.
[0084] Figure 3 The steps of performing the system for efficient retrieval of private information according to the present invention are illustrated in one embodiment.
[0085] Figure 4 The steps performed by the server for efficient retrieval of private information according to the present invention are illustrated in one embodiment.
[0086] Figure 5 The steps performed by the client-side processing module for efficient retrieval of private information according to the present invention are illustrated in one embodiment. Detailed Implementation
[0087] The method, system, server, and client processing module for efficient retrieval of private information described in this invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. However, this detailed description does not constitute a limitation of this invention.
[0088] In homomorphic encryption, operations performed in the ciphertext are equivalent to their corresponding operations in the plaintext after decryption. That is, encrypted data can still be used for computations such as addition and multiplication. Therefore, the value obtained after decrypting the ciphertext computation is equivalent to the computation result of the corresponding plaintext data in plaintext. Homomorphic encryption can typically be expressed as follows:
[0089] Enc(f(m1,m2))=f(Enc(m1),Enc(m2))
[0090] Where m1 and m2 represent plaintext data, Enc(m1) and Enc(m2) represent ciphertext data, and f represents an operation.
[0091] This formula states that encrypting plaintext m1 and m2 before computation is equivalent to computation before encryption. This formula represents the fundamental property of homomorphic encryption: the computation is homomorphic, meaning the result of the computation in the ciphertext field is equal to the result of the computation in the plaintext field after decryption.
[0092] Homomorphic encryption, including fully homomorphic encryption, requires multiple multiplication operations during the encryption process, which can affect the efficiency of information retrieval.
[0093] This invention is also a scheme for efficient retrieval of private information based on the fundamental theory of homomorphic encryption. However, unlike fully homomorphic encryption, this invention innovatively proposes a method that can transform the multiple multiplications of fully homomorphic encryption into a single matrix operation, thereby greatly improving information retrieval efficiency.
[0094] In this invention, the server's database stores n data entries, each including a query key k and a corresponding private information value v. These n data entries can be represented as (k1, v1), (k2, v2), ..., (k... n v n Therefore, each data point can be viewed as a point on a two-dimensional plane. This invention fits the data of these n points into a curve, expressed as a polynomial function f(x), which satisfies: f(k i ) = v i , i∈[0,1,…,n], where k i Indicates the query key, v i Represents the query key k i The corresponding private information value.
[0095] In one embodiment of the present invention, a method for efficiently retrieving private information stored in a database is proposed. Figure 1 An exemplary flowchart of one implementation of the method for efficient retrieval of private information according to the present invention is shown.
[0096] like Figure 1 As shown, the method for efficient retrieval of private information includes the following steps:
[0097] 100: Based on n data points stored in the server, a polynomial function f(x) = a with a highest degree of n is obtained. n x n +a n-1 x n-1 +…+a1x+a0.
[0098] In a more specific embodiment, the polynomial can be obtained by fitting using the least squares method.
[0099] 200: Combine the coefficients of this function into a coefficient vector.
[0100] 300: Call the key generator KeyGen(λ) to generate a pair of private keys SK and public keys PK, and perform homomorphic encryption on the coefficient vector X based on the public key PK to obtain the ciphertext coefficient vector X. c =PK·(wX)+e.
[0101] The above steps are based on the following: the ciphertext and plaintext of vector homomorphic encryption satisfy the following condition: SK×c=wX+e, where e represents the error vector, w represents a large integer, and c and X represent the corresponding ciphertext and plaintext, respectively.
[0102] In a specific embodiment, the private key generated by calling the key generator KeyGe(λ) can be represented as SK = [I, T]P s The generated public key can be represented as Where P s and P m It is a pair of invertible matrices, P s ·P m =I, where I represents the identity matrix, A and T both represent random matrices, and λ represents the security parameter.
[0103] 400: Sends the exponent information [n, n-1, ..., 1, 0] of function f(x) to the user.
[0104] 500: When a user queries private information based on a query key, the query key vector K is calculated in plaintext according to the degree information of the function f(x), and then the authorization key SK sent to the user by the server is used. u The query key vector K is encrypted to generate a ciphertext query key vector K. c .
[0105] 600: Based on Ciphertext Query Key Vector K c and ciphertext coefficient vector Xc Calculate the ciphertext query result V c =K c ×X c and the encrypted query result V c Send to the user.
[0106] 700: The user uses the decryption key SK′ to query the ciphertext result V. c Decrypt To obtain the plaintext result v of the corresponding private information value, where w represents the large integer sent by the server to the user.
[0107] As can be seen from the above description, for the private information to be queried, the server only sends the function's exponent information to the user, but does not send the function's coefficient information to the user, so it will not leak any data from the database.
[0108] Furthermore, since the server performs the computation within the encrypted domain, it obviously cannot know the user's query key vector K. c What is it? Furthermore, since the query result is also encrypted, and the server does not possess the decryption key for this encrypted text, the server cannot know what the query result is. Therefore, this invention has strong privacy protection.
[0109] It should be noted that users who wish to query private information must first possess an authorization key. In some specific embodiments, the authorization key SK u It can be obtained based on the following steps:
[0110] Users send identity information to the server to register. This identity information may be a user ID, email address, phone number, or other identity information known in the field.
[0111] The server randomly generates a pair of invertible matrices. I represents the identity matrix;
[0112] The server generates an authorization key based on an invertible matrix pair and the private key SK.
[0113] The server will use the authorization key SK u Send to the user.
[0114] In this invention, the encrypted query key vector is generated on the user end. In some specific embodiments, the encrypted query key vector K... c Generated based on the following steps:
[0115] Randomly generate a pair of invertible matrices P′ s ·P′ m =I, where I represents the identity matrix;
[0116] Randomly generate matrices T′ and A′;
[0117] Based on query key vector K and authorization key SK u Generate ciphertext query key vector
[0118] The encrypted query key vector K c It is sent to the server to query private information.
[0119] In this invention, the decryption key is also generated on the user end. In some specific embodiments, the decryption key is generated based on the following steps:
[0120] Randomly generate invertible matrix pairs P′ s ·P′ m =I, where I represents the identity matrix;
[0121] Generate random matrices T′ and A′;
[0122] The decryption key S is generated based on invertible matrix pairs and random matrices. K′ :S K′ = [I, T′] × P′ s .
[0123] In another embodiment, the method described in this invention can also enable batch querying for users, that is, the same user can query multiple pieces of private information simultaneously. In this case, multiple pieces of private information can be obtained by querying based on the following steps:
[0124] The query key vector matrix K is calculated in plaintext based on multiple query keys and the exponent information [n, n-1, ..., 1, 0] of the function f(x):
[0125] Randomly generate a pair of invertible matrices P′ s ·P′ m =I, where I represents the identity matrix;
[0126] Randomly generate matrices T′ and A′;
[0127] Based on the query key vector matrix K and the authorization key SK u Generate ciphertext query key vector
[0128] The encrypted query key vector K c It is sent to the server to query private information.
[0129] In another embodiment of the present invention, a system for efficient retrieval of private information is proposed. Figure 2An exemplary schematic diagram of the architecture of the efficient private information retrieval system described in this invention is shown in one implementation.
[0130] like Figure 2 As shown, there are two parties involved in private information retrieval. One party is the server, which has a database storing n data entries. Each data entry includes a query key k and a private information value v corresponding to that query key. The other party is the user, who possesses the query key k and wants to retrieve the private information value v corresponding to the query key from the server.
[0131] This system for efficient retrieval of private information includes a server and multiple user-end processing modules connected to the server for data communication. Each user-end processing module corresponds to one user, so the system supports any number of users to perform covert queries on the same database. Furthermore, each user uses an independent authorization key and decryption key, thereby ensuring the independence of each user's query.
[0132] Figure 3 The steps of performing the system for efficient retrieval of private information according to the present invention are illustrated in one embodiment.
[0133] like Figure 3 As shown, in some embodiments, the system for efficient retrieval of private information performs the following steps:
[0134] 100: The server fits a function f(x) = a in polynomial form with the highest degree of n based on the n data stored in its internal storage. n x n +a n-1 x n-1 +…+a1x+a0.
[0135] In a more specific embodiment, the polynomial can be obtained by fitting using the least squares method.
[0136] 200: The server combines the coefficients of this function into a coefficient vector.
[0137] 300: The server calls the key generator KeyGen(λ) to generate a pair of private keys SK and public keys PK, and performs homomorphic encryption on the coefficient vector X based on the public key PK, Enc(X, PK, e), to obtain the ciphertext coefficient vector X. c =PK·(wX)+e, where e represents the error vector and w represents a large integer.
[0138] In one specific embodiment, the private key generated by the server calling the key generator KeyGen(λ) can be represented as SK = [I, T]P s The generated public key can be represented as Where P s and P m It is a pair of invertible matrices, P s ·P m =I, where I represents the identity matrix, A and T both represent random matrices, and λ represents the security parameter.
[0139] 400: The server sends the exponent information [n, n-1, ..., 1, 0] of the function f(x) to the client processing module.
[0140] 500: When the client-side processing module queries private information values based on the query key, it calculates the query key vector K in plaintext according to the exponent information of the function f(x), and then uses the authorization key SK sent by the server to the client-side processing module. u The query key vector K is encrypted to generate a ciphertext query key vector K. c .
[0141] 600: Server based on encrypted query key vector K c and ciphertext coefficient vector X c Calculate the ciphertext query result V c =K c ×X c And the encrypted query result V c Send to the user-side processing module.
[0142] 700: The user-side processing module uses the decryption key S K′ Query result V for encrypted text c Decrypt To obtain the plaintext result v of the corresponding private information value, where w represents the large integer sent by the server to the user.
[0143] In this invention, users who wish to query private information must first possess an authorization key. In some specific embodiments, the authorization key is SK. u It can be obtained based on the following steps:
[0144] The client-side processing module sends the corresponding user's identity information to the server for registration. This identity information may be a user ID, email address, phone number, or other identity information known in the field.
[0145] The server randomly generates a pair of invertible matrices. I represents the identity matrix;
[0146] The server generates an authorization key based on an invertible matrix pair and the private key SK.
[0147] The server will use the authorization key SK u Send to the user-side processing module.
[0148] In this invention, the encrypted query key vector is generated by the client-side processing module. In some specific embodiments, the encrypted query key vector K... c Generated based on the following steps:
[0149] The user-side processing module randomly generates a pair of invertible matrices P′ s ·P′ m =I, where I represents the identity matrix;
[0150] The client-side processing module randomly generates matrices A′ and A′;
[0151] The client-side processing module is based on the query key vector K and the authorization key SK. u Generate ciphertext query key vector
[0152] The encrypted query key vector K c It is sent to the server to query private information.
[0153] In this invention, the decryption key is also generated by the user-side processing module. In some specific embodiments, the decryption key is generated based on the following steps:
[0154] The user-side processing module randomly generates an invertible matrix P′. s ·P′ m =I, where I represents the identity matrix;
[0155] The user-side processing module generates random matrices T′ and A′;
[0156] The client-side processing module generates a decryption key S based on invertible matrix pairs and a random matrix. K′ :S K′ = [I,T′]×P′ s .
[0157] In another embodiment of the present invention, the system described herein can also implement batch querying for users, that is, the same user can query multiple pieces of private information simultaneously. In this case, multiple pieces of private information can be obtained by querying based on the following steps:
[0158] The client-side processing module calculates the query key vector matrix K in plaintext based on multiple query keys and the exponent information [n, n-1, ..., 1, 0] of the function f(x):
[0159] The user-side processing module randomly generates a pair of invertible matrices P′ s ·P′ m =I, where I represents the identity matrix;
[0160] The client-side processing module randomly generates matrices T′ and A′;
[0161] The client-side processing module is based on the query key vector matrix K and the authorization key SK. u Generate ciphertext query key vector
[0162] The encrypted query key vector K c It is sent to the server to query private information.
[0163] Another embodiment of the present invention also provides a server for efficient retrieval of private information.
[0164] Figure 4 The steps performed by the server for efficient retrieval of private information according to the present invention are illustrated in one embodiment.
[0165] like Figure 4 As shown, the server is configured to perform the following steps:
[0166] 100: The server fits a function f(x) = a in polynomial form with the highest degree of n based on the n data stored in it. n x n +a n-1 x n-1 +…+a1x+a0.
[0167] In one specific embodiment, the server can use the least squares method to fit the function.
[0168] 200: The server combines the coefficients of this function into a coefficient vector.
[0169] 300: The server calls the key generator KeyGen(λ) to generate a pair of private keys SK and public keys PK, and performs homomorphic encryption on the coefficient vector X based on the public key PK, Enc(X, PK, e), to obtain the ciphertext coefficient vector X. c =PK·(wX)+e, where e represents the error vector and w represents a large integer.
[0170] In one specific embodiment, the private key generated by the server calling the key generator KeyGen(λ) can be represented as SK = [I, T]P s The generated public key can be represented as Where P s and P m It is a pair of invertible matrices, P s ·P m =I, where I represents the identity matrix, A and T both represent random matrices, and λ represents the security parameter.
[0171] 400: The server sends out the exponent information [n, n-1, ..., 1, 0] of the function f(x).
[0172] 500: The server receives the encrypted query key vector K generated based on the aforementioned number of times information. c Then, based on the encrypted query key vector K c and ciphertext coefficient vector X c Calculate the ciphertext query result V c =K c ×X c and the encrypted query result V c Send it out.
[0173] In some implementations, the server generates the authorization key by performing the following steps:
[0174] The server receives the identity information sent by the user for registration. This identity information may be a user ID, email address, phone number, or other information known in the art for identifying identity.
[0175] The server randomly generates a pair of invertible matrices. I represents the identity matrix;
[0176] The server generates an authorization key based on an invertible matrix pair and the private key SK.
[0177] The server will use the authorization key SK u Send it out.
[0178] One embodiment of the present invention also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed in a computer, it causes the computer to perform the steps performed by the server in the above-described embodiments of the present invention. Since the steps performed are the same as those performed by the server described above, they will not be described again here.
[0179] One embodiment of the present invention also provides a computing device including a memory and a processor. The memory stores executable code, and when the processor executes the executable code, it performs the steps performed by the server in the above-described embodiments of the present invention. Since the steps performed are the same as those performed by the server described above, they will not be described again here.
[0180] One embodiment of the present invention also provides a client processing module for efficient retrieval of private information.
[0181] Figure 5 The steps performed by the client-side processing module for efficient retrieval of private information according to the present invention are illustrated in one embodiment.
[0182] like Figure 5 As shown, the client processing module is configured to perform the following steps:
[0183] 100: Receive the degree information of the function f(x) [n, n-1, ..., 1, 0].
[0184] 200: Calculate the query key vector K in plaintext based on the query key and the number of queries; and calculate the query key vector K based on the received authorization key SK. u The query key vector K is encrypted to generate a ciphertext query key vector K. c ; this ciphertext query key vector K c Send it out to obtain the key vector K based on the ciphertext query. c The obtained ciphertext query result V c ;
[0185] 300: Using the obtained decryption key S K′ Query result V for encrypted text c Decrypt To obtain the plaintext result v of the corresponding private information value, where w represents the large integer sent by the server to the user.
[0186] In some specific embodiments, the client-side processing module generates the encrypted query key vector K based on the following steps. c :
[0187] The user-side processing module randomly generates a pair of invertible matrices P′ s ·P′ m =I, where I represents the identity matrix;
[0188] The client-side processing module randomly generates matrices T′ and A′;
[0189] The client-side processing module is based on the query key vector K and the authorization key SK. u Generate ciphertext query key vector
[0190] In some specific embodiments, the client-side processing module generates the decryption key based on the following steps:
[0191] The user-side processing module randomly generates an invertible matrix P′. s ·P′ m =I, where I represents the identity matrix;
[0192] The user-side processing module generates random matrices T′ and A′;
[0193] The client-side processing module generates a decryption key S based on invertible matrix pairs and a random matrix. K′ :S K′= [I, T′] × P′ s .
[0194] In another embodiment, the user-side processing module of the present invention can also implement batch querying for users, that is, the same user can perform multiple queries simultaneously. In this case, the user-side processing module:
[0195] Based on multiple query keys k1, k2, ..., k m The query key vector matrix K is obtained by calculating the number of times the data was received [n, n-1, ..., 1, 0] in plaintext:
[0196] Randomly generate a pair of invertible matrices P′ s ·P′ m =I, where I represents the identity matrix;
[0197] Randomly generate matrices T′ and A′;
[0198] Generate the decryption key SK′=[I,T′]×P′ s ;
[0199] Based on the query key vector matrix K and the authorization key SK u Generate ciphertext query key vector
[0200] One embodiment of the present invention also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed in a computer, it causes the computer to perform the steps executed by the user-end processing module in the above-described embodiment of the present invention. Since the steps performed are the same as those performed by the user-end processing module described above, they will not be described again here.
[0201] One embodiment of the present invention provides a computing device including a memory and a processor. The memory stores executable code. When the processor executes the executable code, it performs the steps executed by the user-side processing module in the above embodiment of the present invention. Since the steps performed are the same as those performed by the user-side processing module described above, they will not be described again here.
[0202] To verify the technical effectiveness of the method, system, server, and client-side processing module for efficient retrieval of private information described in this invention, the decryption process is elaborated as follows:
[0203]
[0204] In the above formula, e′ represents noise.
[0205] Dividing the above result by the large integer w, we get: v = f(k), which is the final decryption result.
[0206] This shows that the decryption result is equal to the result of the polynomial function calculated in plaintext, and also equal to the query result.
[0207] The same method is used to process a user based on multiple query keys k1, k2, ..., k m The technical effectiveness of simultaneously querying multiple pieces of corresponding private information was verified, and the final decryption format was:
[0208]
[0209] The result is equal to:
[0210] This shows that when batch processing is performed, the decryption result is equal to the calculation result of the polynomial function in plaintext, and also equal to the query result.
[0211] It should be noted that the above examples are merely specific embodiments of the present invention, and the present invention is obviously not limited to the above embodiments, with many similar variations. All modifications that can be directly derived or conceived by those skilled in the art from the content disclosed in this invention should fall within the protection scope of this invention.
Claims
1. A method for efficient retrieval of private information, characterized in that, Including the following steps: Based on the data stored on the server, a polynomial function is fitted, where each data point includes a query key and a private information value. The function takes the query key as input and outputs the private information value corresponding to the input query key. The coefficients of each term in the function are combined into a vector, which is then used as the coefficient vector. Generate a pair of private and public keys, and perform homomorphic encryption on the coefficient vector based on the public key to obtain the ciphertext coefficient vector; When a encrypted query key vector sent by a user is received, a encrypted query result is calculated based on the encrypted query key vector and the encrypted coefficient vector. The encrypted query key vector is obtained by homomorphically encrypting the query key vector using the authorization key sent by the server. The query key vector is obtained based on the query key and the function's exponent information. The function's exponent information is sent by the server to the user-side processing module. The encrypted query result is sent to the user, who then uses a decryption key to decrypt the encrypted query result to obtain the plaintext result of the private information value corresponding to the query key.
2. The method for efficient retrieval of private information as described in claim 1, characterized in that, The authorization key is obtained based on the following steps: Users send their identity information to the server to register; The server randomly generates pairs of invertible matrices; The server generates the authorization key based on the invertible matrix pair and the private key, and sends the authorization key to the user.
3. The method for efficient retrieval of private information as described in claim 1, characterized in that, The decryption key is generated based on a generated random matrix and a randomly generated invertible matrix pair, and the decryption key is generated by the user-side processing module.
4. The method for efficient retrieval of private information as described in claim 1, characterized in that, The encrypted query key vector is obtained based on the following steps: Randomly generate pairs of invertible matrices; Generate a random matrix; Based on the invertible matrix pair, the random matrix, the query key vector, and the authorization key, a ciphertext query key vector is generated.
5. The method for efficient retrieval of private information as described in claim 1, characterized in that, The query key vector is a query key vector matrix constructed based on the frequency information of the function and multiple query keys.
6. The method for efficient retrieval of private information as described in claim 1, characterized in that, The function was obtained by fitting using the least squares method.
7. A system for efficient retrieval of private information, comprising a server and a user-end processing module communicating with the server, characterized in that: The server fits a polynomial function based on the data stored within it, where each data item includes a query key and a private information value. The function takes the query key as input and outputs the value corresponding to the input query key. The coefficients of each term in the function are combined into a vector as a coefficient vector. The server generates pairs of private and public keys and performs homomorphic encryption on the coefficient vector based on the public key to obtain a ciphertext coefficient vector. The user-side processing module obtains a query key vector based on the query key and the number of times the function is sent by the server; the user-side processing module also performs homomorphic encryption on the query key vector based on the authorization key sent by the server to obtain a ciphertext query key vector, and sends it to the server. When the server receives the encrypted query key vector sent by the user terminal processing module, it calculates the encrypted query result based on the encrypted query key vector and the encrypted coefficient vector, and sends the encrypted query result to the user terminal processing module. The user-side processing module uses a decryption key to decrypt the encrypted query result to obtain the plaintext result of the private information value corresponding to the query key.
8. The system for efficient retrieval of private information as described in claim 7, characterized in that, When the user terminal processing module sends user identity information to the server for registration, the server randomly generates an invertible matrix pair, generates an authorization key based on the invertible matrix pair and the private key, and sends the authorization key to the user terminal processing module.
9. The system for efficient retrieval of private information as described in claim 7, characterized in that, The user-side processing module randomly generates invertible matrix pairs and a random matrix, and then generates the decryption key based on the invertible matrix pairs and the random matrix.
10. The system for efficient retrieval of private information as described in claim 7, characterized in that, The user-side processing module randomly generates invertible matrix pairs and a random matrix, and then generates a ciphertext query key vector based on the invertible matrix pairs, the random matrix, and the obtained query key vector and authorization key.
11. The system for efficient retrieval of private information as described in claim 7, characterized in that, The user-side processing module constructs a query key vector matrix based on the function's frequency information and multiple query keys, which serves as the query key vector.
12. The system for efficient retrieval of private information as described in claim 7, characterized in that, The server uses the least squares method to fit the function.
13. A server for efficient retrieval of private information, characterized in that, It is configured to perform the following steps: Based on the data stored on the server, a polynomial function is fitted, where each data point includes a query key and a private information value. The function takes the query key as input and outputs the private information value corresponding to the input query key. The coefficients of each term in the function are combined into a vector, which is then used as the coefficient vector. Generate a pair of private and public keys, and perform homomorphic encryption on the coefficient vector based on the public key to obtain the ciphertext coefficient vector; The ciphertext query result is calculated based on the ciphertext coefficient vector and the received ciphertext query key vector, and then the ciphertext query result is sent out. The encrypted query key vector is generated by homomorphically encrypting the query key vector using an authorization key generated by the server; the query key vector is obtained based on the query key and the frequency information of the function, which is sent by the server to the user-side processing module.
14. The server as described in claim 13, characterized in that, When it receives user identity information sent from an external source, it randomly generates an invertible matrix pair, generates the authorization key based on the invertible matrix pair and the private key, and sends the authorization key out.
15. The server as described in claim 13, characterized in that, The function is obtained by fitting it using the least squares method.
16. A client-side processing module for efficient retrieval of private information, characterized in that, It is configured to perform the following steps: The query key vector is obtained based on the query key and the degree information of the received polynomial function. Based on the received authorization key, the query key vector is homomorphically encrypted to obtain a ciphertext query key vector, which is then sent out. The encrypted query result obtained based on the encrypted query key vector is received, and the encrypted query result is decrypted using a decryption key to obtain the plaintext result of the private information value corresponding to the query key.
17. The user terminal processing module as described in claim 16, characterized in that, It generates the decryption key based on the generated random matrix and the randomly generated invertible matrix pair.
18. The user terminal processing module as described in claim 16, characterized in that, It generates a random matrix and a pair of invertible matrices, and then generates the ciphertext query key vector based on the pair of invertible matrices, the random matrix, the query key vector, and the authorization key.
19. The user terminal processing module as described in claim 16, characterized in that, The query key vector is a query key vector matrix constructed by the user-side processing module based on the frequency information of the function and multiple query keys.
20. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed in the computer, it causes the computer to perform the steps performed by the server as described in any one of claims 13-15.
21. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed in the computer, it causes the computer to perform the steps performed by the client processing module as described in any one of claims 16-19.
22. A computing device comprising a memory and a processor, characterized in that, The memory stores executable code, which, when executed by the processor, performs the steps performed by the server as described in any one of claims 13-15.
23. A computing device comprising a memory and a processor, characterized in that, The memory stores executable code, and when the processor executes the executable code, it performs the steps performed by the user terminal processing module as described in any one of claims 16-19.
Citation Information
Patent Citations
Method and system for efficiently retrieving private information
CN115642999A