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

Construction of a FieldElement from a BigInteger fails if the BigInteger is too big #404

Open
jot2re opened this issue Nov 11, 2022 · 2 comments
Labels
Type: Bug Bug related issues.

Comments

@jot2re
Copy link
Collaborator

jot2re commented Nov 11, 2022

Currently the method BigIntegerModulus.reduceModThis() fails if the BigInteger it gets as input is more than the square of the modulus... However, no exception is thrown if this is the case.

The code should be changed to either throw and exception so the user knows that something went wrong, or fixed to handle the case of large input gracefully.

See this issue aicis/fresco-outsourcing#6

@jot2re jot2re added the Type: Bug Bug related issues. label Nov 22, 2022
@jot2re
Copy link
Collaborator Author

jot2re commented Nov 22, 2022

Ideally if things are too big, it should simply use the slow modulo operation, or apply the fast modulo operation recursively.

@jot2re
Copy link
Collaborator Author

jot2re commented Nov 22, 2022

Note that the problem happens if the value is larger than the square of the modulo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug related issues.
Projects
None yet
Development

No branches or pull requests

1 participant