Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyse the EvalAddCount and KeySwitchCount and Populate N/moduli chain for BGV #1168

Open
ZenithalHourlyRate opened this issue Dec 10, 2024 · 0 comments

Comments

@ZenithalHourlyRate
Copy link
Collaborator

Main reference: "Revisiting Homomorphic Encryption Schemes for Finite Fields" and OpenFHE pke examples readme

With the modreduce/relinearize strategy introduced in #1126, we can analyse the EvalAddCount and KeySwitchCount, hence determining the noise growth and enabling HEIR to select ring dimension N and the moduli chain qi according to the paper.

The first step could be using the analysis to determine these counts and when configuring the OpenFHE CryptoContext we can pass these parameters and let OpenFHE determine N and qi.

Further step could introduce a pass to use these counts to populate N/qi inside HEIR, which allows more information inside HEIR, allows us to SetFirstModSize/SetScalingModSize for OpenFHE and could benefit the new Lattigo backend (#1159) which allows the user/compiler to specify N/qi in a more fine grained way.

Further more, instead of OpenFHE specifying only the first/scaling modulus size, the compiler can specify each level modulus size because we can get the AddCount/KeySwitchCount for each level (instead of a global one). This often means a smaller Q.

Also, we can optimize the size of special moduli pi, and may possibly reduce the ring dimension N as the total QP is smaller. This mainly refers to Section 6 of "Optimisations and tradeoffs for HElib"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant