Skip to content

Commit

Permalink
wanring and test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ladnir committed Jun 13, 2024
1 parent cdc8f3a commit 2064795
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 32 deletions.
10 changes: 8 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
"ENABLE_SIMPLESTOT": true,
"ENABLE_MRR": true,
"ENABLE_MR": true,
"ENABLE_RELIC": true,
"ENABLE_RELIC": false,
"ENABLE_SODIUM": true,
"ENABLE_ASAN": true,
"ENABLE_MOCK_OT": true,
"LIBOTE_STD_VER": "20",
"CMAKE_PREFIX_PATH": "${sourceDir}/../out/install",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
Expand All @@ -32,7 +34,11 @@
]
},
"microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
"sourceDir": "$env{HOME}/.vs/$ms{projectDirName}"
"sourceDir": "$env{HOME}/.vs/$ms{projectDirName}",
"copySourcesOptions": {
"exclusionList": [ ".vs", "out/build", "out/install", "out/boost*", "out/relic/build" ]
},
"rsyncCommandArgs": [ "-t", "--delete", "--include=${sourceDir}/out/macoro/*", "--verbose" ]
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion cryptoTools
4 changes: 2 additions & 2 deletions frontend/ExampleTwoChooseOne.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ namespace osuCrypto
catch (std::exception& e)
{
std::cout << e.what() << std::endl;
chl.close();
cp::sync_wait(chl.close());
}
}
else
Expand Down Expand Up @@ -202,7 +202,7 @@ namespace osuCrypto
catch (std::exception& e)
{
std::cout << e.what() << std::endl;
chl.close();
cp::sync_wait(chl.close());
}
}

Expand Down
49 changes: 22 additions & 27 deletions libOTe_Tests/Vole_Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,51 +312,46 @@ void Vole_Silent_Rounds_test(const oc::CLP& cmd)
AlignedUnVector<block> c(n), z0(n), z1(n);
auto p0 = recv.silentReceive(c, z0, prng, chls[0]);
auto p1 = send.silentSend(x, z1, prng, chls[1]);
#ifdef ENABLE_SIMPLESTOT_ASM
u64 expRound = 3;
std::cout << "using DefaultBaseOT = AsmSimplestOT;" << std::endl;
#elif defined ENABLE_MRR_TWIST && defined ENABLE_SSE
std::string baseName;
//
//#if defined ENABLE_MRR_TWIST && defined ENABLE_SSE
// using BaseOT = McRosRoyTwist;
//#elif defined ENABLE_MR
// using BaseOT = MasnyRindal;
//#elif defined ENABLE_MRR
// using BaseOT = McRosRoy;
//#elif defined ENABLE_NP_KYBER

#if defined ENABLE_MRR_TWIST && defined ENABLE_SSE
u64 expRound = 3;
std::cout << "using DefaultBaseOT = McRosRoyTwist;" << std::endl;
baseName = "using DefaultBaseOT = McRosRoyTwist;";
#elif defined ENABLE_MR
u64 expRound = 3;
std::cout << "using DefaultBaseOT = MasnyRindal;" << std::endl;
baseName = "using DefaultBaseOT = MasnyRindal;";
#elif defined ENABLE_MRR
u64 expRound = 3;
std::cout << "using DefaultBaseOT = McRosRoy;" << std::endl;
baseName = "using DefaultBaseOT = McRosRoy;";
#elif defined ENABLE_NP_KYBER
u64 expRound = 3;
std::cout << "using DefaultBaseOT = MasnyRindalKyber;" << std::endl;
baseName = "using DefaultBaseOT = MasnyRindalKyber;";
#elif defined ENABLE_SIMPLESTOT_ASM
u64 expRound = 5;
baseName = "using DefaultBaseOT = AsmSimplestOT;";
#elif defined ENABLE_SIMPLESTOT
u64 expRound = 5;
std::cout << "using DefaultBaseOT = SimplestOT;" << std::endl;
baseName = "using DefaultBaseOT = SimplestOT;";
#elif defined ENABLE_MOCK_OT
u64 expRound = 3;
std::cout << "using DefaultBaseOT = INSECURE_MOCK_OT;" << std::endl;
baseName = "using DefaultBaseOT = INSECURE_MOCK_OT;";
#else
baseName = "????";
u64 expRound = 0;
#endif

auto rounds = eval(p0, p1, chls[1], chls[0]);
if (rounds != expRound)
{
//#ifdef ENABLE_SIMPLESTOT_ASM
// std::cout << "using DefaultBaseOT = AsmSimplestOT;" << std::endl;
//#elif defined ENABLE_MRR_TWIST && defined ENABLE_SSE
// std::cout << "using DefaultBaseOT = McRosRoyTwist;" << std::endl;
//#elif defined ENABLE_MR
// std::cout << "using DefaultBaseOT = MasnyRindal;" << std::endl;
//#elif defined ENABLE_MRR
// std::cout << "using DefaultBaseOT = McRosRoy;" << std::endl;
//#elif defined ENABLE_NP_KYBER
// std::cout << "using DefaultBaseOT = MasnyRindalKyber;" << std::endl;
//#elif defined ENABLE_SIMPLESTOT
// std::cout << "using DefaultBaseOT = SimplestOT;" << std::endl;
//#elif defined ENABLE_MOCK_OT
// std::cout << "using DefaultBaseOT = INSECURE_MOCK_OT;" << std::endl;
//#else
// std::cout << " LIBOTE_HAS_BASE_OT" << std::endl;
//#endif
std::cout << baseName << std::endl;
throw std::runtime_error("act " + std::to_string(rounds) + "!= exp " + std::to_string(expRound) + " " + COPROTO_LOCATION);
}

Expand Down

0 comments on commit 2064795

Please sign in to comment.