Homomorphic decryption method and apparatus, and non-volatile storage medium and computer device

By obtaining the LWE ciphertext and NTRU private key to generate the evaluation key of the blind rotation algorithm, the LWE ciphertext is homomorphically decrypted, reducing noise, improving the bootstrapping efficiency of the NTRU fully homomorphic encryption and decryption scheme, and solving the problem of ciphertext bootstrapping The problem of low efficiency.

WO2024174107A1PCT designated stage expired Publication Date: 2024-08-29BEIJING ACAD OF INFORMATION SCI & TECH

Patent Information

Application Number
PCT/CN2023/077520
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2024-08-29

AI Technical Summary

Technical Problem

In the existing fully homomorphic encryption scheme, the ciphertext bootstrapping efficiency is low, which leads to the problem of noise accumulation leading to decryption failure.

Method used

By obtaining the LWE ciphertext and NTRU private key, the evaluation key of the blind rotation algorithm is generated, and the evaluation key is used to homomorphically decrypt the LWE ciphertext to reduce noise and thereby improve the bootstrapping efficiency of the NTRU fully homomorphic encryption and decryption scheme.

Benefits of technology

It achieves rapid reduction of LWE ciphertext noise, improves the bootstrapping efficiency of the NTRU fully homomorphic encryption and decryption scheme, and solves the problem of low ciphertext bootstrapping efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023077520_29082024_PF_FP_ABST
    Figure CN2023077520_29082024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention are a homomorphic decryption method and apparatus, and a non-volatile storage medium and a computer device. The method comprises: acquiring first LWE ciphertext and a private key of the first LWE ciphertext, wherein the first LWE ciphertext is ciphertext to subjected to homomorphic decryption in a layer 1 scheme for homomorphic encryption; determining an NTRU private key and a rotation polynomial, wherein the NTRU private key is used for decrypting NTRU ciphertext in a layer 2 scheme for homomorphic encryption; according to the private key of the first LWE ciphertext and the NTRU private key, generating an evaluation key corresponding to a blind rotation algorithm, wherein the evaluation key comprises a plurality of automorphism keys and a plurality of calculation keys; and on the basis of the rotation polynomial, the evaluation key and the blind rotation algorithm, performing homomorphic decryption on the first LWE ciphertext to obtain target NTRU ciphertext, wherein the target NTRU ciphertext corresponds to the NTRU private key, and is the NTRU ciphertext in the layer 2 scheme for homomorphic encryption.
Need to check novelty before this filing date? Find Prior Art

Description

Homomorphic decryption method, device, non-volatile storage medium and computer equipment Technical Field

[0001] The present invention relates to the field of cryptography, and in particular to a homomorphic decryption method, apparatus, non-volatile storage medium, and computer equipment. Background Art

[0002] Fully homomorphic encryption (FHE) is one of the key cryptographic tools for privacy-preserving computing. It allows computations to be performed on encrypted data without decryption. Existing FHE schemes are all designed based on difficult problems on lattices and are resistant to quantum computer attacks. Currently, mainstream FHE schemes all follow the same framework: first, a noisy finite homomorphic encryption (SHE) scheme is designed that only supports a finite number of homomorphic operations. Such schemes gradually increase the noise as the number of homomorphic operations increases, eventually leading to decryption failures. Therefore, it is necessary to design a corresponding bootstrapping algorithm to homomorphically decrypt the SHE scheme to reduce the noise.

[0003] In 2009, Gentry pioneered the first viable fully homomorphic encryption scheme based on ideal lattices and provided a theoretical framework for constructing such schemes. This framework can be divided into two layers: 1) The first layer constructs a partially homomorphic encryption (SHE) scheme that only supports a finite number of homomorphic operations. This scheme typically introduces random noise, which accumulates with the number of homomorphic operations. Once the noise reaches a threshold, decryption fails. 2) The second layer utilizes a bootstrap algorithm to homomorphically compute the decryption circuit of the SHE in the first step, thereby reducing the noise. Because the depth of the homomorphically computable circuit is smaller than the depth of the decryption circuit, initial schemes often employ sparse subset sum assumptions to compress the decryption circuit. Therefore, the core challenge lies in designing an SHE that can homomorphically compute the decryption circuit and then using Gentry's bootstrap theorem to convert the SHE into FHE. In 2012, Gentry et al. constructed a class of hierarchical fully homomorphic encryption schemes based on the (R)LWE problem. These schemes use circuit depth as an auxiliary input parameter, utilize key switching techniques to control ciphertext dimensionality expansion, and module switching techniques to control noise growth. They can homomorphically execute circuits of arbitrary bounded depth without requiring bootstrapping. Therefore, these schemes eliminate the need for compression and decryption circuits during bootstrapping. Since then, the design of efficient bootstrapping algorithms has become a core task in fully homomorphic encryption.

[0004] Currently, there are two main approaches to improving bootstrapping. The first approach aims to package several messages into a single ciphertext and refresh them in parallel to achieve bootstrapping. These schemes can encrypt a ring element rather than a single bit in a ciphertext, so they naturally support packing multiple messages into independent "slots" and performing single instruction, multiple data (SIMD) operations based on the Chinese Remainder Theorem (CRT). Currently, open source libraries such as Helib, SEAL, and HEAAN, designed based on the BGV, BFV, and CKKS schemes, respectively, are also widely used.

[0005] The second approach is to use bootstrapping techniques for homomorphic encryption schemes based on the Gentry-Sahai-Waters (GSW) scheme. This type of scheme attempts to minimize the cost of bootstrapping a single ciphertext, even at the expense of having to perform bootstrapping after evaluating each gate in the circuit. However, this scheme has some limitations, namely that each gate in the circuit must be bootstrapped once, and it does not support packing several messages into a single ciphertext. Open source libraries designed based on this type of scheme include FHEW and TFHE, which are currently among the most efficient bootstrapping schemes. However, the aforementioned fully homomorphic encryption and decryption schemes still suffer from insufficient bootstrapping efficiency.

[0006] To address the above-mentioned problems, no effective solutions have been proposed so far.

[0007] Summary of the Invention

[0008] Embodiments of the present invention provide a homomorphic decryption method, apparatus, non-volatile storage medium, and computer device to at least solve the technical problem of low ciphertext bootstrapping efficiency in fully homomorphic schemes in related technologies.

[0009] According to one aspect of an embodiment of the present invention, a homomorphic decryption method is provided, comprising: obtaining a first LWE ciphertext and a private key of the first LWE ciphertext, wherein the first LWE ciphertext is a ciphertext to be homomorphically decrypted in a homomorphic encryption first-layer scheme; determining an NTRU private key and a rotation polynomial, wherein the NTRU private key is used to decrypt the NTRU ciphertext in a homomorphic encryption second-layer scheme; generating an evaluation key corresponding to a blind rotation algorithm based on the private key of the first LWE ciphertext and the NTRU private key, wherein the evaluation key includes a plurality of automorphic keys and a plurality of calculation keys, and the plurality of automorphic keys are used for the automorphic encryption. Key switching key, the multiple automorphic keys are obtained by encrypting the automorphic NTRU private key with the NTRU private key based on the vector NTRU encryption method, and the multiple calculation keys are obtained by encrypting the private key of the first LWE ciphertext with the NTRU private key based on the vector NTRU encryption method; based on the rotation polynomial, the evaluation key and the blind rotation algorithm, the first LWE ciphertext is homomorphically decrypted to obtain a target NTRU ciphertext, wherein the target NTRU ciphertext corresponds to the NTRU private key, and the target NTRU ciphertext is the NTRU ciphertext in the second layer of homomorphic encryption scheme.

