Privacy information retrieval method and system based on GPU fast response

By adopting a fast response method based on GPU in hiding retrieval, using BFV full-homomorphic encryption algorithm and GPU hardware facilities, the problem of inefficient computing efficiency of full-homomorphic encryption algorithm in the existing technology is solved, efficient hidden retrieval and fast response result transmission is achieved, and user experience and information security are improved.

CN118690414BActive Publication Date: 2025-03-18SHANDONG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411186276.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2025-03-18
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

In the prior art, the operation efficiency of the fully homomorphic encryption algorithm is low, resulting in the inefficient cryptographic retrieval of the computing security nature. It is impossible to quickly process data during the hidden retrieval process in the hardware environment, and the traffic problem and the acceleration of important operators of the fully homomorphic encryption algorithm are not considered.

Method used

Using a GPU-based fast response privacy information retrieval method, the BFV full homomorphic encryption algorithm and GPU hardware facilities are used to provide a GPU acceleration solution with few data transfer times and high execution efficiency. The specific steps include preprocessing the database data and storing it in the GPU, expanding and matching calculations of the user query data, and using cyclic negative shift, key transformation and mode transformation operations to achieve fast calculation matching and response result transmission.

Benefits of technology

It improves the efficiency of hidden retrieval, reduces the number of data transfers and traffic, realizes rapid processing and acceleration of data during hidden retrieval, and improves user experience and information security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690414B_ABST
    Figure CN118690414B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of privacy information retrieval, and discloses a privacy information retrieval method and system based on GPU fast response, including: preprocessing database data to obtain preprocessed database data; storing the preprocessed database data in the GPU of the server; the CPU obtains the query data of the user client, the CPU sends the query data to the GPU, the GPU uses a homomorphic encryption algorithm to expand the query data to obtain the expanded query data; the GPU matches the preprocessed database data based on the expanded query data to obtain a response result in ciphertext form; the GPU sends the response result in ciphertext form to the CPU; the CPU sends the response result in ciphertext form to the user client, the user client decrypts the response result to obtain the decrypted response result. The present invention provides a GPU acceleration solution with low data transfer times and high execution efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of privacy information retrieval, and in particular to a privacy information retrieval method and system based on GPU fast response. Background Art

[0002] People's demand for information retrieval is reflected in various aspects of life, from the acquisition of knowledge needed for daily life to the retrieval of personal and even confidential data. For example, various shopping and entertainment software recommendation systems. Information retrieval has important application scenarios in various fields such as security, transportation, and business. People's retrieval of information leads to the circulation of various personal information data on the Internet. Protecting these personal retrieval information data plays an important role in protecting information security. Anonymous retrieval has extremely important theoretical and practical research significance.

[0003] The use of hidden retrieval has certain limitations. In today's situation where databases store a lot of complex data, computationally secure hidden retrieval has the characteristics of low efficiency and poor user experience in providing retrieval services. In some cases, compared with simple hidden retrieval (sending all database information to users), computationally secure hidden retrieval is even less efficient. This has also caused dissatisfaction among users and related manufacturers about security protection, which is extremely detrimental to the improvement of security awareness of all users and the construction of a harmonious and secure cyberspace environment. When users use traditional information retrieval services, their personal retrieval information will be further leaked, which will be used by criminals and is not conducive to the development of information retrieval technology.

[0004] Computational security anonymity retrieval protocols are usually implemented using fully homomorphic encryption algorithms. Fully homomorphic encryption algorithms are a special encryption technology that allows the server to perform related computing operations directly on the ciphertext without decrypting the ciphertext, thereby ensuring the security of user information.

[0005] For example: an invention patent for a privacy information retrieval method based on homomorphic encryption, patent publication number CN118094615A, uses a new encoding method to encode and rearrange the key-value database, and makes full use of homomorphic encryption's multi-data single-instruction operation for batch processing, so that one homomorphic comparison can process multiple keywords. However, this solution has the problems of slow retrieval speed and low retrieval efficiency.

