8#ifndef BOTAN_POWER_MOD_H_
9#define BOTAN_POWER_MOD_H_
11#include <botan/bigint.h>
17class 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;
95 { set_base(b);
return execute(); }
111 { set_exponent(e);
return execute(); }
Fixed_Base_Power_Mod()=default
BigInt operator()(const BigInt &e) const
BigInt operator()(const BigInt &b) const
Fixed_Exponent_Power_Mod()=default
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)
#define BOTAN_FUTURE_INTERNAL_HEADER(hdr)