Approximate error reduction method for CKKS fully homomorphic encryption scheme

By defining the distribution and generating public parameters in the CKKS fully homomorphic encryption scheme, and utilizing relinearized keys and hierarchical scaling steps, the low efficiency and rapid error growth problems of the CKKS scheme in practical applications are solved, and efficient complex calculations and high-precision operations are achieved.

CN120639271APending Publication Date: 2025-09-12XIDIAN UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511027451.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

The existing CKKS fully homomorphic encryption scheme is inefficient in practical applications and its error scale grows rapidly, making it unusable for complex calculations or high-precision scenarios.

Method used

By defining the distribution on the first cyclotomic polynomial ring and the second cyclotomic polynomial ring, public parameters are generated, and the relinearization key and hierarchical scaling steps are used to control the growth of ciphertext noise, reduce the noise in the initial encryption and key switching processes, and optimize the operation process.

Benefits of technology

It effectively reduces ciphertext noise, improves computing efficiency, supports complex calculations and high-precision scenarios, and improves computing accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120639271A_ABST
    Figure CN120639271A_ABST
Patent Text Reader

Abstract

The invention discloses a CKKS fully homomorphic encryption scheme approximation error reduction method, and solves the problems of low efficiency and rapid increase of error scale in practical application in the prior art. The method comprises the following steps: generating a public parameter, a public key and a private key; generating a relinear key and a self-isomorphic key according to the public key and the private key; performing multi-layer coding on the received multiple message vectors to obtain a coded plaintext polynomial corresponding to each layer; performing encryption to obtain a ciphertext corresponding to each layer; operation is carried out according to the encryption requirement of a user and the ciphertext, and a ciphertext operation result corresponding to each layer is obtained; carrying out relinearization on the ciphertext operation result and scaling the ciphertext operation result to the next layer step by step to obtain scaled ciphertext corresponding to each layer; a multiplication ciphertext is obtained; decrypting and decoding to obtain a message vector; according to the method, the noise introduced by the ciphertext in the initial encryption process and the noise generated in the key switching process are reduced, and meanwhile, the rounding error introduced in the operation process is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fully homomorphic encryption, and in particular to a CKKS fully homomorphic encryption scheme approximation error reduction method. Background Art

[0002] In recent years, the field of fully homomorphic encryption has seen numerous theoretical and computational advances, bringing the technology closer to practical application than ever before. For this reason, many practitioners in information technology fields, such as artificial intelligence, are seeking to understand fully homomorphic encryption to protect their data privacy. Among mainstream fully homomorphic encryption schemes, CKKS schemes support encryption of floating-point numbers, making them a popular choice. However, this characteristic of CKKS schemes causes noise to become part of the plaintext after decryption, introducing errors. If the error term in the ciphertext is too large, decryption failure or the decrypted plaintext becomes unusable. There are currently two main approaches to address this issue: one is to perform error analysis and parameter evaluation before using the CKKS scheme, based on specific computational requirements. However, due to various constraints such as the security, correctness, and efficiency of the scheme, achieving accurate error analysis and optimal parameter evaluation under specific constraints remains a challenge in practical applications. The other approach is to optimize the CKKS scheme's operation to reduce noise accumulation and thus reduce errors in the decrypted plaintext. The present invention is based on the second approach.

[0003] In 2023, Kim et al. proposed a CKKS variant that reduces the initial decryption error and key switching error in the CKKS scheme by swapping the order of ciphertext multiplication and rescaling operations. In 2024, Drucker et al. proposed an error cleaning procedure, BLEACH, for the CKKS scheme. This procedure reduces noise to an arbitrarily low level after homomorphic multiplication of binary and integer numbers by approximating step functions. However, this method cannot be applied to floating-point encryption operations. Furthermore, because it requires additional circuitry, it consumes a large amount of circuit depth, reducing computational efficiency.

[0004] The current CKKS fully homomorphic encryption scheme has broad application prospects in theory, but due to its efficiency issues in practical applications and the rapid growth of error scale, it is still difficult to be widely used in real-world scenarios. The current mainstream fully homomorphic encryption algorithm is based on the Learning With Errors (LWE) problem and its variants. The encryption algorithm protects the security of the plaintext by introducing noise. In fully homomorphic encryption algorithms such as BGV and BFV, the amount of noise in the ciphertext will affect whether the decryption is successful. Under the parameter settings that ensure successful decryption, the decrypted data calculated after the ciphertext is consistent with the calculation results of the data in the plaintext state. However, in the CKKS fully homomorphic encryption algorithm that supports approximate calculations, the noise introduced in the ciphertext will become an error in the plaintext after decryption, and the error scale grows rapidly with the depth of the circuit, which makes the CKKS scheme unusable in scenarios requiring complex calculations or high precision. Summary of the Invention

