8 #ifndef BOTAN_POWER_MOD_H_
9 #define BOTAN_POWER_MOD_H_
11 #include <botan/bigint.h>
17 class Modular_Exponentiator;
29 BASE_IS_FIXED = 0x0001,
30 BASE_IS_SMALL = 0x0002,
31 BASE_IS_LARGE = 0x0004,
34 EXP_IS_FIXED = 0x0100,
35 EXP_IS_SMALL = 0x0200,
42 static size_t window_bits(
size_t exp_bits,
size_t base_bits,
51 void set_modulus(
const BigInt& modulus,
52 Usage_Hints hints = NO_HINTS,
53 bool disable_montgomery_arith =
false)
const;
58 void set_base(
const BigInt& base)
const;
63 void set_exponent(
const BigInt& exponent)
const;
80 Usage_Hints hints = NO_HINTS,
81 bool disable_montgomery_arith =
false);
85 mutable std::unique_ptr<Modular_Exponentiator> m_core;
101 Usage_Hints hints = NO_HINTS);
117 Usage_Hints hints = NO_HINTS);
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)
BigInt operator()(const BigInt &b) const
BigInt operator()(const BigInt &e) const
void set_exponent(const BigInt &exponent) const
void set_base(const BigInt &base) const
#define BOTAN_FUTURE_INTERNAL_HEADER(hdr)