aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-06-07 14:05:43 +0000
committerlloyd <[email protected]>2011-06-07 14:05:43 +0000
commita610b07bc87d7a64c396ee52909204605c48b6df (patch)
tree521bfaf66c37c359fcf27fcfd007b250553a44fc
parent100ddd76eba1392901577efe8cc191af9df18712 (diff)
Add (compile-time) toggle for fault protection checking in the PK
benchmarks
-rw-r--r--checks/pk_bench.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/checks/pk_bench.cpp b/checks/pk_bench.cpp
index b0e689b0c..de8ad0730 100644
--- a/checks/pk_bench.cpp
+++ b/checks/pk_bench.cpp
@@ -65,6 +65,9 @@ using namespace Botan;
#include <memory>
#include <set>
+#define BENCH_FAULT_PROT DISABLE_FAULT_PROTECTION
+//#define BENCH_FAULT_PROT ENABLE_FAULT_PROTECTION
+
namespace {
const char* ec_domains[] = {
@@ -329,7 +332,7 @@ void benchmark_ecdsa(RandomNumberGenerator& rng,
ECDSA_PrivateKey key(rng, params);
keygen_timer.stop();
- PK_Signer sig(key, padding, IEEE_1363, DISABLE_FAULT_PROTECTION);
+ PK_Signer sig(key, padding, IEEE_1363, BENCH_FAULT_PROT);
PK_Verifier ver(key, padding);
benchmark_sig_ver(ver, sig, verify_timer,
@@ -371,7 +374,7 @@ void benchmark_gost_3410(RandomNumberGenerator& rng,
GOST_3410_PrivateKey key(rng, params);
keygen_timer.stop();
- PK_Signer sig(key, padding, IEEE_1363, DISABLE_FAULT_PROTECTION);
+ PK_Signer sig(key, padding, IEEE_1363, BENCH_FAULT_PROT);
PK_Verifier ver(key, padding);
benchmark_sig_ver(ver, sig, verify_timer,
@@ -478,7 +481,7 @@ void benchmark_dsa_nr(RandomNumberGenerator& rng,
algo_name = key.algo_name();
keygen_timer.stop();
- PK_Signer sig(key, padding, IEEE_1363, DISABLE_FAULT_PROTECTION);
+ PK_Signer sig(key, padding, IEEE_1363, BENCH_FAULT_PROT);
PK_Verifier ver(key, padding);
benchmark_sig_ver(ver, sig, verify_timer,