diff options
author | Jack Lloyd <[email protected]> | 2016-09-28 03:23:12 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-10-20 22:45:47 -0400 |
commit | 6ceeab949aae9d53914838c542e7b156c80b4b57 (patch) | |
tree | 01d56f8570686eff1064b14c8e44c6654e626b11 /src/cli/speed.cpp | |
parent | 36e5b56eb4298e81e8413ac1ef0eada096df8abc (diff) |
Add create_private_key, expose key loading functions in pk_algs.h
Diffstat (limited to 'src/cli/speed.cpp')
-rw-r--r-- | src/cli/speed.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp index b44c6df99..e6d4a6b7f 100644 --- a/src/cli/speed.cpp +++ b/src/cli/speed.cpp @@ -596,16 +596,18 @@ class Speed final : public Command ks_timer.run([&] { enc.set_key(key); }); ks_timer.run([&] { dec.set_key(key); }); + Botan::secure_vector<uint8_t> iv = rng().random_vec(enc.default_nonce_length()); + while(encrypt_timer.under(runtime) && decrypt_timer.under(runtime)) { - const Botan::secure_vector<uint8_t> iv = rng().random_vec(enc.default_nonce_length()); - // Must run in this order, or AEADs will reject the ciphertext iv_timer.run([&] { enc.start(iv); }); encrypt_timer.run([&] { enc.finish(buffer); }); iv_timer.run([&] { dec.start(iv); }); decrypt_timer.run([&] { dec.finish(buffer); }); + + iv[0] += 1; } output() << Timer::result_string_ops(ks_timer); |