openfhe-development icon indicating copy to clipboard operation
openfhe-development copied to clipboard

Optimize TimesQovert in dcrtpoly.cpp (used for BFV encryption)

Open yspolyakov opened this issue 2 years ago • 0 comments

The following two optimizations can be applied

  1. 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.
  2. We should also use an in-place operator for Times.

yspolyakov avatar Jul 07 '22 14:07 yspolyakov