You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
ori32
/etc to plaintext modulus) doesn't mess up their application logic.The text was updated successfully, but these errors were encountered: