diff options
author | lloyd <[email protected]> | 2008-09-14 16:18:22 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-14 16:18:22 +0000 |
commit | 6a16f4855a1645a0cbb677c6a6a9188f5dcc648b (patch) | |
tree | 24c077ff9a366c187becbbcd8145016c03d62a47 /checks/pk_bench.cpp | |
parent | a3887f5657a699b78ce9f54dc73fc118fee0f304 (diff) |
Oops disable part of previous, was for testing
Diffstat (limited to 'checks/pk_bench.cpp')
-rw-r--r-- | checks/pk_bench.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/checks/pk_bench.cpp b/checks/pk_bench.cpp index 776ea1a15..a2364de14 100644 --- a/checks/pk_bench.cpp +++ b/checks/pk_bench.cpp @@ -121,7 +121,7 @@ void benchmark_rsa(RandomNumberGenerator& rng, double seconds, Benchmark_Report& report) { - for(size_t keylen = 512; keylen <= 8192; keylen += 256) + for(size_t keylen = 1024; keylen <= 4096; keylen += 1024) { Timer verify_timer("verify"); Timer sig_timer("signature"); @@ -133,10 +133,16 @@ void benchmark_rsa(RandomNumberGenerator& rng, try { + +#if 0 PKCS8_PrivateKey* pkcs8_key = PKCS8::load_key("rsa/" + to_string(keylen) + ".pem", rng); RSA_PrivateKey* key_ptr = dynamic_cast<RSA_PrivateKey*>(pkcs8_key); RSA_PrivateKey key = *key_ptr; +#else + + RSA_PrivateKey key(rng, keylen); +#endif while(verify_timer.seconds() < seconds || sig_timer.seconds() < seconds) |