From 7266f3b877d9ec6b2e59397bc24c566ed8263726 Mon Sep 17 00:00:00 2001 From: Marcel Keller Date: Wed, 15 Feb 2023 16:51:57 +1100 Subject: [PATCH] Fix performance bug in client communication with Shamir-based protocols. --- Processor/Processor.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Processor/Processor.hpp b/Processor/Processor.hpp index 2f841c83a..78aba8c81 100644 --- a/Processor/Processor.hpp +++ b/Processor/Processor.hpp @@ -246,6 +246,8 @@ void Processor::write_socket(const RegType reg_type, socket_stream.store(message_type); } + auto rec_factor = sint::get_rec_factor(P.my_num(), P.num_players()); + for (int j = 0; j < size; j++) { for (int i = 0; i < m; i++) @@ -256,8 +258,7 @@ void Processor::write_socket(const RegType reg_type, if (send_macs) get_Sp_ref(registers[i] + j).pack(socket_stream); else - get_Sp_ref(registers[i] + j).pack(socket_stream, - sint::get_rec_factor(P.my_num(), P.num_players())); + get_Sp_ref(registers[i] + j).pack(socket_stream, rec_factor); } else if (reg_type == CINT) {