[0006] For example: the invention patent is a fully homomorphic ciphertext retrieval method, system, electronic device and storage medium, patent publication number CN118133324A, which uses the mathematical properties of polynomial equations to solve polynomial equations and obtain results that meet the search conditions. However, this solution also has the problems of slow retrieval speed and low retrieval efficiency.

[0007] In summary, the inventors found that: (1) the fully homomorphic encryption algorithm in the prior art has low computational efficiency, which further leads to low efficiency in computing the hidden retrieval of security properties. The fully homomorphic encryption algorithm in the prior art cannot realize rapid processing of data in the hidden retrieval process under hardware environment; (2) the prior art does not consider the problem of communication volume in actual application process, and cannot reduce the communication volume in the entire information retrieval process in the hidden retrieval scheme; (3) the prior art does not accelerate the important operators of the fully homomorphic encryption algorithm, and cannot realize the acceleration of the hidden retrieval scheme, resulting in a large number of data transfers and low efficiency of the retrieval scheme. Summary of the invention

[0008] In order to address the deficiencies in the prior art, the present invention provides a privacy information retrieval method and system based on GPU fast response; utilizing the BFV fully homomorphic encryption algorithm and GPU hardware facilities, a GPU acceleration solution with low data transfer times and high execution efficiency is provided.

[0009] On the one hand, a privacy information retrieval method based on GPU fast response is provided, including: preprocessing database data to obtain preprocessed database data; storing the preprocessed database data in the GPU of the server; the CPU of the server obtains the query data of the user client, the CPU of the server sends the query data to the GPU of the server, and the GPU of the server uses a query expansion algorithm to expand the query data to obtain expanded query data; the expansion of the query data includes: a cyclic negative shift operation, a key transformation operation and a modulus transformation operation; the GPU of the server performs calculation matching in the preprocessed database data based on the expanded query data to obtain a response result in ciphertext form; the GPU of the server sends the response result in ciphertext form to the CPU of the server; the CPU of the server sends the response result in ciphertext form to the user client, and the user client decrypts the response result to obtain a decrypted response result.

[0010] On the other hand, a privacy information retrieval system based on GPU fast response is provided, including: a user client and a server; a CPU is provided in the server, and a GPU is provided inside the server; database data is preprocessed to obtain preprocessed database data; the preprocessed database data is stored in the GPU of the server; the CPU of the server obtains the query data of the user client, the CPU of the server sends the query data to the GPU of the server, and the GPU of the server uses a query expansion algorithm to expand the query data to obtain expanded query data; the expansion of the query data includes: a cyclic negative shift operation, a key transformation operation and a modulus transformation operation; the GPU of the server performs calculation matching in the preprocessed database data based on the expanded query data to obtain a response result in ciphertext form; the GPU of the server sends the response result in ciphertext form to the CPU of the server; the CPU of the server sends the response result in ciphertext form to the user client, and the user client decrypts the response result to obtain a decrypted response result.

[0011] The above technical solution has the following advantages or beneficial effects: (1) The present invention provides a GPU acceleration solution design for hidden retrieval implemented by the BFV fully homomorphic encryption algorithm, which can realize fast calculation of database preprocessing and response generation in hidden retrieval under hardware environment, thereby improving the efficiency of hidden retrieval. (2) The present invention comprehensively considers the communication volume problem in practical applications, conducts acceleration analysis on the query compression algorithm first used in SealPIR, and applies it to the hidden retrieval solution to reduce the communication volume in the entire information retrieval process. (3) The present invention analyzes the important operator acceleration solution in the BFV algorithm, thereby accelerating the hidden retrieval solution based on it. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0013] Figure 1 Transfer graph for anonymous retrieval data.

[0014] Figure 2 A graph of thread operations encoded for a database element.

[0015] Figure 3 This is a flowchart of the butterfly transformation.

[0016] Figure 4 The following is the thread operation diagram for circular negative shift.

[0017] Figure 5 Graph of thread operations for modular multiplication of point values.

