A lattice-based public key encryption method and system for quantum resistant ciphertext equivalence testing

Through the lattice-based anti-quantum ciphertext equivalent test public key encryption method, the lattice matrix operation and hash value embedding test trapdoor are used to solve the problems of low operating efficiency and large ciphertext size in the existing technology, and achieve efficient Ciphertext equivalence testing and security improvement, suitable for big data and cloud computing environments.

CN118400197BActive Publication Date: 2024-09-06NAVAL UNIV OF ENG PLA
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410849990.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-09-06
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

Existing lattice-based public key encryption methods have shortcomings in operating efficiency and ciphertext size, and are difficult to meet the actual application needs in big data and cloud computing environments.

Method used

Adopt a lattice-based anti-quantum ciphertext equivalence test public key encryption method. Through steps such as key generation, encryption, trapdoor generation and ciphertext equivalence testing, lattice matrix operations and hash value embedding are used to test trapdoors and reduce the number of ciphertext equivalence tests. file size and improve computational efficiency.

Benefits of technology

It effectively improves storage efficiency and computing performance, reduces data transmission bandwidth, enhances the security of cloud data, and can resist quantum attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118400197B
    Figure CN118400197B
Patent Text Reader

Abstract

The present invention discloses a lattice-based quantum resistant ciphertext equivalence test public key encryption method, comprising the following steps: a key generation algorithm generates a pair of public key #imgabs0# and private key #imgabs1# according to security parameters; an encryption algorithm generates a pair of public key #imgabs0# and private key #imgabs1# according to a randomly generated vector s Perform matrix operations on the plaintext #imgabs3# input by the user and the public key #imgabs2# to obtain the ciphertext #imgabs4#; generate the trapdoor basis matrix based on the hash value of the plaintext #imgabs5#, the public key #imgabs6# and the private key #imgabs7# E , for the trapdoor basis matrix E Execute the left sampling algorithm on the lattice to obtain the trapdoor td ; Perform ciphertext equivalence test: generate multiple ciphertext-trapdoor pairs according to the above steps, input two of the ciphertext-trapdoor pairs into the ciphertext equivalence test algorithm, and output the matching result. The method of the present invention can perform equivalence test on ciphertext in an encrypted state, protect the privacy of users, reduce the size of ciphertext and computational overhead, save storage space, and realize efficient management and retrieval of user ciphertext data by cloud servers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to a lattice-based quantum resistant ciphertext equivalence test public key encryption method and system. Background Art

[0002] In the cloud computing environment, users are very concerned about the privacy and security of outsourced data. In order to protect data security, users usually encrypt data before uploading it to the cloud platform. However, when it is necessary to access or query these encrypted data, how to implement the query function without leaking the privacy content becomes a challenge. To solve this problem, the ciphertext equivalence test public key encryption (PKEET) technology is proposed, which allows the cloud server to test the ciphertext without decrypting the data to determine whether they are derived from the same plaintext.

[0003] PKEET technology provides a practical solution for data classification management and search on cloud servers by testing ciphertext without decryption. This technology is built on the principle of bilinear mapping and relies on classical number theory assumptions to ensure security. However, with the development of quantum computing, existing security systems based on classical cryptography are at risk of being cracked by quantum algorithms, which makes the existing PKEET schemes no longer safe. In addition, the development of big data and cloud computing technologies requires a more secure post-quantum cryptographic system to support it. Therefore, studying cryptographic technologies that can resist quantum attacks, such as the quantum-resistant PKEET scheme based on lattice cryptography, has become an important research direction in the field of cryptography.

[0004] Lattice cryptography is currently recognized as the most promising and most likely to be standardized quantum-resistant cryptography. It has basic characteristics such as being reducible to the worst-case difficulty assumption, being resistant to quantum attacks, and having high security. It also has outstanding advantages in applications to traditional or emerging security issues such as encryption, signature, key exchange, and homomorphic encryption. In recent years, lattice-based public key cryptography has developed rapidly. One of the important development trends is to construct various encryption schemes with special functions based on lattices to meet the actual needs of specific application scenarios. For example, the PKEET scheme that is resistant to quantum attacks based on lattice theory can be used in cloud computing scenarios. However, the current lattice-based PKEET scheme still faces challenges in terms of operating efficiency, ciphertext size, and storage space consumption. Further research is needed to improve the performance of these schemes to meet the actual application needs in big data and cloud computing environments. Summary of the invention

