Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug [utils]: some rlwe and mhe tests always pass due to a bug in utils.MaxSlice and utils.MinSlice #457

Closed
Pro7ech opened this issue Apr 29, 2024 · 0 comments · Fixed by #474
Labels
bug Something isn't working

Comments

@Pro7ech
Copy link
Contributor

Pro7ech commented Apr 29, 2024

  • utils.MaxSlice always return 0 if all values are negative
  • utils.MinSlice always return 0 if all values are positive

This bug also cascades to another bug: the function rlwe.NoiseGadgetCiphertext will always return a zero noise because BaseTwoDecompositionVectorSize is zero and thus the last loop is never iterated. rlwe.NoiseGadgetCiphertext is used to check the correctness of the different evaluation keys in the package rlwe and mhe.

A user using this function, and its associated functions (e.g. rlwe.NoiseRelinearizationKey) will not be able to detect errors in its implementation, misleading him on the root of the issue.

@Pro7ech Pro7ech added the bug Something isn't working label Apr 29, 2024
@Pro7ech Pro7ech changed the title Bug [utils]: some rlwe and mhe test always pass due to a bug in utils.MaxSlice and utils.MinSlice Bug [utils]: some rlwe and mhe tests always pass due to a bug in utils.MaxSlice and utils.MinSlice Apr 29, 2024
romainbou added a commit that referenced this issue May 14, 2024
…es utils

Co-authored-by: Jean-Philippe Bossuat <jean-philippe@tuneinsight.com>
@romainbou romainbou linked a pull request Jun 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant