aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmd
diff options
context:
space:
mode:
authorJack Lloyd <lloyd@randombit.net>2015-08-28 20:19:27 -0400
committerJack Lloyd <lloyd@randombit.net>2015-08-28 20:19:27 -0400
commitf7f94b4a22f569098fd4a741ced382346c040530 (patch)
tree6bcaf3c93851d8a4ef30752bb77c2767a7eeeda0 /src/cmd
parente76e1f5f41b2ead518061a33ebc833f5c642bc34 (diff)
PK speed reporting improvements.
Increment the input message so each value is different rather than repeatedly hashing the same message until we regen a new random one. In ECDSA speed test be explicit about what group is being used. Remove 160 bit groups from ECC benchmarking; 80 bits is not enough anymore so doesn't much matter.
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/implementation/speed_public_key.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/cmd/implementation/speed_public_key.cpp b/src/cmd/implementation/speed_public_key.cpp
index 1e14f7eca..73bbd7c1e 100644
--- a/src/cmd/implementation/speed_public_key.cpp
+++ b/src/cmd/implementation/speed_public_key.cpp
@@ -82,12 +82,15 @@ using namespace Botan;
namespace {
const char* ec_domains[] = {
- "secp160r2",
- "secp192r1",
- "secp224r1",
+ // "secp160r2",
+ // "secp192r1",
+ // "secp224r1",
"secp256r1",
"secp384r1",
"secp521r1",
+ //"brainpool256r1",
+ //"brainpool384r1",
+ //"brainpool512r1",
nullptr
};
@@ -159,6 +162,8 @@ void benchmark_sig_ver(PK_Verifier& ver, PK_Signer& sig,
message.resize(48);
rng.randomize(&message[0], message.size());
}
+ else
+ message[0]++;
sig_timer.start();
signature = sig.sign_message(message, rng);
@@ -350,7 +355,7 @@ void benchmark_ecdsa(RandomNumberGenerator& rng,
sig_timer, rng, 1000, seconds);
}
- const std::string nm = "ECDSA-" + std::to_string(pbits);
+ const std::string nm = std::string("ECDSA ") + ec_domains[j];
report.report(nm, keygen_timer);
report.report(nm, verify_timer);