[0005] The present invention solves the problems of low efficiency and rapid growth of error scale in practical applications in the existing technology by providing an approximate error reduction method for the CKKS fully homomorphic encryption scheme. It reduces the noise introduced by the ciphertext during the initial encryption process and the noise generated during the key switching process, while greatly reducing the rounding error introduced during the operation process and further improving the operation efficiency by reducing the number of relinearization operations.

[0006] The present invention provides a CKKS fully homomorphic encryption scheme approximation error reduction method, the method comprising: Define the first cyclotomic polynomial ring and the second cyclotomic polynomial ring The distribution on the , and generate the public parameters through the initialization algorithm ; Based on the key generation algorithm, according to the public parameters Calculate the public key and private key ; According to the public key and private key Generate relinear key and automorphic keys ; Perform multi-layer encoding on the received message vectors to obtain the encoded plaintext polynomials corresponding to each layer. ; In distribution The first initial parameter is uniformly randomly selected from , in the distribution The second initial parameter is uniformly randomly selected from and the third initial parameter , using an encryption algorithm, according to the first initial parameter , the second initial parameter and the third initial parameter For the plaintext polynomial Encrypt to obtain the ciphertext corresponding to each layer ; Obtain user encryption requirements and, based on the user encryption requirements and ciphertext Perform operations to obtain the ciphertext operation results corresponding to each layer; Using the relinear key Relinearize the ciphertext operation result to obtain the relinearized ciphertext corresponding to each layer ; The relinearized ciphertext Zoom to the next layer step by step to obtain the scaled ciphertext corresponding to each layer; Use homomorphic multiplication to process the scaled ciphertext of the same level and the scaled ciphertext of different levels to obtain the multiplication ciphertext ; Decryption algorithm is used to decrypt the multiplication ciphertext Decrypt and get the decryption result ; The decryption result Decode and get the message vector.

[0007] In a possible implementation, the public parameters are generated by the initialization algorithm. ,include: Determine safety parameters , fixed base , initial modulus and the maximum number of layers of homomorphic operations ; Calculate the modulus of each homomorphic operation layer and extended modulus ; Determine the dimension of the selected polynomial ring , and according to the polynomial ring dimension Calculate the degree of the polynomial ; According to the expansion modulus and the safety parameters Calculate the first choice integer parameter and second choice positive integer parameter and select real number parameters ; According to the degree of the polynomial , extended modulus , first choice integer parameter , Second choice positive integer parameter , Maximum number of layers of homomorphic operations and select real number parameters Build and output public parameters .

[0008] In a possible implementation, the key generation algorithm is based on the public parameters Calculate the public key and private key ,include: Determine the encryption method selected by the user. If the encryption method is sparse ternary key encryption, randomly select a source key that obeys the sparse ternary distribution. ; If the encryption method is ternary key encryption, a source key that obeys a uniform ternary distribution is randomly selected. ; Randomly select the first preset parameter , the second preset parameter , according to the source key , the first preset parameter and the second preset parameter Calculate the public key and private key .

[0009] In a possible implementation, the public key and private key Generate relinear key and automorphic keys ,include: According to the private key Source key in , calculate the first parameter ; Using the key generation algorithm, according to the first parameter Calculate the relinearization key ; The source key Perform automorphism to obtain the second parameter , and according to the second parameter Get the automorphic key .

[0010] In a possible implementation, the plaintext polynomial It is to encode multiple message vectors using encoding algorithms to obtain the encoded plaintext polynomials corresponding to each layer. ; Wherein, the plaintext polynomial Expressed as: ; in, express; express; Indicates the A clear polynomial; represents the message vector; Indicates the maximum number of layers of homomorphic operations.

