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

fix modexp precompile to handle arbitrary sized input. #1538

Closed
jangko opened this issue Apr 11, 2023 · 0 comments · Fixed by #1576
Closed

fix modexp precompile to handle arbitrary sized input. #1538

jangko opened this issue Apr 11, 2023 · 0 comments · Fixed by #1576

Comments

@jangko
Copy link
Contributor

jangko commented Apr 11, 2023

From modexp spec:
"Calculates (base**exp) % modulus for arbitrary sized base, exp and. modulus. The return value is the same length as the modulus."

Current situation:
modexp is implemented using Stint and only able to handle fixed size integer up to 1024 bytes(StUint[8192]).
Nimbus will refuse to calculate modexp when one of the input size is longer than 1024.

Possible solution:
Integrate an additional BigInt library to be used specifically for this operation or implement a one-off algorithm for it.

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

Successfully merging a pull request may close this issue.

1 participant