Method and device for accelerating homomorphic encryption algorithm by using fast number theory transformation and medium
By applying fast number theory transformation and inverse transformation in BFV homomorphic encryption algorithm, the computational complexity problem of homomorphic encryption algorithm in ciphertext data processing is solved, and more efficient homomorphic encryption performance and good parallel processing capabilities are achieved.
Patent Information
- Application Number
- CN202411595451.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-02-14
AI Technical Summary
When processing ciphertext data, homomorphic encryption algorithms lead to an increase in data bit length and dimension, increasing data storage requirements and making homomorphic computing complex and time-consuming, affecting cloud data storage and computing performance.
The BFV homomorphic encryption algorithm is optimized by fast number theory and its inverse transformation. The ciphertext in polynomial form is converted into point-value form through fast number theory transformation, homomorphic multiplication operation is performed, and the re-linearized key group is used for decomposition and accumulation. , and finally restore the polynomial form through inverse transformation to decrypt the plaintext.
It significantly reduces the computational complexity of polynomial multiplication operations, improves the running speed of BFV homomorphic encryption algorithm, achieves more efficient homomorphic encryption computing performance, and has good parallel processing capabilities.
Smart Images

Figure CN119449268A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of homomorphic encryption, and in particular to a method, device and medium for accelerating a Brakerski-Fan-Vercauteren (hereinafter referred to as "BFV") homomorphic encryption algorithm using fast number theory. Background Art
[0002] Homomorphic encryption allows untrusted third parties to perform arbitrary homomorphic computations on data without decrypting private data, thus avoiding the leakage of sensitive information and making data "available but invisible". It is an ideal technical means to solve the problem of privacy leakage, especially in the fields of privacy-preserving computing, secure multi-party computing, and cloud computing. However, although homomorphic encryption meets the requirements of data privacy protection, this encryption process also increases the computing pressure on the cloud data storage party (server party). When processing ciphertext data, homomorphic encryption technology will increase the bit length and dimension of the data, which not only increases the storage requirements of the data, but also makes homomorphic computing more complex and time-consuming. Improving the computing performance of homomorphic encryption schemes can better meet the actual needs of society for data security and privacy protection. Summary of the invention
[0003] The purpose of the present invention is to provide a method, device and medium for accelerating the BFV homomorphic encryption algorithm, so as to realize a more efficient homomorphic encryption algorithm while ensuring the universality of homomorphic encryption and the accuracy of data encryption.
[0004] To achieve the above object, the present invention adopts the following technical solutions:
[0005] In a first aspect, the present invention provides a method for accelerating the BFV homomorphic encryption algorithm using fast number theory and its inverse transformation, comprising the following steps:
[0006] S1 initializes BFV homomorphic encryption parameters and generates key polynomials, including public key, private key, and relinearized key;
[0007] S2 uses the public key polynomial in S1 to encrypt the plaintext polynomial to be calculated and generates the corresponding first-order ciphertext polynomial;
[0008] S3 uses a fast number theory transformation method to transform the ciphertext polynomial generated in S2 into a point value form;
[0009] S4 performs a BFV homomorphic multiplication operation on the two point-valued ciphertext polynomials in S3 to obtain three ciphertext polynomials;
[0010] S5 uses the relinearized key in S1 to decompose one of the ciphertexts after the homomorphic multiplication operation in S4 using fast number theory transformation, and accumulates it to the other two ciphertexts to obtain two quasi-primary ciphertexts;
[0011] S6 uses fast number theory inverse transformation to transform the quasi-primary ciphertext generated in S5 from point value form to polynomial form;
[0012] S7 uses the private key in S1 to decrypt the polynomial ciphertext in S6 and obtains the result of the plaintext multiplication.
[0013] The BFV homomorphic encryption algorithm is a cryptographic algorithm based on the error-based learning problem on a ring, which supports fast calculation of encrypted data over integer finite fields.
[0014] In step S1, the BFV homomorphic encryption parameters are initialized, including security parameters, polynomial dimension N, plaintext modulus, ciphertext modulus Q, and Gaussian distribution parameters. The specific steps include:
[0015] Set security parameters, polynomial dimension, and plaintext modulus to convert plaintext into the polynomial form required for BFV homomorphic encryption;
[0016] The private key, random polynomial, and noise polynomial are obtained by sampling from different integer rings. The public key consists of two parts. The first part consists of a random polynomial, a private key, and noise, and the second part consists of a random polynomial.
[0017] A relinearized key group is constructed by a private key, a random polynomial, a noise polynomial and a relinearized key function. Each key in the relinear key group consists of two parts. The first part is constructed by a random polynomial, a private key and a noise polynomial, and the second part is constructed by a random polynomial.
[0018] In step S2, the public key is used to encrypt the plaintext polynomial using the encryption function in the BFV homomorphic encryption algorithm to obtain the ciphertext. The ciphertext consists of two parts. The first part is obtained by using the first part of the public key through the encryption function, and the second part is obtained by using the second part of the public key through the encryption function.
[0019] The fast number theory transformation method in step S3 is:
[0020] (1) Calculate a primitive root of the ciphertext modulus Q set in step S1, such that the remainder of the primitive root raised to the power modulus Q covers all integers in [1, Q-1];
[0021] (2) Sampling a number of points within the power modulo Q of the primitive root, the sampling points have the characteristics of opposite numbers and periodicity in the sense of remainder, such as Figure 1 As shown;
[0022] (3) Group the terms of the ciphertext polynomial according to their odd and even powers, decompose them into the sum of odd and even functions, and recursively decompose them until the degree of each polynomial is 1, thereby obtaining polynomials of different levels of odd and even grouping. This recursive process can be simplified to rearranging the coefficients of the polynomials, that is, rearranging the coefficients of the ciphertext polynomials so that the new subscript of each coefficient is the binary inverse value of its corresponding degree. Based on the rearranged coefficients, the underlying first-order polynomial is generated, thereby replacing the decomposition process of odd and even grouping in the original recursive decomposition step, as follows: Figure 2 As shown;
[0023] (4) Using several sampling points of the power modulo Q of the primitive root, trace back from the first-order polynomial layer by layer, calculate the values of the polynomials at each level at the sampling points, and use the binary power method for acceleration, and finally obtain the values of the ciphertext polynomial at the sampling points. The sampling points and their values are used as the point value form of the ciphertext polynomial, such as Figure 3 shown.
[0024] In step S4, the two ciphertexts obtained in step S2 are input, which are respectively represented as . Perform homomorphic multiplication on two ciphertexts. Specifically, and Use the point value form to perform multiplication to get the first ciphertext. and Use the point value form to perform multiplication to get the second ciphertext. and Use point value form to perform multiplication and add and The result of the multiplication operation in point value form is the third ciphertext, such as Figure 4 shown.
[0025] In step S5, the relinearized key group in step S1 is used to decompose the third ciphertext obtained in step S4 using a fast number theory method and add it to the first ciphertext and the second ciphertext to obtain two quasi-primary ciphertexts, such as Figure 5 As shown, the specific process is:
[0026] (1) Split the third ciphertext into parts with smaller norms by relinearizing the key group, and obtain the cumulative sum of a set of polynomials with smaller norms after relinearization;
[0027] (2) Add the cumulative sum of the polynomial group decomposed in the first part of the relinearized key to the first ciphertext in step S4 to obtain the first quasi-first-order ciphertext;
[0028] (3) The sum of the polynomial group decomposed in the second part of the relinearized key is added to the second ciphertext in step S4 to obtain a second first-order ciphertext.
[0029] The fast number theory inverse transformation method in step S6 is:
[0030] (1) Input the point value form of the ciphertext polynomial obtained in step S5, substitute a number of sampling points (referred to as original sampling points) of the power of the original root under the modulus Q into the polynomial, and obtain a system of univariate multi-time equations;
[0031] (2) Take out the different power values of the original sampling points in each equation in the system of equations to form a polynomial point matrix ;
[0032] (3) Calculate the inverse of the matrix , construct a new polynomial, As a number of sampling points of the newly constructed polynomial, the point values corresponding to the original sampling points are used as coefficients of the newly constructed polynomial;
[0033] (4) Group the terms of the newly constructed polynomial according to their odd and even powers, decompose them into the sum of odd functions and even functions, and recursively decompose them until the degree of each polynomial is 1, thereby obtaining polynomials of several different levels of odd and even groupings. This recursive process can be simplified to the rearrangement of the polynomial coefficients, that is, rearranging the coefficients of the newly constructed polynomial so that the new subscript of each coefficient is the binary inverse value of its corresponding degree, and generating the underlying linear polynomial based on the rearranged coefficients, thereby replacing the decomposition process of odd and even grouping in the original recursive decomposition step;
[0034] (5) Using several sampling points of the newly constructed polynomial, trace back layer by layer from the first-order polynomial to calculate the values of the polynomials at each level at the sampling points. The binary power method can be used to accelerate the calculation process. Finally, the values of the newly constructed polynomial at the sampling points are obtained. These values are the polynomial coefficients of the input point value form ciphertext at different orders. The input ciphertext in polynomial form is thus recovered, such as Figure 6 shown.
[0035] In step S7, the two quasi-primary ciphertexts are regarded as two parts of a ciphertext, and the ciphertext is decrypted using the private key to obtain the homomorphic multiplication result of the plaintext polynomial.
[0036] In a second aspect, the present invention provides a device for accelerating the BFV homomorphic encryption algorithm using fast number theory and its inverse transformation, comprising:
[0037] The local processing end is used to generate keys on the local device, receive the plain text input by the user, encrypt and share the public key, relinearization key, and ciphertext to the cloud processing end;
[0038] The cloud processing end is used to perform ciphertext homomorphic operations on the received ciphertext using the BFV homomorphic operation.
[0039] Furthermore, the local processing end includes a key generation module, an encryption module, and a decryption module; the cloud processing end includes a fast number theory transformation module, a homomorphic multiplication operation module, a relinearization module, and a fast number theory inverse transformation module.
[0040] The key generation module is configured to initialize BFV homomorphic encryption parameters and generate a key;
[0041] The encryption module is configured to encrypt the plaintext to be calculated using the public key to generate a ciphertext polynomial;
[0042] The fast number theory transformation module is configured to convert the polynomial coefficient form into a point value form;
[0043] The homomorphic multiplication operation module is configured to implement a homomorphic multiplication operation on two ciphertext polynomials to generate three ciphertexts;
[0044] The relinearization module is configured to convert the three ciphertexts into two quasi-ciphertexts using fast number theory decomposition and accumulation;
[0045] The fast number theory inverse transformation module is configured to reversely restore the point value form of the polynomial to the coefficient form;
[0046] The decryption module is configured to use a private key to decrypt the ciphertext polynomial to obtain plaintext.
[0047] In a third aspect, the present invention provides an electronic device, comprising: designing one or more programs on one or more processors and memories, wherein the one or more programs are stored in the memories and configured to be executed by the one or more processors, and the one or more programs include methods for executing any of the methods.
[0048] In a fourth aspect, the present invention provides a computer-readable storage medium, characterized in that programs are stored, and these programs include instructions. When these instructions are executed on a computing device, the computing device can be enabled to perform any of the methods described. This description can be further refined as follows: the storage medium includes multiple programs, each of which includes a series of instructions. These instructions are designed to run on a specific computing device, and by executing these instructions, the computing device can implement specific functions or process specific data.
[0049] The present invention adopts the above technical solution, which has the following advantages:
[0050] (1) Improved computing efficiency: This invention significantly reduces the computational complexity of polynomial multiplication operations, significantly improves the running speed of the BFV homomorphic encryption algorithm, and achieves more efficient computing performance.
[0051] (2) Enhanced parallel processing capability: The technical solution proposed in the present invention has a natural parallel advantage and can be effectively applied to hardware platforms such as multi-core processors, making full use of their parallel computing capabilities to speed up the overall computing speed.
[0052] (3) Excellent performance in high-order polynomial operations: When processing high-order polynomials, the solution of the present invention exhibits more superior performance, allowing homomorphic encryption operations to maintain excellent computational efficiency and stability at higher orders. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Attached Figure 1 : Example diagrams of the opposites of primitive roots in the remainder sense and their periodic characteristics, including an example when the primitive root g is 3 and the modulus P is 17.
[0054] Attached Figure 2 : An example diagram of the binary bit re-arrangement of polynomial coefficients and their correspondence with point values.
[0055] Attached Figure 3 : An example diagram of the process of grouping recursively and reversely iterating and doubling to find point values according to the parity characteristics of the polynomial order when the polynomial dimension is 8.
[0056] Attached Figure 4 :For input ciphertext and Perform BFV homomorphic multiplication to generate three ciphertexts An example diagram of the process.
[0057] Attached Figure 5 : Input the three ciphertexts obtained after BFV homomorphic multiplication, and use the relinearized key group An example diagram of the process of fast number theoretic transformation to decompose the third ciphertext and add it to the other two ciphertexts.
[0058] Attached Figure 6 : An example diagram of the process of restoring a ciphertext polynomial from point value form to polynomial form, and converting the matrix of the point value representation of the original ciphertext polynomial to the matrix representation of the newly constructed polynomial.
[0059] Attached Figure 7 : Schematic diagram of the method flow of accelerating the BFV homomorphic encryption algorithm using fast number theoretic transformation and inverse transformation according to an embodiment of the present invention.
[0060] Attached Figure 8 : A device for accelerating the BFV homomorphic encryption algorithm using fast number theoretic transformations. DETAILED DESCRIPTION
[0061] It should be understood that the terms in this article are only used to describe specific implementation examples and are not intended to constitute any limitations. Unless the context specifically indicates, the singular forms of "one", "an" and "said" used in this article are generally also interpreted to include plural cases. Terms such as "including", "containing" or "having" are open, so the presence of the features, steps, operations, elements or parts specified does not exclude the addition of other features, steps, operations, elements or parts, or any combination thereof. The description of the steps, processes and operations of the methods herein does not mean that they need to be performed in the order listed, unless the order is explicitly required, and replacement or addition of steps is also allowed.
[0062] Even though the text may use numerical terms such as first, second, and third to describe multiple elements, components, regions, layers, or segments, these terms are only used to distinguish different objects and should not be understood as limiting the order or sequence of the objects. Unless the context specifically indicates, the words "first", "second", etc. do not imply a sequence. Therefore, the first element, component, region, layer, or segment discussed below can be replaced by a second element, component, region, layer, or segment without departing from the example embodiments.
[0063] For ease of explanation, this document may use some spatial relative terms (such as "inside", "outside", "inner side", "outer side", "upper", "lower", etc.) to describe the relative positions of components or features. Such terms are applicable to situations other than the illustrated orientations and do not exclude other possible relationships of the device in different operating and use orientations.
[0064] In the exemplary embodiments of the present invention, the embodiments are only illustrative examples of devices and methods, and do not cover all possible implementation forms that may conform to the present invention. The purpose of these exemplary embodiments is to illustrate several aspects of the present invention, and their scope should be based on the attached claims. The technical features listed in the claims and their protection scope define the core content of the present invention, and the embodiments are only used to assist in understanding these technical features and their applications. Therefore, any modification, equivalent substitution or improvement within the spirit and principle of the claims shall be deemed to be included in the protection scope of the present invention.
[0065] Embodiment 1: This embodiment provides a method for accelerating the BFV homomorphic encryption algorithm using fast number theory and its inverse transformation, including the following steps:
[0066] S11 initializes BFV homomorphic encryption parameters, including security parameters, polynomial dimension N, plaintext modulus t, ciphertext modulus q, Gaussian distribution , relinearize the base w, define the scaling factor , the plaintext space is , the ciphertext space is In this embodiment, N is 1024, q is 132120577, and t is 16. , take w to satisfy , take this as an example, not limited to this;
[0067] S12 obtains the private key by sampling from the integer ring , random polynomial , the noise polynomial ,in ;Construct the public key from the private key, random polynomial, and noise polynomial , a relinearized key group is constructed by a private key, a random polynomial, a noise polynomial and a relinearized key function ;
[0068] S13 converts the plaintext into the polynomial form required for BFV homomorphic encryption, and obtains .
[0069] S21 uses the public key to take a random polynomial and noise polynomial , use the encryption function in the BFV homomorphic encryption algorithm to encrypt the plaintext polynomial and get the ciphertext
[0070] S31 searches for a primitive root g of the ciphertext modulus q, satisfying that the remainder of the primitive root modulo q covers all integers in the range of [1, q-1]. In this embodiment, g is taken as 5 as an example, but is not limited to this;
[0071] S32 samples several points within the power modulus q of the primitive root, and the sampling points have the characteristics of opposite numbers and periodicity in the sense of remainders;
[0072] S33 converts the ciphertext polynomial The items are grouped according to the odd and even degrees, and are decomposed into the sum of odd functions and even functions, and recursively decomposed until the degree of each polynomial is 1, so as to obtain polynomials after odd and even grouping at different levels; in this embodiment, a rearrangement transformation is used to simplify this process, that is, the coefficients of the ciphertext polynomial are rearranged so that the new subscript of each coefficient is the binary inverse value of its corresponding degree; the underlying first-order polynomial is generated based on the rearranged coefficients, thereby replacing the decomposition process of odd and even grouping in the original recursive decomposition step;
[0073] S34 uses several sampling points of the power modulo Q of the primitive root, traces back layer by layer from the first-order polynomial, and calculates the values of the polynomials at each level at the sampling points. In this embodiment, the binary power method is used for acceleration, and finally the ciphertext polynomial is obtained. The values taken at the sampling points are used as the point value form of the ciphertext polynomial.
[0074] S41 uses the two point-valued ciphertexts obtained in S34 to perform homomorphic multiplication. and The first ciphertext is obtained by multiplying the point value. and The second ciphertext is obtained by multiplying the point value. and Multiply using point value form and add and The result of the multiplication operation in point value form is the third ciphertext.
[0075] S51 uses the relinearization key group in step S12 and a fast number theory method to decompose the third ciphertext obtained in step S41 and add it to the first ciphertext and the second ciphertext in step S41 to obtain two quasi-first-order ciphertexts. Specifically, the third ciphertext is divided into parts with smaller norms by the relinearization key group to obtain the cumulative sum of a group of polynomials with smaller norms after relinearization, and the cumulative sum of the polynomial group decomposed by the first part of the relinearization key is added to the first ciphertext in step S41, and the cumulative sum of the polynomial group decomposed by the second part of the relinearization key is added to the second ciphertext in step S41.
[0076] S61 inputs the point value form obtained in step S51, and for a number of sampling points (herein referred to as original sampling points) whose power of the original root is under the module q, substitutes each sampling point into the polynomial to obtain a one-variable multi-time equation, and obtains a one-variable multi-time equation group from the original sampling points, and takes out the different power values of the original sampling points in each equation to form a polynomial point matrix .
[0077] S62 Calculates the inverse of a matrix , use the inverse of the matrix as several sampling points of the newly constructed polynomial, and use several point values corresponding to the original sampling points as coefficients of the newly constructed polynomial.
[0078] S63 rearranges the coefficients of the newly constructed polynomial so that the new subscript of each coefficient is the binary inverse value of its corresponding degree, generates an underlying linear polynomial based on the rearranged coefficients, uses several sampling points of the newly constructed polynomial, traces back layer by layer from the linear polynomial, calculates the values of the polynomials at each level at the sampling points, and can use the binary power method to accelerate the calculation process, and finally obtains the values of the newly constructed polynomial at the sampling points, which are the polynomial coefficients of the input point value form ciphertext at different orders, thereby recovering the input ciphertext in polynomial form.
[0079] S71 uses the private key to decrypt the ciphertext obtained in S63 to obtain the homomorphic multiplication result of the plaintext polynomial.
[0080] Embodiment 2: Embodiment 1 above provides a method for accelerating the BFV homomorphic encryption algorithm using fast number theory and its inverse transform. Correspondingly, this embodiment provides a device for performing the BFV homomorphic encryption algorithm using fast number theory and its inverse transform. The system provided in this embodiment can implement the homomorphic encryption method described in Embodiment 1. The system can be implemented by software, hardware, or a combination of software and hardware. For ease of explanation, this embodiment is divided into different modules according to their functions and described separately. In actual implementation, the functions of each unit may be implemented in one or more software and / or hardware in a centralized or decentralized manner. The embodiment of accelerating the BFV homomorphic encryption algorithm using fast number theory and its inverse transform provided by the present invention is only an illustrative example.
[0081] The device includes:
[0082] (1) The key generation module is configured to initialize the parameters required for BFV homomorphic encryption, including security parameters , polynomial dimension, plaintext modulus, ciphertext modulus, Gaussian distribution parameters, relinearization bases, etc. The module generates public keys, private keys and relinearization keys through these parameters, providing the necessary key materials and configurations for subsequent homomorphic encryption operations.
[0083] (2) An encryption module, configured to use the generated public key to encrypt the plaintext to be processed and convert the plaintext data into a ciphertext polynomial.
[0084] (3) Fast number theory transformation module, which converts the coefficient form of the ciphertext polynomial into point value form to optimize the efficiency of polynomial operations. Through fast number theory transformation, the execution of multiplication in homomorphic operations is accelerated.
[0085] (4) A homomorphic multiplication operation module is configured to perform homomorphic multiplication operations on two ciphertext polynomials through a fast number theory module and a homomorphic multiplication module to generate three ciphertexts.
[0086] (5) A relinearization module is configured to perform a relinearization operation on the three ciphertexts through fast number theory decomposition and accumulation, thereby simplifying the three ciphertexts into two ciphertexts.
[0087] (6) A fast number theoretic inverse transform module, configured to convert the polynomial processed in point value form back into coefficient form.
[0088] (7) A decryption module, configured to use the private key to decrypt the ciphertext polynomial to obtain a calculation result in plain text form.
[0089] It should be noted that the device embodiment shown in this embodiment matches the content of the above method embodiment, and the content of the above method embodiment can be referred to, which will not be repeated here.
[0090] Embodiment 3: This embodiment provides a computer-readable and writable storage medium, such as a USB flash drive, a hard disk, an optical disk, etc., suitable for storing software codes and related data for executing the method of the present invention. Specifically, the method for accelerating the BFV homomorphic encryption algorithm using fast number theory and its inverse transformation described in Embodiment 1 can be implemented as a computer program and configured according to the device module described in Embodiment 2. The storage medium described in this embodiment can be used as a carrier of this program.
[0091] Finally, it should be noted that the embodiments of the present invention are for illustration only, and the method steps, the structure and connection mode of the device components, the program or configuration data stored in the medium and their implementation mode can be adjusted according to the actual situation. Any equivalent replacement and improvement based on the technical solution of the present invention shall be regarded as part of the present invention and shall not be excluded from the scope of protection.
Claims
1. A method for accelerating a homomorphic encryption algorithm using fast number theoretic transformations, characterized in that: The method includes: Initialize Brakerski-Fan-Vercauteren (BFV) homomorphic encryption parameters and generate public key, private key, and relinearization key; Use the public key to encrypt the plaintext to be calculated and generate the corresponding ciphertext polynomial; Use fast number theory transformation on the ciphertext polynomial to transform it into point value form; Perform homomorphic multiplication on the two point-valued ciphertexts to obtain three ciphertexts; Use the relinearization key to convert the three ciphertexts into two quasi-one ciphertexts; Use fast number theory inverse transformation to transform the quasi-primary ciphertext from point value form to polynomial form; Use the private key to decrypt the ciphertext polynomial and get the plaintext multiplication result.
2. The method of accelerating homomorphic encryption algorithm using fast number theoretic transformation according to claim 1, characterized in that: Initialize BFV homomorphic encryption parameters and generate public key, private key, and relinearization key, including: Set the security parameters, polynomial dimension N, plaintext modulus, ciphertext modulus Q, and Gaussian distribution parameters to convert the plaintext to be calculated into the polynomial form required by BFV homomorphic encryption; Get the private key, random polynomial, and noise polynomial by sampling from different integer rings; Construct a public key, which consists of two parts. The first part is constructed by a random polynomial, a private key, and a noise polynomial, and the second part is constructed by a random polynomial. A relinearization key group is constructed by a private key, a random polynomial, a noise polynomial and a relinearization key function, wherein each relinearization key consists of two parts, the first part is constructed by the random polynomial, the private key and the noise polynomial, and the second part is constructed by the random polynomial.
3. The method of accelerating homomorphic encryption algorithm using fast number theoretic transformation according to claim 1, characterized in that: Use the public key to encrypt the plaintext to be calculated and generate the corresponding ciphertext polynomial, including: Use the encryption function in the BFV homomorphic encryption algorithm to encrypt the plaintext polynomial using the public key to obtain the ciphertext polynomial; The ciphertext consists of two parts. The first part is obtained by an encryption function using the first part of the public key, and the second part is obtained by an encryption function using the second part of the public key.
4. The method of accelerating homomorphic encryption algorithm using fast number theoretic transformation according to claim 1, characterized in that: Use fast number-theoretic transformations on the ciphertext polynomial to transform it into point-value form, including: Calculate a primitive root of the ciphertext modulus Q, so that the remainder of the primitive root modulo Q covers all integers in [1, Q-1]; Sampling a number of points in the power modulo Q of the primitive root, the sampling points have the characteristics of opposite numbers and periodicity in the sense of remainder; The terms of the ciphertext polynomial are grouped according to the odd and even degrees, and decomposed into the sum of odd functions and even functions, and recursively decomposed until the degree of each polynomial is 1, and polynomials after parity grouping at different levels are obtained; Using several sampling points of the power modulo Q of the primitive root, we trace back from the first-order polynomial layer by layer to calculate the values of the polynomials at each level at the sampling points. We can also use the binary power method to accelerate the calculation process, and finally get the values of the ciphertext polynomial at the sampling points. The sampling points and their values are used as the point value form of the ciphertext polynomial.
5. The method for accelerating homomorphic encryption algorithm using fast number theoretic transformation according to claim 2, characterized in that: The recursive process of the ciphertext polynomial can be simplified to the rearrangement of the polynomial coefficients, including: Rearrange the coefficients of the ciphertext polynomial, and the new subscript of each coefficient is the binary inverse value of its corresponding degree; The underlying first-order polynomial is generated based on the rearranged coefficients, thereby replacing the decomposition process of odd and even groups in the original recursive decomposition step.
6. The method of accelerating homomorphic encryption algorithm using fast number theoretic transformation according to claim 1, characterized in that: Perform homomorphic multiplication on two point-valued ciphertexts to obtain three ciphertexts, including: Let the two ciphertexts be ct0=(ct00,ct01) and ct1=(ct10,ct11) respectively; Perform multiplication operation on ct00 and ct10 using point value form to obtain the first ciphertext; Perform multiplication operation on ct01 and ct11 using point value form to obtain the second ciphertext; Perform multiplication operation on ct01 and ct10 in point value form, and add the result of multiplying ct00 and ct11 in point value form to obtain the third ciphertext.
7. The method of accelerating homomorphic encryption algorithm using fast number theoretic transformation according to claim 1, characterized in that: Using the relinearization key, the three ciphertexts are converted into two quasi-one ciphertexts, including: Using fast number theory methods and relinearized key groups, the third ciphertext is divided into parts with smaller norms, and the cumulative sum of a group of polynomials with smaller norms after relinearization is obtained; Add the accumulated sum of the polynomial group decomposed in the first part of the relinearized key to the first ciphertext to obtain the first quasi-first-order ciphertext; The sum of the polynomial group decomposed in the second part of the relinearized key is accumulated to the second ciphertext to obtain the second first-order ciphertext.
8. The method of accelerating homomorphic encryption algorithm using fast number theoretic transformation according to claim 1, characterized in that: Use fast number theory inverse transformation to transform the quasi-one ciphertext from point value form to polynomial form, including: Taking the ciphertext polynomial in point value form as input, substituting the power of the primitive root at each original sampling point under the module Q into the polynomial, a system of univariate multi-time equations is obtained; Take out the different power values of the original sampling points in each equation to form a polynomial point matrix ; Compute the inverse of a matrix , construct a new polynomial, As a number of sampling points of the newly constructed polynomial, the point values corresponding to the original sampling points are used as coefficients of the newly constructed polynomial; The terms of the newly constructed polynomial are grouped according to odd and even degrees, and decomposed into the sum of odd functions and even functions, and recursively decomposed until the degree of each polynomial is 1, and polynomials after odd and even grouping at different levels are obtained; Using several sampling points of the newly constructed polynomial, we trace back layer by layer starting from the first-order polynomial to calculate the values of the polynomials at each level at the sampling points. We can also use the binary power method to accelerate the calculation process, and finally get the values of the newly constructed polynomial at the sampling points. These values are the polynomial coefficients of the input point value form ciphertext at different orders, thereby recovering the input ciphertext in polynomial form.
9. The method of accelerating homomorphic encryption algorithm using fast number theoretic transformation according to claim 8, characterized in that: The recursive process of constructing a new polynomial can be simplified to rearranging the polynomial coefficients, including: Rearrange the coefficients of the newly constructed polynomial, and the new subscript of each coefficient is the binary inverse value of its corresponding degree; The underlying first-order polynomial is generated based on the rearranged coefficients, thereby replacing the decomposition process of odd and even groups in the original recursive decomposition step.
10. The method for accelerating homomorphic encryption algorithm using fast number theoretic transformation according to claim 1, characterized in that: Use the private key to decrypt the ciphertext polynomial and get the plaintext multiplication result, including: The two quasi-one-time ciphertexts are regarded as two parts of a ciphertext, and the ciphertext is decrypted using the private key to obtain the homomorphic multiplication result of the plaintext polynomial.
11. A device for accelerating a homomorphic encryption algorithm using fast number theoretic transformations, characterized in that: The device includes: The local processing end is used to generate a key on the local device, receive the plain text input by the user, encrypt and share the public key, relinearization key and ciphertext to the cloud processing end. The local processing end includes a key generation module, an encryption module and a decryption module. The cloud processing end is used to perform ciphertext homomorphic operation on the received ciphertext using the BFV homomorphic operation algorithm. The cloud processing end includes a fast number theory transformation module, a homomorphic multiplication operation module, a relinearization module, and a fast number theory inverse transformation module.
12. The device for accelerating homomorphic encryption algorithm using fast number theoretic transformation according to claim 9, characterized in that: The key generation module is configured to initialize BFV homomorphic encryption parameters and generate a key; The encryption module is configured to encrypt the plaintext to be calculated using the public key to generate a ciphertext polynomial; The fast number theory transformation module is configured to convert the polynomial coefficient form into a point value form; The homomorphic multiplication operation module is configured to implement a homomorphic multiplication operation on two ciphertext polynomials to generate three ciphertexts; The relinearization module is configured to convert the three ciphertexts into two quasi-ciphertexts using fast number theory decomposition and accumulation; The fast number theory inverse transformation module is configured to reversely restore the point value form of the polynomial to the coefficient form; The decryption module is configured to use a private key to decrypt the ciphertext polynomial to obtain plaintext.
13. An electronic device, characterized in that: include: One or more programs are designed on one or more processors and memories, wherein the one or more programs are stored in the memories and configured to be executed by the one or more processors, and the one or more programs include methods for executing any of the methods described in claims 1 to 10.
14. A computer-readable storage medium, characterized in that: Programs are stored, and these programs contain instructions. When these instructions are executed on a computing device, the computing device can perform any method as described in claims 1 to 10; this description can be further refined as: the storage medium contains multiple programs, each program contains a series of instructions, and these instructions are designed to run on a specific computing device. By executing these instructions, the computing device can realize specific functions or process specific data.
Citation Information
Cited By
High-performance data multi-domain transformation lattice-based homomorphic encryption and decryption method and system
CN121509119A
Encryption with infinite lattice cryptography
US20250379736A1