[0011] In a possible implementation, the user encryption requirement is obtained, and the encryption is performed according to the user encryption requirement and the ciphertext. Perform operations to obtain the ciphertext operation results corresponding to each layer, including: If the user encryption requirement is to use homomorphic addition for encryption operation, then the ciphertext is ciphered according to homomorphic addition. Perform encryption operations to obtain the ciphertext operation results corresponding to each layer; If the user encryption requirement is to use the automorphism method to perform encryption operations, then the ciphertext is encrypted according to the automorphism method. Perform encryption operations to obtain the ciphertext operation results corresponding to each layer; If the user encryption requirement is to perform encryption operations according to homomorphic addition and automorphism in sequence, then the ciphertext is encrypted according to the hybrid operation method. Perform encryption operations to obtain the ciphertext operation results corresponding to each layer.

[0012] In a possible implementation, the ciphertext is ciphered according to the automorphism method. Perform encryption operations to obtain the corresponding ciphertext operation results for each layer, including: According to the automorphic key , for the ciphertext Perform automorphism operations and obtain the ciphertext operation results corresponding to each layer.

[0013] One or more technical solutions provided in the present invention have at least the following technical effects or advantages: The present invention effectively controls the growth of noise in the ciphertext after homomorphic operations by using a relinearization key and a key hierarchical scaling step; relinearization reduces the ciphertext dimension expanded after multiplication back to the original dimension; hierarchical scaling immediately switches the ciphertext from a larger modulus to a smaller modulus after relinearization to prevent it from accumulating to an uncontrollable level in subsequent operations, enabling the scheme to perform multi-layer calculations, isomorphically combining homomorphic addition and multiplication, and realizing a single-instruction multiple-data parallel computing mode. Multiple message vectors can be encrypted simultaneously in one ciphertext, and all packaged data can be processed in parallel through homomorphic operations on the single ciphertext, greatly improving the efficiency of processing batch data. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1A flowchart of the steps of the CKKS fully homomorphic encryption scheme approximation error reduction method provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0015] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present invention.

[0016] The present invention provides a CKKS fully homomorphic encryption scheme approximation error reduction method, see Figure 1 , steps S101 to S111.

[0017] S101, define the first cyclotomic polynomial ring and the second cyclotomic polynomial ring The distribution on the , and generate the public parameters through the initialization algorithm ; For example, (1) : A multinomial distribution , indicating that each coefficient of the polynomial is taken from The uniform distribution between . Define the mean of the polynomial coefficient as the first mean, the variance as the first variance, and the value of the first mean is 0, and the value of the first variance is .

[0018] (2) : For the first real number , a multinomial distribution , indicating that each coefficient of the polynomial is taken from a discrete Gaussian distribution, where the mean of the discrete Gaussian distribution is 0 and the variance is .

[0019] (3) : For a second real number , a multinomial distribution , indicating that each coefficient of the polynomial is taken from , where the coefficient is equal to and The probability of ,equal The probability of Define the mean of the polynomial coefficient as the second mean, the variance as the second variance, the second mean is 0, and the second variance is .

[0020] (4) : For an integer , an N-degree polynomial follows the distribution , indicating that each coefficient of the polynomial is uniformly taken from , and satisfy the shared The coefficients are not equal to 0. Define the mean of the polynomial coefficients as the third mean and the variance as the third variance. The third mean is 0 and the third variance is .

[0021] (5) : A multinomial distribution , each coefficient of the polynomial is uniformly taken from Define the mean of the polynomial coefficient as the fourth mean and the variance as the fourth variance. The fourth mean is 0 and the fourth variance is .

[0022] Define the following two mappings: Canonical Embedding Mapping : in for yes Second primitive root of unity, is a polynomial ring An element in Indicates that Substitute the polynomial The complex value calculated in .

[0023] Natural Projection Mapping : , .in for The specific formula is as follows:

[0024] Specifically, in step S101, the public parameters are generated by initialization algorithm , including the following steps S1011 to S1015.

[0025] S1011, determine safety parameters , fixed base , initial modulus and the maximum number of layers of homomorphic operations ; S1012, calculate the modulus of each homomorphic operation layer and extended modulus ; S1013, determine the dimension of the selected polynomial ring , and according to the polynomial ring dimension Calculate the degree of the polynomial ; S1014, according to the extended module and safety parameters Calculate the first choice integer parameter and second choice positive integer parameter and select real number parameters ; S1015, according to the degree of polynomial , extended modulus , first choice integer parameter , Second choice positive integer parameter , Maximum number of layers of homomorphic operations and select real number parameters Build and output public parameters .

