openfhe-development
openfhe-development copied to clipboard
Optimize TimesQovert in dcrtpoly.cpp (used for BFV encryption)
The following two optimizations can be applied
- Currently we do extra multiplications by [-Q] mod t. We should be able to do it only for a single NativePoly rather than a full DCRTPoly. The message mod t will be the same for all RNS towers because t < q_i. However, it is complicated to implement in OpenFHE because at this point we already have a DCRTPoly, with negative values being different in different towers.
- We should also use an in-place operator for Times.