-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speedup rsa_recover_prime_factors() by using random value (#11899)
* Speedup rsa_recover_prime_factors() by using random value * Comply with ruff codingstyle * Reject invalid combinations of n, d, e early to avoid excessive runtime * Add second failure test case for rsa_recover_prime_factors to hit early error path * Remove leftover debug code * Reduce _MAX_RECOVERY_ATTEMPTS and remove obsolete comment Previously, the code would increase a in steps of 2, therefore, _MAX_RECOVERY_ATTEMPTS was twice the number of tries. With the new code, this is no longer the case.
- Loading branch information
Showing
2 changed files
with
12 additions
and
7 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
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