-
Notifications
You must be signed in to change notification settings - Fork 17
JCE: Implements KeyGenerator benchmark #115
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
Conversation
da6141d to
a601f48
Compare
5bdbbb8 to
49dd840
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 a new KeyGenerator benchmarking feature and updates the algorithm filtering logic for providers, along with some code cleanup.
- Extends
getAlgorithmsForProviderto treatKeyGeneratoralongsideMac - Implements
runKeyGeneratorBenchmarkand related helper methods - Updates
mainto execute the KeyGenerator benchmarks for each provider
Comments suppressed due to low confidence (2)
examples/provider/CryptoBenchmark.java:1292
- New benchmarking logic should be covered by unit or integration tests to ensure consistent behavior and prevent regressions.
private static void runKeyGeneratorBenchmark(String algorithm, String providerName) throws Exception {
examples/provider/CryptoBenchmark.java:1294
- [nitpick] The variable name
opsis ambiguous; consider renaming it to something more descriptive likeoperationCount.
int ops = 0;
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.
Seems like something goes wrong for me when I run this:
-----------------------------------------------------------------------------
KeyGenerator Benchmark Results
-----------------------------------------------------------------------------
wolfJCE:
AES (wolfJCE) 727628 ops took 1.000 sec, 727627.366 ops/sec
HmacSHA1 (wolfJCE) Error: Unsupported algorithm: HmacSHA1
HmacSHA224 (wolfJCE) Error: Unsupported algorithm: HmacSHA224
HmacSHA256 (wolfJCE) Error: Unsupported algorithm: HmacSHA256
HmacSHA384 (wolfJCE) Error: Unsupported algorithm: HmacSHA384
HmacSHA512 (wolfJCE) Error: Unsupported algorithm: HmacSHA512
SunJCE:
AES (SunJCE) 770843 ops took 1.000 sec, 770842.320 ops/sec
HmacSHA1 (SunJCE) Error: Unsupported algorithm: HmacSHA1
HmacSHA224 (SunJCE) Error: Unsupported algorithm: HmacSHA224
HmacSHA256 (SunJCE) Error: Unsupported algorithm: HmacSHA256
HmacSHA384 (SunJCE) Error: Unsupported algorithm: HmacSHA384
HmacSHA512 (SunJCE) Error: Unsupported algorithm: HmacSHA512
BC:
AES (BC) 779577 ops took 1.000 sec, 779576.505 ops/sec
HMACSHA1 (BC) Error: Unsupported algorithm: HMACSHA1
HMACSHA224 (BC) Error: Unsupported algorithm: HMACSHA224
HMACSHA256 (BC) Error: Unsupported algorithm: HMACSHA256
HMACSHA384 (BC) Error: Unsupported algorithm: HMACSHA384
HMACSHA512 (BC) Error: Unsupported algorithm: HMACSHA512
My Java version:
java -version
openjdk version "1.8.0_372"
OpenJDK Runtime Environment Corretto-8.372.07.1 (build 1.8.0_372-b07)
OpenJDK 64-Bit Server VM Corretto-8.372.07.1 (build 25.372-b07, mixed mode)
Also, please squash commits down, thanks.
8e31e2b to
f882b2e
Compare
33d7e22 to
2039cbb
Compare
Added KeyGen benchmark and some code cleanup.