[0018] Figure 6 This is the operation diagram of the relevant calculation threads under the Chinese Remainder Theorem.

[0019] Figure 7 Thread operation graph for scalar multiplication. DETAILED DESCRIPTION

[0020] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0021] BFV is a representative algorithm in the second generation of fully homomorphic encryption algorithms. A series of hidden retrieval schemes are generated by the BFV algorithm and its related variants. It is an important research algorithm in the field of cryptography.

[0022] Embodiment 1: Figure 1 As shown, this embodiment provides a privacy information retrieval method based on GPU fast response, including: S101: preprocessing database data to obtain preprocessed database data; storing the preprocessed database data in the GPU of the server; S102: the CPU of the server obtains the query data of the user client, the CPU of the server sends the query data to the GPU of the server, and the GPU of the server uses a query extension algorithm to expand the query data to obtain the extended query data; the expansion of the query data includes: a cyclic negative shift operation, a key transformation operation and a modulus transformation operation; S103: the GPU of the server performs calculation matching in the preprocessed database data based on the extended query data to obtain a response result in ciphertext form; the GPU of the server sends the response result in ciphertext form to the CPU of the server; S104: the CPU of the server sends the response result in ciphertext form to the user client, and the user client decrypts the response result to obtain the decrypted response result.

[0023] Further, the S101: preprocessing the database data to obtain preprocessed database data; storing the preprocessed database data in the GPU of the server includes: S101-1: storing the database elements in the GPU of the server, and encoding the database elements into the corresponding polynomials as polynomial coefficients through the GPU of the server: ;in, , , It means modulo integer The number field formed by yes All integers in , we get the encoded polynomial.

[0024] S101-1: storing the database elements in the GPU of the server, and encoding the database elements as polynomial coefficients into corresponding polynomials through the GPU of the server: one thread is responsible for encoding one polynomial. The polynomials are divided into Each thread performs splitting and reorganization operations on the data elements according to the database elements it is responsible for, such as Figure 2 As shown; it is guaranteed that each database element exists in a polynomial and each polynomial coefficient contains at most one database element.

[0025] The split operation is to divide the database elements into groups The bits are split; the reorganization operation refers to reorganizing the array generated by the split into a polynomial as coefficients under the split and reorganization conditions. The split and reorganization conditions are: each database element exists in only one polynomial; each polynomial coefficient contains at most one database element.

[0026] Represented in the number field The polynomial formed below is of the form A polynomial of , where , Indicates a The polynomials in .

[0027] S101-2: Use fast number-theoretic transform (NTT) to convert the encoded polynomial from coefficient representation to point value representation and then to NTT form; the operation involved in the fast number-theoretic transform is the butterfly transform. In the process of accelerating the fast number-theoretic transform, one layer of butterfly transform is used as an acceleration process. After one layer of transform is completed, the next layer of transform is started.

[0028] It should be understood that the fast number-theoretic transform (NTT) is a variant of the discrete Fourier transform. The discrete Fourier transform uses the unit circle root , , using a divide-and-conquer algorithm to reduce time complexity. NTT uses the cyclotomic polynomial roots to replace the unit circle roots.

[0029] It should be understood that the cyclotomic polynomial is a polynomial of the form The polynomial can be decomposed into .

[0030] It should be understood that the butterfly transformation refers to an algorithm used in the process of calculating the divide-and-conquer algorithm. The algorithm is used in NTT to achieve a form transformation with lower computational complexity.

[0031] It should be understood that the NTT form refers to the polynomial point value representation obtained using NTT transformation.

[0032] Furthermore, the step S101-2: using fast number-theoretic transform (NTT) to convert the encoded polynomial from coefficient representation to point value representation, and then converting it to NTT form, includes: for the polynomial , its coefficient representation is , substitute the root of the cyclotomic polynomial , we get the polynomial point value representation .

[0033] Further, S101-2: in the process of accelerating the fast number theory transformation, a layer of butterfly transformation is used as an acceleration process, and after one layer of transformation is completed, the next layer of transformation is started, including: performing a butterfly transformation once, for two operands , get the two operands at the corresponding position of the next layer , ;in, Represents the roots of the cyclotomic polynomial used in this butterfly transformation.

