8#ifndef BOTAN_DL_PARAM_H_
9#define BOTAN_DL_PARAM_H_
11#include <botan/bigint.h>
16class Montgomery_Params;
74 static DL_Group DL_Group_from_PEM(std::string_view pem);
90 size_t pbits,
size_t qbits = 0);
100 const std::vector<uint8_t>& seed,
101 size_t pbits = 1024,
size_t qbits = 0);
126 template<
typename Alloc>
128 DL_Group(ber.data(), ber.size(), format) {}
134 const BigInt& get_p()
const;
140 const BigInt& get_q()
const;
146 const BigInt& get_g()
const;
162 bool verify_public_element(
const BigInt&
y)
const;
170 bool verify_private_element(
const BigInt& x)
const;
177 bool verify_element_pair(
const BigInt&
y,
const BigInt& x)
const;
262 BigInt power_g_p(
const BigInt& x,
size_t max_x_bits)
const;
292 std::shared_ptr<const Montgomery_Params> monty_params_p()
const;
298 size_t p_bits()
const;
304 size_t p_bytes()
const;
311 size_t q_bits()
const;
318 size_t q_bytes()
const;
335 size_t exponent_bits()
const;
343 size_t estimated_strength()
const;
352 void BER_decode(
const std::vector<uint8_t>& ber,
DL_Group_Format format);
359 static std::shared_ptr<DL_Group_Data> DL_group_info(std::string_view
name);
362 static std::shared_ptr<DL_Group_Data> load_DL_group_info(
const char* p_str,
366 static std::shared_ptr<DL_Group_Data> load_DL_group_info(
const char* p_str,
369 static std::shared_ptr<DL_Group_Data>
370 BER_decode_DL_group(
const uint8_t data[],
size_t data_len,
374 const DL_Group_Data& data()
const;
375 std::shared_ptr<DL_Group_Data> m_data;
DL_Group(const std::vector< uint8_t, Alloc > &ber, DL_Group_Format format)
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)
@ ANSI_X9_42_DH_PARAMETERS
EC_Point multi_exponentiate(const EC_Point &p1, const BigInt &z1, const EC_Point &p2, const BigInt &z2)