From 17e21f2a90afc4e3926e6c71404c291f104be877 Mon Sep 17 00:00:00 2001 From: Peter Rindal Date: Mon, 22 Jan 2024 16:14:32 -0800 Subject: [PATCH] changed base ot to use fewer rounds --- CMakePresets.json | 5 +++++ libOTe/Vole/Silent/SilentVoleReceiver.h | 11 ++++++++++- libOTe/Vole/Silent/SilentVoleSender.h | 11 +++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/CMakePresets.json b/CMakePresets.json index 5b7eb95..6fe2021 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -16,6 +16,11 @@ "ENABLE_BOOST": true, "ENABLE_BITPOLYMUL": false, "ENABLE_CIRCUITS": true, + "ENABLE_SIMPLESTOT": true, + "ENABLE_MRR": true, + "ENABLE_MR": true, + "ENABLE_SIMPLESTOT": true, + "ENABLE_RELIC": true, "LIBOTE_STD_VER": "17", "CMAKE_PREFIX_PATH": "${sourceDir}/../out/install", "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}" diff --git a/libOTe/Vole/Silent/SilentVoleReceiver.h b/libOTe/Vole/Silent/SilentVoleReceiver.h index 3f0310c..1302492 100644 --- a/libOTe/Vole/Silent/SilentVoleReceiver.h +++ b/libOTe/Vole/Silent/SilentVoleReceiver.h @@ -150,8 +150,17 @@ namespace osuCrypto { #ifdef LIBOTE_HAS_BASE_OT +#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 + using BaseOT = MasnyRindalKyber; +#else using BaseOT = DefaultBaseOT; - +#endif MC_BEGIN(task<>, this, &prng, &chl, choice = BitVector{}, diff --git a/libOTe/Vole/Silent/SilentVoleSender.h b/libOTe/Vole/Silent/SilentVoleSender.h index 5fe9aae..81fcce8 100644 --- a/libOTe/Vole/Silent/SilentVoleSender.h +++ b/libOTe/Vole/Silent/SilentVoleSender.h @@ -124,7 +124,18 @@ namespace osuCrypto task<> genSilentBaseOts(PRNG& prng, Socket& chl, F delta) { #ifdef LIBOTE_HAS_BASE_OT + +#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 + using BaseOT = MasnyRindalKyber; +#else using BaseOT = DefaultBaseOT; +#endif MC_BEGIN(task<>, this, delta, &prng, &chl, msg = AlignedUnVector>(silentBaseOtCount()),