diff options
author | lloyd <[email protected]> | 2008-09-12 15:20:45 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-12 15:20:45 +0000 |
commit | ac1dceb9c6aff5081715f88057b9c72dec354725 (patch) | |
tree | 4516a2eb516dcbe574cab79d86c260474dff3b2d | |
parent | cf97bb56c09bae8c88d6e643ac6dbfe7b8c7b326 (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)
-rw-r--r-- | checks/pk_bench.cpp | 6 |
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)); |