136 DL_Group(std::span<const uint8_t> der, DL_Group_Format format);
142 const BigInt& get_p()
const;
148 const BigInt& get_q()
const;
154 const BigInt& get_g()
const;
167 bool verify_group(RandomNumberGenerator& rng,
bool strong =
true)
const;
175 bool verify_public_element(
const BigInt& y)
const;
183 bool verify_private_element(
const BigInt& x)
const;
190 BOTAN_DEPRECATED(
"Deprecated no replacement") bool verify_element_pair(const BigInt& y, const BigInt& x) const;
197 std::
string PEM_encode(DL_Group_Format format) const;
204 std::vector<uint8_t> DER_encode(DL_Group_Format format) const;
210 BigInt mod_p(const BigInt& x) const;
216 BigInt multiply_mod_p(const BigInt& x, const BigInt& y) const;
221 BigInt inverse_mod_p(const BigInt& x) const;
228 BigInt mod_q(const BigInt& x) const;
235 BigInt multiply_mod_q(const BigInt& x, const BigInt& y) const;
242 BigInt multiply_mod_q(const BigInt& x, const BigInt& y, const BigInt& z) const;
249 BigInt square_mod_q(const BigInt& x) const;
255 BigInt inverse_mod_q(const BigInt& x) const;
277 BigInt power_g_p(
const BigInt& x,
size_t max_x_bits)
const;
310 size_t p_bits()
const;
316 size_t p_bytes()
const;
323 size_t q_bits()
const;
330 size_t q_bytes()
const;
347 size_t exponent_bits()
const;
355 size_t estimated_strength()
const;
375 static std::shared_ptr<DL_Group_Data> DL_group_info(std::string_view
name);
390 explicit DL_Group(std::shared_ptr<DL_Group_Data> data) : m_data(std::move(data)) {}
392 static std::shared_ptr<DL_Group_Data> load_DL_group_info(
const char* p_str,
const char* q_str,
const char* g_str);
394 static std::shared_ptr<DL_Group_Data> load_DL_group_info(
const char* p_str,
const char* g_str);
396 static std::shared_ptr<DL_Group_Data> DER_decode_DL_group(std::span<const uint8_t> data,
397 DL_Group_Format format,
398 DL_Group_Source source);
400 const DL_Group_Data& data()
const;
401 std::shared_ptr<DL_Group_Data> m_data;