From 467ea061c75e8047b90e27035f8460d788fe8340 Mon Sep 17 00:00:00 2001 From: Gerardo Ravago Date: Mon, 30 Dec 2024 14:45:11 -0500 Subject: [PATCH] Add missing JMH parameters and naming changes - Added some parameters to quickly increase our algorithm coverage. - Renamed SignatureRsa to SignatureRsassaPss to more closely match the specific algorithm being tested. (there exists a separate RSA signature algorithm within ACCP) --- .../com/amazon/corretto/crypto/provider/benchmarks/Hashes.java | 2 +- .../corretto/crypto/provider/benchmarks/RsaCipherOneShot.java | 2 +- .../benchmarks/{SignatureRsa.java => SignatureRsassaPss.java} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/{SignatureRsa.java => SignatureRsassaPss.java} (96%) diff --git a/benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/Hashes.java b/benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/Hashes.java index bde726ad..5bed5933 100644 --- a/benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/Hashes.java +++ b/benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/Hashes.java @@ -13,7 +13,7 @@ @State(Scope.Benchmark) public class Hashes { - @Param({"SHA-256", "SHA-384", "SHA-512"}) + @Param({"SHA-256", "SHA-384", "SHA-512", "SHA-1", "MD5"}) public String algorithm; @Param({AmazonCorrettoCryptoProvider.PROVIDER_NAME, "BC", "SUN"}) diff --git a/benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/RsaCipherOneShot.java b/benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/RsaCipherOneShot.java index 350fc1d7..8b26afb9 100644 --- a/benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/RsaCipherOneShot.java +++ b/benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/RsaCipherOneShot.java @@ -22,7 +22,7 @@ public class RsaCipherOneShot { @Param({AmazonCorrettoCryptoProvider.PROVIDER_NAME, "BC", "SunJCE"}) public String provider; - @Param({"Pkcs1Padding", "OAEPWithSHA-1AndMGF1Padding"}) + @Param({"NoPadding", "Pkcs1Padding", "OAEPPadding", "OAEPWithSHA-1AndMGF1Padding"}) public String padding; protected KeyPair keyPair; diff --git a/benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/SignatureRsa.java b/benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/SignatureRsassaPss.java similarity index 96% rename from benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/SignatureRsa.java rename to benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/SignatureRsassaPss.java index 6e05f9c2..9db0b3ac 100644 --- a/benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/SignatureRsa.java +++ b/benchmarks/lib/src/jmh/java/com/amazon/corretto/crypto/provider/benchmarks/SignatureRsassaPss.java @@ -13,7 +13,7 @@ import org.openjdk.jmh.annotations.State; @State(Scope.Benchmark) -public class SignatureRsa extends SignatureBase { +public class SignatureRsassaPss extends SignatureBase { @Param({"SHA-1"}) public String hash;