[0026] For example, the initialization algorithm Setup( ): Given security parameters , fixed using a fixed base and an initial modulus ,make ,in Indicates the ciphertext level and the upper limit of the multiplication depth of the scheme.

[0027] Choose a power-of-2 polynomial ring dimension , polynomial degree , first select integer parameter , the second choice is a positive integer parameter and select real number parameters , get the public parameters .

[0028] S102, based on the key generation algorithm, according to the public parameters Calculate the public key and private key ; Specifically, in step S102, based on the key generation algorithm, according to the public parameters Calculate the public key and private key , including the following steps S1021 to S1023.

[0029] S1021, determine the encryption method selected by the user. If the encryption method is sparse ternary key encryption, randomly select a source key that obeys the sparse ternary distribution. ; S1022, if the encryption method is ternary key encryption, randomly select a source key that obeys a uniform ternary distribution ; S1023, randomly select the first preset parameter , the second preset parameter , according to the source key , the first preset parameter and the second preset parameter Calculate the public key and private key .

[0030] Exemplary key generation algorithm KeyGen(pp): If the source key s is a sparse ternary key, randomly selecting the source key , if the source key For a uniform ternary key, the source key is randomly selected . Randomly select the first preset parameter , the second preset parameter .

[0031] Private key , public key ,in .

[0032] S103, according to the public key and private key Generate relinear key and automorphic keys ; Specifically, in step S103, according to the public key and private key Generate relinear key and automorphic keys , including the following steps S1031 to S1033.

[0033] S1031, according to the private key Source key in , calculate the first parameter ; S1032, using a key generation algorithm, based on the first parameter Calculate the relinearization key ; S1033, the source key Perform automorphism to obtain the second parameter , and according to the second parameter Get the automorphic key .

[0034] For example, the calculation key generation algorithm KeySwitchGen( ): Calculate the key generation algorithm KSGen( ): For the key , randomly selected , . Order conversion key ,in .

[0035] Output relinearization key ; Output automorphic key ,in Pointing to the general Mapped to , this process is called automorphism operation. In the CKKS scheme, automorphism operation mainly includes rotation and conjugation. The functions of are expressed as and , r is the number of rotation bits.

[0036] S104, perform multi-layer encoding on the received message vectors to obtain the encoded plaintext polynomials corresponding to each layer ; Specifically, in step S104, the plaintext polynomial It is to encode multiple message vectors using encoding algorithms to obtain the encoded plaintext polynomials corresponding to each layer. ; Among them, the plaintext polynomial Expressed as: ; in, represents a canonical embedding map; represents the inverse mapping of the canonical embedding mapping; Indicates the A clear polynomial; represents the message vector; Indicates the maximum number of layers of homomorphic operations; This is an approximate rounding operation.

