-rw-r--r-- 487 cryptattacktester-20230614/bruteforce2_params.cpp raw
#include "selection.h"
#include "bruteforce2_params.h"
using namespace std;
void bruteforce2_params(const vector<bigint> ¶ms,map<string,string> &S,int (*callback)(const vector<bigint> &))
{
bigint n = params.at(0);
bigint k = params.at(1);
bigint w = params.at(2);
bigint iters = 0;
for (bigint v = 0;v <= w;++v) {
iters += binomial(k,v);
if (!selection_allows(S,"I",iters.get_str())) continue;
vector<bigint> Q{iters};
if (callback(Q) < 0) return;
}
}