Fix to delta table for private/public SunJCE RSA test
parent
6f87879760
commit
4839bcca32
|
@ -119,6 +119,17 @@ public class CryptoBenchmark {
|
||||||
provider = providerEntry.getKey();
|
provider = providerEntry.getKey();
|
||||||
if (!provider.equals("wolfJCE")) {
|
if (!provider.equals("wolfJCE")) {
|
||||||
otherSpeed = providerEntry.getValue();
|
otherSpeed = providerEntry.getValue();
|
||||||
|
|
||||||
|
/* Adjust provider name for RSA operations */
|
||||||
|
String displayProvider = provider;
|
||||||
|
if (isRSAOperation) {
|
||||||
|
if (operation.contains("key gen")) {
|
||||||
|
displayProvider = "SunRsaSign"; // Key generation uses SunRsaSign
|
||||||
|
} else {
|
||||||
|
displayProvider = "SunJCE"; // Public/private operations use SunJCE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isRSAOperation) {
|
if (isRSAOperation) {
|
||||||
deltaValue = wolfSpeed - otherSpeed;
|
deltaValue = wolfSpeed - otherSpeed;
|
||||||
deltaPercent = ((wolfSpeed / otherSpeed) - 1.0) * 100;
|
deltaPercent = ((wolfSpeed / otherSpeed) - 1.0) * 100;
|
||||||
|
@ -126,11 +137,19 @@ public class CryptoBenchmark {
|
||||||
deltaValue = wolfSpeed - otherSpeed;
|
deltaValue = wolfSpeed - otherSpeed;
|
||||||
deltaPercent = ((wolfSpeed / otherSpeed) - 1.0) * 100;
|
deltaPercent = ((wolfSpeed / otherSpeed) - 1.0) * 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Ensure unique operation-provider combination */
|
||||||
|
String uniqueKey = operation + "|" + displayProvider;
|
||||||
|
if (!groupedResults.containsKey(uniqueKey)) {
|
||||||
System.out.printf("| %-40s | %-12s | %+8.2f | %+8.1f |%n",
|
System.out.printf("| %-40s | %-12s | %+8.2f | %+8.1f |%n",
|
||||||
operation.replace("RSA", "RSA/ECB/PKCS1Padding RSA"),
|
operation.replace("RSA", "RSA/ECB/PKCS1Padding RSA"),
|
||||||
provider,
|
displayProvider,
|
||||||
deltaValue,
|
deltaValue,
|
||||||
deltaPercent);
|
deltaPercent);
|
||||||
|
|
||||||
|
/* Mark this combination as processed */
|
||||||
|
groupedResults.put(uniqueKey, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -138,6 +157,7 @@ public class CryptoBenchmark {
|
||||||
System.out.println("* Delta Value: MiB/s for symmetric ciphers, operations/second for RSA");
|
System.out.println("* Delta Value: MiB/s for symmetric ciphers, operations/second for RSA");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Run symmetric encryption/decryption benchmarks */
|
||||||
private static void runEncDecBenchmark(String algorithm, String mode, String padding,
|
private static void runEncDecBenchmark(String algorithm, String mode, String padding,
|
||||||
String providerName) throws Exception {
|
String providerName) throws Exception {
|
||||||
SecretKey key;
|
SecretKey key;
|
||||||
|
|
Loading…
Reference in New Issue