Word-Sized RNS Moduli for Efficient CKKS Ciphertext Operations
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing implementations of the Cheon-Kim-Kim-Song (CKKS) scheme for Fully Homomorphic Encryption (FHE) face inefficiencies due to the conflicting requirements of minimizing RNS moduli and scaling factors, leading to computational inefficiencies and resource waste, particularly in the distribution of limited modulus budgets.
Innovation Solution
An electronic apparatus and method that utilizes a Residue Number System (RNS) modulus with moduli corresponding to machine word size, employing rational rescaling and key switching operations to optimize homomorphic ciphertext processing, allowing for efficient operations by separating the relationship between RNS moduli and scaling factors.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If the scaling factor is minimized to reduce modulus waste, then the modulus budget is preserved for homomorphic computation, but the RNS modulus must be chosen as scaling factor-sized NTT primes which are much smaller than machine word size, leading to computational inefficiency
Solution Approach 1:
The invention segments the RNS modulus into two independent components: a word-sized base modulus for efficient computation and a scaling factor for precision control. This segmentation allows each component to be optimized independently - the base modulus is chosen for computational efficiency (word size) while the scaling factor is adjusted to minimize modulus waste, resolving the contradiction between these two requirements.
Solution Approach 2:
The invention introduces an intermediary rescaling operation that converts between the word-sized modulus representation and the scaling factor representation. This intermediary mechanism allows the system to use word-sized moduli for efficient computation while maintaining the ability to perform operations with different scaling factors, thus bridging the gap between computational efficiency and precision requirements.
2Productivity
If the RNS modulus is selected as close as possible to machine word size to maximize efficiency, then computational speed is improved, but the scaling factor must be minimized which conflicts with the modulus minimization strategy
Solution Approach 1:
The invention separates the modulus and scaling factor into independent parameters, allowing the modulus to be chosen for computational efficiency (word size) while the scaling factor is independently optimized for precision. This segmentation eliminates the need to choose between word-sized moduli and scaling factor-sized moduli, as both can coexist without conflict.
Solution Approach 2:
The invention changes the parameter relationship from a fixed coupling between modulus size and scaling factor to an independent parameter selection model. By allowing the modulus to be word-sized and the scaling factor to be independently adjusted, the system can optimize for both computational speed and precision without the complexity of maintaining a fixed relationship between these parameters.
3Quantity of substance
If the number of RNS moduli is minimized by using word-sized NTT primes, then space complexity is reduced, but the scaling factor must be minimized which limits the ability to perform operations with larger precision requirements
Solution Approach 1:
The invention segments the precision control function from the modulus structure, allowing the modulus to be minimized for space efficiency while the scaling factor independently provides the necessary precision flexibility. This segmentation enables the system to use fewer moduli while maintaining the ability to handle various precision requirements through scaling factor adjustment.
Solution Approach 2:
The invention uses the scaling factor as a copy mechanism that preserves precision information without requiring additional moduli. Instead of increasing the number of moduli to maintain precision, the system copies the precision requirements into the scaling factor parameter, which can be adjusted independently to match different precision needs.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Provided are an electronic apparatus and a control method thereof. The apparatus includes: a memory for storing at least one instruction; and a processor, wherein the processor may be configured to acquire the homomorphic ciphertext by using a Residue Number System (RNS) modulus including a plurality of moduli each having a size corresponding to a machine word size, and perform an operation on the homomorphic ciphertext by using rational rescaling.