Grid-based designated server searchable encryption optimization method, device, equipment and medium
Through the lattice-based designated server searchable encryption optimization method, the security and storage computing overhead issues under quantum computing attacks are solved, and an efficient and secure encryption and decryption process is achieved. It has flexible keyword search functions and strong security, and is suitable for application scenarios of different scales and security requirements.
Patent Information
- Application Number
- CN202411415287.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-10-11
AI Technical Summary
Existing technologies cannot provide sufficient security in the face of quantum computing attacks, the recipient organization may not be able to obtain correct results, and there are large storage and computing overheads in specific server environments.
A lattice-based designated server searchable encryption optimization method is adopted. By initializing system public parameters, generating public and private keys, encrypting keywords and generating trapdoors, combined with the LWE difficulty problem, an efficient encryption and decryption process is achieved, and the ciphertext and trapdoor are matched on the cloud server.
It provides an efficient encryption and decryption process, has flexible keyword search functions, has strong security and anti-quantum computing capabilities, adapts to application scenarios of different scales and security requirements, and is easy to manage and maintain.
Smart Images

Figure CN119299092B_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 ever-increasing amount of data people possess daily. Cloud servers provide massive storage space and computing resources, effectively reducing data storage and maintenance costs and enabling users to access their data anytime, anywhere. While outsourcing data processing to cloud servers has many advantages, it also has some disadvantages. A major issue is that when users entrust their data to cloud servers, their control over that data is significantly reduced. Because trust in cloud servers is difficult to guarantee, user-uploaded information is at risk of unauthorized access or misuse, posing significant challenges to user privacy and security.
[0003] Search encryption (SE) technology is a key technology in the field of information security. Its purpose is to protect the confidentiality and integrity of data and prevent unauthorized access, tampering, or disclosure. 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-side data usage while protecting privacy. PEKS (Public Key Encryption with Keyword Search) is a search encryption technology based on public key encryption that allows users to perform keyword searches while encrypting data. The core idea of PEKS technology is to embed keyword information into ciphertext during the encryption process. Only users with the corresponding private key can decrypt ciphertext containing specific keywords. In this way, users can retrieve encrypted data through keyword searches without revealing the data content, 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 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, as malicious servers may tamper with query results and leak sensitive information. Therefore, in this case, the recipient organization may not obtain the correct results and security may not be met.
[0007] Third, although it is possible to avoid attacks from malicious servers in a specific server environment, it 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. In order to solve this problem, the applicant has made corresponding explorations. Summary of the Invention
[0009] The purpose of this application is to solve the above problems and 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 server-specific 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 based on 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 instructions, the cloud server selects a uniform random matrix and a short vector Calculated 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 uses the system public parameter pp, 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;
[0016] In response to the trapdoor generation instruction, the receiver institution generates a trapdoor based on 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′ ;
[0017] In response to the search matching 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.
[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 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 the hash function.
[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 r The 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, the grid-based designated server searchable encryption optimization method according to claim 1 is characterized in that the cloud server selects a uniform random matrix and a short vector Calculated 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, the grid-based designated server searchable encryption optimization method according to claim 1 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 The step of calculating and determining the encryption results c1, c2, and c3 of the keyword to be encrypted to construct the ciphertext Cw includes:
[0025] c1=A r T r1+s1, c2=B T ·r2+s2, The ciphertext C w=(c1, c2, c3), wherein r1 and r2 are random vectors used to construct the LWE difficulty problem, s1 and s2 are m-dimensional noise vectors used to construct the LWE difficulty problem to confuse and hide the true 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.
[0026] Optionally, the receiver institution uses the system public parameter pp and the public key pk of the receiver institution to 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′ It 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, which takes the input value and outputs a trapdoor e w ′, trapdoor e w 'Satisfies A r ·e w′ =u w′ .
[0028] Optionally, the cloud server can 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 recipient organization, so as to complete the steps of lattice-based designated server searchable encryption optimization, including:
[0029] 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 Tc2, 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, where 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 system public parameters pp in response to a searchable encryption optimization instruction, wherein the system public parameters pp include 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 uses the TrapGen (qn) 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 ;
[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 Calculated To generate the public key pk of the cloud server c =(B,u c ) and private key sk c =e c ;
[0035] The keyword encryption module is configured to respond to the keyword encryption instruction, and the recipient organization receives 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 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 based on 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 matching module is configured to respond to the search and matching instruction, and the cloud server performs the search and matching 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.
[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, it executes the steps included in the corresponding method.
[0040] Compared with the existing technology, this application addresses the problems in the existing technology that cannot provide sufficient security when facing quantum computing attacks, the recipient organization may not be able to obtain correct results, security may not be met, and there are large storage and computing overheads in specific server environments. This application includes but is not limited to the following beneficial effects:
[0041] First, this application's lattice-based, server-specific searchable encryption optimization method offers efficient encryption and decryption processes. This application incorporates an algorithm based on the LWE (Learning With Errors) problem, ensuring a good balance between computational complexity and security. The use of random and noise vectors ensures both efficient encryption and secure ciphertext.
[0042] Secondly, the grid-based, server-specific searchable encryption optimization method proposed in this application features flexible keyword search capabilities. This application provides keyword searches for encrypted data, allowing users to find relevant data by generating search traps. This capability is particularly important in cloud storage scenarios, providing convenient search and access while ensuring data privacy.
[0043] Third, the proposed lattice-based server-searchable encryption optimization method offers strong security. Lattice-based cryptography is considered resistant to quantum computers. By using the LWE problem and its variants, this application provides robust security against various potential threats, including quantum attacks, ensuring data security during transmission and storage.
[0044] Fourth, the lattice-based, server-specific searchable encryption optimization method of this application is scalable and flexible. The parameter settings in this technical solution are flexible, and security parameters (λ, n, m, q, etc.) can be adjusted according to actual needs, thus adapting to application scenarios of different scales and security requirements. At the same time, the public and private key generation, encryption, and trapdoor generation algorithms in the solution are highly scalable and can be easily integrated into existing system architectures to provide customizable security services.
[0045] Fifth, this application facilitates management and maintenance. Designated servers can centrally manage encrypted data and search traps, facilitating system maintenance and management. Administrators can centrally manage user search requests and access permissions through the server, monitor and log 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 This is an exemplary network architecture of a grid-based searchable encryption system in an embodiment of the present application;
[0048] Figure 2 This 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 Schematic diagram of the structure of the computer device in the embodiment of the present application. DETAILED DESCRIPTION
[0050] The following describes in detail embodiments of the present application, examples of which 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 are not to be construed as limiting the present application.
[0051] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include the 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 intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" used herein includes all or any units 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 commonly understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0053] It will be understood by those skilled in the art that the terms "client," "terminal," and "terminal device" as used herein include both devices that are wireless signal receivers, i.e., devices that only have wireless signal receivers without transmission capabilities, and devices that have receiving and transmitting hardware capable of two-way communication over a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers and tablet computers, which have single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service), which may combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / Intranet access, a web browser, a notepad, a calendar, and / or a GPS (Global Positioning System) receiver; and conventional laptop and / or palmtop computers or other devices, which have and / or include a radio frequency receiver. As used herein, the terms "client," "terminal," or "terminal device" may be portable, transportable, or installed in a vehicle (air, sea, and / or land), or may be adapted and / or configured to operate locally and / or in a distributed manner at any other location on Earth and / or in space. As used herein, the terms "client," "terminal," or "terminal device" may also refer to a communication terminal, an Internet terminal, or a music / video playback terminal, such as a PDA, an MID (Mobile Internet Device), and / or a mobile phone with music / video playback capabilities, or may include a smart TV, a set-top box, or other device.
[0054] The hardware referred to by names such as "server", "client", and "service node" in this application is essentially an electronic device with capabilities equivalent to those of a personal computer. It is a hardware device that has 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. Computer programs are stored in its memory, and the central processing unit loads 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 noted that the concept of "server" referred to in this application can also be extended to server clusters. Based on the network deployment principles understood by those skilled in the art, the servers described should be logically divided. In physical space, these servers can be independent of each other but callable through interfaces, or integrated into a single physical computer or a computer cluster. Those skilled in the art should understand this flexibility and should not use it to constrain 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 implementation.
[0057] Unless expressly specified otherwise, the neural network models referenced or may be referenced in this application may be deployed on a remote server and remotely called on the client, or may be deployed and directly called on a client with sufficient device capabilities. In some embodiments, when it runs on the client, its corresponding intelligence may 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 they are 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 this application are described based on the same concept and thus exhibit commonality, unless otherwise specified, these methods can be independently executed. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept. Therefore, concepts with the same expression, as well as concepts that are appropriately transformed for convenience despite different expression, should be understood as equivalent.
[0060] Unless expressly stated to be mutually exclusive, the various embodiments disclosed in this application may be cross-combined with the relevant technical features of the various embodiments to flexibly construct new embodiments, 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 resolve certain deficiencies in the prior art. Those skilled in the art should be aware of such 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 system public parameters pp in response to the searchable encryption optimization instruction, wherein the system public parameters pp include 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. The receiver organization includes multiple users, and each user can communicate with the cloud server independently to ensure the efficiency and flexibility of the system.
[0064] In some embodiments, the recipient organization includes multiple users, each with their own identity and key pair. Users use system public parameters and their own private keys to generate trapdoors for searching data encrypted on a cloud server. When searching for data, users generate corresponding search trapdoors based on keyword information and send them to the cloud server. The cloud server stores the encrypted data and also receives search requests (traps) from the recipient organization. Upon receiving the search trapdoor, the cloud server uses a specific test algorithm to match the ciphertext with the keyword information in the trapdoor. If a match is successful, the cloud server sends the relevant encrypted file or search results 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 an infinite spatial 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 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 instruction. 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 each 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 keys.
[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 associated trapdoor information in a lattice, so that those who possess the trapdoor can easily solve certain specific lattice problems, while others cannot solve them. The TrapGen algorithm is typically applied to cryptographic schemes based on the Learning with Errors (LWE) problem or the Short Integer Solution (SIS) problem, 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 it to efficiently decode or solve problems related to the matrix A. For example, in schemes based on the LWE assumption, the trapdoor holder can use it to decrypt encrypted messages. Specifically, the trapdoor enables users to efficiently solve lattice-related problems that are computationally complex for those without the trapdoor.
[0074] Step S30: 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 Calculated 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 instructions, and the cloud server selects a uniform random matrix and a short vector Calculated To generate the public key pk of the cloud server c =(B,u c ) and private key sk c =e c The cloud server's public and private key generation process is simple and efficient, based on randomly selected matrices and vectors. This design ensures the system maintains 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 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 results c1, c2 and c3 of the keyword to be encrypted to construct the ciphertext C w ;
[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 organization can use the system public parameter pp, 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 the ciphertext C w During the data encryption phase, the recipient calculates the hash value of the keyword to be encrypted and then randomly selects an obfuscation vector and a noise vector. The ciphertext generation process combines random vectors and Gaussian noise to leverage the difficulty of the LWE (Learning with Errors) problem to ensure ciphertext security. Each component of the ciphertext is carefully designed to obfuscate and conceal the actual keyword information while ensuring that the ciphertext can correctly match the corresponding keyword in the subsequent search phase.
[0079] Specifically, the c1=A r T r1+s1, c2=B T ·r2+s2, The ciphertext C w =(c1, c2, c3), wherein r1 and r2 are random vectors used to construct the LWE difficulty problem, s1 and s2 are m-dimensional noise vectors used to construct the LWE difficulty problem to confuse and hide the true 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.
[0080] In some embodiments, the LWE (Learning with Errors) problem is a crucial mathematical problem in modern cryptography, particularly in post-quantum cryptography. The security of the LWE problem, based on complex problems in lattice theory, is believed 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 resistant to quantum attacks. The LWE problem originates from well-known difficult problems in lattice theory (such as the Shortest Vector Problem (SVP)) and increases its complexity by introducing "errors," thereby 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 lies in the fact 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 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 ';
[0089] After calculating and determining the encryption results c1, c2 and c3 of the keyword to be encrypted to construct the ciphertext Cw, the searchable encryption system can respond to the trapdoor generation instruction, and the receiver institution can generate the 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′ During the trapdoor generation phase, the recipient uses their private key and public key matrix to generate a trapdoor vector that satisfies a specific linear equation using a Gaussian sampling algorithm. This trapdoor vector is used to perform encrypted searches on the cloud server, ensuring that the cloud server can effectively match and return the corresponding encrypted data without revealing the actual keyword.
[0090] Specifically, u w′ It 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, which takes the input value and outputs a trapdoor e w′ , trapdoor e 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 underlying lattice. It plays a crucial role in encryption and decryption, primarily for generating trapdoors to balance security and efficiency. Its core goal is to generate lattice vectors suitable for further cryptographic operations given the underlying lattice and its associated parameters.
[0092] The SamplePre algorithm is used to generate the trapdoors required for encryption or decryption, ensuring both the security and efficiency of the cryptographic scheme. It also provides lattice vectors that meet specific requirements for subsequent cryptographic operations, satisfying 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 related 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. This vector 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. Use 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-basis 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 a 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 cases, the Gaussian sampling algorithm is a very important tool in cryptography, especially in lattice-based cryptography. Its primary purpose is to generate samples from a discrete Gaussian distribution. It is widely used in encryption algorithms, digital signatures, homomorphic encryption, and other cryptographic applications, especially when designing schemes whose security relies on lattice problems (such as LWE and SIS).
[0105] The Gaussian distribution, also known as the normal distribution, is the most common continuous probability distribution in statistics. Its probability density function is a bell-shaped curve with central symmetry, indicating that data is more concentrated near the mean. The farther away from the mean, the smaller the probability density. The probability density function of the 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 the mathematical foundation of the "Central Limit Theorem."
[0108] In cryptography, especially lattice-based cryptographic schemes, generating random samples is often necessary to ensure security and correctness. In many cryptographic scenarios, particularly lattice-based encryption and signature algorithms, it is necessary to sample from a discrete Gaussian distribution in high-dimensional space. Specifically, the samples must conform to a certain error distribution to ensure the algorithm's security against quantum computing. In these applications, discrete Gaussian sampling is more practical than continuous Gaussian sampling. Its goal is to generate samples from discrete lattice points that follow a Gaussian distribution.
[0109] The discrete Gaussian distribution is a discrete version of the Gaussian distribution, defined to generate samples at integer points (or more broadly, at a grid). The importance of the discrete Gaussian distribution lies in 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 sampling range and distribution characteristics.
[0116] 2. Generate initial sample: 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: Because it is difficult to directly generate samples that conform to a discrete Gaussian distribution, the "acceptance-rejection" technique is often 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 result: Once a suitable sample is found, the algorithm returns the sample as a valid sampling result under the discrete Gaussian distribution.
[0119] Step S60: In response to the search and matching 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.
[0120] Call SamplePre(A r , T r ,u w′ ,σ) algorithm generates a trapdoor e w′ Afterwards, the cloud server calculates 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; 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 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, 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 is provided to meet one of the purposes of this application, including 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. The system parameter initialization module 1100 is configured to initialize the system public parameter pp in response to the searchable encryption optimization instruction, 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's public-private key generation instruction, and the receiver uses the TrapGen(qn) 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 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 Calculated 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, set to respond to the keyword encryption instruction, the recipient agency according to the system public parameter 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 results c1, c2 and c3 of the keyword to be encrypted to construct the ciphertext C w ; Trapdoor generation module 1500, configured to respond to the trapdoor generation instruction, the recipient institution according to the system public parameter pp, the public key pk of the recipient institutionr =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 =(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.
[0123] Based on any embodiment of this application, please refer to Figure 3 Another 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, and 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 the terminal. Those skilled in the art will 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 shown in the figure, or combine certain components, or have a different component arrangement.
[0124] In this embodiment, the processor is used to execute Figure 2The memory stores the program code and various data required to execute the 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. The server can call the server's program code and data 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 will appreciate 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. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments of the method. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0128] The above description is only part of the implementation methods 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 facilitates management and maintenance. Designated servers can centrally manage encrypted data and search traps, facilitating system maintenance and management. Administrators can centrally manage user search requests and access permissions through the server, monitor and log 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 based on 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 instructions, the cloud server selects a uniform random matrix and a short vector Calculated 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 uses the system public parameter pp, 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 receiver institution generates a trapdoor based on 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 response to the search matching 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 includes: The system common parameters 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 the hash function.
3. The grid-based designated server searchable encryption optimization method according to claim 1, characterized in that: The receiver uses the TrapGen (qn7) algorithm to generate the receiver'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 Calculated 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 receiver institution uses the system public parameter pp, the key to be encrypted w∈{0,1}*, and the public key pk of the receiver institution to obtain the encrypted key. 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 random vectors used to construct the LWE difficulty problem, s1 and s2 are m-dimensional noise vectors used to construct the LWE difficulty problem to confuse and hide the true 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 institution uses 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 steps include: u w′ It 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, which takes the input value and outputs a trapdoor e w′ , trapdoor e 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 recipient organization, so as to complete the steps of lattice-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, where 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 system public parameters pp in response to a searchable encryption optimization instruction, wherein the system public parameters pp include 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 uses the TrapGen (qn) 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 ; The first public and private key generation module 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 Calculated 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 uses the system public parameter pp, 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 based on 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 matching module is configured to respond to the search and matching instruction, and the cloud server performs the search and matching 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 configured to call and run a 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