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;
162 bool verify_group(RandomNumberGenerator& rng,
bool strong =
true)
const;
170 bool verify_public_element(
const BigInt& y)
const;
178 bool verify_private_element(
const BigInt& x)
const;
185 BOTAN_DEPRECATED(
"Deprecated no replacement") bool verify_element_pair(const BigInt& y, const BigInt& x) const;
192 std::
string PEM_encode(DL_Group_Format format) const;
199 std::vector<uint8_t> DER_encode(DL_Group_Format format) const;
205 BigInt mod_p(const BigInt& x) const;
211 BigInt multiply_mod_p(const BigInt& x, const BigInt& y) const;
216 BigInt inverse_mod_p(const BigInt& x) const;
223 BigInt mod_q(const BigInt& x) const;
230 BigInt multiply_mod_q(const BigInt& x, const BigInt& y) const;
237 BigInt multiply_mod_q(const BigInt& x, const BigInt& y, const BigInt& z) const;
244 BigInt square_mod_q(const BigInt& x) const;
250 BigInt inverse_mod_q(const BigInt& x) const;
272 BigInt power_g_p(
const BigInt& x,
size_t max_x_bits)
const;
305 size_t p_bits()
const;
311 size_t p_bytes()
const;
318 size_t q_bits()
const;
325 size_t q_bytes()
const;
342 size_t exponent_bits()
const;
350 size_t estimated_strength()
const;
370 static std::shared_ptr<DL_Group_Data> DL_group_info(std::string_view name);
385 explicit DL_Group(std::shared_ptr<DL_Group_Data> data) : m_data(std::move(data)) {}
387 static std::shared_ptr<DL_Group_Data> load_DL_group_info(
const char* p_str,
const char* q_str,
const char* g_str);
389 static std::shared_ptr<DL_Group_Data> load_DL_group_info(
const char* p_str,
const char* g_str);
391 static std::shared_ptr<DL_Group_Data> DER_decode_DL_group(std::span<const uint8_t> data,
392 DL_Group_Format format,
393 DL_Group_Source source);
395 const DL_Group_Data& data()
const;
396 std::shared_ptr<DL_Group_Data> m_data;