-
When performing homomorphic bitonic sorting (which consists of multiple steps, with polynomial approximation being the main computation in each step), I encountered a problem: at a certain step, the input to the homomorphic polynomial evaluation is normal, but the output is completely incorrect. For example, while sorting numbers in the range [0,1], after polynomial evaluation, the values suddenly range in the tens, indicating a completely wrong result. Let (x) be the input ciphertext to the polynomial evaluation. During the polynomial evaluation, a series of power basis terms (x, x^2, x^4, x^8, x^{16}, \ldots) are computed, following the relationship: HypothesisI suspect that during sorting, the noise grows excessively, and at the problematic polynomial evaluation step, the Rescale operations during the evaluation of power basis fail to effectively control the noise (possibly due to insufficient scaling factors), leading to exponential noise growth and ultimately incorrect multiplication results. Experiment Plan and ChallengesTo validate this hypothesis, I plan to:
However, I face difficulties in both obtaining the noise of a ciphertext and making noise predictions effectively:
Questions
If any part of my description is unclear, please let me know, and I’ll provide additional details. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The issue is not the noise. Powers in the thousands should still be relatively accurate when using the Chebyshev power because it is numerically stable and the accuracy loss is only slightly larger than 1 bit per squaring in this case. That is, provided that your ciphertext is well formed (all values are in the expected range and the scaling factor is close to the primes that will be consumed). I have a few hypothesis on what might be going on, but I cannot help you further without a way to reproduce the behavior you are experiencing. |
Beta Was this translation helpful? Give feedback.
Ok, so the issue is way more straight forward than I though.
TLDR
A scaling factor of$\Delta=2^{27}$ is not sufficient to ensure numerical stability as well as well close primes for what you are doing and the only solution (if you want it to work with secure parameters, i.e. a with a larger $N$ ) is to increase the size of your scaling factor.
More Details
By default you will lose in the order of :