tuneinsight / lattigo

A library for lattice-based multiparty homomorphic encryption in Go
Apache License 2.0
1.18k stars 176 forks source link

`bgv.Encoder.Encode` should fail when the values are not []uint64 or []int64 #387

Closed henrycg closed 10 months ago

henrycg commented 1 year ago

As is, bgv.Encoder.Encode silently fails, which makes it more difficult to debug encoding (e.g., if you passed an array instead of slice by accident).

I think adding a default case to the switch statement here would be enough: https://github.com/tuneinsight/lattigo/blob/803a26b14d9292ffa7b2be443a49b0c27e6f90a5/bgv/encoder.go#L131

Pro7ech commented 1 year ago

Hi Henry, thank you for pointing it out. Improving this behavior is among the many fixes that are part of the upcoming 4.2 release.

If you have any feedback, suggestion or feature requirement, don't hesitate as the 4.2 release hasn't been finalized yet and we are still actively working on it.

Pro7ech commented 10 months ago

379