[0010] Optionally, generating multiple calculation keys in the evaluation key corresponding to the blind rotation algorithm based on the private key of the first LWE ciphertext and the NTRU private key includes: encrypting the component s0 in the private key of the first LWE ciphertext according to the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, the NTRU private key, and the first parameter in the integer pair to obtain the evk0 key in the multiple calculation keys, wherein the private key of the first LWE ciphertext is s, According to the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, the NTRU private key and the first parameter, the component s in the private key s of the first LWE ciphertext is i Encrypt them separately to obtain evk in the multiple calculation keys i key, where 1≤i<n; encrypting the sum of the components in the private key s of the first LWE ciphertext according to the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, the NTRU private key and the first parameter to obtain evk in the multiple calculation keys n key.

[0011] Optionally, the evk0 key, the evk i key and the evk n The key is calculated using the following formula: Among them, NTRU ′Q,f,τ() represents the vector NTRU encryption method. The calculation formula of the vector NTRU encryption method is as follows: NTRU′ Q,f,τ (v): = (τ·g0 / f+B 0 v,…,τ g d-1 / f+B d-1 v), v represents the data to be encrypted, Q represents the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, and f represents the NTRU private key f∈R extracted from the private key distribution Q , g0 to g d-1 represents the error polynomial g0,…,g drawn from the error distribution d-1 ←R Q , τ represents the first parameter of the integer pair, B represents a positive integer,

[0012] Optionally, generating multiple automorphic keys in the evaluation key corresponding to the blind rotation algorithm based on the private key of the first LWE ciphertext and the NTRU private key includes: determining a parameter j, where the parameter j represents the number of times the private key is mapped during the automorphism process; and generating the multiple automorphic keys based on the following formula according to the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, the NTRU private key, and the first parameter in the integer pair: Among them, ksk j represents the multiple self-similar keys, f(X j ) represents the NTRU private key after the automorphism, f(X) represents the NTRU private key, q represents the ciphertext modulus of the first LWE ciphertext, NTR′ Q,f,τ () represents the vector NTRU encryption method, and N represents the degree of the polynomial ring corresponding to the target NTRU ciphertext.

[0013] Optionally, the method of performing homomorphic decryption on the first LWE ciphertext based on the rotation polynomial, the evaluation key and the blind rotation algorithm to obtain the target NTRU ciphertext includes: Step 1: Determine a plurality of odd numbers w according to the first LWE ciphertext i , where the first LWE ciphertext is represented as m represents the plaintext corresponding to the first LWE ciphertext, a=(a0,…,a n-1 ), for each a in a i , Step 2: Calculation Obtain a constant NTRU ciphertext c0(X), where Δ represents the second parameter in the integer pair, r represents the rotation polynomial, and ⊙ represents the ciphertext outer product. The ciphertext outer product is based on the following formula to represent the operation of the ring element c and the vector NTRU ciphertext c′ to obtain a new ring element: c⊙c′= <BitDecom B (c), c′>, For a∈R Q , the bit decomposition vector under the basis B satisfies and||a i || ∞ <B,c∈R Q , the vector NTRU ciphertext c′ represents the ciphertext encrypted by the vector NTRU encryption method; Step 3: Calculate Get the constant NTRU ciphertext c″0(X), where NTRU Q,f,τ,Δ () represents the constant NTRU encryption method, and the calculation formula of the constant NTRU encryption method is: NTRU Q,f,τ,Δ (u): =τ·g / f+Δ·u / f, Q represents the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, and f represents the NTRU private key f∈R extracted from the private key distribution Q , g represents the error g∈R drawn from the error distribution Q , u represents the data to be encrypted, τ represents the first parameter in the integer pair, and Δ represents the second parameter in the integer pair; Step 4: Calculate Get constant NTRU ciphertext in, is one of the multiple self-similar keys; Step 5: Based on the constant NTRU ciphertext The evki key and the multiple self-similar keys are used to encrypt the constant NTRU ciphertext according to steps 2 to 4. Iterate to get the constant NTRU ciphertext Step 6: Encrypt the constant NTRU With the evk n The key performs the outer product of the ciphertext to obtain the target NTRU ciphertext.

[0014] Optionally, the constant NTRU ciphertext The EVK i The key and the multiple self-similar keys are used to encrypt the constant NTRU ciphertext according to steps 2 to 4. Iterate to get the constant NTRU ciphertext Including: for 1≤i≤n-1,

[0015] calculate

[0016] calculate

[0017] calculate in, is one of the multiple automorphic keys.

[0018] Optionally, the above method further includes: when the ciphertext modulus of the first LWE ciphertext is q and the ciphertext modulus of the target NTRU ciphertext is Q, extracting a constant term from the target NTRU ciphertext to obtain a second LWE ciphertext with a ciphertext modulus of Q; performing modulus switching on the second LWE ciphertext to obtain a third LWE ciphertext with a ciphertext modulus of q; and performing key switching on the third LWE ciphertext to obtain a fourth LWE ciphertext, wherein the ciphertext modulus of the fourth LWE ciphertext is q, and the private key corresponding to the fourth LWE ciphertext is the same as the private key of the first LWE ciphertext.

[0019] Optionally, extracting a constant term from the target NTRU ciphertext to obtain a second LWE ciphertext with a ciphertext modulus of Q comprises: for the target NTRU ciphertext c 目标 =τ·g / f+Δ·m / f, according to the polynomial c 目标 The coefficient c=(c0,...,c N-1 ) and the coefficient of f Sure It is the second LWE ciphertext of message m encrypted under private key f, and the message m is also a message encrypted by the first LWE ciphertext.

[0020] Optionally, performing module switching on the second LWE ciphertext to obtain a third LWE ciphertext with a ciphertext modulus of q includes: calculating Obtain the third LWE ciphertext LWE with a ciphertext modulus of q corresponding to the private key f q,f (m), where LWE Q,f (m) represents the second LWE ciphertext.

[0021] Optionally, performing key switching on the third LWE ciphertext to obtain a fourth LWE ciphertext includes: performing key switching on the third LWE ciphertext to obtain a fourth LWE ciphertext according to the ciphertext modulus q and the integer B of the first LWE ciphertext. ks ,calculate Sure and determine e from the error distribution i,j,v ,in, According to the private key f=(f0, ..., d N-1 ), the private key s∈(s0, ..., s n-1 ), a i,j,vand e i,j,v , calculate the key switching key in, According to the third LWE ciphertext and formula break down Get vector in, calculate Get the fourth LWE ciphertext

