8 #ifndef BOTAN_POWER_MOD_H__
9 #define BOTAN_POWER_MOD_H__
11 #include <botan/bigint.h>
21 virtual void set_base(
const BigInt&) = 0;
22 virtual void set_exponent(
const BigInt&) = 0;
23 virtual BigInt execute()
const = 0;
38 BASE_IS_FIXED = 0x0001,
39 BASE_IS_SMALL = 0x0002,
40 BASE_IS_LARGE = 0x0004,
43 EXP_IS_FIXED = 0x0100,
44 EXP_IS_SMALL = 0x0200,
51 static size_t window_bits(
size_t exp_bits,
size_t base_bits,
54 void set_modulus(
const BigInt&, Usage_Hints = NO_HINTS)
const;
55 void set_base(
const BigInt&)
const;
56 void set_exponent(
const BigInt&)
const;
77 { set_base(b);
return execute(); }
81 Usage_Hints = NO_HINTS);
91 { set_exponent(e);
return execute(); }
95 Usage_Hints = NO_HINTS);
virtual ~Modular_Exponentiator()
BigInt operator()(const BigInt &b) const
BigInt operator()(const BigInt &e) const
Fixed_Exponent_Power_Mod()