DSA_Verification_Operation::DSA_Verification_Operation(const DSA_PublicKey& dsa) : q(dsa.group_q()), y(dsa.get_y()) { powermod_g_p = Fixed_Base_Power_Mod(dsa.group_g(), dsa.group_p()); powermod_y_p = Fixed_Base_Power_Mod(y, dsa.group_p()); mod_p = Modular_Reducer(dsa.group_p()); mod_q = Modular_Reducer(dsa.group_q()); }
/* * Default_ELG_Op Constructor */ Default_ELG_Op::Default_ELG_Op(const DL_Group& group, const BigInt& y, const BigInt& x) : p(group.get_p()) { powermod_g_p = Fixed_Base_Power_Mod(group.get_g(), p); powermod_y_p = Fixed_Base_Power_Mod(y, p); mod_p = Modular_Reducer(p); if(x != 0) powermod_x_p = Fixed_Exponent_Power_Mod(x, p); }
Blinder::Blinder(const BigInt& modulus, std::function<BigInt (const BigInt&)> fwd_func, std::function<BigInt (const BigInt&)> inv_func) { m_reducer = Modular_Reducer(modulus); #if defined(BOTAN_HAS_SYSTEM_RNG) auto& rng = system_rng(); #else AutoSeeded_RNG rng; #endif const BigInt k(rng, modulus.bits() - 1); m_e = fwd_func(k); m_d = inv_func(k); }
/* * Fixed_Window_Exponentiator Constructor */ Fixed_Window_Exponentiator::Fixed_Window_Exponentiator(const BigInt& n, Power_Mod::Usage_Hints hints) : m_reducer{Modular_Reducer(n)}, m_exp{}, m_window_bits{}, m_g{}, m_hints{hints} {}