Support encoding short tensors into BGV ciphertexts of restricted dimension
OpenFHE's MakePackedPlaintext will zero-pad to the ring degree N, and this breaks the rotate-and-reduce trick, so instead in the simple_sum_test.cpp test harness, I manually repeat the coefficients cyclically until it fills the whole ciphertext. I'd like to add this to the compilation pipeline and the encode helper, and it suggests a bunch more work to do if we have an input cleartext tensor that is not divisible by the OpenFHE's ring degree (rotate-and-reduce tricks won't work in that case, or will have to be tweaked to account for the true underlying ring degree).
So this breaks down into two pieces:
- Support auto-generating the cyclic repetition code in the add-client-interface helper
- Determine how to handle inputs that are not divisible by the RLWE tensor size used by a backend (this dips into issues with parameter selection)
The solution may also be related to https://github.com/google/heir/issues/646, since in that ticket a single scalar value can be encoded by repetition.
This issue has 7 outstanding TODOs:
- docs/content/en/docs/getting_started.md:329: support cyclic repetition in add-client-interface
- tests/Examples/openfhe/box_blur_test.cpp:43: support cyclic repetition in add-client-interface
- tests/Examples/openfhe/dot_product_8_test.cpp:37: support cyclic repetition in add-client-interface
- tests/Examples/openfhe/halevi_shoup_matmul_test.cpp:52: support cyclic repetition in add-client-interface
- tests/Examples/openfhe/naive_matmul_test.cpp:72: support cyclic repetition in add-client-interface
- tests/Examples/openfhe/roberts_cross_test.cpp:41: support cyclic repetition in add-client-interface
- tests/Examples/openfhe/simple_sum_test.cpp:34: support cyclic repetition in add-client-interface
This comment was autogenerated by todo-backlinks