[0005] The present invention proposes a lattice-based quantum resistant ciphertext equivalence test public key encryption method and system, which solves the problems of low operating efficiency and large ciphertext size in existing lattice-based public key encryption methods.

[0006] In order to solve the above technical problems, the present invention provides a lattice-based quantum resistant ciphertext equivalence test public key encryption method, comprising the following steps:

[0007] Step S1: The key generation algorithm generates a pair of public keys based on security parameters and private key ;

[0008] Step S2: The encryption algorithm is based on the randomly generated vector s and the public key Plain text input by the user Perform matrix operations on the grid to obtain the ciphertext ;

[0009] Step S3: According to the plaintext Hash value, public key and private key Generate trapdoor basis matrix E , for the matrix E Execute the left sampling algorithm on the lattice to obtain the trapdoor td ;

[0010] Step S4: Perform ciphertext equivalence test: Generate multiple ciphertext-trapdoor pairs according to steps S1 to S3, input two of the ciphertext-trapdoor pairs into the ciphertext equivalence test algorithm, and output the matching result.

[0011] Preferably, the key generation algorithm in step S1 comprises the following steps:

[0012] Step S11: Input , through a probabilistic polynomial-time algorithm Output matrix pair ;

[0013] in m , n , q is a positive integer; , is an integer ring matrix; For A short base on , express The Euclidean norm of , It is the upper bound of time complexity;

[0014] Step S12: Calculate the modulus prime number The residual ring ,exist Take one from the top The matrix is ​​obtained ,from The matrix is ​​obtained by uniform random sampling , , the remaining class ring The calculation expression is:

[0015] ;

[0016] in is the ring of integers;

[0017] Step S13: Generate according to the method of step S12 ,from Random sampling to obtain the matrix ,in k is a positive integer;

[0018] Step S14: Output the public key and private key .

[0019] Preferably, the encryption algorithm in step S2 comprises the following steps:

[0020] Step S21: Get vector by random sampling ;

[0021] Step S22: From Randomly select a matrix , randomly select vector and ,in is a discrete Gaussian distribution, ; represents random sampling from a distribution;

[0022] Step S23: , ,but , ;

[0023] in Express Perform rounding operations; is the field of real numbers;

[0024] Step S24: Output ciphertext , for The first component of .

[0025] Preferably, step S3 comprises the following steps:

[0026] Step S31: Create a hash function , order clear text m Hash value ,calculate , mod represents the modulo operation;

[0027] Step S32: Let the matrix ;

[0028] Step S33: As a trapdoor basis matrix , run the left sampling algorithm Generate Matrix ,satisfy ,in is the Gaussian parameter;

[0029] Step S34: Output trapdoor .

[0030] Preferably, the ciphertext equivalence test algorithm in step S4 comprises the following steps:

[0031] Step S41: For two ciphertext segments and And the corresponding trapdoor and calculate and ;

[0032] Step S42: ,for The amount in ,if ,make ,otherwise ,get ; generated by the same method ;

[0033] Step S43: When When the plaintexts corresponding to the two ciphertexts are equal, output 1; otherwise, the plaintexts corresponding to the two ciphertexts are not equal, output 0.

[0034] Preferably, the ciphertext is decrypted by a decryption algorithm and Decrypt to get the decrypted plaintext and , verify whether the output result of the ciphertext equivalence test algorithm is correct, the decryption algorithm includes the following steps:

[0035] a. Execute left sampling algorithm , generating the matrix ,satisfy ;

[0036] b. Calculation ;

[0037] c. When When The amount satisfy ,but ,otherwise , Express Round down;

[0038] d. Output the decrypted plaintext .

[0039] The present invention also provides a lattice-based quantum ciphertext equivalence test-resistant public key encryption system, which is implemented based on the above-mentioned lattice-based quantum ciphertext equivalence test-resistant public key encryption method, including: a key generation center, a user terminal and a cloud server;

[0040] The key generation center is used to generate and send public keys and private keys to the user end;

