Skip to content

Commit

Permalink
temporary fix for v1.21: golang/go#61992
Browse files Browse the repository at this point in the history
  • Loading branch information
Pro7ech committed Aug 24, 2023
1 parent df306e3 commit 98b412d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions rlwe/gadgetciphertext.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,11 @@ func AddPolyTimesGadgetVectorToGadgetCiphertext(pt ring.Poly, cts []GadgetCipher
}
}

// Temporary fix of compiler error https://github.com/golang/go/issues/61992
tmpfix := uint64(1 << cts[0].BaseTwoDecomposition)

// w^2j
ringQ.MulScalar(buff, 1<<cts[0].BaseTwoDecomposition, buff)
ringQ.MulScalar(buff, tmpfix, buff)
}

return
Expand Down Expand Up @@ -287,7 +290,9 @@ func NewGadgetPlaintext(params Parameters, value interface{}, levelQ, levelP, ba
pt.Value[i] = *pt.Value[0].CopyNew()

for j := 0; j < i; j++ {
ringQ.MulScalar(pt.Value[i], 1<<baseTwoDecomposition, pt.Value[i])
// Temporary fix of compiler error https://github.com/golang/go/issues/61992
tmpfix := uint64(1 << baseTwoDecomposition)
ringQ.MulScalar(pt.Value[i], tmpfix, pt.Value[i])
}
}

Expand Down

0 comments on commit 98b412d

Please sign in to comment.