[ckks] fixed Trace

This commit is contained in:
Jean-Philippe Bossuat
2022-03-26 01:47:57 +01:00
parent 0967897adf
commit 57ffeb262c

View File

@@ -52,6 +52,7 @@ func (eval *evaluator) Trace(ctIn *Ciphertext, logSlotsStart, logSlotsEnd int, c
}
for i := logSlotsStart; i < logSlotsEnd; i++ {
<<<<<<< dev_bfv_poly
<<<<<<< dev_bfv_poly
eval.permuteNTT(ctOut, eval.params.GaloisElementForColumnRotationBy(1<<i), eval.buffCt)
ctBuff := &Ciphertext{Ciphertext: eval.buffCt.Ciphertext, Scale: ctOut.Scale}
@@ -59,8 +60,11 @@ func (eval *evaluator) Trace(ctIn *Ciphertext, logSlotsStart, logSlotsEnd int, c
eval.Add(ctOut, ctBuff, ctOut)
=======
eval.Automorphism(ctOut.Ciphertext, eval.params.GaloisElementForColumnRotationBy(1<<i), eval.ctxpool.Ciphertext)
=======
>>>>>>> [ckks] fixed Trace
ctPool := &Ciphertext{Ciphertext: eval.ctxpool.Ciphertext, Scale: ctOut.Scale}
ctPool.Value = ctPool.Value[:2]
eval.Automorphism(ctOut.Ciphertext, eval.params.GaloisElementForColumnRotationBy(1<<i), ctPool.Ciphertext)
eval.Add(ctOut, ctPool, ctOut)
>>>>>>> [rlwe]: complete refactoring
}