-rw-r--r-- 354 cryptattacktester-20230614/bruteforce_prob.cpp raw
#include "bruteforce_prob.h" using namespace std; bigfloat bruteforce_prob(const vector<bigint> ¶ms,const vector<bigint> &attackparams) { bigint n = params.at(0); bigint k = params.at(1); bigint w = params.at(2); bigint iters = attackparams.at(0); bigint possibilities = binomial(n,w); return bigfloat(iters)/bigfloat(possibilities); }