-
Notifications
You must be signed in to change notification settings - Fork 685
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bigint: Remove unnecessary and misleading assertion in `elem_exp_vart…
…ime_`. The assertion made sense when the function was only for the exponentiation in RSA public key operations. However, this assertion is nonsensical for the other use of the function to construct the montgomery constant for the modulus. Add more documentation about the performance. Rather than trying to "improve" the assertion, just remove it. `PUBLIC_EXPONENT_MAX_VALUE` is just a bit smaller of bits smaller than what the type naturally enforces. The added documentation should help us reason about whether the assertion could ever fail. Because we constrain the maximum modulus (bit) length, the maximum value of the exponent is for the Montgomery setup case is less than `PUBLIC_EXPONENT_MAX_VALUE`.
- Loading branch information
1 parent
53ebaf7
commit d8378ac
Showing
1 changed file
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters