diff options
author | Jack Lloyd <[email protected]> | 2019-08-23 20:08:30 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-08-23 20:08:30 -0400 |
commit | fdca35781c805b01ba658d9fb0fe524f73853315 (patch) | |
tree | 3d5917c31e0d489028ab989e510537e05a06ec31 | |
parent | 8d770d648bbc7a3baa686e24141f51d7ba894154 (diff) |
Remove use of pow_mod.h from PKCS11 RSA code
-rw-r--r-- | src/lib/prov/pkcs11/p11_rsa.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/prov/pkcs11/p11_rsa.cpp b/src/lib/prov/pkcs11/p11_rsa.cpp index 08f4115d1..1a760e1b2 100644 --- a/src/lib/prov/pkcs11/p11_rsa.cpp +++ b/src/lib/prov/pkcs11/p11_rsa.cpp @@ -15,7 +15,6 @@ #include <botan/pk_ops.h> #include <botan/rng.h> #include <botan/blinding.h> -#include <botan/pow_mod.h> namespace Botan { @@ -124,9 +123,8 @@ class PKCS11_RSA_Decryption_Operation final : public PK_Ops::Decryption RandomNumberGenerator& rng) : m_key(key), m_mechanism(MechanismWrapper::create_rsa_crypt_mechanism(padding)), - m_powermod(m_key.get_e(), m_key.get_n()), m_blinder(m_key.get_n(), rng, - [ this ](const BigInt& k) { return m_powermod(k); }, + [ this ](const BigInt& k) { return power_mod(k, m_key.get_e(), m_key.get_n()); }, [ this ](const BigInt& k) { return inverse_mod(k, m_key.get_n()); }) { m_bits = m_key.get_n().bits() - 1; @@ -164,7 +162,6 @@ class PKCS11_RSA_Decryption_Operation final : public PK_Ops::Decryption const PKCS11_RSA_PrivateKey& m_key; MechanismWrapper m_mechanism; size_t m_bits = 0; - Fixed_Exponent_Power_Mod m_powermod; Blinder m_blinder; }; |