aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli/speed.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-09-04 10:04:02 -0400
committerJack Lloyd <[email protected]>2016-10-07 19:27:56 -0400
commit25b6fb53eec30620d084411fb1dbc8913142fc6d (patch)
tree6ffa291a3f4a74cac23bce304a42f4c26e33bcda /src/cli/speed.cpp
parent62cd6e3651711f759f870460599596ff5be904a5 (diff)
Remove Algo_Registry usage from public key code.
Instead the key types exposes operations like `create_encryption_op` which will return the relevant operation if the algorithm supports it. Changes pubkey.h interface, now RNG is passed at init time. Blinder previous created its own RNG, now it takes it from app.
Diffstat (limited to 'src/cli/speed.cpp')
-rw-r--r--src/cli/speed.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp
index bd087e8e4..8666ff4ab 100644
--- a/src/cli/speed.cpp
+++ b/src/cli/speed.cpp
@@ -786,8 +786,8 @@ class Speed final : public Command
{
std::vector<uint8_t> plaintext, ciphertext;
- Botan::PK_Encryptor_EME enc(key, padding, provider);
- Botan::PK_Decryptor_EME dec(key, padding, provider);
+ Botan::PK_Encryptor_EME enc(key, rng(), padding, provider);
+ Botan::PK_Decryptor_EME dec(key, rng(), padding, provider);
Timer enc_timer(nm, provider, padding + " encrypt");
Timer dec_timer(nm, provider, padding + " decrypt");
@@ -823,8 +823,8 @@ class Speed final : public Command
const std::string& kdf,
std::chrono::milliseconds msec)
{
- Botan::PK_Key_Agreement ka1(key1, kdf, provider);
- Botan::PK_Key_Agreement ka2(key2, kdf, provider);
+ Botan::PK_Key_Agreement ka1(key1, rng(), kdf, provider);
+ Botan::PK_Key_Agreement ka2(key2, rng(), kdf, provider);
const std::vector<uint8_t> ka1_pub = key1.public_value();
const std::vector<uint8_t> ka2_pub = key2.public_value();
@@ -851,8 +851,8 @@ class Speed final : public Command
const std::string& kdf,
std::chrono::milliseconds msec)
{
- Botan::PK_KEM_Decryptor dec(key, kdf, provider);
- Botan::PK_KEM_Encryptor enc(key, kdf, provider);
+ Botan::PK_KEM_Decryptor dec(key, rng(), kdf, provider);
+ Botan::PK_KEM_Encryptor enc(key, rng(), kdf, provider);
Timer kem_enc_timer(nm, provider, "KEM encrypt");
Timer kem_dec_timer(nm, provider, "KEM decrypt");
@@ -888,8 +888,8 @@ class Speed final : public Command
{
std::vector<uint8_t> message, signature, bad_signature;
- Botan::PK_Signer sig(key, padding, Botan::IEEE_1363, provider);
- Botan::PK_Verifier ver(key, padding, Botan::IEEE_1363, provider);
+ Botan::PK_Signer sig(key, rng(), padding, Botan::IEEE_1363, provider);
+ Botan::PK_Verifier ver(key, rng(), padding, Botan::IEEE_1363, provider);
Timer sig_timer(nm, provider, padding + " sign");
Timer ver_timer(nm, provider, padding + " verify");