mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-10 05:57:57 -05:00
Fake preprocessing for any threshold with Shamir secret sharing.
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "Math/Z2k.hpp"
|
||||
#include "Math/gfp.hpp"
|
||||
#include "GC/Secret.hpp"
|
||||
#include "Machines/ShamirMachine.hpp"
|
||||
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
@@ -615,6 +616,16 @@ int main(int argc, const char** argv)
|
||||
"-s", // Flag token.
|
||||
"--special" // Flag token.
|
||||
);
|
||||
opt.add(
|
||||
"", // Default.
|
||||
0, // Required?
|
||||
1, // Number of args expected.
|
||||
0, // Delimiter if expecting multiple args.
|
||||
"Number of corrupted parties for Shamir secret sharing "
|
||||
"(default: just below half)", // Help description.
|
||||
"-T", // Flag token.
|
||||
"--threshold" // Flag token.
|
||||
);
|
||||
opt.parse(argc, argv);
|
||||
|
||||
int lgp;
|
||||
@@ -680,6 +691,12 @@ int FakeParams::generate()
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (nplayers > 2)
|
||||
{
|
||||
ShamirOptions::singleton.nparties = nplayers;
|
||||
ShamirOptions::singleton.set_threshold(opt);
|
||||
}
|
||||
|
||||
int ntrip2=0, ntripp=0, nbits2=0,nbitsp=0,nsqr2=0,nsqrp=0,ninp2=0,ninpp=0,ninv=0, nbittrip=0, nbitgf2ntrip=0;
|
||||
vector<int> list_options;
|
||||
int lg2, lgp;
|
||||
|
||||
Reference in New Issue
Block a user