diff --git a/README.md b/README.md index 5845cebfd9..a619e93837 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ For programmable OPRF, this code implements: * Polynomial-based OPPRF * BloomFilter-based OPPRF -For PSI, we implement 2-party PSI (2PSI) and multi-party PSI (nPSI) in augmented-semihonest model and standard semihonest model. +For PSI, we implement multi-party PSI (nPSI) in augmented-semihonest model and standard semihonest model. ## Installations @@ -37,27 +37,17 @@ The database is generated randomly. The outputs include the average online/offli #### Flags: -u unit test which computes PSI of 5 paries, 2 dishonestly colluding, each with set size 2^12 in semihonest setting -n number of parties - -p party ID + -p party ID -m set size -t number of corrupted parties (in semihonest setting) -a run in augmented semihonest model. Table-based OPPRF is by default. 0: Table-based; 1: POLY-seperated; 2-POLY-combined; 3-BloomFilter - -r optimized 3PSI when r = 1 + -r optimized 3PSI when r = 1 #### Examples: ##### 1. Unit test: ./bin/frontend.exe -u -##### 2. two-party PSI: -Compute PSI of 2 parties, each holds 2^2 items - - ./bin/frontend.exe -n 2 -m 12 -p 0 & ./bin/frontend.exe -n 2 -m 12 -p 1 - -##### 3. three-party PSI: -Compute optimized PSI of 3 parties, each holds 2^2 items - - ./bin/frontend.exe -n 3 -r 1 -m 12 -p 0 & ./bin/frontend.exe -n 3 -r 1 -m 12 -p 1 & ./bin/frontend.exe -n 3 -r 1 -m 12 -p 2 - -##### 4. nPSI: +##### 2. nPSI: Compute PSI of 5 parties, 2 dishonestly colluding, each with set size 2^12 in semihonest setting ./bin/frontend.exe -n 5 -t 2 -m 12 -p 0 diff --git a/cryptoTools/cryptoTools.vcxproj b/cryptoTools/cryptoTools.vcxproj index d2b51af38b..c0fe1260df 100644 --- a/cryptoTools/cryptoTools.vcxproj +++ b/cryptoTools/cryptoTools.vcxproj @@ -47,7 +47,7 @@ Level3 Disabled true - D:\libs\miracl;D:\libs\boost;D:\libs;$(ProjectDir);$(SolutionDir)/thirdparty/win;C:\libs;$(SolutionDir)/thirdparty/win/boost;C:\libs\boost;$(SolutionDir)/thirdparty/win/miracl;C:\libs\miracl;%(AdditionalIncludeDirectories) + $(ProjectDir);$(SolutionDir)/thirdparty/win;$(SolutionDir)/thirdparty/win/boost;$(SolutionDir)/thirdparty/win/miracl;%(AdditionalIncludeDirectories) _WIN32_WINNT=0x0501;_MBCS;%(PreprocessorDefinitions) MultiThreadedDebug diff --git a/frontend/PsiMain.cpp b/frontend/PsiMain.cpp index dd507f75ff..f4d829a68a 100644 --- a/frontend/PsiMain.cpp +++ b/frontend/PsiMain.cpp @@ -2106,36 +2106,37 @@ void tparty(u64 myIdx, u64 nParties, u64 tParties, u64 setSize, u64 nTrials) ios.stop(); } -void zero_sharing(std::vector>& mPRNGSeeds) { - PRNG prng(_mm_set_epi32(4253465, 3434565, 234435, 23987045)); - //TODO(remove this hack: unconditional zero - sharing); - //only one time => very mirror effect on perfomance - std::vector> mSeeds(nParties); - mPRNGSeeds.resize(nParties); - //std::vector> mPRNGSeeds(nParties); - for (u64 i = 0; i < nParties; ++i) - { - mSeeds[i].resize(nParties); - for (u64 j = 0; j < nParties; ++j) - { - if (i <= j) - mSeeds[i][j] = prng.get(); - else - mSeeds[i][j] = mSeeds[j][i]; - } - } - for (u64 i = 0; i < nParties; ++i) - { - mPRNGSeeds[i].resize(nParties); - for (u64 j = 0; j < nParties; ++j) - { - mPRNGSeeds[i][j].SetSeed(mSeeds[i][j]); - } - } -} - - -void aug_party(u64 myIdx, u64 nParties, u64 setSize, std::vector& mSeedPrng, u64 opt, u64 nTrials) +//std::vector zero_sharing(u64 id) { +// PRNG prng(_mm_set_epi32(4253465, 3434565, 234435, 23987045)); +// //TODO(remove this hack: unconditional zero - sharing); +// //only one time => very mirror effect on perfomance +// std::vector> mSeeds(nParties); +// //mPRNGSeeds.resize(nParties); +// std::vector> mPRNGSeeds(nParties); +// for (u64 i = 0; i < nParties; ++i) +// { +// mSeeds[i].resize(nParties); +// for (u64 j = 0; j < nParties; ++j) +// { +// if (i <= j) +// mSeeds[i][j] = prng.get(); +// else +// mSeeds[i][j] = mSeeds[j][i]; +// } +// } +// for (u64 i = 0; i < nParties; ++i) +// { +// mPRNGSeeds[i].resize(nParties); +// for (u64 j = 0; j < nParties; ++j) +// { +// mPRNGSeeds[i][j].SetSeed(mSeeds[i][j]); +// } +// } +// return mPRNGSeeds[id]; +//} + + +void aug_party(u64 myIdx, u64 nParties, u64 setSize, u64 opt, u64 nTrials) { //opt = 1; @@ -2250,6 +2251,35 @@ void aug_party(u64 myIdx, u64 nParties, u64 setSize, std::vector& mSeedPr //########################## auto start = timer.setTimePoint("start"); + + + + + + PRNG prng_zs(_mm_set_epi32(4253465, 3434565, 234435, 23987045)); + //TODO(remove this hack: unconditional zero - sharing); + //only one time => very mirror effect on perfomance + std::vector> mSeeds(nParties); + + for (u64 i = 0; i < nParties; ++i) + { + mSeeds[i].resize(nParties); + for (u64 j = 0; j < nParties; ++j) + { + if (i <= j) + mSeeds[i][j] = prng_zs.get(); + else + mSeeds[i][j] = mSeeds[j][i]; + } + } + + std::vector mSeedPrng(nParties); + for (u64 j = 0; j < nParties; ++j) + { + mSeedPrng[j].SetSeed(mSeeds[myIdx][j]); + } + + if (myIdx == leaderIdx) //leader for (u32 i = 0; i < recvPayLoads.size(); i++) { @@ -2538,10 +2568,10 @@ void aug_party(u64 myIdx, u64 nParties, u64 setSize, std::vector& mSeedPr << "onlineTime: " << onlineTime << " ms\n" //<< "Bandwidth: Send: " << Mbps << " Mbps,\t Recv: " << MbpsRecv << " Mbps\n" << "Total time: " << time << " s\n"; - if (myIdx == clientdx) - std::cout << "Total Comm: Send:" << (dataSent / std::pow(2.0, 20)) << " MB" + //if (myIdx == clientdx) + // std::cout << "Total Comm: Send:" << (dataSent / std::pow(2.0, 20)) << " MB" //<< "\t Recv: " << (dataRecv / std::pow(2.0, 20)) << " MB\n" - << "------------------\n"; + // << "------------------\n"; offlineAvgTime += offlineTime; hashingAvgTime += hashingTime; @@ -2657,7 +2687,7 @@ void aug_party(u64 myIdx, u64 nParties, u64 setSize, std::vector& mSeedPr void OPPRFnt_EmptrySet_Test_Main() { - u64 setSize = 1 << 5, psiSecParam = 40, bitSize = 128; + u64 setSize = 1 << 8, psiSecParam = 40, bitSize = 128; u64 nParties = 5; u64 tParties = 1; @@ -2681,7 +2711,7 @@ void OPPRFnt_EmptrySet_Test_Main() void OPPRFn_EmptrySet_Test_Main() { - u64 setSize = 1 << 5, psiSecParam = 40, bitSize = 128; + u64 setSize = 1 << 8, psiSecParam = 40, bitSize = 128; u64 nParties = 4; PRNG prng(_mm_set_epi32(4253465, 3434565, 234435, 23987045)); mSet.resize(setSize); @@ -2705,7 +2735,7 @@ void OPPRFn_EmptrySet_Test_Main() void OPPRF3_EmptrySet_Test_Main() { - u64 setSize = 1 << 5, psiSecParam = 40, bitSize = 128; + u64 setSize = 1 << 8, psiSecParam = 40, bitSize = 128; nParties = 3; std::vector pThrds(nParties); for (u64 pIdx = 0; pIdx < pThrds.size(); ++pIdx) @@ -2876,11 +2906,11 @@ void party2(u64 myIdx, u64 setSize, u64 nTrials) if (myIdx == 1) { //I am a sender to my next neigbour - send.getOPRFkeysCombined(0, bins, chls[0], false); + send.sendPlain(0, bins, chls[0]); } else if (myIdx == 0) { //I am a recv to my previous neigbour - recv.getOPRFkeysCombined(1, bins, chls[1], false); + recv.recvPlain(1, bins, chls[1]); } auto getOPRFDone = timer.setTimePoint("getOPRFDone"); #ifdef PRINT @@ -2898,18 +2928,18 @@ void party2(u64 myIdx, u64 setSize, u64 nTrials) #endif - //########################## - //### online phasing - secretsharing - //########################## + ////########################## + ////### online phasing - secretsharing + ////########################## - if (myIdx == 0) - { - recv.recvPlain(1, bins, chls[1]); - } - else if (myIdx == 1) - { - send.sendPlain(0, bins, chls[0]); - } + //if (myIdx == 0) + //{ + // recv.recvPlain(1, bins, chls[1]); + //} + //else if (myIdx == 1) + //{ + // send.sendPlain(0, bins, chls[0]); + //} if (myIdx == 0) { @@ -2970,7 +3000,7 @@ void party2(u64 myIdx, u64 setSize, u64 nTrials) void OPPRF2_EmptrySet_Test_Main() { - u64 setSize = 1 << 5, psiSecParam = 40, bitSize = 128; + u64 setSize = 1 << 8, psiSecParam = 40, bitSize = 128; PRNG prng(_mm_set_epi32(4253465, 3434565, 234435, 23987045)); mSet.resize(setSize); for (u64 i = 0; i < setSize; ++i) @@ -2993,7 +3023,7 @@ void OPPRF2_EmptrySet_Test_Main() void OPPRFn_Aug_EmptrySet_Test_Impl() { - u64 setSize = 1 << 5, psiSecParam = 40, bitSize = 128; + u64 setSize = 1 << 8, psiSecParam = 40, bitSize = 128; PRNG prng(_mm_set_epi32(4253465, 3434565, 234435, 23987045)); mSet.resize(setSize); for (u64 i = 0; i < setSize; ++i) @@ -3001,7 +3031,7 @@ void OPPRFn_Aug_EmptrySet_Test_Impl() mSet[i] = prng.get(); } - nParties = 4; + nParties = 5; /*std::vector> mSeeds(nParties); std::vector> mPRNGSeeds(nParties); @@ -3025,8 +3055,32 @@ void OPPRFn_Aug_EmptrySet_Test_Impl() } }*/ +// PRNG prng(_mm_set_epi32(4253465, 3434565, 234435, 23987045)); + //TODO(remove this hack: unconditional zero - sharing); + //only one time => very mirror effect on perfomance + std::vector> mSeeds(nParties); std::vector> mPRNGSeeds(nParties); - zero_sharing(mPRNGSeeds); + mPRNGSeeds.resize(nParties); + + for (u64 i = 0; i < nParties; ++i) + { + mSeeds[i].resize(nParties); + for (u64 j = 0; j < nParties; ++j) + { + if (i <= j) + mSeeds[i][j] = prng.get(); + else + mSeeds[i][j] = mSeeds[j][i]; + } + } + for (u64 i = 0; i < nParties; ++i) + { + mPRNGSeeds[i].resize(nParties); + for (u64 j = 0; j < nParties; ++j) + { + mPRNGSeeds[i][j].SetSeed(mSeeds[i][j]); + } + } //for (u64 i = 0; i < 1; ++i) @@ -3060,7 +3114,7 @@ void OPPRFn_Aug_EmptrySet_Test_Impl() { pThrds[pIdx] = std::thread([&, pIdx]() { // Channel_party_test(pIdx); - aug_party(pIdx, nParties, mSet.size(), mPRNGSeeds[pIdx], opt, 1); + aug_party(pIdx, nParties, mSet.size(), opt, 1); }); } for (u64 pIdx = 0; pIdx < pThrds.size(); ++pIdx) diff --git a/frontend/PsiMain.h b/frontend/PsiMain.h index 340b19eec9..28e3d7f2b1 100644 --- a/frontend/PsiMain.h +++ b/frontend/PsiMain.h @@ -18,10 +18,11 @@ void party3(u64 myIdx, u64 setSize, u64 nTrials); void party2(u64 myIdx, u64 setSize, u64 nTrials); void party(u64 myIdx, u64 nParties, u64 setSize, std::vector& mSet); void tparty(u64 myIdx, u64 nParties, u64 tParties, u64 setSize, u64 nTrials); -void aug_party(u64 myIdx, u64 nParties, u64 setSize, std::vector& mSeedPrng,u64 opt, u64 nTrials); +void aug_party(u64 myIdx, u64 nParties, u64 setSize, u64 opt, u64 nTrials); void OPPRFn_Aug_EmptrySet_Test_Impl(); void OPPRFnt_EmptrySet_Test_Impl(); void getBinSizeDistribution(u64 setSize, std::vector set, u64 psiSecParam); //void OPPRFn_EmptrySet_Test(); void Transpose_Test(); -void zero_sharing(std::vector>& mPRNGSeeds); \ No newline at end of file +//void zero_sharing(std::vector>& mPRNGSeeds); +//std::vector zero_sharing(u64 id); \ No newline at end of file diff --git a/frontend/frontend.vcxproj b/frontend/frontend.vcxproj index 0ed1c97bf4..c113ca45e3 100644 --- a/frontend/frontend.vcxproj +++ b/frontend/frontend.vcxproj @@ -51,7 +51,7 @@ Level3 Disabled true - $(ProjectDir);$(SolutionDir)/cryptoTools;$(solutionDir)thirdparty\win\boost\;$(SolutionDir)/libOPRF;$(SolutionDir)thirdparty\win\;$(SolutionDir)thirdparty/win/NTL/include;$(SolutionDir)thirdparty/win/miracl;D:\libs\boost;C:/libs/boost;C:/libs/;C:/libs/NTL/include;C:/libs/miracl;C:\Program Files %28x86%29\Visual Leak Detector\include;D:\libs\miracl;$(SolutionDir)/libOTe + $(ProjectDir);$(SolutionDir)/cryptoTools;$(solutionDir)thirdparty\win\boost\;$(SolutionDir)/libOPRF;$(SolutionDir)thirdparty\win\;$(SolutionDir)thirdparty/win/NTL/include;$(SolutionDir)thirdparty/win/miracl;C:/libs/NTL/include;$(SolutionDir)/libOTe MultiThreadedDebug SOLUTION_DIR=R"**($(SolutionDir))**";_WIN32_WINNT=0x0501;_MBCS;%(PreprocessorDefinitions) true diff --git a/frontend/main.cpp b/frontend/main.cpp index 21499da237..ca8f3a2894 100644 --- a/frontend/main.cpp +++ b/frontend/main.cpp @@ -38,8 +38,6 @@ int main(int argc, char** argv) //return 0; u64 trials = 1; - std::vector mSet; - u64 pSetSize = 5, psiSecParam = 40, bitSize = 128; u64 nParties, tParties, opt_basedOPPRF, setSize, isAug; @@ -134,11 +132,8 @@ int main(int argc, char** argv) tparty(pIdx, nParties, tParties, setSize, trials); } else if (argv[3][1] == 'a') - { - std::vector> mPRNGSeeds(nParties); - zero_sharing(mPRNGSeeds); - //cout << nParties << " " << opt_basedOPPRF << " " << setSize << " " << pIdx << "\n"; - aug_party(pIdx, nParties, mSet.size(), mPRNGSeeds[pIdx], opt_basedOPPRF, trials); + { + aug_party(pIdx, nParties, setSize,opt_basedOPPRF, trials); } } else diff --git a/libOPRF/Hashing/CuckooHash.cpp b/libOPRF/Hashing/CuckooHash.cpp index 180cf0ee30..c403e14486 100644 --- a/libOPRF/Hashing/CuckooHash.cpp +++ b/libOPRF/Hashing/CuckooHash.cpp @@ -20,13 +20,13 @@ namespace osuCrypto //u64 mSenderBinStashSize; CuckooParams k2n24s40CuckooParams - { { 1.11,0.17 },{ 3,2 },{ 31,63 } }; + { { 1.12,0.17 },{ 3,2 },{ 31,63 } }; CuckooParams k2n20s40CuckooParams - { { 1.12,0.17 },{ 3,2 },{ 30,63 } }; + { { 1.13,0.17 },{ 3,2 },{ 30,63 } }; CuckooParams k2n16s40CuckooParams - { { 1.13,0.16 },{ 3,2 },{ 29,63 }}; + { { 1.14,0.16 },{ 3,2 },{ 29,63 }}; CuckooParams k2n14s40CuckooParams - { { 1.14,0.16 },{ 3,2 },{ 28,63 } }; + { { 1.15,0.16 },{ 3,2 },{ 28,63 } }; CuckooParams k2n12s40CuckooParams { { 1.17,0.15 },{ 3,2 },{ 27,63 } }; CuckooParams k2n08s40CuckooParams diff --git a/libOPRF/Hashing/SimpleHash.cpp b/libOPRF/Hashing/SimpleHash.cpp index 0d1db4d6fd..3a4c2480c9 100644 --- a/libOPRF/Hashing/SimpleHash.cpp +++ b/libOPRF/Hashing/SimpleHash.cpp @@ -10,13 +10,13 @@ namespace osuCrypto { SimpleParams k2n24s40SimpleParams - { { 1.11,0.17 },{ 3,2 },{ 31,63 },{5,6} }; + { { 1.12,0.17 },{ 3,2 },{ 31,63 },{5,6} }; SimpleParams k2n20s40SimpleParams - { { 1.12,0.17 },{ 3,2 },{ 30,63 } ,{ 5,6 } }; + { { 1.13,0.17 },{ 3,2 },{ 30,63 } ,{ 5,6 } }; SimpleParams k2n16s40SimpleParams - { { 1.13,0.16 },{ 3,2 },{ 29,63 },{ 5,6 } }; + { { 1.14,0.16 },{ 3,2 },{ 29,63 },{ 5,6 } }; SimpleParams k2n14s40SimpleParams - { { 1.14,0.16 },{ 3,2 },{ 28,63 },{ 5,6 } }; + { { 1.15,0.16 },{ 3,2 },{ 28,63 },{ 5,6 } }; SimpleParams k2n12s40SimpleParams { { 1.17,0.15 },{ 3,2 },{ 27,63 },{ 5,6 } }; SimpleParams k2n08s40SimpleParams diff --git a/libOPRF/OPPRF/OPPRFReceiver.h b/libOPRF/OPPRF/OPPRFReceiver.h index 3bf2f2420b..7e31c2c924 100644 --- a/libOPRF/OPPRF/OPPRFReceiver.h +++ b/libOPRF/OPPRF/OPPRFReceiver.h @@ -74,7 +74,6 @@ namespace osuCrypto void recvPlain(u64 IdxTheirParty, binSet& bins, const std::vector& chls); - }; diff --git a/libOPRF/OPPRF/OPPRFSender.h b/libOPRF/OPPRF/OPPRFSender.h index 5741ed2981..b3cc94afd7 100644 --- a/libOPRF/OPPRF/OPPRFSender.h +++ b/libOPRF/OPPRF/OPPRFSender.h @@ -82,7 +82,7 @@ namespace osuCrypto void recvBFBased(u64 IdxTheirParty, binSet& bins, std::vector& plaintexts, const std::vector& chls); //for 2-party PSI - void sendPlain(u64 IdxTheirParty, binSet& bins, const std::vector& chls); + void sendPlain(u64 IdxTheirParty, binSet& bins, const std::vector& chls); }; diff --git a/libOPRF/OPPRF/PlainOprfReceiver.cpp b/libOPRF/OPPRF/PlainOprfReceiver.cpp index 9b4d3efe70..a30dbd0e4a 100644 --- a/libOPRF/OPPRF/PlainOprfReceiver.cpp +++ b/libOPRF/OPPRF/PlainOprfReceiver.cpp @@ -17,30 +17,112 @@ //#define PRINT namespace osuCrypto { - void OPPRFReceiver::recvPlain(u64 IdxP, binSet& bins, const std::vector& chls) + void OPPRFReceiver::recvPlain(u64 IdxP, binSet& bins, const std::vector& chls) { - +#if 1 // this is the online phase. gTimer.setTimePoint("online.recv.start"); - u32 numHashes = bins.mSimpleBins.mNumHashes[0] + bins.mSimpleBins.mNumHashes[1]; - if (bins.mMaskSize > sizeof(block)) - throw std::runtime_error("masked are stored in blocks, so they can exceed that size"); + std::vector thrds(chls.size()); + // std::vector thrds(1); + + // we use 5 unordered_maps, we put the mask to the corresponding unordered_map + //that indicates of the hash function index 0,1,2,3,4. + std::array>, 5> localMasks; + //store the masks of elements that map to bin by h0 + localMasks[0].reserve(mN); //upper bound of # mask + localMasks[1].reserve(mN); //upper bound of # mask + localMasks[2].reserve(mN); //upper bound of # mask + localMasks[3].reserve(mN); //upper bound of # mask + localMasks[4].reserve(mN); //upper bound of # mask + + // fr each thread, spawn it. + for (u64 tIdx = 0; tIdx < thrds.size(); ++tIdx) + { + auto seed = mPrng.get(); + thrds[tIdx] = std::thread([&, tIdx, seed]() + { + + if (tIdx == 0) gTimer.setTimePoint("online.recv.thrdStart"); + auto& chl = *chls[tIdx]; - std::vector thrds(chls.size()); - // this mutex is used to guard inserting things into the intersection vector. - std::mutex mInsertMtx; + if (tIdx == 0) gTimer.setTimePoint("online.recv.insertDone"); - auto& chl = *chls[0]; + const u64 stepSize = 16; + + std::vector ncoInput(bins.mNcoInputBlkSize); + +#if 1 +#pragma region compute Recv Bark-OPRF + + //#################### + //#######Recv role + //#################### + auto& otRecv = *mOtRecvs[tIdx]; + + auto otCountRecv = bins.mCuckooBins.mBins.size(); + // get the region of the base OTs that this thread should do. + auto binStart = tIdx * otCountRecv / thrds.size(); + auto binEnd = (tIdx + 1) * otCountRecv / thrds.size(); - ByteStream maskBuffer; - chl.recv(maskBuffer); - auto maskBFView = maskBuffer.getMatrixView(bins.mMaskSize); + + for (u64 bIdx = binStart; bIdx < binEnd;) + { + u64 currentStepSize = std::min(stepSize, binEnd - bIdx); + + for (u64 stepIdx = 0; stepIdx < currentStepSize; ++bIdx, ++stepIdx) + { + auto& bin = bins.mCuckooBins.mBins[bIdx]; + + if (!bin.isEmpty()) + { + u64 inputIdx = bin.idx(); + u64 hIdx = bin.hashIdx(); + + for (u64 j = 0; j < ncoInput.size(); ++j) + ncoInput[j] = bins.mNcoInputBuff[j][inputIdx]; + + otRecv.encode( + bIdx, // input + ncoInput, // input + bin.mValOPRF[IdxP]); // output + + localMasks[hIdx].emplace(*(u32*)&bin.mValOPRF[IdxP], std::pair(bin.mValOPRF[IdxP], inputIdx)); + } + else + otRecv.zeroEncode(bIdx); + } + otRecv.sendCorrection(chl, currentStepSize); + } + + if (tIdx == 0) gTimer.setTimePoint("online.recv.otRecv.finalOPRF"); + + + +#pragma endregion +#endif + + otRecv.check(chl); + }); + } + + // join the threads. + for (u64 tIdx = 0; tIdx < thrds.size(); ++tIdx) + thrds[tIdx].join(); + + gTimer.setTimePoint("online.recv.exit"); + + //std::cout << gTimer; +#endif + + auto& chl = *chls[0]; + + //std::cout << "\nr[" << IdxP << "]-maskBFView.size() " << maskBFView.size()[0] << "\n"; // std::cout << "\nr[" << IdxP << "]-mBfBitCount " << mBfSize << "\n"; @@ -49,77 +131,116 @@ namespace osuCrypto //std::cout << "\nr[" << IdxP << "]-maskBFView[1][3]" << maskBFView[1][3] << "\n"; #if 1 - + u32 numHashes = bins.mSimpleBins.mNumHashes[0] + bins.mSimpleBins.mNumHashes[1]; - for (u64 tIdx = 0; tIdx < thrds.size(); ++tIdx) + ByteStream maskBuffer1, maskBuffer2, maskBuffer3, maskBuffer4, maskBuffer5; + chl.recv(maskBuffer1); + chl.recv(maskBuffer2); + chl.recv(maskBuffer3); + chl.recv(maskBuffer4); + chl.recv(maskBuffer5); + std::vector> maskBFView(numHashes); + for (u64 i = 0; i < numHashes; i++) { - auto seed = mPrng.get(); - thrds[tIdx] = std::thread([&, tIdx, seed]() - { - if (tIdx == 0) gTimer.setTimePoint("online.recv.thrdStart"); + if (i == 0) + maskBFView[i] = maskBuffer1.getMatrixView(bins.mMaskSize); + else if (i == 1) + maskBFView[i] = maskBuffer2.getMatrixView(bins.mMaskSize); + else if (i == 2) + maskBFView[i] = maskBuffer3.getMatrixView(bins.mMaskSize); + else if (i == 3) + maskBFView[i] = maskBuffer4.getMatrixView(bins.mMaskSize); + else if (i == 4) + maskBFView[i] = maskBuffer5.getMatrixView(bins.mMaskSize); + + // std::cout << "\nr[" << IdxP << "]-maskBFView.size() " << maskBFView[i].size()[0] << "\n"; - auto& chl = *chls[tIdx]; - const u64 stepSize = 16; - - if (tIdx == 0) gTimer.setTimePoint("online.recv.recvShare"); + } - //2 type of bins: normal bin in inital step + stash bin - for (auto bIdxType = 0; bIdxType < 2; bIdxType++) + for (u64 tIdx = 0; tIdx < thrds.size(); ++tIdx) + { + auto seed = mPrng.get(); + thrds[tIdx] = std::thread([&, tIdx, seed]() { - auto binCountRecv = bins.mCuckooBins.mBinCount[bIdxType]; + if (tIdx == 0) gTimer.setTimePoint("online.recv.thrdStart"); - u64 binStart, binEnd; - if (bIdxType == 0) - { - binStart = tIdx * binCountRecv / thrds.size(); - binEnd = (tIdx + 1) * binCountRecv / thrds.size(); - } - else - { - binStart = tIdx * binCountRecv / thrds.size() + bins.mCuckooBins.mBinCount[0]; - binEnd = (tIdx + 1) * binCountRecv / thrds.size() + bins.mCuckooBins.mBinCount[0]; - } + auto& chl = *chls[tIdx]; + const u64 stepSize = 16; + if (tIdx == 0) gTimer.setTimePoint("online.recv.recvShare"); - for (u64 bIdx = binStart; bIdx < binEnd;) + //2 type of bins: normal bin in inital step + stash bin + for (auto bIdxType = 0; bIdxType < 2; bIdxType++) { - u64 curStepSize = std::min(stepSize, binEnd - bIdx); + auto binCountRecv = bins.mCuckooBins.mBinCount[bIdxType]; - for (u64 stepIdx = 0; stepIdx < curStepSize; ++bIdx, ++stepIdx) + u64 binStart, binEnd; + if (bIdxType == 0) { - auto& bin = bins.mCuckooBins.mBins[bIdx]; - if (!bin.isEmpty()) - { - u64 inputIdx = bin.idx(); - u64 hIdx = bin.hashIdx(); + binStart = tIdx * binCountRecv / thrds.size(); + binEnd = (tIdx + 1) * binCountRecv / thrds.size(); + } + else + { + binStart = tIdx * binCountRecv / thrds.size() + bins.mCuckooBins.mBinCount[0]; + binEnd = (tIdx + 1) * binCountRecv / thrds.size() + bins.mCuckooBins.mBinCount[0]; + } - auto theirBFMask = ZeroBlock; - memcpy(&theirBFMask, maskBFView[hIdx*mN + inputIdx].data(), bins.mMaskSize); - /*if (inputIdx == 0) - { - std::cout << "inputIdx[" << inputIdx << "]-hIdx[" << hIdx << "]-OPRF" << bin.mValOPRF[IdxP]; - std::cout << "\n----" << blkY << std::endl; - }*/ - - if (!memcmp((u8*)&bin.mValOPRF[IdxP], &theirBFMask, bins.mMaskSize)) + for (u64 bIdx = binStart; bIdx < binEnd;) + { + u64 curStepSize = std::min(stepSize, binEnd - bIdx); + + for (u64 stepIdx = 0; stepIdx < curStepSize; ++bIdx, ++stepIdx) + { + auto& bin = bins.mCuckooBins.mBins[bIdx]; + if (!bin.isEmpty()) { - mIntersection.push_back(inputIdx); + u64 inputIdx = bin.idx(); + u64 hIdx = bin.hashIdx(); + + /* auto theirBFMask = ZeroBlock; + memcpy(&theirBFMask, maskBFView[hIdx][inputIdx].data(), bins.mMaskSize); + Log::out << "theirBFMask: " << *(u32*)maskBFView[hIdx][inputIdx].data() << "\n"; + Log::out << "myBFMask: " << *(u32*)&bin.mValOPRF[IdxP] << "\n"; + + Log::out << "theirBFMask: " << theirBFMask << "\n"; + Log::out << "myBFMask: " << bin.mValOPRF[IdxP] << "\n"; + u64 a = *(u32*)&bin.mValOPRF[IdxP]; + Log::out << "myBFMask: " << a << "\n"; + + u32 a1, a2; + memcpy(&a1, maskBFView[hIdx][inputIdx].data(), sizeof(u32)); + memcpy(&a2, &bin.mValOPRF[IdxP], sizeof(u32)); + Log::out << "a1: " << a1 << "\n"; + Log::out << "a2: " << a2 << "\n";*/ + + + + auto& msk = *(u32*)maskBFView[hIdx][inputIdx].data(); + auto match = localMasks[hIdx].find(msk); + if (match != localMasks[hIdx].end()) + { + //auto theirBFMask = ZeroBlock; + if (memcmp(maskBFView[hIdx][inputIdx].data(), &match->second.first, bins.mMaskSize) == 0) // check full mask + { + mIntersection.push_back(match->second.second); + //Log::out << "#id: " << match->second.second << Log::endl; + } + } } - } } } - } - }); - // if (tIdx == 0) gTimer.setTimePoint("online.recv.done"); - } - // join the threads. - for (auto& thrd : thrds) - thrd.join(); - + }); + // if (tIdx == 0) gTimer.setTimePoint("online.recv.done"); + } + // join the threads. + for (auto& thrd : thrds) + thrd.join(); + #endif // 0 diff --git a/libOPRF/OPPRF/PlainOprfSender.cpp b/libOPRF/OPPRF/PlainOprfSender.cpp index 2cc0e49833..0da3074d4b 100644 --- a/libOPRF/OPPRF/PlainOprfSender.cpp +++ b/libOPRF/OPPRF/PlainOprfSender.cpp @@ -11,70 +11,138 @@ //#define PRINT namespace osuCrypto { - - void OPPRFSender::sendPlain(u64 IdxP, binSet& bins, const std::vector& chls) + void OPPRFSender::sendPlain(u64 IdxP, binSet& bins, const std::vector& chls) { - u32 numHashes = bins.mSimpleBins.mNumHashes[0] + bins.mSimpleBins.mNumHashes[1]; - if (bins.mMaskSize > sizeof(block)) - throw std::runtime_error("masked are stored in blocks, so they can exceed that size"); + //std::vector thrds(chls.size()); + std::vector thrds(1); - std::vector thrds(chls.size()); - // std::vector thrds(1); + gTimer.setTimePoint("online.send.spaw"); - uPtr sendMaskBuff(new Buff); - sendMaskBuff->resize(mN* bins.mMaskSize*numHashes); - auto maskBFView = sendMaskBuff->getMatrixView(bins.mMaskSize); + /*std::vector hashIdxBlk(bins.mSimpleBins.mNumHashes[0] + bins.mSimpleBins.mNumHashes[1]); - gTimer.setTimePoint("online.send.spaw"); + for (u64 i = 0; i < hashIdxBlk.size(); ++i) + { + hashIdxBlk[i] = _mm_set1_epi64x(i); + }*/ + u32 numHashes = bins.mSimpleBins.mNumHashes[0] + bins.mSimpleBins.mNumHashes[1]; + //TODO: using vector + uPtr sendMaskBuff1(new Buff), sendMaskBuff2(new Buff), sendMaskBuff3(new Buff), + sendMaskBuff4(new Buff), sendMaskBuff5(new Buff); + sendMaskBuff1->resize(mN* bins.mMaskSize); + sendMaskBuff2->resize(mN* bins.mMaskSize); + sendMaskBuff3->resize(mN* bins.mMaskSize); + sendMaskBuff4->resize(mN* bins.mMaskSize); + sendMaskBuff5->resize(mN* bins.mMaskSize); + std::vector> maskBFView(numHashes); + for (u64 i = 0; i < numHashes; i++) + { + if (i == 0) + maskBFView[i] = sendMaskBuff1->getMatrixView(bins.mMaskSize); + else if (i == 1) + maskBFView[i] = sendMaskBuff2->getMatrixView(bins.mMaskSize); + else if (i == 2) + maskBFView[i] = sendMaskBuff3->getMatrixView(bins.mMaskSize); + else if (i == 3) + maskBFView[i] = sendMaskBuff4->getMatrixView(bins.mMaskSize); + else if (i == 4) + maskBFView[i] = sendMaskBuff5->getMatrixView(bins.mMaskSize); + + } + for (u64 tIdx = 0; tIdx < thrds.size(); ++tIdx) { auto seed = mPrng.get(); thrds[tIdx] = std::thread([&, tIdx, seed]() { - PRNG prng(seed); if (tIdx == 0) gTimer.setTimePoint("online.send.thrdStart"); + auto& chl = *chls[tIdx]; + + if (tIdx == 0) gTimer.setTimePoint("online.send.insert"); const u64 stepSize = 16; -#pragma region sendShare -#if 1 - if (tIdx == 0) gTimer.setTimePoint("online.send.sendShare"); + std::vector ncoInput(bins.mNcoInputBlkSize); - u64 idxStart, idxEnd; +#if 1 +#pragma region compute Send Bark-OPRF + //#################### + //#######Sender role + //#################### + auto& otSend = *mOtSends[tIdx]; + auto otCountSend = bins.mSimpleBins.mBins.size(); - idxStart = tIdx * mN / thrds.size(); - idxEnd = (tIdx + 1) * mN / thrds.size(); + auto binStart = tIdx * otCountSend / thrds.size(); + auto binEnd = (tIdx + 1) * otCountSend / thrds.size(); - if (tIdx == 0) gTimer.setTimePoint("online.send.masks.init.step"); + if (tIdx == 0) gTimer.setTimePoint("online.send.OT"); - for (u64 inputIdx = idxStart; inputIdx < idxEnd;) + for (u64 bIdx = binStart; bIdx < binEnd;) { - u64 currentStepSize = std::min(stepSize, idxEnd - inputIdx); + u64 currentStepSize = std::min(stepSize, binEnd - bIdx); + otSend.recvCorrection(chl, currentStepSize); - for (u64 stepIdx = 0; stepIdx < currentStepSize; ++inputIdx, ++stepIdx) + for (u64 stepIdx = 0; stepIdx < currentStepSize; ++bIdx, ++stepIdx) { - u64 baseMaskIdx = stepIdx; - int MaskIdx = 0; - for (u64 hIdx = 0; hIdx < numHashes; ++hIdx) + auto& bin = bins.mSimpleBins.mBins[bIdx]; + + + if (bin.mIdx.size() > 0) { - bins.mSimpleBins.mOprfs[IdxP][inputIdx][hIdx]; - memcpy(maskBFView[hIdx*mN + inputIdx].data(), (u8*)&bins.mSimpleBins.mOprfs[IdxP][inputIdx][hIdx], bins.mMaskSize); + bin.mValOPRF[IdxP].resize(bin.mIdx.size()); + //std::cout << "s-" << inputIdx << ", "; + for (u64 i = 0; i < bin.mIdx.size(); ++i) + { + u64 inputIdx = bin.mIdx[i]; + + for (u64 j = 0; j < bins.mNcoInputBlkSize; ++j) + { + ncoInput[j] = bins.mNcoInputBuff[j][inputIdx]; + } + + // block sendMask; + + otSend.encode( + bIdx, //each bin has 1 OT + ncoInput, + bins.mSimpleBins.mOprfs[IdxP][inputIdx][bin.hIdx[i]]); + //put oprf by inputIdx + //std::cout << "------" << bins.mSimpleBins.mOprfs[IdxP][inputIdx][bin.hIdx[i]] << "\n"; + memcpy(maskBFView[bin.hIdx[i]][inputIdx].data(), (u8*)&bins.mSimpleBins.mOprfs[IdxP][inputIdx][bin.hIdx[i]], bins.mMaskSize); + + + } } } } - if (tIdx == 0) gTimer.setTimePoint("online.compute x y"); -#endif + + if (tIdx == 0) gTimer.setTimePoint("online.send.otSend.finalOPRF"); + + /*for (size_t i = 0; i < 5; i++) + { + std::cout << "\nr[" << IdxP << "]-maskBFView.size() " << maskBFView[0].size()[0] << "\n"; + + }*/ + + chl.asyncSend(std::move(sendMaskBuff1)); + chl.asyncSend(std::move(sendMaskBuff2)); + chl.asyncSend(std::move(sendMaskBuff3)); + chl.asyncSend(std::move(sendMaskBuff4)); + chl.asyncSend(std::move(sendMaskBuff5)); #pragma endregion +#endif + + + otSend.check(chl); }); } @@ -82,6 +150,8 @@ namespace osuCrypto for (auto& thrd : thrds) thrd.join(); + + //std::cout << "\ns[" << IdxP << "]-maskBFView.size() " << maskBFView.size()[0] << "\n"; //std::cout << "\ns[" << IdxP << "]-mBfSize " << mBfSize << "\n"; //std::cout << "\ns[" << IdxP << "]-mMaskSize " << bins.mMaskSize << "\n"; @@ -92,10 +162,6 @@ namespace osuCrypto //std::cout << "\ns[" << IdxP << "]-arrayMask[1][3]" << arrayMask[1][3] << "\n"; - auto& chl = *chls[0]; - chl.asyncSend(std::move(sendMaskBuff)); - - } diff --git a/libOPRF/libOPRF.vcxproj b/libOPRF/libOPRF.vcxproj index 4c7b2afc8b..06e3300d93 100644 --- a/libOPRF/libOPRF.vcxproj +++ b/libOPRF/libOPRF.vcxproj @@ -51,7 +51,7 @@ Level3 Disabled true - D:\libs\miracl;D:\libs\boost;$(ProjectDir);$(SolutionDir)/cryptoTools;$(SolutionDir)thirdparty/win/boost;$(SolutionDir)thirdparty/win/NTL/include;$(SolutionDir)thirdparty/win/;$(SolutionDir)thirdparty/win/miracl;C:/libs/boost;C:/libs/;C:/libs/NTL/include;C:/libs/miracl;C:\Program Files %28x86%29\Visual Leak Detector\include;$(SolutionDir)/libOTe;C:/libs/NTL/;$(SolutionDir)/libPSI + $(ProjectDir);$(SolutionDir)/cryptoTools;$(SolutionDir)thirdparty/win/boost;$(SolutionDir)thirdparty/win/NTL/include;$(SolutionDir)thirdparty/win/;$(SolutionDir)thirdparty/win/miracl;C:/libs/NTL/include;$(SolutionDir)/libOTe;C:/libs/NTL/ SOLUTION_DIR=R"**($(SolutionDir))**";_MBCS;%(PreprocessorDefinitions);_WIN32_WINNT=0x0501 MultiThreadedDebug diff --git a/libOTe/libOTe.vcxproj.vcxproj b/libOTe/libOTe.vcxproj.vcxproj index e2ba8d478b..e3958e6432 100644 --- a/libOTe/libOTe.vcxproj.vcxproj +++ b/libOTe/libOTe.vcxproj.vcxproj @@ -98,7 +98,7 @@ Level3 Disabled true - D:\libs\miracl;D:\libs\boost;D:\libs;H:\npsi\cryptoTools;$(SolutionDir)/cryptoTools;$(ProjectDir);$(SolutionDir)thirdparty/win/boost;$(SolutionDir)thirdparty/win/NTL/include;$(SolutionDir)thirdparty/win/;$(SolutionDir)thirdparty/win/miracl;C:/libs/boost;C:/libs/;C:/libs/NTL/include;C:/libs/miracl;C:\Program Files %28x86%29\Visual Leak Detector\include + $(SolutionDir)/cryptoTools;$(ProjectDir);$(SolutionDir)thirdparty/win/boost;$(SolutionDir)thirdparty/win/NTL/include;$(SolutionDir)thirdparty/win/;$(SolutionDir)thirdparty/win/miracl;C:/libs/NTL/include SOLUTION_DIR=R"**($(SolutionDir))**";_MBCS;%(PreprocessorDefinitions);_WIN32_WINNT=0x0501 MultiThreadedDebug diff --git a/thirdparty/win/cryptopp_patch/cryptest.sln b/thirdparty/win/cryptopp_patch/cryptest.sln new file mode 100644 index 0000000000..f5b622d784 --- /dev/null +++ b/thirdparty/win/cryptopp_patch/cryptest.sln @@ -0,0 +1,39 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cryptlib", "cryptlib.vcxproj", "{3423EC9A-52E4-4A4D-9753-EDEBC38785EF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + DLL-Import Debug|Win32 = DLL-Import Debug|Win32 + DLL-Import Debug|x64 = DLL-Import Debug|x64 + DLL-Import Release|Win32 = DLL-Import Release|Win32 + DLL-Import Release|x64 = DLL-Import Release|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|Win32.ActiveCfg = Debug|Win32 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|Win32.Build.0 = Debug|Win32 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|x64.ActiveCfg = Debug|x64 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Debug|x64.Build.0 = Debug|x64 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Debug|Win32.ActiveCfg = DLL-Import Debug|Win32 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Debug|Win32.Build.0 = DLL-Import Debug|Win32 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Debug|x64.ActiveCfg = DLL-Import Debug|x64 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Debug|x64.Build.0 = DLL-Import Debug|x64 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Release|Win32.ActiveCfg = DLL-Import Release|Win32 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Release|Win32.Build.0 = DLL-Import Release|Win32 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Release|x64.ActiveCfg = DLL-Import Release|x64 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.DLL-Import Release|x64.Build.0 = DLL-Import Release|x64 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|Win32.ActiveCfg = Release|Win32 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|Win32.Build.0 = Release|Win32 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|x64.ActiveCfg = Release|x64 + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/thirdparty/win/cryptopp_patch/cryptlib.vcxproj b/thirdparty/win/cryptopp_patch/cryptlib.vcxproj new file mode 100644 index 0000000000..e1841f9947 --- /dev/null +++ b/thirdparty/win/cryptopp_patch/cryptlib.vcxproj @@ -0,0 +1,1548 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL-Import Debug + Win32 + + + DLL-Import Debug + x64 + + + DLL-Import Release + Win32 + + + DLL-Import Release + x64 + + + Release + Win32 + + + Release + x64 + + + + {3423EC9A-52E4-4A4D-9753-EDEBC38785EF} + cryptlib + + + + StaticLibrary + v140 + false + MultiByte + true + + + StaticLibrary + v140 + false + MultiByte + true + + + StaticLibrary + v140 + false + MultiByte + true + + + StaticLibrary + v140 + false + MultiByte + true + + + StaticLibrary + v140 + false + MultiByte + true + + + StaticLibrary + v140 + false + MultiByte + true + + + StaticLibrary + v140 + false + MultiByte + true + + + StaticLibrary + v140 + false + MultiByte + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>14.0.25420.1 + + + $(Platform)\Output\$(Configuration)\ + $(Platform)\$(ProjectName)\$(Configuration)\ + + + $(Platform)\Output\$(Configuration)\ + $(Platform)\$(ProjectName)\$(Configuration)\ + + + $(Platform)\DLL_Output\Release\ + $(Platform)\$(ProjectName)\$(Configuration)\ + + + $(Platform)\DLL_Output\Release\ + $(Platform)\$(ProjectName)\$(Configuration)\ + + + $(Platform)\Output\$(Configuration)\ + $(Platform)\$(ProjectName)\$(Configuration)\ + + + $(Platform)\Output\$(Configuration)\ + $(Platform)\$(ProjectName)\$(Configuration)\ + + + $(Platform)\DLL_Output\Debug\ + $(Platform)\$(ProjectName)\$(Configuration)\ + + + $(Platform)\DLL_Output\Debug\ + $(Platform)\$(ProjectName)\$(Configuration)\ + + + + MaxSpeed + AnySuitable + true + true + NDEBUG;_WINDOWS;USE_PRECOMPILED_HEADERS;WIN32;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + pch.h + $(OutDir)vc80.pdb + Level4 + true + ProgramDatabase + + + 0x0409 + + + true + + + + + MaxSpeed + AnySuitable + true + true + NDEBUG;_WINDOWS;USE_PRECOMPILED_HEADERS;WIN32;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + pch.h + $(OutDir)vc80.pdb + Level4 + true + ProgramDatabase + + + 0x0409 + + + true + + + + + MaxSpeed + AnySuitable + true + true + NDEBUG;_WINDOWS;USE_PRECOMPILED_HEADERS;WIN32;CRYPTOPP_IMPORTS;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + pch.h + $(OutDir)vc80.pdb + Level4 + true + ProgramDatabase + + + 0x0409 + + + true + + + + + MaxSpeed + AnySuitable + true + true + NDEBUG;_WINDOWS;USE_PRECOMPILED_HEADERS;WIN32;CRYPTOPP_IMPORTS;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + pch.h + $(OutDir)vc80.pdb + Level4 + true + ProgramDatabase + + + 0x0409 + + + true + + + + + Disabled + true + _DEBUG;_WINDOWS;USE_PRECOMPILED_HEADERS;WIN32;%(PreprocessorDefinitions) + MultiThreadedDebug + StreamingSIMDExtensions + Use + pch.h + $(OutDir)vc80.pdb + Level4 + true + ProgramDatabase + + + 0x0409 + + + true + + + + + Disabled + true + _DEBUG;_WINDOWS;USE_PRECOMPILED_HEADERS;WIN32;%(PreprocessorDefinitions) + MultiThreadedDebug + Use + pch.h + $(OutDir)vc80.pdb + Level4 + true + ProgramDatabase + + + 0x0409 + + + true + + + + + Disabled + true + _DEBUG;_WINDOWS;USE_PRECOMPILED_HEADERS;WIN32;CRYPTOPP_IMPORTS;%(PreprocessorDefinitions) + MultiThreadedDebug + Use + pch.h + $(OutDir)vc80.pdb + Level4 + true + ProgramDatabase + + + 0x0409 + + + true + + + + + Disabled + true + _DEBUG;_WINDOWS;USE_PRECOMPILED_HEADERS;WIN32;CRYPTOPP_IMPORTS;%(PreprocessorDefinitions) + MultiThreadedDebug + Use + pch.h + $(OutDir)vc80.pdb + Level4 + true + ProgramDatabase + + + 0x0409 + + + true + + + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + + + Disabled + + + MaxSpeed + + + MaxSpeed + + + Disabled + + + Disabled + + + + + + + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + true + Disabled + true + Disabled + true + MaxSpeed + true + MaxSpeed + true + Disabled + true + Disabled + true + true + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + + true + Disabled + true + Disabled + true + MaxSpeed + true + MaxSpeed + true + Disabled + true + Disabled + true + true + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + + + Disabled + + + Disabled + + + MaxSpeed + + + MaxSpeed + + + Disabled + + + Disabled + + + + + + + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Create + Disabled + Create + MaxSpeed + Create + MaxSpeed + Create + Disabled + Create + Disabled + Create + Create + Create + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + Disabled + Disabled + MaxSpeed + MaxSpeed + Disabled + Disabled + + + + + if not exist adhoc.cpp copy "%(FullPath)" adhoc.cpp +echo: >> adhoc.cpp.copied + + adhoc.cpp.copied;%(Outputs) + if not exist adhoc.cpp copy "%(FullPath)" adhoc.cpp +echo: >> adhoc.cpp.copied + + adhoc.cpp.copied;%(Outputs) + if not exist adhoc.cpp copy "%(FullPath)" adhoc.cpp +echo: >> adhoc.cpp.copied + + adhoc.cpp.copied;%(Outputs) + if not exist adhoc.cpp copy "%(FullPath)" adhoc.cpp +echo: >> adhoc.cpp.copied + + adhoc.cpp.copied;%(Outputs) + if not exist adhoc.cpp copy "%(FullPath)" adhoc.cpp +echo: >> adhoc.cpp.copied + + adhoc.cpp.copied;%(Outputs) + if not exist adhoc.cpp copy "%(FullPath)" adhoc.cpp +echo: >> adhoc.cpp.copied + + adhoc.cpp.copied;%(Outputs) + if not exist adhoc.cpp copy "%(FullPath)" adhoc.cpp +echo: >> adhoc.cpp.copied + + adhoc.cpp.copied;%(Outputs) + if not exist adhoc.cpp copy "%(FullPath)" adhoc.cpp +echo: >> adhoc.cpp.copied + + adhoc.cpp.copied;%(Outputs) + + + + + Building and assembling rdrand.asm + ml.exe /c /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo"$(IntDir)rdrand-x86.obj" /Zi "%(FullPath)" + + $(IntDir)rdrand-x86.obj;%(Outputs) + Building and assembling rdrand.asm + ml64.exe /c /nologo /D_M_X64 /W3 /Cx /Zi /Fo"$(IntDir)rdrand-x64.obj" /Zi "%(FullPath)" + + $(IntDir)rdrand-x64.obj;%(Outputs) + Building and assembling rdrand.asm + ml.exe /c /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo"$(IntDir)rdrand-x86.obj" "%(FullPath)" + + $(IntDir)rdrand-x86.obj;%(Outputs) + Building and assembling rdrand.asm + ml64.exe /c /nologo /D_M_X64 /W3 /Cx /Zi /Fo"$(IntDir)rdrand-x64.obj" "%(FullPath)" + + $(IntDir)rdrand-x64.obj;%(Outputs) + Building and assembling rdrand.asm + ml.exe /c /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo"$(IntDir)rdrand-x86.obj" /Zi "%(FullPath)" + + $(IntDir)rdrand-x86.obj;%(Outputs) + Building and assembling rdrand.asm + ml64.exe /c /nologo /D_M_X64 /W3 /Cx /Zi /Fo"$(IntDir)rdrand-x64.obj" /Zi "%(FullPath)" + + $(IntDir)rdrand-x64.obj;%(Outputs) + Building and assembling rdrand.asm + ml.exe /c /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo"$(IntDir)rdrand-x86.obj" "%(FullPath)" + + $(IntDir)rdrand-x86.obj;%(Outputs) + Building and assembling rdrand.asm + ml64.exe /c /nologo /D_M_X64 /W3 /Cx /Zi /Fo"$(IntDir)rdrand-x64.obj" "%(FullPath)" + + $(IntDir)rdrand-x64.obj;%(Outputs) + + + true + true + ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64dll.obj" /Zi "%(FullPath)" + + $(IntDir)x64dll.obj;%(Outputs) + true + true + ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64dll.obj" /Zi "%(FullPath)" + + $(IntDir)x64dll.obj;%(Outputs) + true + ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64dll.obj" /Zi "%(FullPath)" + + $(IntDir)x64dll.obj;%(Outputs) + true + ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64dll.obj" /Zi "%(FullPath)" + + $(IntDir)x64dll.obj;%(Outputs) + + + true + ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64masm.obj" /Zi "%(FullPath)" + + $(IntDir)x64masm.obj;%(Outputs) + true + ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64masm.obj" /Zi "%(FullPath)" + + $(IntDir)x64masm.obj;%(Outputs) + true + ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64masm.obj" /Zi "%(FullPath)" + + $(IntDir)x64masm.obj;%(Outputs) + true + ml64.exe /c /nologo /D_M_X64 /W3 /Fo"$(IntDir)x64masm.obj" /Zi "%(FullPath)" + + $(IntDir)x64masm.obj;%(Outputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/win/cryptopp_patch/cryptlib.vcxproj.filters b/thirdparty/win/cryptopp_patch/cryptlib.vcxproj.filters new file mode 100644 index 0000000000..bdc91749de --- /dev/null +++ b/thirdparty/win/cryptopp_patch/cryptlib.vcxproj.filters @@ -0,0 +1,812 @@ + + + + + {fd358647-0162-4f2b-9f55-9057267aa97d} + .cpp + + + {fcfa718b-da98-46ee-a83c-bcb0690692cf} + .;.h + + + {355b2c4a-e89d-4197-af02-6e3d718858cb} + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Miscellaneous + + + Miscellaneous + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Miscellaneous + + + Miscellaneous + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file