8#include <botan/internal/workfactor.h>
20size_t nfs_workfactor(
size_t bits,
double log2_k) {
22 const double log_p = bits / std::numbers::log2e;
24 const double log_log_p = std::log(log_p);
27 const double est = 1.92 * std::pow(log_p * log_log_p * log_log_p, 1.0 / 3.0);
30 return static_cast<size_t>(log2_k + std::numbers::log2e * est);
42 const double log2_k = -5.6438;
43 return nfs_workfactor(bits, log2_k);
size_t ecp_work_factor(size_t bits)
size_t dl_work_factor(size_t bits)
size_t dl_exponent_size(size_t bits)
size_t if_work_factor(size_t bits)