Skip to content

Commit

Permalink
Improved error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed Aug 9, 2024
1 parent 94a839c commit 42b3dc1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion OT/BaseOT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,17 @@ void BaseOT::exec_base(bool new_receiver_inputs)

if (ot_role & SENDER)
for (int i = 0; i < nOT; i++)
assert(sender_inputs.at(i).at(0) != sender_inputs.at(i).at(1));
{
if(sender_inputs.at(i).at(0) == sender_inputs.at(i).at(1))
{
string error = "Sender outputs are the same at " + to_string(i)
+ ": " + sender_inputs[i][0].str();
#ifdef NO_AVX_OT
error += ". Try compiling with 'AVX_OT = 0' in CONFIG.mine";
#endif
throw runtime_error(error);
}
}

// Hash with counter to avoid collisions
for (int i = 0; i < nOT; i++)
Expand Down

0 comments on commit 42b3dc1

Please sign in to comment.