-
Notifications
You must be signed in to change notification settings - Fork 3
build error #5
Description
When I changed main.cpp code in secure-join/frontend and recompile it
the code is :
#include "secure-join/Prf/AltModPrfProto.h"
#include "secure-join/Prf/AltModSimd.h"
#include "secure-join/Prf/mod3.h"
#include "cryptoTools/Crypto/PRNG.h"
#include "cryptoTools/Common/Matrix.h"
#include "cryptoTools/Common/TestCollection.h"
#include "coproto/Socket/AsioSocket.h"
#include "cryptoTools/Network/Channel.h"
#include "cryptoTools/Common/Timer.h"
#include "secure-join/Util/Util.h"
#include "secure-join/Prf/F3LinearCode.h"
#include "secure-join/Prf/ConvertToF3.h"
#include "secure-join/AggTree/PerfectShuffle.h"
using namespace secJoin;
void SOPRF_test(u32 idx, u32 numElements){
// std::vector<block> set(numElements);
Timer timer;
timer.setTimePoint("start");
Socket chl;
chl = coproto::asioConnect("localhost:" + std::to_string(PORT + 101), idx);
std::vector<oc::block> x(numElements);
std::vector<oc::block> y0(numElements), y1(numElements);
// sender with sk
if(idx == 0){
AltModWPrfSender sender;
sender.mDebug = debug;
PRNG prng0(oc::ZeroBlock);
CorGenerator ole0;
// ole0.init(sock[0].fork(), prng0, 0, 1, 1 << 18, cmd.getOr("mock", 1));
ole0.init(chl, prng0, 0, 1, 1 << 18, cmd.getOr("mock", 1));
coproto::sync_wait(ole0.start());
AltModPrf dm(prng0.get());
std::vector<oc::block> rk(AltModPrf::KeySize);
for (u64 i = 0; i < AltModPrf::KeySize; ++i)
{
rk[i] = oc::block(i, *oc::BitIterator((u8*)&dm.mExpandedKey, i));
}
sender.init(n, ole0, AltModPrfKeyMode::SenderOnly, AltModPrfInputMode::ReceiverOnly, dm.getKey(), rk);
coproto::sync_wait(sender.evaluate({}, y0, chl, prng0));
}
// receiver with set x
else if(idx == 1){
AltModWPrfReceiver recver;
recver.mDebug = debug;
PRNG prng1(oc::OneBlock);
prng1.get(x.data(), x.size());
CorGenerator ole1;
ole1.init(chl, prng1, 1, 1, 1 << 18, cmd.getOr("mock", 1));
coproto::sync_wait(ole1.start());
std::vector<std::array<oc::block, 2>> sk(AltModPrf::KeySize);
for (u64 i = 0; i < AltModPrf::KeySize; ++i)
{
sk[i][0] = oc::block(i, 0);
sk[i][1] = oc::block(i, 1);
}
recver.init(n, ole1, AltModPrfKeyMode::SenderOnly, AltModPrfInputMode::ReceiverOnly, {}, sk);
coproto::sync_wait(recver.evaluate(x, y1, sock[1], prng1));
}
coproto::sync_wait(chl.close());
// check out the output
}
int main(int agrc, char** argv){
CLP cmd;
cmd.parse(agrc, argv);
u32 n = cmd.getOr("n", 1ull << nn);
bool help = cmd.isSet("h");
if (help){
std::cout << " -n: number of elements in each set, default 1024" << std::endl;
return 0;
}
if ((idx > 1 || idx < 0)){
std::cout << "wrong idx of party, please use -h to print help information" << std::endl;
return 0;
}
SOPRF_test(idx,n);
return 0;
}
then it failed , Is there something wrong with my code? How can I fix it?