-
Notifications
You must be signed in to change notification settings - Fork 196
Labels
bugSomething isn't workingSomething isn't working
Description
This bug is at the origin of #560
Cause
lattigo/circuits/ckks/dft/dft.go
Line 343 in c930849
func (eval *Evaluator) dft(ctIn *rlwe.Ciphertext, matrices []ltcommon.LinearTransformation, opOut *rlwe.Ciphertext) (err error) { |
// dft evaluates a series of [lintrans.LinearTransformation] sequentially on the ctIn and stores the result in opOut.
func (eval *Evaluator) dft(ctIn *rlwe.Ciphertext, matrices []ltcommon.LinearTransformation, opOut *rlwe.Ciphertext) (err error) {
inputLogSlots := ctIn.LogDimensions
// Sequentially multiplies w with the provided dft matrices.
if err = eval.LTEvaluator.EvaluateSequential(ctIn, matrices, opOut); err != nil {
return
}
// Encoding matrices are a special case of `fractal` linear transform
// that doesn't change the underlying plaintext polynomial Y = X^{N/n}
// of the input ciphertext.
opOut.LogDimensions = inputLogSlots
return
}
Does not take into account that multiples matrices can be evaluated for a single prime.
Fix
Algorithm shouldn't call EvaluateSequential, but sequentially evaluate each matrice and only rescale after all the matrices of a same level have been evaluated (this can be derived from the Level
field of MatrixLiteral
).
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working