[0034] For a butterfly transformation, one thread is used to perform the calculation, such as Figure 3 The marked content. For the polynomial degree The total butterfly transformation is Second, The butterfly transformation is divided into , a butterfly transformation is performed by one thread; wherein the polynomial degree refers to the coefficient of the highest non-zero term in the polynomial; It is the number of thread resources available for this butterfly transformation.

[0035] The GPU thread executes the assigned butterfly transformation and writes the result of the butterfly transformation to the corresponding storage array position when reading, so as to perform the butterfly transformation of the next layer; the storage position refers to the number of times the thread reads the butterfly transformation in a butterfly operation. and , Refers to the index difference of the two operands of the thread. The index difference is initially , is the degree of the polynomial; after each layer of butterfly transformation, the index difference is , the thread will perform the butterfly operation to get the final result and write it into and , respectively ; .

[0036] After the butterfly transform polynomial is executed in the GPU, the data obtained by the butterfly transform of the polynomial is still stored in the memory of the GPU.

[0037] The received query is expanded in the GPU. The query expansion algorithm is as follows: Figure 4 As shown, the time cost involved is the formula and , .

[0038] Furthermore, the S102: the GPU of the server uses a query expansion algorithm to expand the query data to obtain the expanded query data, including: S102-1: calculating the minimum and , so that and , initially, set the array The unexpanded query ciphertext sent by the user received by the server, initialization parameters ; ; S102-2: Read The index in the array is Array elements of , assigned to ; S102-3: Use the first query expansion algorithm , perform a cyclic negative shift operation on the query data to obtain the expanded query data ; S102-4: Use the second query extension algorithm , expand the query data to obtain the expanded query data ; S102-5: Use the third query extension algorithm , expand the query data to obtain the expanded query data ; S102-6: Update parameters ; S102-7: Repeat S102-2 to S-102-6 until ,renew Array: , update the parameters ; S102-8: Repeat S102-2 to S102-7 until ; S102-9: Calculated In the model Inverse in meaning ; S102-10: For array , then for the array Calculate each item separately ; That is, calculated Corresponding value, assign the value to the parameter ; S102-11: Get the expanded inquiry .

[0039] Furthermore, the S102-3: adopting the first query expansion algorithm , perform a cyclic negative shift operation on the query data to obtain the expanded query data ,include: It is a circular negative shift operation. After knowing the shift step, the position of each polynomial coefficient is determined. One thread is used to read and write the coefficients, such as Figure 4 As shown, the polynomial coefficients are , divide the polynomial coefficients equally into On a thread.

[0040] Furthermore, the S102-4: using the second query extension algorithm , expand the query data to obtain the expanded query data ,include: The operations involved are key switching operations (Keyswitch) and modulo switching operations (Modswitch).

[0041] Furthermore, the key transformation operation includes: transforming the plaintext polynomial Encrypted polynomial Convert to .

[0042] ;in means .

[0043] Represented in the number field The polynomial formed below is For the shape Polynomial, where ; Indicates a The polynomials in .

[0044] ; .

[0045] in, . ; As user key; ; is an error distribution, set to discrete Gaussian distribution; The plaintext encrypted by the ciphertext.

[0046] Will Substitution ,get ; ;in That is to Substitute the polynomial Income, , Similarly, Substitute into and Among them is the user key, is the error distribution obtained by sampling.

[0047] The key at this time is becomes ; Key transformation changes the encryption key involved in the ciphertext from Convert to ; Among them, the acceleration method of the rotation operation involved is consistent with the acceleration method of the circular negative shift operation, such as Figure 4 shown.

[0048] In the key transformation operation, a Galois key is used. The Galois key is calculated and generated by the user client when generating the key, and is notified to the server. The server stores the Galois key in the GPU memory in advance.

