-
Notifications
You must be signed in to change notification settings - Fork 164
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
OpenFHE for pke schemes does not work correctly when NATIVE_SIZE=64 and 128-bit integers are disabled #667
Comments
Hi @j2kun Based on the error, it looks like you are using a configuration where INT128 is not available. The typical configuration for the 64-bit native backend is to use 128-bit words to store the result of multiplication. This maps to In the mode when INT128 is not available, the maximum modulus should be set to 57 bits (instead of default 60). I can give you more instructions if INT128 is not available in your configuration. |
I can enable INT128 but it seems I'm now running into this:
I'll try tinkering with my |
The problem is in CryptoParametersBGVRNS::PrecomputeCRTTables(), which is passed an auxBits value of 60 from ParameterGenerationBGVRNS::ParamsGenBGVRNS() regardless of whether HAVE_INT128 is set or not. There needs to be an alternate default auxBits value used when HAVE_INT128 is false. |
I just looked through the code. It looks like BGV, BFV, and CKKS are hard-coding 60 bits, which is not supported when 128-bit are note available. Assigned this bug to Milestone 1.1.3. |
I suggest changing the implementation of modular multiplication so that we could support 60-bit moduli for the case when 128-bit integers are not available. |
@j2kun If possible, it is better to use the configuration when 128-bit integers are supported. This configuration is faster than the 64-bit only option (even after we fix the 57 vs 60-bit issue specific to the 64-bit only option) |
I can enable 128-bit ints, though I ran into #669 when trying to do that. Is there a particular place in the documentation that is intended to explain how the compilation parameters connect to the functionality and/or compilability of the library? |
In CMakeLists.txt, the following code checks whether 128-bit and 64-bit integers are supported. This automatically sets
You can also manually set it (overriding the automatically set value).
|
The main problem in #669 is that setting |
I have the following code pulled from the BGV tutorial:
This fails with the error
My OpenFHE version is pinned to v1.1.2 (b2869ae) and I'm running with
My
config_core.h
isThe text was updated successfully, but these errors were encountered: