Grid-based specified server searchable encryption optimization method and device, equipment and medium
Through the grid-based searchable encryption optimization method of designated servers, the difficulty problems of TrapGen and LWE are used to solve the problems of insufficient security and large storage computing overhead under quantum computing attacks in the prior art, and efficient encryption and decryption are achieved, ensuring that Data privacy and security.
Patent Information
- Application Number
- CN202411415287.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-10-11
AI Technical Summary
The existing searchable encryption schemes are insecurity in the face of quantum computing attacks, and the storage and computing overhead in a specific server environment is large, so they cannot effectively prevent tampering and leakage of malicious servers.
Using a grid-based searchable encryption optimization method for designated servers, generate public and private keys through the TrapGen algorithm, combine LWE difficulties, build ciphertexts using random vectors and noise vectors, and generate trap gates through the SamplePre algorithm to achieve efficient encryption and decryption processes to ensure the security and efficiency of search matches.
It provides efficient encryption and decryption processes, ensures security and data privacy in the quantum computing environment, reduces storage and computing overhead, and realizes flexible keyword search functions and powerful security guarantees.
Smart Images

Figure CN119299092A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data encryption, and in particular to a grid-based designated server searchable encryption optimization method, corresponding device, electronic device and computer-readable storage medium. Background Art
[0002] The rise of cloud storage technology stems from the increasing amount of data people have every day. Cloud servers provide large-scale storage space and computing resources, effectively reducing the cost of data storage and maintenance, and enabling users to access their data anytime, anywhere. Although there are many advantages to outsourcing data processing to cloud servers, there are also some disadvantages. One of the main issues is that when users entrust their data to cloud servers, their control over the data will be greatly reduced. Since trust in cloud servers is difficult to ensure, the information uploaded by users is at risk of being illegally accessed or abused, which poses a major challenge to the privacy and security of users.
[0003] Search encryption (SE) technology is one of the important technologies in the field of information security. Its purpose is to protect the confidentiality and integrity of data and prevent unauthorized access, tampering or leakage. The concept was first proposed by Song et al. in 2000, who proposed the symmetric searchable encryption (SSE) scheme. This technology allows users to search and query encrypted data without revealing its content, thereby achieving efficient client use of data while protecting privacy. PEKS (Public Key Encryption with Keyword Search) is a search encryption technology based on public key encryption technology, which allows users to perform keyword search while encrypting data. The core idea of PEKS technology is to embed keyword information into ciphertext during the encryption process, and only users with the corresponding private key can decrypt ciphertext containing specific keywords. In this way, users can retrieve encrypted data through keyword search without exposing the content of the data, realizing the search function of encrypted data.
[0004] At present, traditional technologies have the following problems, mainly including:
[0005] First, many existing traditional searchable encryption schemes are based on bilinear pairing, but they have been proven to be unable to provide sufficient security in the face of quantum computing attacks, and therefore cannot meet the needs of post-quantum security.
[0006] Second, in lattice-based searchable encryption schemes, there is a need to resist malicious servers, because malicious servers may tamper with query results and leak sensitive information. Therefore, in this case, the recipient organization may not get the correct results and security may not be met.
[0007] Third, although attacks from malicious servers can be avoided in a specific server environment, this is usually accompanied by large storage and computing overhead.
[0008] To sum up, the existing technology cannot provide sufficient security when facing quantum computing attacks, the recipient organization may not be able to obtain correct results, and security may not be met. In addition, there are large storage and computing overheads in specific server environments. The applicant has made corresponding explorations to solve this problem. Summary of the invention
[0009] The purpose of the present application is to solve the above-mentioned problems and to provide a grid-based designated server searchable encryption optimization method, corresponding device, electronic device and computer-readable storage medium.
[0010] In order to meet the various objectives of this application, this application adopts the following technical solutions:
[0011] A grid-based designated server searchable encryption optimization method proposed to meet one of the purposes of this application includes:
[0012] Initializing a system public parameter pp in response to a searchable encryption optimization instruction, wherein the system public parameter pp includes security parameters n and q;
[0013] In response to the receiver's public and private key generation instruction, the receiver organization uses the TrapGen (q, n) algorithm to generate the receiver organization's public key pk according to the system public parameter pp. r =A r And the private key sk r =T r ;
[0014] In response to the cloud server's public and private key generation instruction, the cloud server selects a uniform random matrix and a short vector Calculation To generate the public key pk of the cloud server c =(B,u c ) and private key sk c =e c ;
[0015] In response to the keyword encryption instruction, the recipient organization generates a keyword based on the system public parameter pp and the keyword to be encrypted w∈{0,1} * , the public key pk of the recipient organization r =A r And the public key pk of the cloud server c =(B,u c ), calculated and determined Randomly select a number b∈{0,1} from the set {0,1} and select a uniformly random vector as well as Calculate and determine the encryption result c of the keyword to be encrypted 1 、c 2 and c 3 , to construct the ciphertext Cw;
[0016] In response to the trapdoor generation instruction, the recipient institution generates a trapdoor based on the system public parameter pp and the public key pk of the recipient institution. r =A r , the private key sk of the recipient organization r =T r And the keyword to be searched w′∈{0,1} * , calculated and determined Call SamplePre(A r , T r ,u w′ ,σ) algorithm generates a trapdoor e w′ ;
[0017] In response to the search and match instruction, the cloud server w =(c 1 , c 2 , c 3 ), the trapdoor e w′ And the private key sk of the cloud server c =e c , to match the keyword information in the ciphertext and the trapdoor, and send the matching result to the user client corresponding to the recipient organization to complete the grid-based designated server searchable encryption optimization.
[0018] Optionally, the step of initializing the system public parameter pp in response to the searchable encryption optimization instruction includes:
[0019] The system common parameters pp = (q, n, m, σ, σ 2 , H), where q is used to divide the infinite space into multiple small regions with the same rules, n represents the number of rows in the matrix, m represents the number of columns in the matrix, σ, σ 2 is the Gaussian parameter used for the Gaussian sampling algorithm, H represents the hash function, H:
[0020] Optionally, the receiver organization uses the TrapGen(q,n) algorithm to generate the receiver organization's public key pk according to the system public parameter pp. r =A r And the private key sk r =T rThe steps include:
[0021] The public key of the recipient organization is pk r =A r , the private key of the recipient organization is sk r =T r ,in, A r is an n×m dimensional matrix, T r is an m×m dimensional matrix that satisfies A r ×T r =0 mod q.
[0022] Optionally, according to the grid-based designated server searchable encryption optimization method of claim 1, it is characterized in that the cloud server selects a uniform random matrix and a short vector Calculation To generate the public key pk of the cloud server c =(B,u c ) and private key sk c =e c The steps include:
[0023] The matrix B is an n×m dimensional matrix, and the short vector e c is an m-dimensional vector randomly selected from a Gaussian distribution, u c The value of is B·e c The value after mod q, u c The dimension is n.
[0024] Optionally, according to the grid-based designated server searchable encryption optimization method of claim 1, it is characterized in that the receiver organization selects the encrypted keyword w∈{0,1} according to the system public parameter pp and the encrypted keyword w∈{0,1} * , the public key pk of the recipient organization r =A r And the public key pk of the cloud server c =(B,u c ), calculated and determined Randomly select a number b∈{0,1} from the set {0,1} and select a uniformly random vector as well as Calculate and determine the encryption result c of the keyword to be encrypted 1 、c 2 and c 3 , the steps to construct the ciphertext Cw include:
[0025] The c 1 =A r T ·r1 +s 1 , the c 2 =B T ·r 2 +s 2 , The ciphertext C w =(c 1 , c 2 , c 3 ), wherein said r 1 , r 2 are random vectors used to construct the LWE difficulty problem. 1 and 2 are all m-dimensional noise vectors, which are used to construct the LWE difficulty problem to confuse and hide the real secret vector. 3 is a positive integer used for auxiliary search, the c 1 , c 2 is an m-dimensional vector, the c 3 is a positive integer.
[0026] Optionally, the recipient organization uses the system public parameter pp and the public key pk of the recipient organization to obtain the r =A r , the private key sk of the recipient organization r =T r And the keyword to be searched w′∈{0,1} * , calculated and determined Call SamplePre(A r , T r ,u w′ ,σ) algorithm generates a trapdoor e w′ The steps include:
[0027] u w′ is the value of the search keyword calculated by the hash function, its dimension is n, and the generated u w′ It is needed in the SamplePre algorithm. It is used as the input value and outputs a trapdoor e w ′, trapdoor e w 'Satisfies A r ·e w′ =u w′ .
[0028] Optionally, the cloud server w =(c 1 , c 2 , c 3 ), the trapdoor e w′ And the private key sk of the cloud server c =ec , to match the ciphertext and the keyword information in the trapdoor, and send the matching result to the user client corresponding to the receiver organization, so as to complete the steps of the grid-based designated server searchable encryption optimization, including:
[0029] The cloud server uses the ciphertext C w =(c 1 , c 2 , c 3 ), the trapdoor e w′ And the private key sk of the cloud server c =e c , calculate and determine b′=c 3 -e w′ T c 1 -e c T c 2 , calculate and determine [(q / 2)·b′]=b, when the output value of the matching result is 1, it indicates that the search match is successful, and when the output value of the matching result is 0, it indicates that the search match fails, wherein b′ is a positive integer used to verify the final matching result;
[0030] The matching results are sent to the user client corresponding to the recipient organization to complete the grid-based designated server searchable encryption optimization.
[0031] A grid-based designated server searchable encryption optimization device adapted to another purpose of the present application includes:
[0032] A system parameter initialization module, configured to initialize a system public parameter pp in response to a searchable encryption optimization instruction, wherein the system public parameter pp includes security parameters n and q;
[0033] The first public and private key generation module is configured to respond to the receiver's public and private key generation instruction, and the receiver organization uses the TrapGen (qn) algorithm to generate the receiver organization's public key pk according to the system public parameter pp. r =A r And the private key sk r =T r ;
[0034] The second public and private key generation module is configured to respond to the cloud server public and private key generation instruction. The cloud server selects a uniform random matrix and a short vector Calculation To generate the public key pk of the cloud server c =(B,u c ) and private key skc =e c ;
[0035] The keyword encryption module is configured to respond to the keyword encryption instruction, and the recipient organization generates the keyword encryption instruction according to the system public parameter pp and the keyword to be encrypted w∈{0,1} * , the public key pk of the recipient organization r =A r And the public key pk of the cloud server c =(B,u c ), calculated and determined Randomly select a number b∈{0,1} from the set {0,1} and select a uniformly random vector as well as Calculate and determine the encryption result c of the keyword to be encrypted 1 、c 2 and c 3 , to construct the ciphertext C w ;
[0036] The trapdoor generation module is configured to respond to the trapdoor generation instruction, and the receiver institution generates a trapdoor according to the system public parameter pp and the public key pk of the receiver institution. r =A r , the private key sk of the recipient organization r =T r And the keyword to be searched w′∈{0,1} * , calculated and determined Call SamplePre(A r , T r ,u w′ ,σ) algorithm generates a trapdoor e w′ ;
[0037] The search and match module is configured to respond to the search and match instruction, and the cloud server performs the search and match operation according to the ciphertext C w =(c 1 , c 2 , c 3 ), the trapdoor e w′ And the private key sk of the cloud server c =e c , to match the keyword information in the ciphertext and the trapdoor, and send the matching result to the user client corresponding to the recipient organization to complete the grid-based designated server searchable encryption optimization.
[0038] An electronic device provided to meet another purpose of the present application includes a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the grid-based designated server searchable encryption optimization method described in the present application.
[0039] A computer-readable storage medium is provided to meet another purpose of the present application, which stores a computer program implemented according to the grid-based designated server searchable encryption optimization method in the form of computer-readable instructions. When the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
[0040] Compared with the prior art, the present application aims at the problems that the prior art cannot provide sufficient security when facing quantum computing attacks, the recipient organization may not be able to obtain correct results, the security may not be satisfied, and there are large storage and computing overheads in a specific server environment. The present application includes but is not limited to the following beneficial effects:
[0041] First, the lattice-based designated server searchable encryption optimization method of the present application has an efficient encryption and decryption process. The present application introduces an algorithm based on the LWE (Learning With Errors) problem in the encryption and decryption process to ensure a good balance between computational complexity and security. The use of random vectors and noise vectors ensures the efficiency of the encryption process and the security of the ciphertext.
[0042] Secondly, the grid-based server-specified searchable encryption optimization method of the present application has a flexible keyword search function. The present application provides a keyword search function for encrypted data, allowing users to find relevant data by generating search traps. This function is particularly important in cloud storage scenarios, and can provide convenient search and access while ensuring data privacy.
[0043] Third, the lattice-based designated server searchable encryption optimization method of the present application has strong security. Lattice-based cryptography is considered to be resistant to quantum computers. By using the LWE problem and its variants, the present application provides strong security protection, which can resist various potential threats including quantum attacks and ensure the security of data during transmission and storage.
[0044] Fourthly, the grid-based designated server searchable encryption optimization method of the present application is scalable and flexible. The parameter settings in the technical solution of the present application are flexible, and the security parameters (λ, n, m, q, etc.) can be adjusted according to actual needs, so as to adapt to application scenarios of different scales and security requirements. At the same time, the public key and private key generation, encryption and trapdoor generation algorithms in the solution have good scalability and can be easily integrated into the existing system architecture to provide customizable security services;
[0045] Fifth, this application is easy to manage and maintain. The designated server can centrally manage encrypted data and search traps, which is conducive to the maintenance and management of the system. Administrators can centrally manage users' search requests and access rights through the server, monitor and record search operations, and facilitate auditing and troubleshooting. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0047] Figure 1 An exemplary network architecture of a grid-based searchable encryption system in an embodiment of the present application;
[0048] Figure 2 It is a principle block diagram of a grid-based designated server searchable encryption optimization device in an embodiment of the present application;
[0049] Figure 3 It is a schematic diagram of the structure of the computer device in the embodiment of the present application. DETAILED DESCRIPTION
[0050] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0051] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0052] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0053] It will be understood by those skilled in the art that the "client", "terminal" and "terminal device" used herein include both devices with wireless signal receivers, which are devices with only wireless signal receivers without transmission capabilities, and devices with receiving and transmitting hardware, which are devices with receiving and transmitting hardware capable of two-way communication on a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers, tablet computers, which have single-line displays or multi-line displays or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service), which can combine voice, data processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, pager, Internet / intranet access, web browser, notepad, calendar and / or GPS (Global Positioning System) receiver; conventional laptop and / or palmtop computers or other devices, which have and / or include a conventional laptop and / or palmtop computer or other device with and / or including a radio frequency receiver. The "client", "terminal" and "terminal device" used herein may be portable, transportable, installed in a vehicle (air, sea and / or land), or suitable for and / or configured to run locally, and / or in a distributed form, at any other location on the earth and / or in space. The "client", "terminal" and "terminal device" used herein may also be a communication terminal, an Internet terminal, a music / video playing terminal, for example, a PDA, a MID (Mobile Internet Device) and / or a mobile phone with a music / video playing function, or a smart TV, a set-top box and other devices.
[0054] The hardware referred to by the names such as "server", "client", and "service node" in this application is essentially an electronic device with the equivalent capabilities of a personal computer. It is a hardware device with the necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. The computer program is stored in its memory, and the central processing unit calls the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.
[0055] It should be pointed out that the concept of "server" referred to in this application can also be extended to the case of server clusters. According to the network deployment principle understood by those skilled in the art, the servers should be logically divided. In physical space, these servers can be independent of each other but can be called through interfaces, or integrated into a physical computer or a set of computer clusters. Those skilled in the art should understand this flexibility, and should not use it to restrict the implementation of the network deployment method of this application.
[0056] Unless expressly specified, one or more technical features of the present application can be deployed on a server for implementation and accessed by a client through a remote call to obtain an online service interface provided by the server, or can be directly deployed and run on a client for access.
[0057] The neural network models referenced or may be referenced in this application, unless expressly specified, can be deployed on a remote server and remotely called on the client, or can be deployed and directly called on a client with sufficient device capabilities. In some embodiments, when it runs on the client, its corresponding intelligence can be obtained through transfer learning to reduce the requirements for the client's hardware operating resources and avoid excessive occupation of the client's hardware operating resources.
[0058] Unless explicitly specified, the various data involved in this application can be stored remotely on a server or on a local terminal device, as long as it is suitable for being called by the technical solution of this application.
[0059] Those skilled in the art should be aware that, although the various methods of the present application are described based on the same concept and thus present commonality to each other, unless otherwise specified, these methods can be independently executed. Similarly, for each embodiment disclosed in the present application, they are all proposed based on the same inventive concept, therefore, concepts with the same expression, and concepts that are appropriately changed for convenience despite different expressions, should be understood as equivalent.
[0060] Unless the mutually exclusive relationship between the embodiments to be disclosed in this application is explicitly stated, the relevant technical features involved in each embodiment can be cross-combined to flexibly construct a new embodiment, as long as such combination does not deviate from the creative spirit of this application and can meet the needs of the prior art or solve certain deficiencies in the prior art. Those skilled in the art should be aware of this flexibility.
[0061] See also Figure 1 In one embodiment, the grid-based designated server searchable encryption optimization method of the present application includes:
[0062] Step S10, initializing a system public parameter pp in response to a searchable encryption optimization instruction, wherein the system public parameter pp includes security parameters n and q;
[0063] The grid-based designated server searchable encryption optimization method of the present application can be based on the following Figure 1 The lattice-based searchable encryption system shown is implemented, which consists of a receiver organization and a cloud server, wherein the receiver organization includes multiple users, each of which can communicate with the cloud server independently, ensuring the efficiency and flexibility of the system.
[0064] In some embodiments, the recipient organization includes multiple users, each of whom has his own identity and key pair. The user generates a trapdoor using the system public parameters and his own private key to search for data encrypted on the cloud server. When the user needs to search for data, he can generate a corresponding search trapdoor based on keyword information and send it to the cloud server. The cloud server is responsible for storing the encrypted data and also receives search requests (traps) from the recipient organization. After receiving the search trapdoor, the cloud server matches the ciphertext with the keyword information in the trapdoor through a specific test algorithm. If the match is successful, the cloud server sends the relevant encrypted file or search result back to the recipient organization.
[0065] Furthermore, the searchable encryption system can initialize system public parameters pp in response to searchable encryption optimization instructions, wherein the system public parameters pp include security parameters n and q; during the initialization phase, each user client in the recipient organization can input security parameters n and q to initialize the system public parameters, and select a hash function as part of the system public parameters pp.
[0066] Specifically, the system common parameter pp = (q, n, m, σ, σ 2 , H), where q is used to divide the infinite space into multiple small regions with the same rules, n represents the number of rows in the matrix, m represents the number of columns in the matrix, σ, σ 2 is the Gaussian parameter used for the Gaussian sampling algorithm, H represents the hash function, H:
[0067] Step S20: In response to the receiver's public and private key generation instruction, the receiver uses the TrapGen (q, n) algorithm to generate the receiver's public key pk according to the system public parameter pp. r =A r And the private key sk r =T r ;
[0068] After initializing the system public parameters pp, the searchable encryption system can respond to the receiver's public and private key generation instructions. The receiver uses the TrapGen (q, n) algorithm to generate the receiver's public key pk according to the system public parameters pp. r =A r And the private key sk r =T r Specifically, during the key generation phase, the recipient organization and the cloud server generate their own public and private key pairs. The recipient organization's public and private key generation process uses a specific TrapGen algorithm to ensure the security and correctness of the key.
[0069] Specifically, the public key of the recipient organization is pk r =A r , the private key of the recipient organization is sk r =T r ,in, A r is an n×m dimensional matrix, T r is an m×m dimensional matrix that satisfies A r ×T r =0 mod q.
[0070] In some embodiments, the main goal of the TrapGen algorithm is to generate a public matrix A and the trapdoor information associated with it in the lattice, so that the person who has the trapdoor can easily solve certain specific lattice problems, while others cannot solve them. The TrapGen algorithm is usually applied to cryptographic schemes based on the Learning with Errors (LWE) or Short Integer Solution (SIS), which include:
[0071] 1. Generate a random matrix A: The TrapGen algorithm first generates a full-rank random matrix A, which is usually published as a public key. This matrix defines a lattice, and the trapdoor will help the holder find a specific solution in this lattice.
[0072] 2. Generate trapdoor information: The trapdoor is usually associated with some property of the matrix A, such as a certain "good" decomposition of the matrix, which allows the holder to perform specific operations on mathematical problems involving this matrix.
[0073] 3. Decoding and solving: A user with a trapdoor can use this trapdoor to efficiently decode or solve problems related to the matrix A. For example, in a scheme based on the LWE assumption, the trapdoor holder can use it to decrypt an encrypted message. Specifically, the trapdoor enables users to efficiently solve problems related to the lattice that are computationally complex for people without the trapdoor.
[0074] Step S30: In response to the cloud server public and private key generation instruction, the cloud server selects a uniform random matrix and a short vector Calculation To generate the public key pk of the cloud server c =(B,u c ) and private key sk c =e c ;
[0075] Generate the public key pk of the recipient organization r =A r And the private key sk r =T r Afterwards, the searchable encryption system can respond to the cloud server's public and private key generation instruction, and the cloud server selects a uniform random matrix and a short vector Calculation To generate the public key pk of the cloud server c =(B,u c ) and private key sk c =e c The public and private key generation process of the cloud server is based on randomly selected matrices and vectors, which is simple and efficient. This design ensures that the system can maintain high security and flexibility while achieving efficient encryption and decryption operations.
[0076] Specifically, the matrix B is an n×m-dimensional matrix, and the short vector e c is an m-dimensional vector randomly selected from a Gaussian distribution, u c The value of is B·e c The value after mod q, u c The dimension is n.
[0077] Step S40: In response to the keyword encryption instruction, the recipient organization generates a keyword based on the system public parameter pp and the keyword to be encrypted w∈{0,1} * , the public key pk of the recipient organization r =A r And the public key pk of the cloud server c =(B,u c ), calculated and determined Randomly select a number b∈{0,1} from the set {0,1} and select a uniformly random vector as well as Calculate and determine the encryption result c of the keyword to be encrypted 1 、c 2 and c 3 , to construct the ciphertext Cw ;
[0078] Generate the public key pk of the cloud server c =(B,u c ) and private key sk c =e c Afterwards, the searchable encryption system can respond to the keyword encryption instruction, and the recipient institution can encrypt the keyword according to the system public parameter pp and the keyword to be encrypted w∈{0,1} * , the public key pk of the recipient organization r =A r And the public key pk of the cloud server c =(B,u c ), calculated and determined Randomly select a number b∈{0,1} from the set {0,1} and select a uniformly random vector as well as Calculate and determine the encryption result c of the keyword to be encrypted 1 、c 2 and c 3 , to construct the ciphertext C w ; In the data encryption phase, the recipient organization calculates the hash value of the keyword to be encrypted, and then randomly selects the obfuscation vector and the noise vector. The ciphertext generation process combines random vectors and Gaussian noise to ensure the security of the ciphertext by taking advantage of the difficulty of the LWE (Learning with Errors) problem. Each part of the ciphertext is carefully designed to obfuscate and hide the actual keyword information, while ensuring that the ciphertext can correctly match the corresponding keyword in the subsequent search phase.
[0079] Specifically, the c 1 =A r T ·r 1 +s 1 , the c 2 =B T ·r 2 +s 2 , The ciphertext C w =(c 1 , c 2 , c 3 ), wherein said r 1 , r 2 are random vectors used to construct the LWE difficulty problem. 1 and 2 are all m-dimensional noise vectors, which are used to construct the LWE difficulty problem to confuse and hide the real secret vector. 3is a positive integer used for auxiliary search, the c 1 , c 2 is an m-dimensional vector, the c 3 is a positive integer.
[0080] In some embodiments, the LWE (Learning with Errors) problem is an extremely important mathematical problem in modern cryptography, especially in the field of post-quantum cryptography. The security of the LWE problem is based on complex problems in lattice theory and is considered to be highly resistant to attacks by both classical and quantum computers.
[0081] The LWE problem was first proposed by cryptographer Oded Regev in 2005. Regev proposed the LWE problem as a fundamental problem for designing encryption schemes that are resistant to quantum attacks. The LWE problem originates from well-known difficult problems in lattice theory (such as Shortest Vector Probiem, SVP) and increases its complexity by introducing "errors", making it more secure in cryptographic applications.
[0082] The LWE problem can be simplified to the following mathematical form: Given a matrix The goal is to solve the unknown secret vector s using the known A and a vector b (where b = A·s+e, s is the secret vector, and e is a small error vector). The specific definitions include:
[0083] 1. Matrix A: This is a known public matrix, usually a randomly generated matrix.
[0084] 2. Secret Vector This is the core of the LWE problem and needs to be recovered by solving it.
[0085] 3. Error vector Each element is usually a random error drawn from a small distribution and is used to mask the results of matrix operations.
[0086] The goal is to infer the secret vector s from the known A and b=A.s+e.
[0087] The difficulty of LWE is that the existence of the error e makes it very difficult to solve s directly through linear algebra methods, especially when the error is large enough, which makes the LWE problem a difficult problem with extremely high computational complexity.
[0088] Step S50: In response to the trapdoor generation instruction, the receiver institution generates a trapdoor based on the system public parameter pp and the receiver institution's public key pk. r =A r , the private key sk of the recipient organizationr =T r And the keyword to be searched w′∈{0,1} * , calculated and determined Call SamplePre(A r , T r ,u w′ ,σ) algorithm generates a trapdoor e w ′;
[0089] Calculate and determine the encryption result c of the keyword to be encrypted 1 、c 2 and c 3 , to construct the ciphertext Cw, the searchable encryption system can respond to the trapdoor generation instruction, and the receiver institution generates the ciphertext according to the system public parameter pp and the public key pk of the receiver institution. r =A r , the private key sk of the recipient organization r =T r And the keyword to be searched w′∈{0,1} * , calculated and determined Call SamplePre(A r , T r ,u w′ ,σ) algorithm generates a trapdoor e w′ In the trapdoor generation phase, the receiver uses its own private key and public key matrix to generate a trapdoor vector that satisfies a specific linear equation through the Gaussian sampling algorithm. This trapdoor vector is used to perform encrypted search operations on the cloud server to ensure that the cloud server can effectively match and return the corresponding encrypted data without leaking the actual keywords.
[0090] Specifically, u w′ is the value of the search keyword calculated by the hash function, its dimension is n, and the generated u w′ It is needed in the SamplePre algorithm. It is used as the input value and outputs a trapdoor e w′ , trapdoor w′ Satisfy A r ·e w′ =u w′ .
[0091] In some embodiments, the SamplePre algorithm aims to generate vectors from a specific Gaussian distribution that is closely related to the properties of the base lattice. It plays an important role in the encryption and decryption process, mainly used to generate trapdoors to balance the security and efficiency of the scheme. Its core goal is to generate lattice vectors suitable for further cryptographic operations when the base lattice and related parameters are known.
[0092] The SamplePre algorithm is used to generate the trapdoor required for encryption or decryption, ensuring that the security and efficiency of the cryptographic scheme are taken into account; it provides lattice vectors that meet specific requirements for subsequent cryptographic operations to meet decryption conditions or proof requirements.
[0093] The inputs to the SamplePre algorithm include:
[0094] 1. The basis matrix B of the lattice, which is the basic structure of the generated lattice;
[0095] 2. The target vector t, around which the algorithm will search for relevant grid vectors;
[0096] 3. Define the parameters of the Gaussian distribution (such as standard deviation) to determine the distribution characteristics of the generated vector; 4. Pre-generated trapdoor T B , usually generated by the TrapGen algorithm, is a key auxiliary element for algorithm execution.
[0097] The output of the SamplePre algorithm includes: a lattice vector s that satisfies a given distribution, which must meet specific decryption conditions or proof requirements to ensure its effectiveness in the cryptographic system.
[0098] The core steps of the SamplePre algorithm include:
[0099] 1. Using Trapdoor T B Sampling the target vector t is one of the key processing steps of the algorithm;
[0100] 2. Calculate the lattice vector s that satisfies the Gaussian distribution and associate it with the input vector to ensure that the generated vector meets the design goals of the algorithm;
[0101] 3. Return the vector s and ensure that it strictly obeys the target distribution to meet the accuracy and reliability requirements of subsequent cryptographic operations.
[0102] The core idea of the SamplePre algorithm is to generate lattice vectors based on Gaussian sampling. Its implementation relies on short-base sampling technology and the properties of lattice trapdoors. The specific mathematical formula is as follows:
[0103] Assume that there is a lattice L(B) generated by the basis matrix B. The algorithm aims to extract the L,σ (t) generates a vector x to meet specific decryption or security requirements. The formula can be expressed as: x~D L,σ (t), which means sampling the target t with standard deviation σ from the Gaussian distribution on the grid L(B). At the same time, the trapdoor T based on the grid B To select the appropriate x, so as to ensure the efficiency and correctness of the calculation.
[0104] In some embodiments, the Gaussian Sampling Algorithm is a very important tool in cryptography, especially in lattice-based cryptography. Its main purpose is to generate samples from a discrete Gaussian distribution, which is widely used in encryption algorithms, digital signatures, homomorphic encryption, and other cryptographic applications, especially when designing schemes whose security depends on lattice problems (such as LWE, SIS).
[0105] Gaussian distribution, also known as normal distribution, is the most common continuous probability distribution in statistics. The shape of its probability density function is a bell-shaped curve with central symmetry, indicating that the data is more concentrated near the mean, and the farther away from the mean, the smaller the probability density. The probability density function of Gaussian distribution is defined as:
[0106]
[0107] where μ is the mean and σ is the standard deviation. The importance of the Gaussian distribution lies in its ubiquity in natural phenomena and in the mathematical basis of the "central limit theorem"*.
[0108] In cryptography, especially in lattice-based cryptographic schemes, it is often necessary to generate random samples to ensure security and correctness. In many cryptographic scenarios, especially in lattice-based encryption and signature algorithms, it is necessary to sample from a discrete Gaussian distribution in a high-dimensional space. Specifically, the samples need to conform to a certain error distribution so that the algorithm is quantum-resistant. In these applications, discrete Gaussian sampling is more practical than continuous Gaussian sampling. Its goal is to generate samples from discrete grid points that follow a certain Gaussian distribution.
[0109] The discrete Gaussian distribution is a discrete version of the Gaussian distribution, which is defined to generate samples at integer points (or more generally at a grid point). The importance of the discrete Gaussian distribution is that it not only maintains the mathematical properties of the Gaussian distribution, but is also suitable for cryptographic applications that require the generation of discrete random values in a finite space.
[0110] Given a grid and a central point and a standard deviation σ, the probability mass function of the discrete Gaussian distribution is defined as follows:
[0111]
[0112] where x is a vector sampled from the grid Λ, distributed around the center c, and with variance given by σ 2 control.
[0113] The main task of the Gaussian sampling algorithm is to generate samples according to the Gaussian distribution at given discrete grid points.
[0114] This process includes the following core steps:
[0115] 1. Input settings: The input of Gaussian sampling includes the target grid Λ, the center point c, and the standard deviation σ. These parameters determine the range and distribution characteristics of the sampling.
[0116] 2. Generate initial samples: The algorithm first generates an initial candidate sample. This candidate sample can be achieved by extracting values from a standard normal distribution and then mapping them to discrete grid points.
[0117] 3. Acceptance-rejection sampling: Since it is difficult to directly generate samples that conform to the discrete Gaussian distribution, the "acceptance-rejection" technique is usually used. This technique first generates a sample and then calculates the probability that it conforms to the target distribution. If the probability of the sample is low, the sample is rejected and regenerated until a sample that conforms to the expected distribution is obtained.
[0118] 4. Return results: Once a suitable sample is found, the algorithm returns the sample as a valid sampling result under discrete Gaussian distribution.
[0119] Step S60: In response to the search and match instruction, the cloud server generates a matching result according to the ciphertext C. w =(c 1 , c 2 , c 3 ), the trapdoor e w′ And the private key sk of the cloud server c =e c , to match the keyword information in the ciphertext and the trapdoor, and send the matching result to the user client corresponding to the recipient organization to complete the grid-based designated server searchable encryption optimization.
[0120] Call SamplePre(A r , T r ,u w′ ,σ) algorithm generates a trapdoor e w′ Afterwards, the cloud server w =(c 1 , c 2 , c 3 ), the trapdoor e w′ And the private key sk of the cloud server c =e c, to match the keyword information in the ciphertext and the trapdoor, and send the matching result to the user client corresponding to the recipient organization to complete the grid-based designated server searchable encryption optimization; in the search and matching stage, the cloud server is based on the ciphertext information of the keyword and the search trapdoor of the recipient organization. Through the preset search and matching algorithm, the cloud server can match the keyword information in the ciphertext and the trapdoor without decryption, and finally send the matching result to the user client in the recipient organization.
[0121] Specifically, the cloud server w =(c 1 ,c 2 , c 3 ), the trapdoor e w′ And the private key sk of the cloud server c =e c , calculate and determine b′=c 3 -e w′ T c 1 -e c T c 2 , calculated and determined When the output value of the matching result is 1, it indicates that the search match is successful; when the output value of the matching result is 0, it indicates that the search match fails, wherein b′ is a positive integer used to verify the final matching result; the matching result is sent to the user client corresponding to the recipient organization to complete the grid-based designated server searchable encryption optimization.
[0122] See also Figure 2 , a grid-based designated server searchable encryption optimization device provided to meet one of the purposes of the present application, includes a system parameter initialization module 110, a first public-private key generation module 1200, a second public-private key generation module 1300, a keyword encryption module 1400, a trapdoor generation module 1500, and a search and matching module 1600. Among them, the system parameter initialization module 1100 is configured to respond to the searchable encryption optimization instruction and initialize the system public parameter pp, wherein the system public parameter pp includes security parameters n and q; the first public-private key generation module 1200 is configured to respond to the receiver public-private key generation instruction, and the receiver organization uses the TrapGen (qn) algorithm according to the system public parameter pp to generate the receiver organization's public key pk r =A r And the private key sk r =T r ; The second public and private key generation module 1300 is configured to respond to the cloud server public and private key generation instruction, and the cloud server selects a uniform random matrix and a short vector Calculation To generate the public key pk of the cloud server c =(B,u c ) and private key sk c =e c ; Keyword encryption module 1400, configured to respond to keyword encryption instructions, the recipient organization according to the system public parameters pp, to be encrypted keyword w∈{0,1} * , the public key pk of the recipient organization r =A r And the public key pk of the cloud server c =(B,u c ), calculated and determined Randomly select a number b∈{0,1} from the set {0,1} and select a uniformly random vector as well as Calculate and determine the encryption result c of the keyword to be encrypted 1 、c 2 and c 3 , to construct the ciphertext C w ; Trapdoor generation module 1500, configured to respond to the trapdoor generation instruction, the receiver institution according to the system public parameter pp, the public key pk of the receiver institution r =A r , the private key sk of the recipient organization r =T r And the keyword to be searched w′∈{0,1} * , calculated and determined Call SamplePre(A r , T r ,u w′ ,σ) algorithm generates a trapdoor e w′ ; Search and match module 1600, configured to respond to the search and match instruction, the cloud server according to the ciphertext C w =(c 1 , c 2 , c 3 ), the trapdoor e w′ And the private key sk of the cloud server c =e c , to match the keyword information in the ciphertext and the trapdoor, and send the matching result to the user client corresponding to the recipient organization to complete the grid-based designated server searchable encryption optimization.
[0123] Based on any embodiment of this application, please refer to Figure 3Another embodiment of the present application further provides an electronic device, which can be implemented by a computer device, such as Figure 3 As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a grid-based designated server searchable encryption optimization method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the grid-based designated server searchable encryption optimization method of the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art can understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0124] In this embodiment, the processor is used to execute Figure 2 The memory stores the program code and various data required to execute the above modules or submodules. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program code and data required to execute all modules / submodules in the grid-based designated server searchable encryption optimization device of this application, and the server can call the program code and data of the server to execute the functions of all submodules.
[0125] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the grid-based designated server searchable encryption optimization method described in any embodiment of the present application.
[0126] The present application also provides a computer program product, including a computer program / instruction, which, when executed by one or more processors, implements the steps of the grid-based designated server searchable encryption optimization method described in any embodiment of the present application.
[0127] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0128] The above is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
[0129] In summary, this application is easy to manage and maintain. The designated server can centrally manage encrypted data and search traps, which is conducive to the maintenance and management of the system. Administrators can centrally manage users' search requests and access rights through the server, monitor and record search operations, and facilitate auditing and troubleshooting.
Claims
1. A grid-based designated server searchable encryption optimization method, characterized in that: include: Initializing a system public parameter pp in response to a searchable encryption optimization instruction, wherein the system public parameter pp includes security parameters n and q; In response to the receiver's public and private key generation instruction, the receiver organization uses the TrapGen (q, n) algorithm to generate the receiver organization's public key pk according to the system public parameter pp. r =A r And the private key sk r =T r ; In response to the cloud server's public and private key generation instruction, the cloud server selects a uniform random matrix and a short vector Calculation To generate the public key pk of the cloud server c =(B,u c ) and private key sk c =e c ; In response to the keyword encryption instruction, the recipient organization generates a keyword based on the system public parameter pp and the keyword to be encrypted w∈{0,1} * , the public key pk of the recipient organization r =A r And the public key pk of the cloud server c =(B,u c ), calculated and determined Randomly select a number b∈{0,1} from the set {0,1} and select a uniformly random vector as well as Calculate and determine the encryption results c1, c2 and c3 of the keyword to be encrypted to construct a ciphertext Cw; In response to the trapdoor generation instruction, the recipient institution generates a trapdoor based on the system public parameter pp and the public key pk of the recipient institution. r =A r , the private key sk of the recipient organization r =T r And the keyword to be searched w′∈{0,1} * , calculated and determined Call SamplePre(A r , T r ,u w′ ,σ) algorithm generates a trapdoor e w′ ; In response to the search and match instruction, the cloud server w =(c1, c2, c3), the trapdoor e w′ And the private key sk of the cloud server c =e c , to match the keyword information in the ciphertext and the trapdoor, and send the matching result to the user client corresponding to the recipient organization to complete the grid-based designated server searchable encryption optimization.
2. The grid-based designated server searchable encryption optimization method according to claim 1, characterized in that: The step of initializing the system public parameter pp in response to the searchable encryption optimization instruction comprises: The system common parameter pp = (q, n, m, σ, σ2, H), where q is used to divide an infinite space region into multiple small regions with the same rules, n represents the number of rows of the matrix, m represents the number of columns of the matrix, σ and σ2 are Gaussian parameters used for the Gaussian sampling algorithm, and H represents a hash function.
3. The grid-based designated server searchable encryption optimization method according to claim 1, characterized in that: The receiver organization uses the TrapGen (qn7) algorithm to generate the receiver organization's public key pk based on the system public parameter pp. r =A r And the private key sk r =T r The steps include: The public key of the recipient organization is pk r =A r , the private key of the recipient organization is sk r =T r ,in, A r is an n×m dimensional matrix, T r is an m×m dimensional matrix that satisfies A r ×T r =0 mod q.
4. The grid-based designated server searchable encryption optimization method according to claim 1, characterized in that: The cloud server selects a uniform random matrix and a short vector Calculation To generate the public key pk of the cloud server c =(B,u c ) and private key sk c =e c The steps include: The matrix B is an n×m dimensional matrix, and the short vector e c is an m-dimensional vector randomly selected from a Gaussian distribution, u c The value of is B·e c The value after mod q, u c The dimension is n.
5. The grid-based designated server searchable encryption optimization method according to claim 1, characterized in that: The recipient organization uses the system public parameter pp, the key to be encrypted w∈{0,1}*, and the public key pk of the recipient organization. r =A r And the public key pk of the cloud server c =(B,u c ), calculated and determined Randomly select a number b∈{0,1} from the set {0,1} and select a uniformly random vector as well as Calculate and determine the encryption results c1, c2 and c3 of the keyword to be encrypted to construct the ciphertext C w The steps include: c1=A r T ·r1+s1, c2=B T ·r2+s2, The ciphertext C w =(c1, c2, c3), wherein r1 and r2 are both random vectors used to construct the LWE difficulty problem, s1 and s2 are both m-dimensional noise vectors used to construct the LWE difficulty problem to confuse and hide the real secret vector, s3 is a positive integer used to assist the search, c1 and c2 are m-dimensional vectors, and c3 is a positive integer.
6. The grid-based designated server searchable encryption optimization method according to claim 1, characterized in that: The receiver organization uses the system public parameter pp and the receiver organization's public key pk r =A r , the private key sk of the recipient organization r =T r And the keyword to be searched w′∈{0,1} * , calculated and determined Call SamplePre(A r , T r ,u w′ ,σ) algorithm generates a trapdoor e w′ The steps include: u w′ is the value of the search keyword calculated by the hash function, its dimension is n, and the generated u w′ It is needed in the SamplePre algorithm. It is used as the input value and outputs a trapdoor e w′ , trapdoor w′ Satisfy A r ·e w′ =u w′ .
7. The grid-based designated server searchable encryption optimization method according to claim 1, characterized in that: The cloud server uses the ciphertext C w =(c1, c2, c3), the trapdoor e w′ And the private key sk of the cloud server c =e c , to match the ciphertext and the keyword information in the trapdoor, and send the matching result to the user client corresponding to the receiver organization, so as to complete the steps of the grid-based designated server searchable encryption optimization, including: The cloud server uses the ciphertext C w =(c1, c2, c3), the trapdoor e w′ And the private key sk of the cloud server c =e c , calculate and determine b′=c3-e w′ T c1-e c T c2, calculate and determine [(q / 2)·b′]=b, when the output value of the matching result is 1, it indicates that the search match is successful, when the output value of the matching result is 0, it indicates that the search match fails, wherein b′ is a positive integer used to verify the final matching result; The matching results are sent to the user client corresponding to the recipient organization to complete the grid-based designated server searchable encryption optimization.
8. A grid-based designated server searchable encryption optimization device, characterized in that: include: A system parameter initialization module, configured to initialize a system public parameter pp in response to a searchable encryption optimization instruction, wherein the system public parameter pp includes security parameters n and q; The first public and private key generation module is configured to respond to the receiver's public and private key generation instruction, and the receiver organization uses the TrapGen (qn) algorithm to generate the receiver organization's public key pk according to the system public parameter pp. r =A r And the private key sk r =T r ; The first public and private key generation module is configured to respond to the cloud server public and private key generation instruction. The cloud server selects a uniform random matrix and a short vector Calculation To generate the public key pk of the cloud server c =(B,u c ) and private key sk c =e c ; The keyword encryption module is configured to respond to the keyword encryption instruction, and the recipient organization generates the keyword encryption instruction according to the system public parameter pp and the keyword to be encrypted w∈{0,1} * , the public key pk of the recipient organization r =A r And the public key pk of the cloud server c =(B,u c ), calculated and determined Randomly select a number b∈{0,1} from the set {0,1} and select a uniformly random vector as well as Calculate and determine the encryption results c1, c2 and c3 of the keyword to be encrypted to construct a ciphertext Cw; The trapdoor generation module is configured to respond to the trapdoor generation instruction, and the receiver institution generates a trapdoor according to the system public parameter pp and the public key pk of the receiver institution. r =A r , the private key sk of the recipient organization r =T r And the keyword to be searched w′∈{0,1} * , calculated and determined Call SamplePre(A r , T r ,u w′ ,σ) algorithm generates a trapdoor e w′ ; The search and match module is configured to respond to the search and match instruction, and the cloud server performs the search and match operation according to the ciphertext C w =(c1, c2, c3), the trapdoor e w′ And the private key sk of the cloud server c =e c , to match the keyword information in the ciphertext and the trapdoor, and send the matching result to the user client corresponding to the recipient organization to complete the grid-based designated server searchable encryption optimization.
9. An electronic device, comprising a central processing unit and a memory, characterized in that: The central processing unit is used to call and run the computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: It stores a computer program implemented according to the method described in any one of claims 1 to 7 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
Citation Information
Patent Citations
PEKS (public-key encryption with keyword search) method for lattice-based cloud stored cyphertext data under standard model
CN106789044A
Searchable encryption and multi-user expansion method without secure channel supporting privacy protection
CN117499021A
Searchable encryption method for supporting disjunction search on lattice based on hierarchical identity
CN117744131A
Ciphertext search method, apparatus and system, and computer-readable storage medium
WO2022099496A1
Cited By
Symmetrical searchable encryption method based on quantum security after meeting LWE problem
CN120358096A
Symmetric searchable encryption method based on LWE problem with post-quantum security
CN120358096B
Lightweight hybrid encryption transmission method and system capable of resisting quantum attack
CN120675692A
Lattice-based puncturable key strategy attribute searchable encryption method and system
CN121567393A
A lattice-based puncturable key-policy attribute-based searchable encryption method and system
CN121567393B