aboutsummaryrefslogtreecommitdiffstats
path: root/checks/pk_bench.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-12 15:20:45 +0000
committerlloyd <[email protected]>2008-09-12 15:20:45 +0000
commitac1dceb9c6aff5081715f88057b9c72dec354725 (patch)
tree4516a2eb516dcbe574cab79d86c260474dff3b2d /checks/pk_bench.cpp
parentcf97bb56c09bae8c88d6e643ac6dbfe7b8c7b326 (diff)
Padding changes in the PK benchmarks:
RSA: EMSA4(SHA-1) -> EMSA1(SHA-1) RW: EMSA4(SHA-1) -> EMSA2(SHA-1) ELG: Raw -> EME1(SHA-1)
Diffstat (limited to 'checks/pk_bench.cpp')
-rw-r--r--checks/pk_bench.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/checks/pk_bench.cpp b/checks/pk_bench.cpp
index bf13bcb29..ca90b82cf 100644
--- a/checks/pk_bench.cpp
+++ b/checks/pk_bench.cpp
@@ -104,6 +104,8 @@ void benchmark_rsa_rw(RandomNumberGenerator& rng,
Timer verify_timer("verify");
Timer sig_timer("signature");
+ std::string padding = (algo_name == "RSA") ? "EMSA1(SHA-1)" : "EMSA2(SHA-1)";
+
while(verify_timer.seconds() < seconds ||
sig_timer.seconds() < seconds)
{
@@ -111,8 +113,6 @@ void benchmark_rsa_rw(RandomNumberGenerator& rng,
PRIV_KEY_TYPE key(rng, keylen);
keygen_timer.stop();
- std::string padding = "EMSA4(SHA-1)";
-
std::auto_ptr<PK_Signer> sig(get_pk_signer(key, padding));
std::auto_ptr<PK_Verifier> ver(get_pk_verifier(key, padding));
@@ -265,7 +265,7 @@ void benchmark_elg(RandomNumberGenerator& rng,
ElGamal_PrivateKey key(rng, group);
keygen_timer.stop();
- const std::string padding = "Raw"; //"EME1(SHA-1)";
+ const std::string padding = "EME1(SHA-1)";
std::auto_ptr<PK_Decryptor> dec(get_pk_decryptor(key, padding));
std::auto_ptr<PK_Encryptor> enc(get_pk_encryptor(key, padding));