aboutsummaryrefslogtreecommitdiffstats
path: root/checks
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-11 00:00:10 +0000
committerlloyd <[email protected]>2008-11-11 00:00:10 +0000
commit894a225d14043cbd0cbd42c677ab4063b461fa24 (patch)
treed86973c4bc9bcddf4ac1970728479bf04e8f6522 /checks
parente6abb0fd8289619d559ff430dff84f0de4f82808 (diff)
Remove lookup.h use from DLIES, PK key agreement, DSA param gen, get_enc.cpp
Diffstat (limited to 'checks')
-rw-r--r--checks/pk.cpp5
-rw-r--r--checks/pk_bench.cpp12
2 files changed, 13 insertions, 4 deletions
diff --git a/checks/pk.cpp b/checks/pk.cpp
index bafbc57d2..ab6fab665 100644
--- a/checks/pk.cpp
+++ b/checks/pk.cpp
@@ -33,6 +33,7 @@
#if defined(BOTAN_HAS_DLIES)
#include <botan/dlies.h>
+ #include <botan/kdf.h>
#endif
#include <botan/filters.h>
@@ -542,8 +543,8 @@ u32bit validate_dlies(const std::string& algo,
if(options.size() != 3)
throw Exception("DLIES needs three options: " + opt_str);
- std::string kdf = options[0];
- std::string mac = options[1];
+ KDF* kdf = get_kdf(options[0]);
+ MessageAuthenticationCode* mac = get_mac(options[1]);
u32bit mac_key_len = to_u32bit(options[2]);
PK_Decryptor* d = new DLIES_Decryptor(to, kdf, mac, mac_key_len);
diff --git a/checks/pk_bench.cpp b/checks/pk_bench.cpp
index b097c5815..a944934fb 100644
--- a/checks/pk_bench.cpp
+++ b/checks/pk_bench.cpp
@@ -30,6 +30,9 @@
#if defined(BOTAN_HAS_DLIES)
#include <botan/dlies.h>
+ #include <botan/kdf2.h>
+ #include <botan/hmac.h>
+ #include <botan/sha160.h>
#endif
#if defined(BOTAN_HAS_ECDSA)
@@ -525,10 +528,15 @@ void benchmark_dlies(RandomNumberGenerator& rng,
DH_PublicKey dh2_pub(dh2_priv);
- DLIES_Encryptor dlies_enc(dh1_priv);
+ DLIES_Encryptor dlies_enc(dh1_priv,
+ new KDF2(new SHA_160),
+ new HMAC(new SHA_160));
+
dlies_enc.set_other_key(dh2_pub.public_value());
- DLIES_Decryptor dlies_dec(dh2_priv);
+ DLIES_Decryptor dlies_dec(dh2_priv,
+ new KDF2(new SHA_160),
+ new HMAC(new SHA_160));
benchmark_enc_dec(dlies_enc, dlies_dec,
enc_timer, dec_timer, rng,