diff options
author | lloyd <[email protected]> | 2014-01-01 21:20:55 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-01-01 21:20:55 +0000 |
commit | 197dc467dec28a04c3b2f30da7cef122dfbb13e9 (patch) | |
tree | cdbd3ddaec051c72f0a757db461973d90c37b97a /src/math/numbertheory/def_powm.h | |
parent | 62faac373c07cfe10bc8c309e89ebdd30d8e5eaa (diff) |
Shuffle things around. Add NIST X.509 test to build.
Diffstat (limited to 'src/math/numbertheory/def_powm.h')
-rw-r--r-- | src/math/numbertheory/def_powm.h | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/src/math/numbertheory/def_powm.h b/src/math/numbertheory/def_powm.h deleted file mode 100644 index 6ceee7bb6..000000000 --- a/src/math/numbertheory/def_powm.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -* Modular Exponentiation -* (C) 1999-2007 Jack Lloyd -* -* Distributed under the terms of the Botan license -*/ - -#ifndef BOTAN_DEFAULT_MODEXP_H__ -#define BOTAN_DEFAULT_MODEXP_H__ - -#include <botan/pow_mod.h> -#include <botan/reducer.h> -#include <vector> - -namespace Botan { - -/** -* Fixed Window Exponentiator -*/ -class Fixed_Window_Exponentiator : public Modular_Exponentiator - { - public: - void set_exponent(const BigInt&); - void set_base(const BigInt&); - BigInt execute() const; - - Modular_Exponentiator* copy() const - { return new Fixed_Window_Exponentiator(*this); } - - Fixed_Window_Exponentiator(const BigInt&, Power_Mod::Usage_Hints); - private: - Modular_Reducer reducer; - BigInt exp; - size_t window_bits; - std::vector<BigInt> g; - Power_Mod::Usage_Hints hints; - }; - -/** -* Montgomery Exponentiator -*/ -class Montgomery_Exponentiator : public Modular_Exponentiator - { - public: - void set_exponent(const BigInt&); - void set_base(const BigInt&); - BigInt execute() const; - - Modular_Exponentiator* copy() const - { return new Montgomery_Exponentiator(*this); } - - Montgomery_Exponentiator(const BigInt&, Power_Mod::Usage_Hints); - private: - BigInt m_exp, m_modulus, m_R_mod, m_R2_mod; - word m_mod_prime; - size_t m_mod_words, m_exp_bits, m_window_bits; - Power_Mod::Usage_Hints m_hints; - std::vector<BigInt> m_g; - }; - -} - -#endif |