[0022] Optionally, the above method further includes: obtaining the initial RLWE ciphertext RLWE q,s (m R )=(a R , b R ), wherein the initial RLWE ciphertext is a ciphertext encrypted using the same private key as the first LWE ciphertext; based on the initial RLWE ciphertext, determine a R =(a R0 ,...,a R(n-1) ), s=(s0, ..., s n-1 ), m R =(m R0 ,...,m R(n-1) ) is a R , s and m R The coefficients of m are extracted from the initial RLWE ciphertext and encrypted under the private key s. Ri The initial LWE ciphertext LWE q,s (m Ri )=(a Ri , b Ri ), wherein the initial LWE ciphertext includes the first LWE ciphertext and multiple fifth LWE ciphertexts; a blind rotation algorithm is applied to the multiple fifth LWE ciphertexts to obtain multiple NTRU ciphertexts corresponding one-to-one to the multiple fifth LWE ciphertexts; multiple sixth LWE ciphertexts are respectively extracted from the multiple NTRU ciphertexts corresponding one-to-one to the multiple fifth LWE ciphertexts; a second LWE ciphertext is extracted from the target NTRU ciphertext; and the second LWE ciphertext and the multiple sixth LWE ciphertexts are packaged to obtain a target RLWE ciphertext.

[0023] According to another aspect of an embodiment of the present invention, a homomorphic decryption device is further provided, including: an acquisition module for acquiring a first LWE ciphertext and a private key of the first LWE ciphertext, wherein the first LWE ciphertext is a ciphertext to be homomorphically decrypted in the first layer of homomorphic encryption; a determination module for determining an NTRU private key and a rotation polynomial, wherein the NTRU private key is used to decrypt the NTRU ciphertext in the second layer of homomorphic encryption; a generation module for generating an evaluation key corresponding to a blind rotation algorithm based on the private key of the first LWE ciphertext and the NTRU private key, wherein the evaluation key includes multiple automorphic keys and multiple calculation keys, and the multiple automorphic keys are A key switching key for automorphism, wherein the multiple automorphic keys are obtained by encrypting the automorphic NTRU private key using the NTRU private key based on the vector NTRU encryption method, and the multiple calculation keys are obtained by encrypting the private key of the first LWE ciphertext using the NTRU private key based on the vector NTRU encryption method; a homomorphic decryption module is used to perform homomorphic decryption on the first LWE ciphertext based on the rotation polynomial, the evaluation key and the blind rotation algorithm to obtain a target NTRU ciphertext, wherein the target NTRU ciphertext corresponds to the NTRU private key, and the target NTRU ciphertext is the NTRU ciphertext in the second layer of the homomorphic encryption scheme.

[0024] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is further provided, wherein the non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any one of the above-mentioned homomorphic decryption methods.

[0025] According to another aspect of an embodiment of the present invention, a computer device is further provided, comprising a memory and a processor, wherein the memory is used to store programs, and the processor is used to run the programs stored in the memory, wherein the program executes any one of the above-mentioned homomorphic decryption methods when running.

[0026] In an embodiment of the present invention, a smaller evaluation key is generated based on the private key of the first-layer LWE ciphertext and the NTRU private key in the fully homomorphic encryption scheme, and then the first-layer LWE ciphertext is homomorphically decrypted into the NTRU ciphertext with reduced noise using the evaluation key, thereby achieving the purpose of quickly reducing the noise in the first LWE ciphertext, thereby achieving the technical effect of improving the bootstrapping efficiency in the NTRU-based fully homomorphic encryption and decryption scheme, and further solving the technical problem of low bootstrapping efficiency of ciphertext in the fully homomorphic scheme in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0028] FIG1 shows a hardware structure block diagram of a computer terminal for implementing a homomorphic decryption method;

[0029] FIG2 is a schematic diagram of a flow chart of a homomorphic decryption method according to an embodiment of the present invention;

[0030] FIG3 is a structural block diagram of a homomorphic decryption device provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described 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 making creative efforts should fall within the scope of protection of the present invention.

[0032] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] According to an embodiment of the present invention, an embodiment of a homomorphic decryption method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0034] The method embodiment provided in Example 1 of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 shows a hardware structure block diagram of a computer terminal for implementing a homomorphic decryption method. As shown in Figure 1, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used in the figure to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that the structure shown in Figure 1 is only for illustration and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 may also include more or fewer components than those shown in Figure 1, or have a configuration different from that shown in Figure 1.

[0035] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10. As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0036] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the homomorphic decryption method in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the homomorphic decryption method of the above-mentioned application. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0037] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .

[0038] To improve the efficiency of fully homomorphic encryption methods, a fully homomorphic encryption scheme can be designed based on NTRU. However, the current bottleneck limiting the advancement of fully homomorphic encryption from theory to practice is still the efficiency of bootstrapping. Therefore, the new and efficient fully homomorphic encryption bootstrapping technology proposed in this application is of great significance.

[0039] First, some nouns, terms, symbols, and methods that appear in the description of the embodiments of this application are subject to the following explanations or definitions:

[0040] Homomorphic encryption, a computationally complex cryptographic technique based on difficult mathematical problems, ensures that operations on homomorphically encrypted data produce the same results as those on unencrypted data. In 2009, Craig Gentry of IBM first proposed a fully homomorphic algorithm based on an ideal lattice, an encryption algorithm capable of protecting data privacy.

[0041] Automorphism refers to the isomorphism process from a mathematical object to itself, that is, a way to map this mathematical object to itself while maintaining the overall structure of the mathematical object.

[0042] The LWE ciphertext represents the ciphertext encrypted based on the learning with errors problem, where the learning with errors (LWE) problem is a problem of solving a system of linear equations with noise.

[0043] RLWE ciphertext refers to the ciphertext encrypted based on the ring learning with errors problem (RLWE).

[0044] NTRU ciphertext is encrypted using a public-key system invented by three mathematics professors at Brown University in 1996. NTRU (Number Theory Research Unit) is a public-key system. Because NTRU generates keys more easily, encryption and decryption speeds are much faster than those of well-known algorithms like RSA.

[0045] Bootstrapping, a ciphertext refresh technique, uses homomorphic decryption to reduce ciphertext noise.

[0046] represents a set of integers, i.e. represents the set of residue classes modulo q, that is, Where q is a positive integer; for any positive integer n, Indicates n The direct product of represents the set of residue classes modulo Q, that is, Where Q is a positive integer; Indicates n The direct product of .

[0047] make is a positive integer, R is defined in The polynomial ring of degree N-1, R q It is defined in The polynomial ring of degree N-1 on R Q It is defined in The polynomial ring of degree N-1 over ; It is defined in The polynomial ring of degree n-1, It is defined in The polynomial ring of degree n-1 over , It is defined in The ring of polynomials of degree n-1 over .

[0048] For distribution D, x←D means randomly selecting x according to distribution D; for a finite set S, x←S means uniformly randomly selecting x from set S.

