Homomorphic ciphertext processing method, batch function bootstrap method and computing device
By reducing the number of FFT operations in batch homomorphic function operations through multiplexing technology, the problem of time-consuming bootstrapping operations in fully homomorphic encryption schemes is solved, thus improving computational efficiency.
Patent Information
- Application Number
- CN202610003446.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-04
- Publication Date
- 2026-05-01
AI Technical Summary
Existing fully homomorphic encryption schemes suffer from time-consuming bootstrapping operations, particularly Fourier transform (FFT) calculations, when handling high-precision and complex tasks, thus impacting computational efficiency.
By acquiring multiple RLWE ciphertext sequences and group key ciphertexts, batch function bootstrapping is performed using multiplexing technology to reduce the number of iterations of polynomial and monomial multiplications. In particular, the number of FFT calculations is reduced through multiplexer operations in formulas (8), (14)-(17) and (24), (30)-(33).
It significantly improves the computational efficiency of batch homomorphic function operations, reduces the total number of FFT operations, and thus increases the speed of processing homomorphic ciphertext.
Smart Images

Figure CN121966823A_ABST
Abstract
Description
Methods for processing homomorphic ciphertext, batch function bootstrapping methods, and computing devices Technical Field
[0001] The embodiments in this specification belong to the field of homomorphic encryption technology, and particularly relate to a method for processing homomorphic ciphertext, a method for performing batch function bootstrapping, and a computing device. Background Technology
[0002] Homomorphic encryption algorithms can theoretically support arbitrary computations, such as matrix-vector multiplication, activation functions in neural networks, and privacy information retrieval and intersection. When dealing with high-precision and complex circuits, fully homomorphic encryption (FHE) schemes rely on a core operation—bootstrapping, a concept defined by Gentry in his first FHE solution proposed in 2009. Bootstrapping aims to refresh the ciphertext, reducing its noise level and preventing excessive noise expansion during homomorphic computation that could lead to decryption failure. Bootstrapping is consistently the most time-consuming part of FHE applications. FHEW and TFHE are among the most practical FHE schemes, Boolean-type fully homomorphic encryption algorithms. TFHE currently boasts the lowest bootstrapping latency of all fully homomorphic encryption schemes, requiring only about 13ms for gate bootstrapping. In contrast, BFV and BGV bootstrapping algorithms take several minutes; CKKS takes several seconds, at the cost of precision loss. The FHEW and TFHE schemes are more advantageous in handling high-precision function operations. Essentially, they can embed an arbitrary lookup table function during bootstrapping, a process known as Functional Bootstrapping (FBS). Functional bootstrapping schemes can be used, for example, to evaluate nonlinear functions in neural networks, such as sigmoid and ReLU.
[0003] Existing batch function bootstrapping schemes require multiple Fourier transform (FFT) calculations, which are time-consuming. Summary of the Invention
[0004] The purpose of this invention is to provide a method for performing batch homomorphic function operations, so as to reduce the number of FFT operations in batch homomorphic function operations.
[0005] The first aspect of this specification provides a method for processing homomorphic ciphertext, including:
[0006] Obtain a sequence of multiple first RLWE ciphertexts, where the plaintext corresponding to each first RLWE ciphertext includes a first monomial with each coefficient of the first polynomial as the first exponent;
[0007] Get Each key ciphertext consists of multiple RGSW ciphertexts, where each RGSW ciphertext is either 0 or 1. The number of binary bits for the second exponent of the second monomial. ≥2, the ciphertext of the i-th key group and the i-th element in the second exponent The bit values correspond;
[0008] Based on the above Group key ciphertext, and sequence of the plurality of first RLWE ciphertexts. The rotation process yields a sequence of multiple second RLWE ciphertexts. In the i-th rotation process, the rotation method is selected based on the i-th key ciphertext. The plaintext corresponding to each second RLWE ciphertext includes a third monomial with each coefficient of the second polynomial as the third exponent. The second polynomial is equal to the polynomial obtained by multiplying the first polynomial and the second monomial. Each rotation process includes a Fourier transform.
[0009] The second aspect of this specification provides a method for performing batch function bootstrapping, including:
[0010] Obtain the fourth RLWE ciphertext of the first polynomial, wherein the first plaintext polynomial includes n first values as its n coefficients, and the fourth RLWE ciphertext includes the second polynomial and the third polynomial;
[0011] Obtain n test polynomials corresponding to n functions, wherein the n functions correspond to the n first values respectively;
[0012] Obtain multiple sets of key ciphertexts, which are generated based on the key polynomial of homomorphic encryption. Each set of key ciphertexts includes multiple RGSW ciphertexts, and each RGSW ciphertext is an RGSW ciphertext of 0 or 1.
[0013] Based on the n coefficients of the third polynomial and the n test polynomials, a sequence of multiple fifth RLWE ciphertexts is generated, wherein the plaintext corresponding to each fifth RLWE ciphertext is the product of the j-th test polynomial and a monomial with the j-th coefficient as the exponent.
[0014] Based on the sequences of the plurality of fifth RLWE ciphertexts, an h+1th preset algorithm is performed to obtain a sequence of plurality of sixth RLWE ciphertexts, where h is the number of terms in the key polynomial, and the plaintext corresponding to the j-th sixth RLWE ciphertext is the product of the j-th test polynomial and a monomial with the j-th first value as the exponent; wherein, the preset algorithm includes the method steps as described in the first aspect, the first preset algorithm uses the sequence of the plurality of fifth RLWE ciphertexts as the sequence of the plurality of first RLWE ciphertexts, and the plurality of key ciphertexts include the Group key ciphertext;
[0015] Based on the sequence of the plurality of sixth RLWE ciphertexts, n ciphertexts are obtained, the n ciphertexts corresponding to n second values, each second value being a function value obtained by inputting each first value into the corresponding function.
[0016] A third aspect of this specification provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method described in the first aspect.
[0017] A fourth aspect of this specification provides a computing device including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method described in the first aspect.
[0018] This specification provides a computer program product in a fifth aspect, including a computer program / instructions that, when executed by a processor, implement the steps of the method described in the first aspect.
[0019] This specification provides a method for processing homomorphic ciphertext. This method performs multiplexing selection based on the key ciphertext corresponding to the multi-bit monomial exponent, thereby reducing the number of iterations of polynomial multiplication of monomials in the process of processing homomorphic ciphertext. Since each iteration includes FFT processing, reducing the number of iterations can greatly reduce the total number of FFTs in the process of processing homomorphic ciphertext, thereby improving the computational efficiency of processing homomorphic ciphertext. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments in this specification, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 is a flowchart of a function bootstrapping method in one embodiment; Figure 2 is a flowchart of a method for processing homomorphic ciphertext in an embodiment of this specification; Figure 3 is a flowchart of a batch function bootstrapping method in an embodiment of this specification; Figure 4 is a schematic diagram of a batch function bootstrapping method in an embodiment of this specification. Detailed Implementation
[0022] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0023] Currently, most FHE schemes are based on the error learning with errors assumption (LEW) or the ring learning with errors assumption (RLWE). Correspondingly, FHE schemes can include the following types of ciphertext:
[0024] LWE Ciphertext: Given two positive integers n and q, the LWE ciphertext of plaintext m (where m is an integer) is defined as follows: ,in, Representing n+1 dimensions space, The space represents the set of integers modulo q, in the range {0, 1, 2, ..., q−1}. Let be a vector randomly selected from an n-dimensional vector space. The private key for homomorphic encryption. , The error Obtained by sampling from the error distribution.
[0025] RLWE ciphertext: RLWE ciphertext is LWE ciphertext in polynomial space The ring form in polynomial space In this polynomial space, the degree is less than n, where n is a power of 2, for example, it can take values such as 4096, 8192, etc., and is set as follows: polynomial The RLWE ciphertext is defined as follows: ,in, ,in, , This is the private key polynomial for homomorphic encryption. In this document, bold letters denote vectors or polynomials.
[0026] RLWE' Ciphertext: Given a gadget vector The gadget RLWE ciphertext can be represented as RLWE′ ciphertext: .in, , Indicates to Rounding up, q is the modulus of the space, and B is the gadget base.
[0027] RGSW Ciphertext: .
[0028] The following text will first briefly describe function bootstrapping schemes and tree-based function bootstrapping schemes in the relevant technical field.
[0029] Figure 1 is a flowchart of a function bootstrapping method in one embodiment.
[0030] As shown in Figure 1, firstly, in step S101, the LWE ciphertext LWE(m) and the test polynomial P(X) of the objective function f(x) are obtained.
[0031] This method can be executed by a computing device that performs homomorphic function operations. This computing device can receive LWE(m) = from other devices. The other device can use a homomorphic encryption algorithm to homomorphically encrypt the plaintext m to obtain the ciphertext. The ciphertext is then sent to the computing device. Upon receiving the ciphertext... Then, the ciphertext can be calculated using the function bootstrapping method to obtain the noise-reduced LWE(f(m)).
[0032] The test polynomial P(X) of the objective function f(x) can be expressed as shown in Equation (1):
[0033] (1)
[0034] Where f(x) satisfies m Let B be the modulus of the function space, t = 2B, q = 2N. The integer symbol is used for rounding. According to formula (1), the coefficients of the test polynomial P(X) include p f(0), p f(1), ..., p f(B-1) arranged in sequence, where p is determined based on t and q.
[0035] Therefore, we can first generate a lookup table for the function f(x), that is, the values of f(0), f(1), ... f(B-1), and then substitute the values of f(0), f(1), ... f(B-1) into formula (1) to obtain the test polynomial P(X).
[0036] In step S103, a blind rotation is performed based on the LWE ciphertext LWE(m) to obtain... ),in .
[0037] In one implementation, calculation can be performed first. Then, for i=0 to n-1, perform the calculation as shown in formula (2) in a loop:
[0038] (2)
[0039] Among them, blind rotation key .
[0040] Formula (2) is equivalent to formula (3):
[0041] (3)
[0042] in, express ACC and The cross product between them.
[0043] Here, firstly... Let's take an example to explain the calculation of the outer product. Assume... ,but
[0044]
[0045]
[0046]
[0047] (4)
[0048] in, This represents the product of gadgets, here expressed as... Let's take an example to describe how to calculate the product of gadgets:
[0049]
[0050]
[0051]
[0052] in, for Regarding gadget vectors Gadget factorization of polynomials .
[0053] According to formula (4), The result is approximately RLWE ciphertext.
[0054] Therefore, when When the constant is 0, The corresponding plaintext is 0. According to formula (3), ACC remains unchanged; when When corresponding to a constant of 1, The corresponding plaintext is the plaintext corresponding to ACC. According to formula (3), ACC becomes = After n iterations, it is equivalent to calculating... .
[0055] In step S105, from the ciphertext LWE(f(m)) is extracted.
[0056] After obtaining the ciphertext After that, due to It can be approximated as m, therefore, Since the first... The coefficients of the term include f(m), the first term of P(X). Item and The product is = In other words, The constant term includes f(m). Therefore, it can be obtained from the ciphertext. Obtain the ciphertext corresponding to the constant term to obtain the noise-reduced ciphertext LWE(f(m)). Here, key switching and modulus switching refer to LWE key switching and LWE modulus switching, which are used to convert LWE(f(m)) into a key with the same modulus and dimension as the initial LWE(m).
[0057] Specifically, in LWE modulus conversion, given the LWE ciphertext ct= It can be converted to:
[0058]
[0059] Where s is the key, the dimension of the n-dimensional key s, and Q is the modulus.
[0060] In LWE key transformation, given the LWE ciphertext ct= It can be converted to :
[0061]
[0062] in, The above-mentioned function bootstrapping method is generally applicable to functions f(x) that include a single variable. As mentioned above, the TFBS algorithm can be applied to functions that include any number of variables.
[0063] The method shown in Figure 1 describes function bootstrapping for the ciphertext LWE(m) of a single plaintext. Each bootstrapping can only obtain the function value ciphertext LWE(f(m)) corresponding to one ciphertext, which is inefficient.
[0064] Therefore, embodiments of this specification provide a method for handling multiple plaintexts. The corresponding self-bootstrapping solution.
[0065] Figure 2 is a flowchart of a method for processing homomorphic ciphertext in an embodiment of this specification.
[0066] As shown in Figure 2, in step S201, the sequence of multiple RLWE ciphertexts is obtained. Among them, each RLWE ciphertext ,in, , It is a polynomial Multiple coefficients.
[0067] Each RLWE ciphertext Including Specifically, each RLWE ciphertext It can be Or it could be a polynomial and The product of q and 2n. In one implementation, the RLWE ciphertext sequence modulo q can be obtained, and each RLWE ciphertext modulo 2n can be obtained through modulo switching from q to 2n. .
[0068] Those skilled in the art will understand that in calculating polynomials With monomials Multiplication At that time, among them For polynomials Multiply Equivalent to Rotation of each coefficient A position. For example, when When it is a positive number, The order of the coefficients changed as follows:
[0069]
[0070] In the above formula, the negative sign - represents i+ When it is greater than n, by Convert it out.
[0071] As can be seen from the formula above, when When it is a positive number, it is equivalent to putting Rotate each coefficient to the right, and correspondingly, when When it is negative, it is equivalent to... The coefficients are rotated to the left. (The following text will use...) The example is described using positive numbers; those skilled in the art can obtain the corresponding values by changing the direction of rotation. Operation steps when the number is negative.
[0072] More specifically, by Decomposed into ,in, ,right Multiply Equivalent to Sequential multiplication The polynomial in this process Multiply This is equivalent to performing the following transformation on the coefficients of the polynomial:
[0073] (5)
[0074] In the embodiments of this specification, by obtaining the polynomial The coefficients are placed on the exponent in the RLWE ciphertext, i.e. And according to the above formula (5) Perform a similar rotation, where the "-" needs to be placed on the exponent, i.e. This is equivalent to performing a polynomial on the exponent. With monomials Homomorphic multiplication.
[0075] In step S203, obtain Each key ciphertext consists of multiple RGSW ciphertexts, where each RGSW ciphertext is either 0 or 1. monomial index The number of binary bits, ≥2, where the ciphertext of the i-th key group is equal to the exponent. The i-th The value corresponds to the bit.
[0076] use The term before rotation in formula (5) is used Corresponding to the rotated terms in formula (5), formula (5) can be transformed into the Cmux expressions shown in formulas (6) and (7):
[0077] when hour,
[0078] (6)
[0079] in, , It represents the outer product.
[0080] when hour,
[0081] (7)
[0082] in For automorphism algorithms (hereinafter referred to as ), used to convert X into .
[0083] because Therefore, it is necessary to perform equations (6) and (7). Times, including n Sub-CMux and Secondary automorphism operation.
[0084] outer product Both HomoAuto's operations include gadget decomposition (Decom) and Fast Fourier Transform (FFT). Therefore, calculating the multiplication of a polynomial by a monomial using formulas (6) and (7) requires 2(2d+2). The number of FFT calculations is the primary computational bottleneck in this embodiment, where d is the length of the gadget decomposition.
[0085] Therefore, in the embodiments of this specification, the above can be used as a basis. Multiplication of polynomials and monomials is performed on multiple digits. The following description is based on... Taking the multiplication of a polynomial and a monomial by two digits as an example, we get...
[0086] (8)
[0087] Understandable, for those based on For multiplication of polynomials and monomials with more digits, please refer to the following: The two-digit example is performed accordingly.
[0088] In formula (8), i = 2j, each time based on and With polynomial When multiplied, the coefficients of the polynomial can be rotated as follows:
[0089]
[0090] (9)
[0091] According to formula (9), in order to perform polynomial multiplication of monomials over the exponent as in formulas (6) and (7), we can first perform polynomial multiplication of monomials over the exponent for each of formulas (9). ,according to and The value is set as shown in Table 1 for the key ciphertext Bsk. 2j,k , where k is based on and The value is determined and can be one of 0, 1, 2, or 3.
[0092] Table 1
[0093] in,
[0094] (10)
[0095] Formula (10) includes the key polynomial due to the automorphism of the polynomial. Key switching, i.e., switching the key polynomial Perform a -1 automorphism process to make the exponent in the key polynomial negative.
[0096] Similarly, based on When multiplying a polynomial and a monomial using 3 digits, even if...
[0097] (11)
[0098] In formula (11), i = 3j, each time based on , and With polynomial When multiplied, the coefficients of the polynomial can be rotated as follows:
[0099]
[0100] (12)
[0101] In formula (12), there are a total of 8 cases, among which, and The two cases are not shown. Therefore, for each of the formulas (12) ,according to , and The value can be set similarly to the key ciphertext Bsk in Table 1. 3j,k Among them, Bsk 3j,k include and k is based on , , The value is determined and is one of 0-8. That is, a set of keys corresponding to each 3j includes 16 key ciphertexts, used for... When rotating the coefficients of a polynomial, the rotation method is selected so that the coefficients of the polynomial are rotated according to formula (12).
[0102] In one implementation, given ciphertext ,and The associated variant outer product can be calculated as:
[0103] (13)
[0104] Using formula (13), the automorphism can be... The outer product is combined into a single outer product operation, avoiding the additional RLWE key switching caused by automorphism, which includes the FFT operation.
[0105] In step S205, based on the Group key ciphertext, a sequence of the plurality of RLWE ciphertexts. conduct After several rotations, multiple sequences of RLWE ciphertext are obtained. In the i-th rotation process, the rotation method is selected based on the i-th key ciphertext, and each RLWE ciphertext... The corresponding plaintext includes polynomials The various coefficients The polynomial is a monomial with an exponent. By polynomial With monomials Multiplying them together, we get, that is, Each of the rotation processes includes a Fourier transform.
[0106] Based on Table 1, the following can be expressed according to formula (14) for... By performing a similar rotation, we can obtain ,in,
[0107] when hour,
[0108]
[0109]
[0110] (14)
[0111] In other words, based on , , and A multiplexer was constructed, based on , , and Perform homomorphic computation, which is equivalent to based on and The value is selected after rotation.
[0112] When j is between 0 and At -1,
[0113] (15)
[0114] When j is arrive hour,
[0115] (16)
[0116] When j is arrive hour,
[0117] (17)
[0118] It is understandable that, although formula (17) shows the process of... and The calculation, for Alternatively, it can be done separately. and This operation yields the same processing result. In each rotation process, regardless of whether... , still Each operation requires first performing an FFT on the ciphertext sequence to be processed in this operation, and then performing an iFFT on the resulting ciphertext sequence after this operation. For example, for the first rotation process, it is necessary to... Each of the Perform FFT processing, and after the first rotation processing, perform iFFT processing on each of the resulting ciphertexts.
[0119] Therefore, by combining formulas (8) and (14)-(17), when performing multiplication of polynomials and monomials, it is only necessary to perform... This involves multiple rotations, thus reducing the number of FFT calculations by half.
[0120] As can be understood, the above description used m=2 as an example. In the case where m>2, such as when m=3, the key ciphertext Bsk described above can be used similarly. 3j,kPerform an outer product to obtain the rotation effect shown in Equation (15), thereby reducing the number of FFT calculations when multiplying a polynomial by a monomial on the exponent.
[0121] Figure 3 is a flowchart of a batch function bootstrapping method in an embodiment of this specification.
[0122] As shown in Figure 3, in step S301, RLWE( )=( (X), (X)), multiple sets of key ciphertexts BSK, and multiple functions Each corresponding test polynomial The key ciphertext BSK is based on a key polynomial. The generated RGSW ciphertext.
[0123] in, , where n is the degree of the polynomial space of the RLWE ciphertext. The RLWE ( The ciphertext is modulo 2n. In one implementation, the RLWE modulo q can be obtained. ), through modulus switching from q to 2n, the modulus RLWE( ) is obtained. To obtain n ciphertexts LWE(f(m) through a single bootstrap, i Referring to the bootstrap process shown in Figure 1, multiple results need to be obtained in a single bootstrap. ,in for The various components, Parameter determination based on mode switching. For ease of understanding, this embodiment will... Considered As will be understood by those skilled in the art, in practice, this can be achieved through the description of... By performing known parameter transformations and approximations, we obtain Therefore, this embodiment requires obtaining multiple [items] in a single bootstrap summary. Therefore, if we calculate on the index... The coefficients of each term in the polynomial can then be used to obtain the individual terms. .in You can refer to the above formula (1) based on each m i Functions that perform function transformations generate.
[0124] Therefore, the following text will first introduce the... The calculation.
[0125] Based on the definition of RLWE ciphertext above, we can approximate formula (18):
[0126] (18)
[0127] in, , express The set of degrees (or orders) of non-zero coefficients. For example, Then j = (0, 5, 7), and the number of j's is h, representing the key. The Hamming weight, i.e., j=( , ,..., ).
[0128] Therefore, the above formula (18) can be transformed into formula (19):
[0129] (19)
[0130] Will Disassembling it, we can obtain the following formula (20):
[0131] (20)
[0132] in, This represents the multiplication of a polynomial and a monomial. From formula (20), we can deduce that for j=( , ,..., A total of h+1 multiplications of the polynomial and monomial are required.
[0133] For example, the above text For example, For any polynomial in formula (20) and monomials Multiplication ,in For polynomials Multiply Equivalent to Rotation of each coefficient A position. For example, when When it is a positive number, The order of the coefficients changed as follows: In the above formula, the negative sign - represents i+ When it is greater than n, by Convert it out.
[0134] As can be seen from the formula above, when When it is a positive number, it is equivalent to putting Rotate each coefficient to the right, and correspondingly, when When it is negative, it is equivalent to... The coefficients are rotated to the left. (The following text will use...) The example is described using positive numbers; those skilled in the art can obtain the corresponding values by changing the direction of rotation. Operation steps when the number is negative.
[0135] More specifically, by Decomposed into ,in, ,right Multiply Equivalent to Sequential multiplication The polynomial in this process Multiply This is equivalent to performing the following transformation on the coefficients of the polynomial: (21) In the embodiments of this specification, for the multiplication of a linear polynomial and a monomial in formula (20), the polynomial is obtained. The coefficients are placed on the exponent in the RLWE ciphertext, i.e. By applying formula (21) Perform a similar rotation, where the "-" needs to be placed on the exponent, i.e. Then, in formula (20) "- "Through various" Multiply This is equivalent to multiplying a polynomial by a monomial in formula (20) on an exponent.
[0136] use The term before rotation in formula (21) is used Corresponding to the rotated terms in formula (21), formula (21) can be transformed into the Cmux expressions shown in formulas (22) and (23):
[0137] when hour,
[0138] (twenty two)
[0139] in, , It represents the outer product.
[0140] when hour,
[0141] (twenty three)
[0142] in For automorphism algorithms (hereinafter referred to as ), used to convert X into .
[0143] because Therefore, it is necessary to perform equations (22) and (23). Times, including n Sub-CMux and Secondary automorphism operation.
[0144] outer product Both HomoAuto's operations include gadget decomposition (Decom) and Fast Fourier Transform (FFT). Therefore, calculating the multiplication of a polynomial by a monomial using formulas (22) and (23) requires 2(2d+2). The number of FFT calculations is the primary computational bottleneck in this embodiment, where d is the length of the gadget decomposition.
[0145] Therefore, in the embodiments of this specification, the above can be used as a basis. Multiplication of polynomials and monomials is performed on multiple digits. The following description is based on... Taking the multiplication of a polynomial and a monomial by two digits as an example, we get...
[0146] , (twenty four)
[0147] Understandable, for those based on For multiplication of polynomials and monomials with more digits, please refer to the following: The two-digit example is performed accordingly.
[0148] In formula (24), i = 2j, each time based on and With polynomial When multiplied, the coefficients of the polynomial can be rotated as follows: (25)
[0149] According to formula (24), in order to perform polynomial multiplication of monomials over the exponent as in formulas (22) and (23), we can first perform polynomial multiplication of monomials over the exponent for each of formulas (24). ,according to and The value is set as shown in Table 1 for the key ciphertext Bsk. 2j,k , where k is based on and The value is determined and can be one of 0, 1, 2, or 3.
[0150] Table 1
[0151] in, (26)
[0152] Formula (26) includes the key polynomial due to the automorphism of the polynomial. Key switching, i.e., switching the key polynomial Perform a -1 automorphism to make the exponents in the polynomial negative.
[0153] Similarly, based on When multiplying a polynomial and a monomial using 3 digits, even if...
[0154] (27)
[0155] In formula (27), i = 3j, each time based on , and With polynomial When multiplied, the coefficients of the polynomial can be rotated as follows: (28) In formula (28), there are a total of 8 cases, among which, and The two cases are not shown. Therefore, for each of the formulas (28) ,according to , and The value can be set similarly to the key ciphertext Bsk in Table 1. 3j,k Among them, Bsk 3j,k include and k is based on , , The value is determined and is one of 0-8. That is, a set of keys corresponding to each 3j includes 16 key ciphertexts, used for... When rotating the coefficients of a polynomial, the rotation method is selected so that the coefficients of the polynomial are rotated according to formula (28).
[0156] In one implementation, given ciphertext ,and The associated variant outer product can be calculated as: (29) Using formula (29), the automorphism can be... The outer product is combined into a single outer product operation, avoiding the additional RLWE key switching caused by automorphism, which includes the FFT operation.
[0157] Based on Table 1, the following can be expressed according to formula (25) for... By performing a similar rotation, we can obtain ,in,
[0158] when hour,
[0159]
[0160] (30) That is to say, based on , , and A multiplexer was constructed, based on , , and Perform homomorphic computation, which is equivalent to based on and The value is selected after rotation.
[0161] When j is between 0 and At -1, (31)
[0162] When j is arrive hour, (32)
[0163] When j is arrive hour, (33) Referring to the description above, by combining formulas (24) and (30)-(33), when performing multiplication of polynomials and monomials, it is only necessary to perform... This involves multiple rotations, thus reducing the number of FFT calculations by half.
[0164] In the above formula (29), Typically, the operations include the following: automorphic correlation operations, including Auto+Decom+FFT+Hadm+iFFT, where Auto represents the negative operation of the exponent, Hadm represents the Hadamard multiplication with the key, and iFFT represents the inverse fast Fourier transform; and outer product correlation operations, including Decom+FFT+Hadm+iFFT.
[0165] In one implementation, considering that Auto can penetrate gadget and FFT operations, Auto can be placed in a later stage, thereby making the outer product... Sharing gadgets and FFT operations with HomoAuto is coming soon. Convert to include the following operations:
[0166] Decom+FFT+ +iFFT (34)
[0167] According to formula (34), during execution In this case, it is not necessary to perform FFT and iFFT separately in automorphism and outer product, but only one FFT and iFFT can be performed, that is, the two share one FFT and iFFT operation, thereby further reducing the number of FFT and iFFT in polynomial-monomial multiplication. Specifically, before each rotation based on formula (33), as shown in formula (34), each ciphertext of the ciphertext sequence to be rotated is first processed by Decom and FFT, and then during the rotation process, for the automorphism operation, only one FFT and iFFT operation needs to be performed. For the outer product operation, only the following operations are required: The operation involves performing an iFFT on the resulting ciphertext sequence after this rotation, allowing the automorphism operation and the outer product operation to share the FFT and iFFT processing, further reducing the number of FFT operations.
[0168] By performing multiple multiplications of the polynomial and monomial on the exponent as shown in formula (20), we can finally obtain .
[0169] In step S303, returning to formula (20), in order to perform batch bootstrapping, generate... ,in .Right now, .
[0170] In step S305, based on Multiplying the polynomial of degree h+1 and the monomial, we get ( ).
[0171] According to the calculation of the innermost polynomial and monomial in formula (20) (i.e. ),by As with polynomials The multiple coefficients correspond to multiple terms, in order to As ,according to Based on formulas (30)-(33) and The corresponding Bsk is shown in Table 1. 2j,k conduct After several iterations, the final result is... . That is, based on right The terms are rotated to obtain multiple terms. Then, the terms are... Multiply each of the terms ,get , The terms are RLWE( That is, calculated on the exponent of X. .
[0172] Figure 4 illustrates the processes in steps S303 and S305. Specifically, Bsk in Figure 4... i,0 -Bsk i,3 As shown in Table 1, this can be achieved by using Bsk as a basis. i,0 -Bsk i,3 right By rotating the terms in the equation or by rotating them after an automorphism, we obtain... Through the Multiply each of the terms ,get .
[0173] In obtaining Then, according to formula (20), the calculation of the polynomial and monomial of the innermost outer layer (i.e. In ), it can be As with the above polynomial The multiple coefficients correspond to multiple terms, in order to As ,according to Based on formulas (30)-(33) After several iterations, the final result is... Then check. Multiply each of the terms ,get , The terms are RLWE( .
[0174] Similarly, according to formula (20), the multiplication of a polynomial and a monomial of degree h is performed, and the multiplication is then performed by... After the operation, execute it again. and The multiplication of a polynomial and a monomial over the exponent is ultimately equivalent to performing the calculation of formula (19) over the exponent, resulting in ( ),in, .
[0175] In step S307, from each Obtain the ciphertext corresponding to the constant term of the plaintext polynomial (e.g., LWE(f)). i (m))). In one implementation, each ciphertext can be packaged into a package corresponding to multiple f. i RLWE ciphertext of (m).
[0176] This specification provides a method for performing batch homomorphic function operations. In this method, during the polynomial multiplication of monomials in the batch function bootstrapping, multiplexing selection is performed based on the key ciphertext corresponding to the multiple bits of the monomial exponent. This reduces the number of iterations of polynomial multiplication of monomials in the batch function bootstrapping. Since each iteration includes FFT processing of n ciphertexts, reducing the number of iterations can greatly reduce the total number of FFTs in the batch function bootstrapping, thereby improving the computational efficiency of the batch function bootstrapping.
[0177] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must also be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0178] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0179] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. A typical implementation device is a server system. Of course, this application does not exclude the possibility that, with the future development of computer technology, the computer implementing the functions of the above embodiments can be, for example, a personal computer, a laptop computer, an in-vehicle human-machine interaction device, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0180] While one or more embodiments of this specification provide the operational steps of the methods described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive means. The order of steps listed in the embodiments is merely one possible order of execution among many steps and does not represent the only possible order. In actual device or end product execution, the methods shown in the embodiments or drawings may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, the presence of other identical or equivalent elements in the process, method, product, or apparatus that includes said elements is not excluded. For example, the use of terms such as "first," "second," etc., is to denote names and does not indicate any particular order.
[0181] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, when implementing one or more of these specifications, the functions of each module can be implemented in one or more software and / or hardware components, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.
[0182] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.
[0183] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0184] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0185] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0186] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0187] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0188] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0189] One or more embodiments of this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type. One or more embodiments of this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0190] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, system embodiments are basically similar to method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. In the description of this specification, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this specification. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0191] The above description is merely an embodiment of one or more embodiments of this specification and is not intended to limit the scope of these embodiments. Various modifications and variations can be made to these embodiments by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims.
Claims
1. A method for processing homomorphic ciphertext, comprising: Obtain a sequence of multiple first RLWE ciphertexts, where the plaintext corresponding to each first RLWE ciphertext includes a first monomial with each coefficient of the first polynomial as the first exponent; Get Each key ciphertext consists of multiple RGSW ciphertexts, where each RGSW ciphertext is either 0 or 1. The number of binary bits for the second exponent of the second monomial. ≥2, the ciphertext of the i-th key group and the i-th element in the second exponent The value of the bit corresponds; based on the... Group key ciphertext, and sequence of the plurality of first RLWE ciphertexts. The rotation process yields a sequence of multiple second RLWE ciphertexts. In the i-th rotation process, the rotation method is selected based on the i-th key ciphertext. The plaintext corresponding to each second RLWE ciphertext includes a third monomial with each coefficient of the second polynomial as the third exponent. The second polynomial is equal to the polynomial obtained by multiplying the first polynomial and the second monomial. Each rotation process includes a Fourier transform.
2. The method according to claim 1, wherein the i-th group of key ciphertext corresponds to the k-th and (k+1)-th bits of the second exponent, and the method based on the... Group key ciphertext, and sequence of the plurality of first RLWE ciphertexts. The secondary rotation process includes: When the k-th bit is 0 and the (k+1)-th bit is 0, the sequence of multiple third RLWE ciphertexts is processed based on the i-th key ciphertext, so that the sequence of the multiple third RLWE ciphertexts is not rotated, and the sequence of the multiple third RLWE ciphertexts is the RLWE ciphertext sequence corresponding to the i-th rotation; when the k-th bit is 1 and the (k+1)-th bit is 0, the sequence of the multiple third RLWE ciphertexts is processed... The terms up to the (n-1)th term are subjected to automorphism, which converts the exponents of the monomials in the plaintext corresponding to each term to negative numbers. Then, the sequence of the transformed RLWE ciphertext is rotated to the right based on the ciphertext of the i-th key. When the k-th bit is equal to 0 and the (k+1)-th bit is equal to 1, the sequence of the plurality of third RLWE ciphertexts is... The sequence of the transformed RLWE ciphertext is then rotated to the right based on the ciphertext of the i-th key. When the k-th bit is equal to 1 and the (k+1)-th bit is equal to 1, the sequence of the plurality of third RLWE ciphertexts is... The sequence of the transformed RLWE ciphertext is then rotated to the right based on the ciphertext of the i-th key. Bit.
3. The method according to claim 2, wherein each set of key ciphertexts includes a first rotated key ciphertext to a fourth rotated key ciphertext, and a first automorphic rotated key ciphertext to a fourth automorphic rotated key ciphertext, wherein the key ciphertext is based on the... Group key ciphertext, and sequence of the plurality of first RLWE ciphertexts. The secondary rotation process includes: exist When ≤j≤n-1, calculate the j-th ciphertext in the sequence of the plurality of third RLWE ciphertexts. Item, j- Item, j- - The j-th term is obtained by summing the outer products of the term and the j-th term with the first to fourth rotation key ciphertexts, respectively; In j≤ When -1, calculate the sum of the following terms to obtain the j-th term after rotation: the n-th term... The automorphic outer product of the term with the first automorphic rotation key ciphertext, the n-th term The automorphic outer product of the term with the second automorphic rotation key ciphertext, the n-th - +j terms' automorphic outer product with the third automorphic rotated key ciphertext, and the outer product of the j-th term with the fourth rotated key ciphertext; in ≤j≤ When -1, calculate the sum of the following terms to obtain the j-th term after rotation: the j-th term... The outer product of the term and the first rotation key ciphertext, the nth term The automorphic outer product of the term with the second automorphic rotation key ciphertext, the n-th - +j terms' automorphic outer product with the third automorphic rotated key ciphertext, and the outer product of the j-th term with the fourth rotated key ciphertext; in ≤j≤ When -1, calculate the sum of the following terms to obtain the j-th term after rotation: the j-th term... The outer product of the term and the first rotation key ciphertext, the j-th term The outer product of the term and the second rotation key ciphertext, the nth... - The automorphic outer product of +j terms with the third automorphic rotation key ciphertext, and the outer product of j terms with the fourth rotation key ciphertext.
4. The method according to claim 3, wherein the first self-isomorphic rotation key ciphertext is generated based on the ciphertext of the homomorphic encryption key polynomial and the first rotation key ciphertext.
5. The method according to claim 3, the nth... The automorphic outer product of the term with the first automorphic rotated key ciphertext is calculated through the following steps: for the n-th term... The two ciphertext polynomials corresponding to the term are subjected to automorphism processing to obtain two automorphic ciphertext polynomials; the automorphic outer product is calculated based on the two automorphic ciphertext polynomials and the first automorphic rotated key ciphertext.
6. A method for performing batch function bootstrapping, comprising: Obtain the fourth RLWE ciphertext of the first polynomial, where the first plaintext polynomial includes n first values as its n coefficients, and the fourth RLWE ciphertext includes the second and third polynomials; obtain n test polynomials corresponding to the n functions, where the n functions correspond to the n first values respectively; obtain multiple sets of key ciphertexts, which are generated based on homomorphic encryption key polynomials, each set of key ciphertexts including multiple RGSW ciphertexts, each RGSW ciphertext being an RGSW ciphertext of 0 or 1; based on the n coefficients of the third polynomial and the n test polynomials, generate a sequence of multiple fifth RLWE ciphertexts, where each fifth RLWE ciphertext... The plaintext corresponding to the first RLWE ciphertext is the product of the j-th test polynomial and a monomial with the j-th coefficient as the exponent; based on the sequence of the plurality of fifth RLWE ciphertexts, h+1 preset algorithms are performed to obtain the sequence of the plurality of sixth RLWE ciphertexts, where h is the number of terms in the key polynomial, and the plaintext corresponding to the j-th sixth RLWE ciphertext is the product of the j-th test polynomial and a monomial with the j-th first value as the exponent; wherein, the preset algorithm includes the method steps as described in claim 1, the first preset algorithm uses the sequence of the plurality of fifth RLWE ciphertexts as the sequence of the plurality of first RLWE ciphertexts, and the plurality of key ciphertexts include the Group key ciphertext; based on the sequence of the plurality of sixth RLWE ciphertexts, n ciphertexts are obtained, the n ciphertexts corresponding to n second values, each second value being a function value obtained by inputting each first value into the corresponding function.
7. The method according to claim 6, further comprising: After each of the previous h preset calculations, the j-th RLWE ciphertext obtained by executing the current preset algorithm is multiplied by a monomial with the negative of the j-th coefficient of the second polynomial as the exponent, to obtain a sequence of RLWE ciphertexts for the next preset algorithm.
8. The method according to claim 6, for the second to the h-th preset algorithm, wherein the p-th preset algorithm corresponds to... The number of binary digits equal to the third value, which is equal to the difference between the exponent of the (p-1)th term and the exponent of the pth term in the key polynomial; The first preset algorithm corresponds to The number of binary digits equal to the fourth value, which is equal to the negative exponent of the first term of the key polynomial; The h+1th preset algorithm corresponds to The fifth value is equal to the number of binary digits of the fifth value, which is equal to the exponent of the h-th term of the key polynomial.
9. The method according to claim 6 further includes obtaining the RLWE ciphertext of the first polynomial modulo q, switching the RLWE ciphertext of the first polynomial modulo q to the RLWE ciphertext modulo 2N, and obtaining the fourth RLWE ciphertext.
10. A computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-9.
