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

Shift --secret-to-<scheme> passes from accepting arith to requiring modarith #1161

Open
AlexanderViand-Intel opened this issue Dec 9, 2024 · 0 comments

Comments

@AlexanderViand-Intel
Copy link
Collaborator

AlexanderViand-Intel commented Dec 9, 2024

Inspired by @WoutLegiest 's PR on arith-to-mod-arith:

In the past, we've discussed that there's a disconnect between various high-level arithmetic operations (e.g. a + b in Python, arith.addi %a, %b : i32 in high-level IR, etc) and what FHE actually does, especially in the arithmetic schemes, where the plaintext modulus is virtually never a nice power of two. In binary schemes, there's less of a disconnect, but it's still there (e.g. integer-level RNS?).

Since we're now (again, mostly for the arithmetic schemes) starting to more clearly differentiate the "arithmetization"/"binarization" phase from the actual scheme/LWE level lowerings, I think it might be a good idea to make this conversion from application-level semantics to plaintext-level semantics more explicit and only accept "mod arith with modulus that matches plaintext modulus" for the (arithmetic) secret-to-scheme lowerings.

This not only reduces possible errors/footgun situations, but it also means we could let people run the actual "plaintext" circuit to verify that arithmetization (including changing from Int or i32/etc to plaintext modulus) doesn't mess up their application logic.

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