[0049] set up , calculated ;in For the Galois key The value of the key is determined by the user client. Substitution get The encrypted ciphertext of the client is calculated to obtain the plaintext and ciphertext modulus basis , the Galois key modular basis is ; To calculate Then round up to the nearest integer.

[0050] At this time, the calculation .

[0051] in ; .

[0052] Among them, modular multiplication and addition and subtraction operations are involved. The polynomial storage form is all NTT point value representation, and each point value is operated separately, such as Figure 5As shown, one thread is used to be responsible for one point value operation. The number of point values ​​in the point value representation in the NTT form is , in the polynomial point value representation points are evenly divided into On each thread resource, the accelerated implementation method of addition and subtraction is consistent with the modular multiplication operation; in order to reduce the use of time-consuming operations such as division, in the actual implementation of hidden retrieval, Barrett's reduction method is usually used to perform modular operations, converting modular multiplication into addition, subtraction and multiplication operations.

[0053] Furthermore, the module transformation operation includes: module transformation converts the key transformed Reconvert to :The Galois key is located at , and convert it back to the template basis where the plaintext is located: .

[0054] The ciphertext obtained at this time meets the decryption requirements. After the response message is obtained by calculation, it is sent to the user client. The user client can use its own key Successfully decrypted and obtained .

[0055] The modular transformation operation involves modular multiplication and addition and subtraction operations on point values. Figure 5 The modular multiplication and addition and subtraction acceleration scheme shown in FIG. The modular conversion operation is as follows: ; Modular multiplication and addition and subtraction acceleration solutions, acceleration analysis is performed on the modular conversion algorithm. It can be seen from the Fast RNS Base Conversion formula that addition and subtraction as well as modular multiplication operations on point values ​​are involved in the conversion process.

[0056] In point value representation, the calculations between point values ​​are independent of each other. Therefore, the GPU is used to accelerate the modular transformation in parallel. The modular transformation algorithm is to convert the modular basis Switch to another set of mold base .in ; The original number On mold base The value below.

[0057] It should be understood that the Galois key refers to the key used by the user client for its ciphertext. ,encryption , .Get the ciphertext and send it to the server, which can use the Galois key to perform key switching and other operations.

[0058] Further, the S103: the GPU of the server performs calculation matching in the preprocessed database data based on the expanded query data to obtain a response result in ciphertext form, including: S103-1: the expanded query is , is still stored in the GPU memory; the preprocessed database is stored in the GPU memory in NTT form, and the database elements form an array .

[0059] S103-2: Expanded Inquiry With database Perform calculations and get .

[0060] S103-3: What GPU will get , copied from GPU memory to CPU memory, Sent to the user client.

[0061] The expanded query is multiplied and summed with the database element, as shown in S103-2. , and obtain the ciphertext form of the polynomial where the final user retrieves the element. The scalar multiplication involved in S103-2 is for the database element index retrieved by the user , the expanded inquiry satisfy ,Apart from for Except for , the user client passes its key encryption or Therefore, the expanded query is in ciphertext form, and the database elements are stored in plaintext form. The internal operation of the summation sign in is a scalar multiplication operation. The S103-2 is performed in the form of point value representation, and the summation sign is a point value addition and subtraction operation.

[0062] In S103-2, in order to reduce the extra overhead caused by large number operations, the Chinese remainder theorem is used to reduce the size of the operands.

[0063] It should be understood that the Chinese remainder theorem refers to an algorithm for solving a system of linear congruence equations in one variable. , for operands , respectively calculated , we can obtain .

[0064] When calculating the Chinese remainder theorem algorithm, the point values ​​corresponding to different moduli are calculated. Figure 6The following is a storage structure of a ciphertext. For polynomial point value representation , the storage structure is , for the plaintext and ciphertext corresponding to a modulus, use Figure 5 The calculation is performed using the method shown. That is, during the calculation, for the point value , the operations corresponding to the values ​​under different module bases are independent, so threads are used for GPU acceleration. For one module base, the number of point values ​​is , , divide it equally into the allocated On each thread, repeat This completes all operations under the mold base.