[0041] The user end includes a data user end and a query user end. The data user end encrypts and uploads the data to be stored to the cloud server, and creates and uploads a ciphertext-trapdoor pair at the same time. When the query user end needs to query the data in the cloud server, it sends the ciphertext-trapdoor pair to the cloud server for query.

[0042] The cloud server is used to store the ciphertext-trapdoor pairs uploaded by the data user end. When receiving the query request from the query user end, it performs the ciphertext equivalence test, compares the data required by the user with the data stored on the cloud server, and feeds back the result to the query user end.

[0043] Preferably, when the ciphertext needs to be decrypted, the querying client sends the ciphertext, the public key and the private key to the cloud server. If the decryption is successful, the cloud server returns the decrypted plaintext to the querying client.

[0044] The present invention also provides an electronic device, comprising: a memory, a processor and a computer program, wherein the computer program is stored in the memory and is configured to be executed by the processor to implement the above-mentioned lattice-based quantum resistant ciphertext equivalence test public key encryption method.

[0045] The present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is executed by a processor to implement the above-mentioned lattice-based quantum resistant ciphertext equivalence test public key encryption method.

[0046] The benefits of the present invention include at least:

[0047] 1. The present invention embeds the hash value of the plaintext into the test trapdoor instead of directly encrypting the hash value of the plaintext, which effectively avoids the problem of increased ciphertext size caused by encrypting the hash value in the traditional encryption method. By reducing the size of the ciphertext, not only the storage efficiency is improved, but also the bandwidth required in the data transmission process is reduced, thereby improving the overall system performance in practical applications;

[0048] 2. The present invention adopts a lattice-based matrix operation to replace the complex bilinear pairing operation in the traditional scheme. The lattice-based matrix operation has lower computational complexity, reduces the running time in the encryption, decryption and testing stages, and improves the computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A schematic diagram of a method flow of an embodiment of the present invention;

[0050] Figure 2 4 is a system model diagram of an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.

[0052] For the convenience of description, the symbols used in the embodiments of the present invention are as follows:

[0053] : Security parameters;

[0054] : Positive integer;

[0055] : Gaussian parameters;

[0056] : integer ring;

[0057] : the field of real numbers;

[0058] : Discrete Gaussian distribution

[0059] : modulo a prime number The remaining class ring of ;

[0060] : on Matrix collection;

[0061] : Ring of integers The upper length is A vector of

[0062] :vector No. Quantity;

[0063] : Ring of integers on matrix;

[0064] : From the distribution Sampling in ;

[0065] : From the distribution Random sampling from ;

[0066] : Euclidean norm;

[0067] : The upper bound of time complexity;

[0068] : The lower bound of time complexity;

[0069] : n-degree polynomial;

[0070] : Round down, round up, and round off operations.

[0071] Embodiment 1

[0072] like Figure 1 As shown, an embodiment of the present invention provides a lattice-based quantum resistant ciphertext equivalence test public key encryption method, comprising the following steps:

[0073] Step S1: Setting security parameters , execute the key generation algorithm , output the public key and private key .

[0074] Specifically, the key generation algorithm The following steps are involved:

[0075] Step S11: Input , a probabilistic polynomial time algorithm Output a matrix Passive A short base ,satisfy ;

[0076] Step S12: From Uniform random sampling is performed in the matrix , ;

[0077] Step S13: Obtain matrix by random sampling ;

[0078] Step S14: Output the public key and private key .

[0079] Step S2: Execute the encryption algorithm , enter the plain text With public key , generate ciphertext .

[0080] Specifically, the encryption algorithm The following steps are involved:

[0081] Step S21: Get vector by random sampling ,and The first component ;

[0082] Step S22: From Randomly select a matrix ;

[0083] Step S23: Randomly select a vector and ,in ;

[0084] Step S24: Calculation ;

[0085] Step S25: Calculation , , , and is the generated ciphertext part of;

[0086] Step S26: Output ciphertext .

[0087] Step S3: Execute the trapdoor generation algorithm , enter the private key and other information to generate the corresponding test trapdoor , and the ciphertext And the corresponding trapdoor td Upload to the cloud.

[0088] Specifically, the trapdoor generation algorithm The following steps are involved:

[0089] Step S31: Create a hash function ,make ,calculate ;

[0090] Step S32: Let the matrix ;

[0091] Step S33: Run the left sampling algorithm Generate Matrix ,satisfy , for the matrix , ,satisfy ;

[0092] Step S34: Output as a trapdoor.

[0093] Step S4: Input the two sets of ciphertexts and their corresponding trapdoors in the cloud into the ciphertext equivalence test algorithm , output the matching results.

[0094] Specifically, the ciphertext equivalence test algorithm The following steps are involved:

[0095] Step S41: Calculation and ;

[0096] Step S42: ,for Each component in ,if ,make , otherwise let , thus we get , Also generated in the same way;

[0097] Step S43: When When two ciphertexts and If the corresponding plaintexts are equal, the ciphertext equality test algorithm outputs 1, otherwise it means that the plaintexts corresponding to the two ciphertexts are not equal and outputs 0.

[0098] In order to verify the correctness of the equivalence test algorithm, the ciphertext and And their corresponding public and private keys input decryption algorithm , output the decrypted plaintext and ,like and If the matching result is the same as that of the equivalence test algorithm, it proves the correctness of the equivalence test algorithm.

[0099] Specifically, the decryption algorithm The following steps are involved:

[0100] a. Execute left sampling algorithm , generating the matrix ,satisfy , ;

[0101] b. Calculation ;

[0102] c. When When The amount satisfy ,but ,otherwise , Express Round down;

[0103] d. Output the decrypted plaintext .

[0104] The correctness and anti-quantum attack security of the method provided by the present invention can be proved based on the fault-tolerant learning LWE problem:

[0105] (1) Correctness

[0106] Since the hash function used in the present invention is collision-resistant, the encryption scheme provided in the embodiment of the present invention can effectively decrypt and perform ciphertext equivalence test operations, which will be described below from two aspects: the correctness of decryption and the correctness of the test.

[0107] Vector Rewrite as in is the error term in the LWE problem of fault-tolerant learning on lattices. When the relevant parameters are appropriately selected, studies have shown that the error term is likely to be less than This ensures the correctness of the decryption step in the present invention. By encrypting with this method, the correct plaintext information can always be obtained after decryption.

[0108] Next, we will explain the correctness of the test. In the trapdoor generation process, a matrix with a special structure is designed. W To implement the ciphertext equivalence test function. After introducing this specially constructed matrix, use it as one of the parameters to execute the left sampling algorithm to generate the trapdoor matrix During testing, this trapdoor matrix is ​​used and ciphertext By performing multiplication calculation, the ciphertext equality test function can be realized, as described below:

[0109] because And the matrix is defined as:

[0110] .

[0111] but It can also be expressed as:

[0112] .

[0113] because and Generated by the same method, so under the same parameters, The norm value is less than . And in the test algorithm, The calculation is equal to , The same is true with Because the hash function is collision-resistant, if and only if When , which can illustrate the correctness of the test results and show that this method can realize the ciphertext equivalence test function.

[0114] (2) Security

[0115] When the LWE difficulty assumption holds and the hash function used in the invention is a one-way hash function, the above lattice-based quantum resistant ciphertext equivalence test public key encryption method is one-way secure under the chosen ciphertext attack, as specifically proved as follows:

[0116] The remainder hashing lemma shows that if the prime number , , , randomly select the matrix , and vector ,but and The distributions are statistically indistinguishable.

[0117] when is a universal hash function, for any adversary in polynomial time, even if they obtain information about Some information, and It is also difficult to distinguish. Here we use a quantum attacker and OW-CCA Challenger The game between them is used to prove the security of the solution of the present invention.

[0118] Game 0: Adversary with Quantum Computing Capabilities You can arbitrarily query the target user's trapdoor information and perform ciphertext equality tests. In the interaction, the adversary You can obtain the trapdoor corresponding to the challenge ciphertext and try to guess the plaintext corresponding to the challenge ciphertext. Launch an attack on the user, he and the challenger The game is played in the following steps:

[0119] 1) Initialization phase (Init): Challenger run Algorithm to obtain public and private keys , and all public keys Send to adversary ;

[0120] 2) Interrogation Phase 1: Adversary The following three queries are allowed to be made to the oracle in polynomial time:

