HElib
HElib copied to clipboard
Rotation with redundant slots
Sorry, @fionser I closed the issue in SEAL.
My question is: I want to get the exact number of slots in the ciphertext to get a cyclic rotation. Or implement the below rotations with redundant slots.
For example, given a ctxt
with 16 slots, (1, 2, 3, ..., 16)
. The expected rotationrotate(ctxt, -2)
should be (3, ..., 16, 1, 2)
.
But if we get a ctxt
with 20 slots. Rotate it directly, we get (3, ..., 16, 0, 0, 0, 0, 1, 2)
, how can I get (3, ..., 16, 1, 2, 0, 0, 0, 0)
. I have to rotate the ctxt
several times and make some additions?