[0065] For the database plaintext polynomial The expanded queries are , at this time The position index is , which is the plaintext polynomial containing the element that the user wants to retrieve.

[0066] Calculated ; It involves scalar multiplication, in which the acceleration method is similar to the acceleration scheme for the Chinese remainder theorem. During the operation, for the point value , the operations corresponding to the values ​​under different module bases are independent, so threads can be used for GPU acceleration. For one module base, the number of point values ​​is , , divide it equally into the allocated On each thread, repeat This completes all operations under the mold base.

[0067] like Figure 7 As shown, for a scalar multiplication of a point value corresponding to a modulus, a thread is used to process a point value operation.

[0068] Furthermore, the CPU of the server sends the response result in ciphertext to the user client, and the user client decrypts the response result to obtain the decrypted response result, including: S104-1: The user client receives the ciphertext ,in means . Represented in the number field The polynomial formed below is of the form Polynomial, where ; Indicates a S104-2: The user client uses the key ,calculate ; S104-3: The user will Store to hard disk.

[0069] The database data is encoded from its plaintext storage form into a polynomial form, and then converted into NTT point value form to meet the BFV homomorphic encryption algorithm's requirements for plaintext. The corresponding response message is generated for the query sent by the client user.

[0070] Database preprocessing: Encode the elements in the database into polynomials one by one In the coefficients of , during the encoding process, each element can be encoded into multiple polynomial coefficients, but a database element is at most in one polynomial, and the number of polynomials obtained by database encoding is calculated based on the element size and number of elements in the database. , divide the polynomial equally according to the number of GPUs The database elements are then copied to the GPU memory and encoded into the corresponding polynomials respectively; the polynomials are preprocessed for storage format and converted into NTT form for storage.

[0071] The specific steps of generating a response are: copy the query message to the GPU memory, and expand it through key transformation and module transformation. For one expansion process, the number of polynomial coefficients is increased by one expansion. The expanded query is processed and converted into NTT format for storage; the query and the corresponding database plaintext polynomial are subjected to scalar multiplication and modular multiplication of addition and subtraction on point values ​​to obtain the final response message, and the response message is copied to the CPU memory and then returned to the user client.

[0072] Database preprocessing and database response generation based on GPU hardware environment. The database preprocessing is used to encode and transform database data, as well as update dynamic database data content; the database response generation is used to respond to user inquiries, and the query operations involved are performed in the form of ciphertext. The acceleration scheme provided by the present invention uses GPU hardware facilities to accelerate the process to address the common problems of slow response and long data processing time in computational security anonymity retrieval protocols. Promote the popularization of security information retrieval protocols in society. Reduce CPU core occupancy when server CPU core resources are scarce.

[0073] Embodiment 2: This embodiment provides a privacy information retrieval system based on GPU fast response, including: a user client and a server; the server is provided with a CPU, and the server is provided with a GPU; the database data is preprocessed to obtain preprocessed database data; the preprocessed database data is stored in the GPU of the server; the CPU of the server obtains the query data of the user client, the CPU of the server sends the query data to the GPU of the server, and the GPU of the server uses a homomorphic encryption algorithm to expand the query data to obtain expanded query data; the expansion of the query data includes: a cyclic negative shift operation, a key transformation operation and a module transformation operation; the GPU of the server matches the preprocessed database data based on the expanded query data to obtain a response result in ciphertext form; the GPU of the server sends the response result in ciphertext form to the CPU of the server; the CPU of the server sends the response result in ciphertext form to the user client, and the user client decrypts the response result to obtain a decrypted response result.

[0074] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A privacy information retrieval method based on GPU fast response, characterized in that: include: Preprocessing the database data to obtain preprocessed database data; Store the preprocessed database data in the server's GPU; The CPU of the server obtains the query data of the user client, and the CPU of the server sends the query data to the GPU of the server. The GPU of the server uses the query expansion algorithm to expand the query data to obtain the expanded query data; the expansion of the query data includes: a cyclic negative shift operation, a key transformation operation and a module transformation operation; The GPU of the server performs calculation matching in the preprocessed database data based on the expanded query data to obtain a response result in ciphertext form; the GPU of the server sends the response result in ciphertext form to the CPU of the server; The CPU of the server sends the response result in ciphertext to the user client, and the user client decrypts the response result to obtain the decrypted response result.

2. The privacy information retrieval method based on GPU fast response as claimed in claim 1, characterized in that: Preprocessing the database data to obtain preprocessed database data; Storing the preprocessed database data in the server's GPU includes: The database elements are stored in the server's GPU, and the database elements are used as polynomial coefficients and encoded into the corresponding polynomials through the server's GPU: ; in, , , It means modulo integer The number field formed by yes All integers in In the code, we get the encoded polynomial; The fast number theory transform is used to convert the encoded polynomial from coefficient representation to point value representation and then to NTT form. The operation involved in the fast number theory transform is the butterfly transform. In the process of accelerating the fast number theory transform, one layer of butterfly transform is used as an acceleration process. After one layer of transform is completed, the next layer of transform is started.

3. The privacy information retrieval method based on GPU fast response as claimed in claim 2, characterized in that: The database elements are stored in the server's GPU, and the database elements are used as polynomial coefficients and encoded into the corresponding polynomial through the server's GPU: One thread is responsible for encoding a polynomial. The polynomials are divided into Each thread performs splitting and reorganization operations on the data elements according to the database elements it is responsible for; it ensures that each database element exists in a polynomial and each polynomial coefficient contains at most one database element; the splitting operation refers to dividing the database elements into groups The bits are segmented; the reorganization operation refers to reorganizing the array generated by the segmentation into a polynomial as coefficients under the segmentation and reorganization conditions; wherein the segmentation and reorganization conditions are: each database element exists in only one polynomial; each polynomial coefficient contains at most one database element.

4. The privacy information retrieval method based on GPU fast response as claimed in claim 2, characterized in that: Using fast number theory transformation, the encoded polynomial is converted from coefficient representation to point value representation and then to NTT form, including: For polynomials , its coefficient representation is , substitute the root of the cyclotomic polynomial , we get the polynomial point value representation ; In the process of accelerating the fast number theory transformation, one layer of butterfly transformation is used as an acceleration process. After one layer of transformation is completed, the next layer of transformation begins, including: Perform a butterfly transformation on both operands , get the two operands at the corresponding position of the next layer , ;in, Represents the roots of the cyclotomic polynomial used in this butterfly transformation; For a butterfly transformation, one thread is used to perform the operation. The total butterfly transformation is Second, The butterfly transformation is divided into , a butterfly transformation is performed by one thread; wherein the polynomial degree refers to the coefficient of the highest non-zero term in the polynomial; is the number of thread resources allowed to be used in this butterfly transformation; The GPU thread executes the assigned butterfly transformation and writes the result of the butterfly transformation to the corresponding storage array position when reading, so as to perform the butterfly transformation of the next layer; the storage array position refers to the number of times the thread reads the butterfly in a butterfly operation. and , Refers to the index difference of the two operands of the thread. The index difference is initially , is the degree of the polynomial; after each layer of butterfly transformation, the index difference is , the thread will perform the butterfly operation to get the final result and write it into and , respectively ; .

5. The privacy information retrieval method based on GPU fast response as claimed in claim 1, characterized in that: The GPU of the server uses a query expansion algorithm to expand the query data to obtain the expanded query data, including: (1) Calculate the minimum and , so that and , initially, set the array The unexpanded query ciphertext sent by the user received by the server, initialization parameters ; ; (2) Read The index in the array is Array elements of , assigned to ; (3) Using the first query expansion algorithm , perform a cyclic negative shift operation on the query data to obtain the expanded query data ; (4) Using the second query expansion algorithm , expand the query data to obtain the expanded query data ; (5) Using the third query expansion algorithm , expand the query data to obtain the expanded query data ; (6) Update parameters ; (7) Repeat (2) to (6) until ,renew Array: , update the parameters ; (8) Repeat (2) to (7) until ; (9) Calculated In the model Inverse in meaning ; (10) For arrays , then for the array Calculate each item separately ; That is, calculated Corresponding value, assign the value to the parameter ; (11) Get the expanded inquiry .