[0049] For real numbers Represents the integer closest to x.

[0050] The symbol := represents assignment, that is, for any two values ​​a and b, a:=b means assigning a to b.

[0051] The constant NTRU encryption method is an encryption method defined in this application. For the encrypted message polynomial u, the private key f is extracted from the private key distribution, and g is extracted from the error distribution. Based on two integer parameters (τ, Δ), the constant NTRU ciphertext is output:

[0052] NTRU Q,f,τ,Δ (u):=τ·g / f+Δ·u / f∈R Q .

[0053] The vector NTRU encryption method is an encryption method defined in this application. For the message polynomial v to be encrypted, let Draw a private key f from the private key distribution and draw g0,…,g from the error distribution d-1 , output vector NTRU ciphertext:

[0054] The ciphertext outer product is an operation defined in this application. In this application, “⊙” is used to represent the ciphertext outer product operation. For a ring element c∈R Q With vector NTRU ciphertext The ciphertext outer product operation between the two is described as follows:

[0055] Among them, for a∈R Q , Represents the bit decomposition under the basis B, the vector satisfies and||a i || ∞ <B.

[0056] This application defines a key switching algorithm based on constant NTRU ciphertext, including a key switching key generation method and a key switching method. Among them, the key switching key generation method KSG(f1, f2) is: Get the private key f1, f2∈R Q , calculate the key switching key in, It is obtained by the following calculation:

[0057] Key switching method To: Get the constant NTRU ciphertext of the message polynomial u encrypted under the key f1 And get the corresponding key switching key Calculated using the ciphertext outer product operation in, is the constant NTRU ciphertext of the message polynomial u encrypted under the key f2.

[0058] This application defines an automorphism method based on constant NTRU ciphertext. First, an automorphism key is generated by the key generation method AutoKGen(t, f). For example, an odd number is input. and private key f∈R Q , output automorphic key ksk t , among which, ksk t =KSG(ψ t (f), f) = KSG((f(X t ),f(X)),ψ t (X) represents an isomorphic mapping X→X t Then based on the following automorphism method EvalAuto(c, ksk t )Sure Input the constant NTRU ciphertext of the message polynomial u encrypted under f And the corresponding automorphic key ksk t , calculate ψ t (c) = c(X t ), and calculate Obtain automorphism results

[0059] FIG2 is a flow chart of a homomorphic decryption method according to an embodiment of the present invention. As shown in FIG2 , the method includes the following steps:

[0060] Step S202: Obtain a first LWE ciphertext and a private key of the first LWE ciphertext, wherein the first LWE ciphertext is a ciphertext to be homomorphically decrypted in a first-layer homomorphic encryption scheme.

[0061] Among them, the first LWE ciphertext can be expressed as Where a and b are two parts of the first LWE ciphertext, a=(a0,...,a n-1 ), the private key of the first LWE ciphertext can be expressed as m represents the pre-encrypted message polynomial corresponding to the first LWE ciphertext, and noised(m) represents the encoding method of the noise and message in the first LWE ciphertext. When the noise in the first LWE ciphertext is too large, the LWE ciphertext cannot be decrypted. Therefore, it is necessary to use the homomorphic decryption method provided in this application to homomorphically decrypt the noisy LWE ciphertext to obtain the constant NTRU ciphertext with reduced noise. The original message polynomial m can then be decrypted based on the noise-reduced constant NTRU ciphertext.

[0062] Step S204: Determine the NTRU private key and the rotation polynomial, wherein the NTRU private key is used to decrypt the NTRU ciphertext in the second-layer homomorphic encryption scheme. The NTRU private key can be the private key f of the NTRU-based GSW-like encryption scheme in the second layer of the fully homomorphic encryption and decryption framework, f∈R Q Based on the solution of this application, the first LWE ciphertext can be homomorphically decrypted into the target NTRU ciphertext corresponding to the NTRU private key. The rotation polynomial can be represented by r and is used to rotate the key in the blind rotation method.

[0063] Step S206: Generate an evaluation key corresponding to the blind rotation algorithm based on the private key of the first LWE ciphertext and the NTRU private key, where the evaluation key includes multiple automorphic keys and multiple calculation keys. The multiple automorphic keys are key switching keys for automorphism. The multiple automorphic keys are obtained by encrypting the automorphic NTRU private key using the NTRU private key based on the vector NTRU encryption method. The multiple calculation keys are obtained by encrypting the private key of the first LWE ciphertext using the NTRU private key based on the vector NTRU encryption method.

[0064] It should be noted that the blind rotation algorithm in the above steps is a homomorphic decryption method used to reduce ciphertext noise, and the evaluation key is an auxiliary parameter required in the ciphertext bootstrapping process.

[0065] As an optional embodiment, multiple computation keys in the evaluation key corresponding to the blind rotation algorithm can be generated based on the following steps: encrypting the component s0 in the private key of the first LWE ciphertext according to the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, the NTRU private key, and the first parameter in the integer pair to obtain the evk0 key in the multiple computation keys, wherein the private key of the first LWE ciphertext is s, According to the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, the NTRU private key and the first parameter, the component s in the private key s of the first LWE ciphertext is i Encrypt them separately to obtain evk in multiple calculation keys i key, where 1≤i<n; encrypt the sum of the components in the private key s of the first LWE ciphertext according to the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, the NTRU private key and the first parameter to obtain evk in the multiple calculation keys n key.

[0066] Optionally, the encryption scheme given in the above optional embodiment can be instantiated using an integer pair (τ, Δ). Specifically, for the ciphertext modulus Q and the message modulus t, and the encoding function noised(m) about the message m, set Wherein, τ represents the first parameter, and Δ represents the second parameter.

[0067] As an optional embodiment, evk0 key, evk i Key and evk n The key is calculated using the following formula:

[0068] Among them, NTRU′ Q,f,τ () represents the vector NTRU encryption method. The calculation formula of the vector NTRU encryption method is as follows:

[0069] NTRU′ Q,f,τ (v): = (τ·g0 / f+B 0 v,…,τ g d-1 / f+B d-1 v)

[0070] In the formula, v represents the data to be encrypted, Q represents the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, and f represents the NTRU private key f∈R extracted from the private key distribution. Q , g0 to g d-1 represents the error polynomial g0,…,g drawn from the error distribution d-1 ←R Q , τ represents the first parameter in the integer pair, B represents a positive integer,

[0071] As an optional embodiment, multiple automorphic keys in the evaluation key corresponding to the blind rotation algorithm can also be generated according to the following method: determining a parameter j, where the parameter j represents the number of times the private key is mapped during the automorphism process; and generating multiple automorphic keys based on the following formula according to the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, the NTRU private key, and the first parameter in the integer pair:

[0072] Among them, ksk j represents multiple self-similar keys, f(X j ) represents the NTRU private key after automorphism, f(X) represents the NTRU private key, q represents the ciphertext modulus of the first LWE ciphertext, NTRU′ Q,f,τ () represents the vector NTRU encryption method, and N represents the degree of the polynomial ring corresponding to the target NTRU ciphertext.

[0073] Then, the evaluation key EVK corresponding to the blind rotation algorithm can be determined τ,Δ , where the evaluation key is in the form of: EVK τ,Δ =(evk0, ...,evk n ,{ksk j} j∈S The evaluation key constructed using the above optional implementation is a key based on NTRU design, which is superior to the traditional evaluation key based on RLWE design in terms of storage. The evaluation key based on NTRU design is shorter in length and more efficient in use.

[0074] In step S208, the first LWE ciphertext is homomorphically decrypted based on the rotation polynomial, the evaluation key, and the blind rotation algorithm to obtain a target NTRU ciphertext, wherein the target NTRU ciphertext corresponds to the NTRU private key and is the NTRU ciphertext in the second-layer homomorphic encryption scheme.

[0075] As an optional embodiment, a process of homomorphically decrypting the first LWE ciphertext based on the rotation polynomial, the evaluation key, and the blind rotation algorithm to obtain the target NTRU ciphertext may include the following steps:

[0076] Step 1: Determine multiple odd numbers w based on the first LWE ciphertext i , where the first LWE ciphertext is represented as m represents the plaintext corresponding to the first LWE ciphertext, a=(a0,…,a n-1 ), for each a in a i ,

[0077] Step 2: Calculation Obtain the constant NTRU ciphertext c0(X), where Δ represents the second parameter in the integer pair, r represents the rotation polynomial, and ⊙ represents the ciphertext outer product. The ciphertext outer product is based on the following formula to represent the operation of the ring element c and the vector NTRU ciphertext c′ to obtain a new ring element:

[0078] c⊙c′= <BitDecom B (c), c′>, For a∈R Q , the bit decomposition vector under the basis B satisfies and||a i || ∞ <B,c∈R Q , the vector NTRU ciphertext c′ represents the ciphertext encrypted by the vector NTRU encryption method.

[0079] Specifically, for the constant NTRU ciphertext c=NTRU Q,f,τ,Δ (u) and the vector NTRU ciphertext c′=NTRU′ Q,f,τ (v), the result of the ciphertext outer product is:

[0080] Step 3: Calculation Get the constant NTRU ciphertext c′0(X), where NTRU Q,f,τ,Δ () represents the constant NTRU encryption method. The calculation formula of the constant NTRU encryption method is: NTRU Q,f,τ,Δ (u): =τ·g / f+Δ·u / f, Q represents the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, and f represents the NTRU private key f∈R extracted from the private key distribution Q , g represents the error g∈R drawn from the error distribution Q , u represents the data to be encrypted, τ represents the first parameter in the integer pair, and Δ represents the second parameter in the integer pair.

[0081] Step 4: Calculation Get constant NTRU ciphertext in, is one of multiple automorphic keys.

[0082] Step 5: Based on constant NTRU ciphertext evki key and multiple automorphic keys, follow steps 2 to 4 to generate constant NTRU ciphertext Iterate to get the constant NTRU ciphertext

[0083] As an optional embodiment, the execution process of step 5 may include the following steps:

[0084] 1) For 1≤i≤n-1, calculate

[0085] 2) Calculation

[0086] 3) Calculation in, is one of multiple automorphic keys.

[0087] Step 6: Constant NTRU ciphertext with evk n The key is used to perform the outer product of the ciphertext to obtain the target NTRU ciphertext.

[0088] In the above steps, a smaller evaluation key is generated based on the private key of the first-layer LWE ciphertext and the NTRU private key in the fully homomorphic encryption scheme, and then the evaluation key is used to homomorphically decrypt the first-layer LWE ciphertext into the NTRU ciphertext with reduced noise, thereby achieving the purpose of quickly reducing the noise in the first LWE ciphertext, thereby achieving the technical effect of improving the bootstrapping efficiency in the NTRU-based fully homomorphic encryption and decryption scheme, and further solving the technical problem of low bootstrapping efficiency of ciphertext in the fully homomorphic scheme in the related art.

[0089] As an optional embodiment, the above-mentioned homomorphic decryption method can be applied to an efficient bootstrapping scheme for ciphertexts. For a homomorphic encryption and decryption scheme whose first layer is an LWE ciphertext, the bootstrapping process may include the following steps: when the ciphertext modulus of the first LWE ciphertext is q and the ciphertext modulus of the target NTRU ciphertext is Q, extract a constant term from the target NTRU ciphertext to obtain a second LWE ciphertext with a ciphertext modulus of Q; perform modulus switching on the second LWE ciphertext to obtain a third LWE ciphertext with a ciphertext modulus of q; perform key switching on the third LWE ciphertext to obtain a fourth LWE ciphertext, wherein the ciphertext modulus of the fourth LWE ciphertext is q, and the private key corresponding to the fourth LWE ciphertext is the same as the private key of the first LWE ciphertext. Among them, the first LWE ciphertext is the LWE ciphertext of the first layer, and the noise in the first LWE ciphertext needs to be reduced, so it needs to be bootstrapped for noise reduction. The first LWE ciphertext can be expressed as: Where a=(a0,...,a n-1 ), s=(s0, ..., s n-1 ).

[0090] Through the above optional embodiment, the target NTRU ciphertext with a ciphertext modulus Q obtained by homomorphically decrypting the first LWE ciphertext can be processed to output a fourth LWE ciphertext with a ciphertext modulus q. The private key corresponding to the fourth LWE ciphertext is the same as the private key of the first LWE ciphertext. This allows a user to decrypt the fourth LWE ciphertext using the private key corresponding to the first LWE ciphertext, thereby completing efficient bootstrapping of the LWE ciphertext.

[0091] Optionally, extracting a constant term from the target NTRU ciphertext to obtain a second LWE ciphertext with a ciphertext modulus of Q includes: for the target NTRU ciphertext c 目标 =τ·g / f+Δ·m / f, according to the polynomial c 目标 The coefficient c=(c0,...,c N-1 ) and the coefficient of f Sure is the second LWE ciphertext of message m encrypted under private key f, and message m is also the message encrypted by the first LWE ciphertext. Among them, the target NTRU ciphertext is represented by c 目标 , which can also be expressed as ACC.

[0092] As an optional embodiment, the process of performing module switching on the second LWE ciphertext may include the following steps: calculating Get the third LWE ciphertext LWE with the ciphertext modulus q and corresponding private key f q,f (m), where LWE Q,f (m) represents the second LWE ciphertext.

[0093] As an optional embodiment, the process of performing key switching on the third LWE ciphertext to obtain the fourth LWE ciphertext may include the following process:

[0094] According to the ciphertext modulus q and integer B of the first LWE ciphertext ks ,calculate

[0095] Sure and determine e from the error distribution i,j,v ,in,

[0096] According to the private key f=(f0, ..., f N-1 ), the private key s∈(s0,...,s n-1 ), a i,j,v and e i,j,v , calculate the key switching key in,

[0097] According to the third LWE ciphertext and formula break down Get vector in,

[0098] calculate Get the fourth LWE ciphertext

[0099] As an optional embodiment, the present application provides the following four sets of bootstrapping algorithm parameters and corresponding experimental results as shown in Table 1. Those skilled in the art will understand that the embodiments that can implement the homomorphic decryption method proposed in this application are not limited to the following four implementation methods.

[0100] Table 1

[0101] As an optional embodiment, the above homomorphic decryption method can also be applied to a fully homomorphic encryption and decryption scheme whose first layer is RLWE ciphertext. Optionally, the following method can be used for efficient bootstrapping of RLWE ciphertext:

[0102] Get the initial RLWE ciphertext RLWE q,s (m R )=(a R , b R ), wherein the initial RLWE ciphertext is a ciphertext encrypted using the same private key as the first LWE ciphertext; based on the initial RLWE ciphertext, determine a R =(a R0 ,...,a R(n-1) ), s=(s0, ..., s n-1 ), m R =(m R0 ,...,m R(n-1) ) is a R , s and m R The coefficients of m are extracted from the initial RLWE ciphertext and encrypted under the private key s. Ri The initial LWE ciphertext LWE q,s (m Ri )=(a Ri , b Ri), wherein the initial LWE ciphertext includes a first LWE ciphertext and multiple fifth LWE ciphertexts; a blind rotation algorithm is applied to each of the multiple fifth LWE ciphertexts to obtain multiple NTRU ciphertexts corresponding one-to-one to the multiple fifth LWE ciphertexts; multiple sixth LWE ciphertexts are extracted from each of the multiple NTRU ciphertexts corresponding one-to-one to the multiple fifth LWE ciphertexts; a second LWE ciphertext is extracted from the target NTRU ciphertext; and the second LWE ciphertext and the multiple sixth LWE ciphertexts are packaged to obtain a target RLWE ciphertext.

[0103] The following embodiment shows an implementation process of a bootstrapping scheme for RLWE ciphertext, for RLWE ciphertext encrypted under private key s make for The coefficient of .

[0104] Step 1: Extract n from the RLWE ciphertext and encrypt m under the private key s Ri LWE ciphertext LWE q,s (m Ri )=(a Ri , b Ri ), wherein the n LWE ciphertexts may include the first LWE ciphertext and the fifth LWE ciphertext in the above homomorphic decryption method.

[0105] Step 2: Apply the homomorphic decryption method provided in the above embodiment or optional embodiment of the present application to the above n LWE ciphertexts respectively, and perform blind rotation on the above n LWE ciphertexts in turn to obtain n ACCs corresponding to the n LWE ciphertexts respectively. i , among which, ACC i represents the NTRU ciphertext obtained after blind rotation of the i-th LWE ciphertext among the n LWE ciphertexts above.

[0106] Step 3: From each ACC i Extract the encryption and encrypt m under the modulus Q Ri LWE ciphertext LWE Q,f (m Ri ), get n ACC i The n new LWE ciphertexts respectively correspond to each other, and the n new LWE ciphertexts may include the second LWE ciphertext and the sixth LWE ciphertext in the above homomorphic decryption method.

[0107] Step 4: Pack n new LWE ciphertexts into a target RLWE ciphertext. The packing process is described as follows:

[0108] PackKGen(f, s): input vector and ring elements For all Extraction and sample from the error distribution Then calculate

[0109] Output RPK τ ={rpk j,k}.

[0110] Pack({LWE Q,f (m Ri )}, RPK τ ): For 0≤i≤n-1, in Enter the packaging key RPK τ ={rpk j,k}. First calculate Where 0≤j≤N-1, then calculate satisfy calculate And output Among them, (u, v) represents the target RLWE ciphertext obtained by packaging.

[0111] Based on the blind rotation algorithm proposed in this application, this application designs a new, efficient, quantum-resistant bootstrap algorithm. The bootstrap algorithm proposed in this application has the following characteristics and advantages: (1) Small evaluation key size: Compared with the homomorphic algorithm disclosed in the prior art, the homomorphic decryption method proposed in this application has a shorter evaluation key. (2) High computational efficiency: The bootstrap algorithm proposed in this invention requires fewer multiplications during the homomorphic decryption process. (3) Support for arbitrary private key distribution: The selection of the first-layer ciphertext private key will not affect the performance of the homomorphic encryption and decryption algorithm proposed in this application, and the private key distribution can be flexibly selected to adjust the system parameters.

[0112] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0113] Through the description of the above implementation methods, those skilled in the art can clearly understand that the homomorphic decryption method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, disk, CD-ROM), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of various embodiments of the present invention.

[0114] According to an embodiment of the present invention, a homomorphic decryption device for implementing the above-mentioned homomorphic decryption method is also provided. Figure 3 is a structural block diagram of the homomorphic decryption device provided according to an embodiment of the present invention. As shown in Figure 3, the homomorphic decryption device includes: an acquisition module 32, a determination module 34, a generation module 36 and a homomorphic decryption module 38. The homomorphic decryption device is described below.

[0115] an acquisition module 32 configured to acquire a first LWE ciphertext and a private key of the first LWE ciphertext, wherein the first LWE ciphertext is a ciphertext to be homomorphically decrypted in a first-layer homomorphic encryption scheme;

[0116] A determination module 34, connected to the acquisition module 32, is configured to determine an NTRU private key and a rotation polynomial, wherein the NTRU private key is used to decrypt the NTRU ciphertext in the second layer of the homomorphic encryption scheme;

[0117] a generating module 36 connected to the determining module 34 and configured to generate an evaluation key corresponding to the blind rotation algorithm based on the private key of the first LWE ciphertext and the NTRU private key, wherein the evaluation key includes a plurality of automorphic keys and a plurality of computation keys, the plurality of automorphic keys being key switching keys for the automorphism, the plurality of automorphic keys being obtained by encrypting the automorphic NTRU private key using the NTRU private key based on a vector NTRU encryption method, and the plurality of computation keys being obtained by encrypting the private key of the first LWE ciphertext using the NTRU private key based on a vector NTRU encryption method;

[0118] The homomorphic decryption module 38 is connected to the above-mentioned generation module 36 and is used to homomorphically decrypt the first LWE ciphertext based on the rotation polynomial, the evaluation key and the blind rotation algorithm to obtain the target NTRU ciphertext, wherein the target NTRU ciphertext corresponds to the NTRU private key and the target NTRU ciphertext is the NTRU ciphertext in the second layer of the homomorphic encryption scheme.

[0119] It should be noted that the acquisition module 32, determination module 34, generation module 36, and homomorphic decryption module 38 correspond to steps S202 to S208 in the embodiment. The examples and application scenarios implemented by the four modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules, as part of the device, can be run in the computer terminal 10 provided in the embodiment.

[0120] An embodiment of the present invention may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one of a plurality of network devices in a computer network. The computer device includes a memory and a processor.

