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

Use LibCryptoRng instead of DEFAULT in Random benchmark #392

Merged

Conversation

fabrice102
Copy link
Contributor

Issue #, if available: N/A

Description of changes:

Following reversal of PR #376 in PR #388, using the ACCP SecureRandom algorithm DEFAULT (which is an alias of LibCryptoRng) yields lower performance in multi-threaded settings.
See #376 for details.

This PR is meant to use the algorithm LibCryptoRng in the benchmark, instead of its alias DEFAULT. This solves the performance drop in multi-threaded settings.

This also corresponds to the most common use of ACCP SecureRandom. Indeed, if ACCP is the first security provider and if ACCP SecureRandom
is registered, then when instantiating SecureRandom as
new SecureRandom(), the algorithm LibCryptoRng will be selected.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Following reversal of PR corretto#376 in PR corretto#388, using the ACCP SecureRandom
algorithm `DEFAULT` (which is an alias of `LibCryptoRng`) yields lower
performance in multi-threaded settings.
See corretto#376 for details.

This PR is meant to use the algorithm `LibCryptoRng` in the benchmark,
instead of its alias `DEFAULT`. This solves the performance drop in
multi-threaded settings.

This also corresponds to the most common use of ACCP SecureRandom.
Indeed, if ACCP is the first security provider and if ACCP SecureRandom
 is registered, then when instantiating SecureRandom as
 `new SecureRandom()`, the algorithm `LibCryptoRng` will be selected.
@fabrice102 fabrice102 requested a review from a team as a code owner July 25, 2024 15:35
@geedo0 geedo0 merged commit 5071483 into corretto:main Jul 25, 2024
10 checks passed
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.

3 participants