[0037] For example, the encoding algorithm Encode( : For message vector , output The plaintext polynomial obtained after encoding is expressed as: .

[0038] S105, in distribution The first initial parameter is uniformly randomly selected from , in the distribution The second initial parameter is uniformly randomly selected from and the third initial parameter , using an encryption algorithm, based on the first initial parameter , the second initial parameter and the third initial parameter For plaintext polynomial Encrypt to obtain the ciphertext corresponding to each layer ; For example, the encryption algorithm Enc( ): For plaintext , in the distribution Uniformly random selection , in the distribution Uniformly random selection , output ciphertext ,in , as follows:

[0039] S106, obtain the user's encryption requirements, and Perform operations to obtain the ciphertext operation results corresponding to each layer; Specifically, in step S106, the user encryption requirement is obtained, and the encryption is performed according to the user encryption requirement and the ciphertext. Performing operations to obtain the ciphertext operation results corresponding to each layer includes the following steps S1061 to S1063.

[0040] S1061, if the user's encryption requirement is to use homomorphic addition for encryption operation, then the ciphertext is encrypted according to homomorphic addition. Perform encryption operations to obtain the ciphertext operation results corresponding to each layer; S1062: If the user's encryption requirement is to use the automorphism method for encryption, the ciphertext is encrypted according to the automorphism method. Perform encryption operations to obtain the ciphertext operation results corresponding to each layer; Here, according to the automorphism method, the ciphertext Perform encryption operations to obtain the corresponding ciphertext operation results of each layer, including: , for the ciphertext Perform automorphism operations and obtain the ciphertext operation results corresponding to each layer.

[0041] S1063: If the user's encryption requirement is to perform encryption operations according to homomorphic addition and automorphism in sequence, the ciphertext is encrypted according to the hybrid operation method. Perform encryption operations to obtain the ciphertext operation results corresponding to each layer.

[0042] For example, homomorphic addition Add( : Ciphertext at the same level and The homomorphic addition between is as follows: For the same level Ciphertext and , the result after homomorphic addition operation is as follows:

[0043] Different levels of ciphertext and The homomorphic addition between is as follows: for Hierarchical ciphertext and Hierarchical ciphertext , the result after homomorphic addition operation is as follows:

[0044] After the homomorphic addition calculation is completed, it needs to be calculated and stored ,when and At the same level When , the calculation results are as follows: .

[0045] when and If they are not at the same level, lie in level, lie in The calculation results are as follows: .

[0046] Automorphism :for Hierarchical ciphertext and automorphic keys , when performing the automorphism operation hour, ,in The calculation results are as follows: .

[0047] S107, using the re-linear key Relinearize the ciphertext operation results to obtain the relinearized ciphertext corresponding to each layer ; For example, the relinearization algorithm Relinear( ):for Hierarchical ciphertext , , the results after relinearization are as follows:

[0048] in .

[0049] S108, the ciphertext after relinearization Zoom to the next layer step by step to obtain the scaled ciphertext corresponding to each layer; For example, rescaling ):for l Ciphertext after hierarchical relinearization , , rescale it to the next level The results are as follows:

[0050] in .

[0051] S109, using homomorphic multiplication to process the scaled ciphertext of the same level and the scaled ciphertext of different levels to obtain the multiplication ciphertext ; For example, homomorphic multiplication Mult( : Ciphertext at the same level and The homomorphic multiplication between is as follows: For the same level Ciphertext and , the ciphertext obtained after multiplication is:

[0052] Different levels of ciphertext and The homomorphic multiplication between is as follows: for Hierarchical ciphertext and Hierarchical ciphertext , you need to first Perform modular reduction operation to obtain ,right and Perform multiplication and the resulting ciphertext is:

[0053] After the homomorphic multiplication is completed, it needs to be calculated and stored ,when and At the same level When , the calculation results are as follows:

[0054] when and If they are not at the same level, lie in level, lie in The calculation results are as follows:

[0055] S110, using the decryption algorithm to decrypt the multiplication ciphertext Decrypt and get the decryption result ; For example, the decryption algorithm Dec ( :for Hierarchical ciphertext and key , the decrypted result is as follows:

[0056] S111, decryption result Decode and get the message vector.

[0057] For example, the decoding algorithm Decode( ): For the plaintext polynomial , the decoded message is as follows:

[0058] The following two algorithms are used as components in the above cryptographic algorithm: (1) Modular reduction algorithm :for Hierarchical ciphertext , converted to The results of the hierarchy are as follows:

[0059] (2) Key conversion algorithm :for Hierarchical ciphertext and calculate the key , the key conversion calculation results are as follows:

[0060] The present invention significantly reduces the noise accumulation after operations between ciphertexts at different levels by changing the modular reduction operation of the original CKKS scheme; the present invention constructs a new operation framework including ciphertext multiplication, relinearization and rescaling operations. By swapping the relinearization and rescaling operations before the ciphertext multiplication, the noise introduced in the initial encryption process and the noise generated in the key switching process are effectively reduced, thereby significantly reducing the rounding error introduced in the operation process, and further improving the operation efficiency by reducing the number of relinearization operations.

[0061] Compared with existing representative technologies, the present invention reduces the error scale under circuit models with a large number of ciphertext operations at different levels, and the error scale is reduced by approximately 2 orders of magnitude under the addition operation circuit of 6 ciphertexts at different levels; compared with existing representative technologies, the present invention improves the operating efficiency under circuit models with a large number of homomorphic additions at the same level, and the operation time is reduced by approximately 4 times under the addition operation circuit of 20 ciphertexts at the same level.

[0062] The method provided by the present invention is an important research achievement in the field of homomorphic encryption. Because it supports floating-point operations, it has demonstrated unique advantages in application scenarios such as machine learning, smart medical care, and data retrieval, and has become a key technology that is difficult to replace by other fully homomorphic encryption schemes. However, with the continuous growth of practical application needs, the CKKS scheme has encountered many challenges in error control, parameter setting, and performance improvement. Problems such as the rapid error accumulation rate, high difficulty in parameter configuration, and the difficulty in balancing computational efficiency and security have become key bottlenecks restricting the practical application of the CKKS scheme. Research on error reduction technology to address these problems is particularly important. Error reduction technology can not only provide theoretical support for the optimization of the CKKS scheme, but also lay a technical foundation for its practical application in actual scenarios.

[0063] In the field of privacy-preserving machine learning, breakthroughs in error reduction technology have enabled encrypted computations on complex neural network models. Traditional homomorphic encryption schemes struggle to support the training and inference of deep networks due to error accumulation. However, by introducing hierarchical modulus management and optimized activation function approximation algorithms, the CKKS scheme can now support complex models including convolutional neural networks and Transformer architectures. For example, in federated learning scenarios, the CKKS scheme, which utilizes improved error control technology, ensures the numerical stability of model parameters during the encrypted aggregation process, keeping the accuracy loss of the final model to less than 1%. This advancement provides a practical technical solution for cross-institutional data collaboration in sensitive fields such as healthcare and finance.

[0064] Applications in the healthcare field place higher demands on computational accuracy. In genomic data analysis, single nucleotide polymorphism (SNP) detection requires extremely high computational precision; medical image processing requires the retention of key pathological features. To address these needs, researchers have developed a high-precision numerical calculation method based on CKKS. By adopting improved encoding strategies and error compensation algorithms, relative error control at the level of 10^-6 can be achieved in encrypted calculations. Clinical trial data show that encrypted MRI images processed using the optimized CKKS scheme can retain 99.7% of key diagnostic features, fully meeting clinical diagnostic requirements. These achievements lay the technical foundation for building a truly usable medical privacy computing platform.

[0065] Financial computing scenarios are unique in their demanding dual requirements for computational accuracy and real-time performance. Core tasks such as derivatives pricing and risk assessment often require millions of Monte Carlo simulations. By combining CKKS's error reduction technology with modern hardware acceleration, we have achieved thousands of simulations per second in an encrypted state. Of particular note, in practical applications such as interest rate swap pricing, the optimized CKKS solution can control pricing error to within 0.1 basis points, a level of accuracy that meets commercial standards. This provides a new technical path for financial institutions to conduct complex quantitative analysis while meeting strict compliance requirements.

[0066] In IoT and edge computing scenarios, error reduction techniques face the challenge of balancing resource constraints with computational accuracy. To address this issue, recent research has proposed a lightweight error control scheme that, through dynamic precision adjustment and a selective bootstrapping strategy, reduces computational overhead by an order of magnitude while maintaining sufficient accuracy. Real-world tests have demonstrated that, in a typical smart home scenario, embedded devices using this optimized scheme can complete encrypted data processing within millisecond latency while ensuring over 95% data availability. These advances have cleared key technical barriers to building truly usable privacy-preserving IoT systems.

[0067] Overall, the CKKS solution, with its smaller computational error, has significant application value in a wide range of fields. Through error reduction techniques, the final computational accuracy of the CKKS solution can be significantly increased. This lays a solid foundation for the widespread application of CKKS in various scenarios, including cloud computing, finance, healthcare, scientific research collaboration, and regulatory compliance. With the continuous advancement of technology and the growing demand from various industries, the application prospects of the CKKS solution will be even broader, and its potential deserves continued attention and in-depth exploration.

[0068] The various embodiments in this specification are described in a progressive manner. References to the same or similar parts between the various embodiments are sufficient. Each embodiment focuses on the differences from other embodiments. All or part of the present invention can be used in a variety of general or specialized computer system environments or configurations. For example, personal computers, server computers, handheld or portable devices, tablet devices, mobile communication terminals, multiprocessor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above systems or devices.

[0069] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the present invention.

Claims

1. A CKKS fully homomorphic encryption scheme approximation error reduction method, characterized in that: include: Define the first cyclotomic polynomial ring and the second cyclotomic polynomial ring The distribution on the , and generate the public parameters through the initialization algorithm ; Based on the key generation algorithm, according to the public parameters Calculate the public key and private key ; According to the public key and private key Generate relinear key and automorphic keys ; Perform multi-layer encoding on the received message vectors to obtain the encoded plaintext polynomials corresponding to each layer. ; In distribution The first initial parameter is uniformly randomly selected from , in the distribution The second initial parameter is uniformly randomly selected from and the third initial parameter , using an encryption algorithm, according to the first initial parameter , the second initial parameter and the third initial parameter For the plaintext polynomial Encrypt to obtain the ciphertext corresponding to each layer ; Obtain user encryption requirements and, based on the user encryption requirements and ciphertext Perform operations to obtain the ciphertext operation results corresponding to each layer; Using the relinear key Relinearize the ciphertext operation result to obtain the relinearized ciphertext corresponding to each layer ; The relinearized ciphertext Zoom to the next layer step by step to obtain the scaled ciphertext corresponding to each layer; Use homomorphic multiplication to process the scaled ciphertext of the same level and the scaled ciphertext of different levels to obtain the multiplication ciphertext ; Decryption algorithm is used to decrypt the multiplication ciphertext Decrypt and get the decryption result ; The decryption result Decode and get the message vector.

2. The CKKS fully homomorphic encryption scheme approximation error reduction method according to claim 1, characterized in that: The public parameters are generated by the initialization algorithm ,include: Determine safety parameters , fixed base , initial modulus and the maximum number of layers of homomorphic operations ; Calculate the modulus of each homomorphic operation layer and extended modulus ; Determine the dimension of the selected polynomial ring , and according to the polynomial ring dimension Calculate the degree of the polynomial ; According to the expansion modulus and the safety parameters Calculate the first choice integer parameter and second choice positive integer parameter and select real number parameters ; According to the degree of the polynomial , extended modulus , first choice integer parameter , Second choice positive integer parameter , Maximum number of layers of homomorphic operations and select real number parameters Build and output public parameters .

3. The CKKS fully homomorphic encryption scheme approximation error reduction method according to claim 1, characterized in that: The key generation algorithm is based on the public parameters Calculate the public key and private key ,include: Determine the encryption method selected by the user. If the encryption method is sparse ternary key encryption, randomly select a source key that obeys the sparse ternary distribution. ; If the encryption method is ternary key encryption, a source key that obeys a uniform ternary distribution is randomly selected. ; Randomly select the first preset parameter , the second preset parameter , according to the source key , the first preset parameter and the second preset parameter Calculate the public key and private key .

4. The CKKS fully homomorphic encryption scheme approximation error reduction method according to claim 1, characterized in that: The public key and private key Generate relinear key and automorphic keys ,include: According to the private key Source key in , calculate the first parameter ; Using the key generation algorithm, according to the first parameter Calculate the relinearization key ; The source key Perform automorphism to obtain the second parameter , and according to the second parameter Get the automorphic key .

5. The CKKS fully homomorphic encryption scheme approximation error reduction method according to claim 1, characterized in that: The plaintext polynomial It is to encode multiple message vectors using encoding algorithms to obtain the encoded plaintext polynomials corresponding to each layer. ; Wherein, the plaintext polynomial Expressed as: ; in, represents a canonical embedding map; represents the inverse mapping of the canonical embedding mapping; Indicates the A clear polynomial; represents the message vector; Indicates the maximum number of layers of homomorphic operations.

6. The CKKS fully homomorphic encryption scheme approximation error reduction method according to claim 1, characterized in that: The user encryption requirement is obtained, and the encryption requirement and the ciphertext are obtained. Perform operations to obtain the ciphertext operation results corresponding to each layer, including: If the user encryption requirement is to use homomorphic addition for encryption operation, then the ciphertext is ciphered according to homomorphic addition. Perform encryption operations to obtain the ciphertext operation results corresponding to each layer; If the user encryption requirement is to use the automorphism method to perform encryption operations, then the ciphertext is encrypted according to the automorphism method. Perform encryption operations to obtain the ciphertext operation results corresponding to each layer; If the user encryption requirement is to perform encryption operations according to homomorphic addition and automorphism in sequence, then the ciphertext is encrypted according to the hybrid operation method. Perform encryption operations to obtain the ciphertext operation results corresponding to each layer.

7. The CKKS fully homomorphic encryption scheme approximation error reduction method according to claim 6, characterized in that: The ciphertext is processed according to the automorphism method. Perform encryption operations to obtain the corresponding ciphertext operation results for each layer, including: According to the automorphic key , for the ciphertext Perform automorphism operations to obtain the ciphertext operation results corresponding to each layer.

Citation Information

Cited By

  • Homomorphic encryption protection system for privacy portrait characteristics of flower consumers

    CN122153944A