[0121] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the homomorphic decryption method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned homomorphic decryption method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0122] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain a first LWE ciphertext and a private key of the first LWE ciphertext, wherein the first LWE ciphertext is the ciphertext to be homomorphically decrypted in the first-layer homomorphic encryption scheme; determine the NTRU private key and the rotation polynomial, wherein the NTRU private key is used to decrypt the NTRU ciphertext in the second-layer homomorphic encryption scheme; determine the NTRU private key and the rotation polynomial, wherein the NTRU private key is used to decrypt the NTRU ciphertext in the second-layer homomorphic encryption scheme; based on the rotation polynomial, the evaluation key and the blind rotation algorithm, homomorphically decrypt the first LWE ciphertext to obtain a target NTRU ciphertext, wherein the target NTRU ciphertext corresponds to the NTRU private key, and the target NTRU ciphertext is the NTRU ciphertext in the second-layer homomorphic encryption scheme.

[0123] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0124] An embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store program codes executed by the homomorphic decryption method provided in the above embodiment.

[0125] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0126] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: obtaining a first LWE ciphertext and a private key of the first LWE ciphertext, wherein the first LWE ciphertext is the ciphertext to be homomorphically decrypted in the first-layer homomorphic encryption scheme; determining an NTRU private key and a rotation polynomial, wherein the NTRU private key is used to decrypt the NTRU ciphertext in the second-layer homomorphic encryption scheme; determining an NTRU private key and a rotation polynomial, wherein the NTRU private key is used to decrypt the NTRU ciphertext in the second-layer homomorphic encryption scheme; and homomorphically decrypting the first LWE ciphertext based on the rotation polynomial, the evaluation key, and the blind rotation algorithm to obtain a target NTRU ciphertext, wherein the target NTRU ciphertext corresponds to the NTRU private key, and the target NTRU ciphertext is the NTRU ciphertext in the second-layer homomorphic encryption scheme.

[0127] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0128] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0129] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0130] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0131] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0132] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, and other media that can store program code.

[0133] The above is only a preferred embodiment of the present invention. 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 invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention. Industrial Applicability

[0134] The solution provided in the embodiment of the present application can be applied to the field of cryptography. In the embodiment of the present application, a homomorphic decryption method based on NTRU is adopted to achieve the purpose of quickly reducing the noise in the LWE ciphertext, and achieve the technical effect of improving the bootstrapping efficiency in the fully homomorphic encryption and decryption scheme based on NTRU.

Claims

1. A homomorphic decryption method, comprising: Obtain a first LWE ciphertext and a private key of the first LWE ciphertext, wherein the first LWE ciphertext is a ciphertext to be homomorphically decrypted in a first-layer homomorphic encryption scheme; Determine an NTRU private key and a rotation polynomial, wherein the NTRU private key is used to decrypt the NTRU ciphertext in the homomorphic encryption layer 2 scheme; Generate an evaluation key corresponding to the blind rotation algorithm according to the private key of the first LWE ciphertext and the NTRU private key, wherein the evaluation key includes a plurality of automorphic keys and a plurality of calculation keys, the plurality of automorphic keys are key switching keys for automorphism, the plurality of automorphic keys are obtained by encrypting the automorphic NTRU private key using the NTRU private key based on the vector NTRU encryption method, and the plurality of calculation keys are obtained by encrypting the private key of the first LWE ciphertext using the NTRU private key based on the vector NTRU encryption method; Based on the rotation polynomial, the evaluation key and the blind rotation algorithm, the first LWE ciphertext is homomorphically decrypted to obtain a target NTRU ciphertext, wherein the target NTRU ciphertext corresponds to the NTRU private key, and the target NTRU ciphertext is the NTRU ciphertext in the second layer of homomorphic encryption scheme.

2. The method according to claim 1, wherein: The step of generating a plurality of calculation keys in the evaluation key corresponding to the blind rotation algorithm according to the private key of the first LWE ciphertext and the NTRU private key includes: Encrypting component s0 in the private key of the first LWE ciphertext according to the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, the NTRU private key and the first parameter in the integer pair to obtain an evk0 key in the multiple computation keys, wherein the private key of the first LWE ciphertext is s, According to the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, the NTRU private key and the first parameter, the component s in the private key s of the first LWE ciphertext i Encrypt them respectively to obtain evk in the multiple calculation keys i Key, where 1≤i<n; Encrypt the sum of the components in the private key s of the first LWE ciphertext according to the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, the NTRU private key and the first parameter to obtain evk in the multiple calculation keys n Key.

3. The method according to claim 2, wherein: The evk0 key, the evk i Key and the evk n The key is calculated using the following formula: Among them, NTRU′ Q,f,τ () represents the vector NTRU encryption method, and the calculation formula of the vector NTRU encryption method is as follows: NTRU′ Q,f,τ (v): = (τ·g0 / f+B 0 ·v,…,τ·g d-1 / f+B d-1 v), v represents the data to be encrypted, Q represents the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, and f represents the NTRU private key f∈R extracted from the private key distribution Q , g0 to g d-1 represents the error polynomial g0,…,g drawn from the error distribution d-1 ←R Q , τ represents the first parameter in the integer pair, B represents a positive integer, d = "log B Q".

4. The method according to claim 1, wherein: The step of generating a plurality of automorphic keys in an evaluation key corresponding to a blind rotation algorithm according to the private key of the first LWE ciphertext and the NTRU private key includes: Determine a parameter j, wherein the parameter j represents the number of times the private key is mapped in the automorphism process; The multiple automorphic keys are generated based on the following formula according to the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, the NTRU private key and the first parameter in the integer pair: Among them, ksk j represents the multiple self-similar keys, f(X j ) represents the NTRU private key after the automorphism, f(X) represents the NTRU private key, q represents the ciphertext modulus of the first LWE ciphertext, NTRU′ Q,f,τ () represents the vector NTRU encryption method, and N represents the degree of the polynomial ring corresponding to the target NTRU ciphertext.

5. The method according to claim 3, wherein: The step of homomorphically decrypting the first LWE ciphertext based on the rotation polynomial, the evaluation key, and the blind rotation algorithm to obtain a target NTRU ciphertext includes: Step 1: Determine a number of odd numbers w according to the first LWE ciphertext i , where the first LWE ciphertext is represented as m represents the plaintext corresponding to the first LWE ciphertext, a=(a0, ..., a n-1 ), for each a in a i , Step 2: Calculation The constant NTRU ciphertext c0(X) is obtained, where Δ represents the second parameter in the integer pair, r represents the rotation polynomial, and ⊙ represents the ciphertext outer product. The ciphertext outer product is based on the following formula to represent the operation of the ring element c and the vector NTRU ciphertext c′. Calculate the new ring element: For a∈R Q , the bit decomposition vector under basis B satisfies And||a i || ∞ <B,c∈R Q , the vector NTRU ciphertext c′ represents the ciphertext encrypted by the vector NTRU encryption method; Step 3: Calculation Get the constant NTRU ciphertext c′0(X), where NTRU Q,f,τ,Δ () represents the constant NTRU encryption method, and the calculation formula of the constant NTRU encryption method is: NTRU Q,f,τ,Δ (u): =τ·g / f+Δ·u / f, Q represents the ciphertext modulus of the NTRU ciphertext corresponding to the NTRU private key, and f represents the NTRU private key f∈R extracted from the private key distribution Q , g represents the error g∈R drawn from the error distribution Q , u represents the data to be encrypted, τ represents the first parameter in the integer pair, and Δ represents the second parameter in the integer pair; Step 4: Calculation Get constant NTRU ciphertext in, is one of the plurality of self-similar keys; Step 5: Based on the constant NTRU ciphertext The evk i key and the multiple self-similar keys, according to steps 2 to 4, the constant NTRU ciphertext Iterate to get the constant NTRU ciphertext Step 6: encrypt the constant NTRU With the evk n The key performs the outer product of the ciphertext to obtain the target NTRU ciphertext.