[0121] Private key query: send sequence number , get user The corresponding private key ;

[0122] Decryption query: Send sequence number and ciphertext , execute the decryption algorithm Get ciphertext The corresponding decryption result;

[0123] Trapdoor query: Send sequence number And the corresponding public key, private key, ciphertext etc., calculate the hash value of the plaintext, and use the algorithm Get the corresponding trapdoor .

[0124] 3) Challenge Phase: Challenger Randomly select plaintext , run the encryption algorithm Get the ciphertext , Challenger Challenge the ciphertext Send to adversary .

[0125] 4) Interrogation Phase 2: Adversary The adversary is allowed to query the oracle in polynomial time for the three queries in phase 1. Do not ask the target user for the private key Private key , and must not ask for the serial number when decrypting The ciphertext , get the corresponding decryption result.

[0126] 5) Guessing stage: Adversary Output ,like , then the opponent Win the game.

[0127] In this game, the adversary Successful strengths can be defined as: .

[0128] Game 1: Represents the index of the target user and sends the public key to the adversary , while retaining the private key. After some inquiries, the challenger from Randomly select , generate the challenge ciphertext In game 1, the matrix The construction method becomes , the other steps are the same as Game 0. Although the matrices in Game 0 and Game 1 Different, but rival However, it is difficult to detect this change. The vector used to construct the challenge ciphertext is , from the residual hashing lemma, we know that and The distribution of yes The random matrix on , the newly constructed is also uniformly randomly distributed. In this case, the adversary It is impossible to distinguish between the two. This means that the adversary It seemed that Game 1 and Game 0 were exactly the same, and he could not spot the difference, let alone distinguish the two games by a huge advantage.

[0129] Game 2: In this game, the matrix is ​​generated and The method is different from that in Game 1, and the other steps are the same as in Game 1. By running Algorithm generation , by Random sampling to get the matrix , is generated in the same way as in Game 1. After making these changes, the challenger Use this changed result to answer the opponent For private key When asked about the target user When the challenger Trapdoor Answer. When asked for another user's private key, the challenger By running The algorithm obtains Trapdoor And output, where In Game 2, although the challenger The way to generate the target user's private key is different from the previous two games, but due to the algorithm and The output of follows the same distribution, so that the adversary It is difficult to notice this change. Therefore, any adversary in polynomial time It is difficult to distinguish between Game 1 and Game 2.

[0130] Game 3: In this game, the challenge ciphertext is set to , Will Replace with random independent elements in Indicates removal This is different from the {0} element in Game 2. Apart from this, the other steps are the same as in Game 2. After this change, the adversary The advantage of winning the OW-CCA game is no greater than the advantage of correctly guessing the plaintext, which is approximately , this probability is very small and can almost be ignored.

[0131] Next, we explain that any adversary in polynomial probability time , even if it had access to a quantum computer, it would be difficult to notice the difference between the last two games. Otherwise, the LWE hardness assumption would no longer hold.

[0132] Assume the adversary The last two games can be distinguished by having a non-negligible advantage, by As a random oracle to construct an efficient LWE problem solver In particular, given Samples ,if It can be determined whether these samples come from LWE distribution or true random distribution. Solved the LWE problem. Follow these steps:

[0133] Initialization settings: , is a sample provided in the LWE problem. Select the target user index and send to , Take advantage of this Generate a public key , the generation steps are as follows:

[0134] 1) Random selection , and satisfies ,definition and .

[0135] 2) When Take vector As the Constructing matrices from column vectors , denoted as .

[0136] 3) When Take vector As the Constructing matrices from column vectors , denoted as .

[0137] 4) , The construction of is the same as in Game 2.

[0138] 5) Send to adversary .

[0139] Query: Perform the same private key generation steps as in Game 2 to respond For each user's private key Query.

[0140] Challenge: In response to a query for a user's private key, Just run it like in game 2 Algorithm, for the target plaintext , Challenge ciphertext The construction steps are as follows:

[0141] 1) When Take vector As the Component Construction , denoted as .

[0142] 2) When Take vector As the Component Construction , denoted as .

[0143] 3) Matrix The same generation method as in Game 2 is used to calculate and .