6. The privacy information retrieval method based on GPU fast response as claimed in claim 5, characterized in that: Second query expansion algorithm , expand the query data to obtain the expanded query data ,include: The operations involved are key transformation operations and module transformation operations; The key transformation operation uses a Galois key, which is calculated and generated by the user client when generating the key, and notified to the server. The server stores the Galois key in the GPU memory in advance; setting , calculated ;in For the Galois key The value of the key is determined by the user client. Substitution get The encrypted ciphertext of the client is calculated to obtain the plaintext and ciphertext modulus basis , the Galois key modular basis is ; To calculate Then take the nearest integer; At this time, the calculation ; in, ; ; Among them, modular multiplication and addition and subtraction operations are involved. The polynomial storage form is a fast number theory transformation point value representation form. Each point value is operated separately, and one thread is responsible for one point value operation. The number of point values ​​in the point value representation under the fast number theory transformation form is , in the polynomial point value representation points are evenly divided into On a single thread resource, the acceleration of addition and subtraction is implemented in the same way as modular multiplication.

7. The privacy information retrieval method based on GPU fast response as claimed in claim 6, characterized in that: The modular transformation operation involves modular multiplication and addition and subtraction operations on point values ​​using modular multiplication and addition and subtraction acceleration solutions; The module conversion operation includes: ; The transformation process involves addition, subtraction and modular multiplication operations on point values. In point value representation, the calculations between point values ​​are independent of each other, and the modular transformation is accelerated in parallel by GPU. The modular transformation algorithm is to convert the modular basis Switch to another set of mold base ;in ; The original number On mold base The value below.

8. The privacy information retrieval method based on GPU fast response as claimed in claim 1, characterized in that: The server's GPU performs calculations and matches on the preprocessed database data based on the expanded query data to obtain a response result in ciphertext form, including: The expanded query is , is still stored in the GPU memory; the preprocessed database is stored in the GPU memory in NTT form, and the database elements form an array ; Expanded Inquiry With database Perform calculations and get . The GPU will get , copied from GPU memory to CPU memory, Sent to the user client.

9. The privacy information retrieval method based on GPU fast response as claimed in claim 1, characterized in that: The server's CPU sends the ciphertext response to the user client, which decrypts the response to obtain the decrypted response, including: The user client receives the ciphertext ,in means ; Represented in the number field The following polynomials are constructed: ,in ; Indicates a The polynomial in ; The user client uses the key ,calculate ; The user client will be plain text Store to hard disk.

10. A GPU-based fast-response privacy information retrieval system, characterized by: include: User clients and servers; The server is provided with a CPU, and the server is provided with a GPU; Preprocessing the database data to obtain preprocessed database data; Store the preprocessed database data in the server's GPU; The CPU of the server obtains the query data of the user client, and the CPU of the server sends the query data to the GPU of the server. The GPU of the server uses the query expansion algorithm to expand the query data to obtain the expanded query data; the expansion of the query data includes: a cyclic negative shift operation, a key transformation operation and a module transformation operation; The GPU of the server performs calculation matching in the preprocessed database data based on the expanded query data to obtain a response result in ciphertext form; the GPU of the server sends the response result in ciphertext form to the CPU of the server; The CPU of the server sends the response result in ciphertext to the user client, and the user client decrypts the response result to obtain the decrypted response result.

Citation Information

Patent Citations

  • Private information retrieval method based on homomorphic encryption

    CN118094615A

  • Fully homomorphic ciphertext retrieval method and system, electronic equipment and storage medium

    CN118133324A

  • Private information retrieval method in environment of a plurality of servers

    CN102629924A

  • Privacy information retrieval protocol making method, storage medium and device

    CN115378573A