Context: CKKS.
If I want to generate a uniformly random DCRTPoly I can just do something like:
DCRTPoly::DugType dug;
DCRTPoly randPoly(dug, elementParams, Format::EVALUATION);
where elementParams
are parameters from an instance of CKKS. This way randPoly
seems to be living in the latest level Q_L.
If I want a random polynomial at a lower level, I can just drop some elements in the CRT form with DropLastElement()
.
But what if I want a random polynomial living in R_{Q_l} whose norm is strictly lower than Q_l? (let’s say bounded by B with Q_{l -1} < B < Q_l)
Should I first create a normal Poly
mod B and then turn it into CRT representation?
(note that then I need to perform operations between this polynomial and other DCRTPoly
s in R_{Q_l})
If anyone had a code snippet for this, it would be really appreciated.