[0144] 4) Set to .

[0145] 5) Order ,if , from is randomly selected from ,but , then Send to adversary .

[0146] if All from LWE The sample is obtained from the distribution, then for and is established, among which, ;because , It can be expressed as:

[0147] ;

[0148] ,in Indicates the last The error term of the LWE sample is, therefore, It happens to be the challenge ciphertext in Game 2.

[0149] if is randomly distributed, then the hash remainder theorem shows that the constructed game 3 is also randomly distributed. Therefore, the challenge ciphertext exist are randomly independent, which is the same as in Game 3.

[0150] Guess: After receiving the challenge ciphertext And after making some queries, the adversary will guess which of the above games it is interacting with. Will be based on The guess answer to the LWE question.

[0151] Under the assumption of LWE problem and the condition that the residual hashing lemma holds, the adversary It is impossible to distinguish one game from another in probabilistic polynomial time, so the above-mentioned inventive scheme is OW-CCA secure.

[0152] The lattice-based ciphertext equivalence test public key encryption method provided in this embodiment can perform equality tests on ciphertexts in an encrypted state, which makes up for the defect that existing ciphertext equivalence test schemes cannot resist quantum attacks, enhances the security of cloud data, and can effectively protect user privacy information. At the same time, it reduces the ciphertext size and computing overhead, and saves storage space.

[0153] Embodiment 2

[0154] Based on the above-mentioned lattice-based quantum resistant ciphertext equivalence test public key encryption method, the embodiment of the present invention provides the following Figure 2 A lattice-based quantum resistant ciphertext equivalence test public key encryption system is shown, comprising: a key generation center, a user terminal and a cloud server.

[0155] Specifically, the key generation center is used to generate and send public keys and private keys to the user end.

[0156] The user side includes the data user side and the query user side. The data user side encrypts the data to be stored and uploads it to the cloud server, and creates and uploads the ciphertext-trapdoor pair at the same time. The query user side has the private key generated by the key generation center. When it needs to query certain data in the cloud server, it sends the ciphertext-trapdoor pair to the cloud server for query.

[0157] The cloud server is used to store the ciphertext-trapdoor pairs uploaded by the data user. When receiving the query request from the query user, it performs the ciphertext equivalence test, compares the data required by the user with the data stored on the cloud server, and feeds back the result to the query user.

[0158] When the ciphertext needs to be decrypted, the querying client sends the ciphertext, public key and private key to the cloud server. If the decryption is successful, the cloud server returns the decrypted plaintext to the querying client.

[0159] Embodiment 3

[0160] An embodiment of the present invention provides an electronic device, comprising: a memory, a processor and a computer program, wherein the computer program is stored in the memory and is configured to be executed by the processor to implement the above-mentioned lattice-based quantum resistant ciphertext equivalence test public key encryption method.

[0161] Embodiment 4

[0162] An embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored. The computer program is executed by a processor to implement the above-mentioned lattice-based quantum resistant ciphertext equivalence test public key encryption method.

[0163] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. Only the preferred embodiments of the present invention are expressed. The description is more specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. As long as there is no contradiction in the combination of these technical features, they should be considered as the scope recorded in this specification.

[0164] It should be noted that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these modifications and improvements all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A lattice-based quantum resistant ciphertext equivalence test public key encryption method, characterized by: The following steps are involved: Step S1: The key generation algorithm generates a pair of public keys based on security parameters and private key ; Step S2: The encryption algorithm is based on the randomly generated vector s and the public key Plain text input by the user Perform matrix operations on the grid to obtain the ciphertext ; Step S3: According to the plain text Hash value, public key and private key Generate trapdoor basis matrix E , for the matrix E Execute the left sampling algorithm on the lattice to obtain the trapdoor td ; Step S4: Perform ciphertext equivalence test: Generate multiple ciphertext-trapdoor pairs according to steps S1 to S3, input two of the ciphertext-trapdoor pairs into the ciphertext equivalence test algorithm, and output the matching result.

2. A lattice-based quantum resistant ciphertext equivalence test public key encryption method according to claim 1, characterized in that: The key generation algorithm in step S1 includes the following steps: Step S11: Input , through a probabilistic polynomial-time algorithm Output matrix pair ; in m , n , q is a positive integer; , is an integer ring matrix; For A short base on , express The Euclidean norm of , It is the upper bound of time complexity; Step S12: Calculate the modulus prime number The residual ring ,exist Take one from the top The matrix is ​​obtained ,from The matrix is ​​obtained by uniform random sampling , , the remaining class ring The calculation expression is: ; in is the ring of integers; Step S13: Generate according to the method of step S12 ,from Random sampling to obtain the matrix ,in k is a positive integer; Step S14: Output the public key and private key .

3. A lattice-based quantum resistant ciphertext equivalence test public key encryption method according to claim 2, characterized in that: The encryption algorithm described in step S2 includes the following steps: Step S21: Get vector by random sampling ; Step S22: From Randomly select a matrix , randomly select vector and ,in is a discrete Gaussian distribution, ; represents random sampling from a distribution; Step S23: , ,but , ; in Express Perform rounding operations; is the field of real numbers; Step S24: Output ciphertext , for The first component of .

4. A lattice-based quantum resistant ciphertext equivalence test public key encryption method according to claim 3, characterized in that: Step S3 includes the following steps: Step S31: Create a hash function , order clear text m Hash value ,calculate , mod represents the modulo operation; Step S32: Let the matrix ; Step S33: As a trapdoor basis matrix , run the left sampling algorithm Generate Matrix ,satisfy ,in is the Gaussian parameter; Step S34: Output trapdoor .

5. The lattice-based quantum resistant ciphertext equivalence test public key encryption method according to claim 4, characterized in that: The ciphertext equivalence test algorithm in step S4 includes the following steps: Step S41: For two ciphertext segments and And the corresponding trapdoor and calculate and ; Step S42: ,for The amount in ,if ,make ,otherwise ,get ; generated by the same method ; Step S43: When When the plaintexts corresponding to the two ciphertexts are equal, output 1; otherwise, the plaintexts corresponding to the two ciphertexts are not equal, output 0.

6. A lattice-based quantum resistant ciphertext equivalence test public key encryption method according to claim 5, characterized in that: The ciphertext is decrypted by the algorithm and Decrypt to get the decrypted plaintext and , verify whether the output result of the ciphertext equivalence test algorithm is correct, the decryption algorithm includes the following steps: a. Execute left sampling algorithm , generating the matrix ,satisfy ; b. Calculation ; c. When When The amount satisfy ,but ,otherwise , Express Round down; d. Output the decrypted plaintext .

7. A lattice-based quantum resistant ciphertext equivalence test public key encryption system, implemented based on a lattice-based quantum resistant ciphertext equivalence test public key encryption method as claimed in any one of claims 1 to 6, characterized in that: Includes key generation center, user end and cloud server; The key generation center is used to generate and send public keys and private keys to the user end; The user end includes a data user end and a query user end. The data user end encrypts and uploads the data to be stored to the cloud server, and creates and uploads a ciphertext-trapdoor pair at the same time. When the query user end needs to query the data in the cloud server, it sends the ciphertext-trapdoor pair to the cloud server for query. The cloud server is used to store the ciphertext-trapdoor pairs uploaded by the data user end. When receiving the query request from the query user end, it performs the ciphertext equivalence test, compares the data required by the user with the data stored on the cloud server, and feeds back the result to the query user end.

8. A lattice-based quantum resistant ciphertext equivalence test public key encryption system according to claim 7, characterized in that: When the ciphertext needs to be decrypted, the query client sends the ciphertext, the public key and the private key to the cloud server. If the decryption is successful, the cloud server returns the decrypted plaintext to the query client.

9. An electronic device, comprising: A memory, a processor and a computer program, characterized in that: the computer program is stored in the memory and is configured to be executed by the processor to implement a lattice-based quantum resistant ciphertext equivalence test public key encryption method as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement a lattice-based quantum resistant ciphertext equivalence test public key encryption method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Ciphertext data retrieval method based on lattice forward security

    CN114844634A

  • Grid-based signcryption method with delegation test function

    CN116346367A

  • System and Method for Performing Information-Theoretically Secure Quantum Gate Computation and Quantum Key Distribution, Based on Random Rotation of Qubits

    US20220231844A1