Finished project

This commit is contained in:
2025-02-10 13:25:07 +00:00
parent 39e4e9ce0c
commit d4eef99b2e
2 changed files with 619 additions and 0 deletions

46
versions/001/old.cpp Normal file
View File

@@ -0,0 +1,46 @@
# include<iostream>
# include<string>
# include<random>
# include<cmath>
using namespace std;
int genRandInt(int range_start, int range_end) {
random_device dev;
mt19937 rng(dev());
uniform_int_distribution<mt19937::result_type> dist6(range_start, range_end);
return dist6(rng);
}
int genPolyPoints(int poly_func) {
}
int genPoly(int degree) {
int poly[degree+1];
for (int i = 0; i < degree+1; i++) {
int random_num = genRandInt(1, 99999999999999999);
poly[i] = random_num;
}
return poly;
}
void genSecret(string secret, int shares, int required=shares) {
int poly_degree = required - 1;
int poly_func = genPoly(poly_degree);
int points = genPolyPoints(poly_func)
}
void getShares(int num_shares) {
string shares[num_shares];
cout << "Enter share secret:\n"
cin >> share;
cout << "\n"
}
void encodeSecret(string secret) {
}
int main() {
return 0;
}