6. The method according to claim 5, wherein: The constant NTRU ciphertext The evk i key and the multiple self-similar keys, according to steps 2 to 4, the constant NTRU ciphertext Iterate to get the constant NTRU ciphertext include: For 1≤i≤n-1, calculate calculate calculate in, is one of the multiple self-similar keys.

7. The method according to any one of claims 1 to 6, wherein: The method further comprises: When the ciphertext modulus of the first LWE ciphertext is q and the ciphertext modulus of the target NTRU ciphertext is Q, extract a constant term from the target NTRU ciphertext to obtain a second LWE ciphertext with a ciphertext modulus of Q; Performing modulus switching on the second LWE ciphertext to obtain a third LWE ciphertext whose ciphertext modulus is q; Key switching is performed on the third LWE ciphertext to obtain a fourth LWE ciphertext, wherein a ciphertext modulus of the fourth LWE ciphertext is q, and a private key corresponding to the fourth LWE ciphertext is the same as a private key of the first LWE ciphertext.

8. The method according to claim 7, wherein: The step of extracting a constant term from the target NTRU ciphertext to obtain a second LWE ciphertext with a ciphertext modulus of Q includes: For the target NTRU ciphertext c 目标 =τ·g / f+Δ·m / f, according to the polynomial c 目标 The coefficient c=(c0,...,c N-1 ) and the coefficient of f Sure It is the second LWE ciphertext that encrypts the message m under the private key f, and the message m is also the message encrypted by the first LWE ciphertext.

9. The method according to claim 8, wherein: The performing modulus switching on the second LWE ciphertext to obtain a third LWE ciphertext with a ciphertext modulus of q includes: Calculate ModSwitch(LWE Q,f (m), q) = "LWE Q,f (m)·q / Q" modq, and obtain the third LWE ciphertext LWE with a ciphertext modulus of q and corresponding to the private key f q,f (m), where LWE Q,f (m) represents the second LWE ciphertext.

10. The method according to claim 9, wherein: The performing key switching on the third LWE ciphertext to obtain a fourth LWE ciphertext includes: According to the ciphertext modulus q and integer B of the first LWE ciphertext ks ,calculate Sure and determine e from the error distribution i,j,v ,in, According to the private key f=(f0, ..., f N-1 ), the private key s∈(s0,...s n-1 ), a i,j,v and e i,j,v , calculate the key switching key in, According to the third LWE ciphertext Japanese formula break down Get vector in, calculate Get the fourth LWE ciphertext 11. The method according to any one of claims 1 to 6, wherein: Also includes: Get the initial RLWE ciphertext RLWE q,s (m R )=(a R , b R ), wherein the initial RLWE ciphertext is a ciphertext encrypted using the same private key as the first LWE ciphertext; Based on the initial RLWE ciphertext, determine a R =(a R0 , ..., a R(n-1) ), s=(s0,...,s n-1 ), m R =(m R0 , ..., m R(n-1) ) is a R , s and m R The coefficients of m are extracted from the initial RLWE ciphertext and encrypted under the private key s. Ri The initial LWE ciphertext LWE q,s (m Ri )=(a Ri , b Ri ), wherein the initial LWE ciphertext includes the first LWE ciphertext and a plurality of fifth LWE ciphertexts; Using a blind rotation algorithm on the plurality of fifth LWE ciphertexts respectively, to obtain a plurality of NTRU ciphertexts corresponding one to one to the plurality of fifth LWE ciphertexts; Extracting a plurality of sixth LWE ciphertexts from a plurality of NTRU ciphertexts corresponding one-to-one to the plurality of fifth LWE ciphertexts respectively; Extracting a second LWE ciphertext from the target NTRU ciphertext; The second LWE ciphertext and the plurality of sixth LWE ciphertexts are packaged to obtain a target RLWE ciphertext.

12. A homomorphic decryption device, comprising: An acquisition component is configured to acquire a first LWE ciphertext and a private key of the first LWE ciphertext, wherein the first LWE ciphertext is a ciphertext to be homomorphically decrypted in a first-layer homomorphic encryption scheme; A determining component configured to determine an NTRU private key and a rotation polynomial, wherein the NTRU private key is used to decrypt the NTRU ciphertext in the homomorphic encryption layer 2 scheme; a generating component, configured to generate an evaluation key corresponding to a blind rotation algorithm according to a private key of the first LWE ciphertext and the NTRU private key, wherein the evaluation key includes a plurality of automorphic keys and a plurality of calculation keys, the plurality of automorphic keys being key switching keys for automorphism, the plurality of automorphic keys being obtained by encrypting the automorphic NTRU private key using the NTRU private key based on a vector NTRU encryption method, and the plurality of calculation keys being obtained by encrypting the private key of the first LWE ciphertext using the NTRU private key based on the vector NTRU encryption method; A homomorphic decryption component is configured to perform homomorphic decryption on the first LWE ciphertext based on the rotation polynomial, the evaluation key and the blind rotation algorithm to obtain a target NTRU ciphertext, wherein the target NTRU ciphertext corresponds to the NTRU private key, and the target NTRU ciphertext is the NTRU ciphertext in the second layer of the homomorphic encryption scheme.

13. A non-volatile storage medium, the non-volatile storage medium comprising a stored program, wherein: When the program is running, the device where the non-volatile storage medium is located is controlled to execute the homomorphic decryption method described in any one of claims 1 to 11.

14. A computer device, comprising a memory and a processor, wherein the memory is used to store a program, and the processor is used to run the program stored in the memory, wherein: When the program is running, the homomorphic decryption method described in any one of claims 1 to 11 is executed.

Citation Information

Patent Citations

  • Fully-homomorphic encryption method and device and computer readable storage medium

    CN108718231A

  • An NTRU type multi-key fully homomorphic encryption method with a fast homomorphic operation process

    CN109936435A

  • NTRU encryption method based on R-LWE and security certification method thereof

    CN110545179A

  • Executing a cryptographic operation

    US20200313886A1

Cited By

  • Encryption method and device, electronic equipment and computer storage medium

    CN119094105A

  • Multi-party data processing method capable of protecting privacy and computing equipment

    CN119150353A

  • Privacy information retrieval method based on NTRU homomorphic outer product

    CN119323056A

  • Data monitoring method, electronic equipment and computer readable storage medium

    CN119420496A

  • Data monitoring method, electronic device, and computer-readable storage medium

    CN119420496B