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

[3.1] Add subjective limit to mod_exp host function #739

Merged
merged 2 commits into from
Aug 3, 2022

Conversation

arhag
Copy link
Member

@arhag arhag commented Aug 3, 2022

Based on benchmarking (see fc changes for details) and a desire to prevent deadline overruns longer than 5 ms (to protect timely block delivery), we decided to enforce a subjective limit of at most 2048 bits on any of the base, exponent, or modulus.

This can be adjusted in the future (higher or lower) without a consensus change since it is a subjective limitation. In the future, we may wish to solve the above concern in a more flexible way as described in #785.

This PR also adds a test case to test that the subjective limit is enforced.

Also adds test case to test that the subjective limit is enforced.
@arhag arhag linked an issue Aug 3, 2022 that may be closed by this pull request
@arhag arhag marked this pull request as ready for review August 3, 2022 01:04
@arhag arhag requested a review from larryk85 August 3, 2022 01:28
@arhag arhag merged commit 65573e6 into release/3.1.x Aug 3, 2022
@arhag arhag deleted the arhag/GH-361-mod-exp-limits-for-3.1 branch August 3, 2022 04:47
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 this pull request may close these issues.

Add subjective limit for mod_exp
2 participants