-
Notifications
You must be signed in to change notification settings - Fork 17
Added signature benchmarks #109
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
Added signature benchmarks #109
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
examples/provider/CryptoBenchmark.java:725
- Reassigning providerName when using the SunJCE branch changes its identity for later logging; consider using a separate variable (e.g., actualProviderName) to retain the original provider identity for clarity.
providerName = "SunRsaSign";
examples/provider/CryptoBenchmark.java:737
- [nitpick] The EC curve name 'secp256r1' is repeated; consider extracting it into a constant to improve maintainability.
keyGen.initialize(new ECGenParameterSpec("secp256r1"));
cconlon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why we can't include SUN/Oracle Signature benchmarks. As long as we are calling public Java Security API's, doing something like Signature.getInstance("SHA256withRSA", "SunRsaSign"); shouldn't cause any problems that I am aware of.
The list of Oracle security providers and the services they offer for Java 11 (for example) can be found here: https://docs.oracle.com/en/java/javase/11/security/oracle-providers.html.
987963b to
7f18dc6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds signature performance benchmarks for BC, wolfJCE, and Sun providers and refactors provider setup to avoid conflicts across tests.
- Introduces
SIGNATURE_ALGORITHMSandSUN_SIGNATURE_ALGORITHMSarrays and a newrunSignatureBenchmarkmethod - Consolidates provider insertion/removal into
setupProvidersForTestand addssetupDigestProvider - Updates
mainto invoke signature benchmarks and cleans up table formatting and exception handling
9a212a3 to
4bc62c6
Compare
ece8664 to
f64f90b
Compare
cconlon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See new Copilot suggestions
a47e802 to
028f172
Compare
|
When I run the benchmark with Java 23, I get this error: ChatGPT thinks the SunEC provider is already registered on all versions of Java, and we don't need to instantiate it ourselves (https://chatgpt.com/share/683f8cfa-5d80-8000-8648-a8fbaeca3cb3). Can you try to adjust so we can maintain compatibility with running on newer Java versions? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds new signature benchmarks for BC, wolfJCE, and Sun signature algorithms and refactors test setup to avoid provider conflicts. Key changes include:
- Introduction of a runSignatureBenchmark method and supporting helper methods for signature algorithm detection and execution.
- Refactoring of provider setup across different benchmark sections to ensure a clean environment.
- Minor formatting updates in benchmark output displays.
92dbe19 to
7d285d9
Compare
Added BC, wolfJCE and Sun signature algorithms benchmarks as well as refactored other test to better insert security providers to avoid provider conflicts.