diff --git a/CMakePresets.json b/CMakePresets.json index 347eba0..cd4812d 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -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}" @@ -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" ] } } }, diff --git a/cryptoTools b/cryptoTools index 8c1f469..16c9d7f 160000 --- a/cryptoTools +++ b/cryptoTools @@ -1 +1 @@ -Subproject commit 8c1f4694b5d60f4d8b97edbe9e213e3a81a9530d +Subproject commit 16c9d7f7919d2ee90621f84cd61f92cc40903747 diff --git a/frontend/ExampleTwoChooseOne.cpp b/frontend/ExampleTwoChooseOne.cpp index ff74588..1a1fb15 100644 --- a/frontend/ExampleTwoChooseOne.cpp +++ b/frontend/ExampleTwoChooseOne.cpp @@ -167,7 +167,7 @@ namespace osuCrypto catch (std::exception& e) { std::cout << e.what() << std::endl; - chl.close(); + cp::sync_wait(chl.close()); } } else @@ -202,7 +202,7 @@ namespace osuCrypto catch (std::exception& e) { std::cout << e.what() << std::endl; - chl.close(); + cp::sync_wait(chl.close()); } } diff --git a/libOTe_Tests/Vole_Tests.cpp b/libOTe_Tests/Vole_Tests.cpp index cb153a5..09986c5 100644 --- a/libOTe_Tests/Vole_Tests.cpp +++ b/libOTe_Tests/Vole_Tests.cpp @@ -312,51 +312,46 @@ void Vole_Silent_Rounds_test(const oc::CLP& cmd) AlignedUnVector 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); }