Closed scg258 closed 2 years ago
Should I change it as the following?
void EvaluateProtocol(mo::PartyPointer& party, std::uint32_t value) {
encrypto::motion::ShareWrapper input0{party->In<encrypto::motion::MpcProtocol::kBmr>(mo::ToInput(value),0)};
encrypto::motion::ShareWrapper input1{party->In<encrypto::motion::MpcProtocol::kBmr>(mo::ToInput(value),1)};
const auto kPathToAlgorithm{std::string(encrypto::motion::kRootDir)+"/circuits/advanced/millionaires.bristol"};
const auto millionaires_algorithm{encrypto::motion::AlgorithmDescription::FromBristol(kPathToAlgorithm)};
const auto result{input0.Evaluate(millionaires_algorithm)};
const auto result{input1.Evaluate(millionaires_algorithm)};
encrypto::motion::ShareWrapper output;
output=result.Out();
party->Run();
party->Finish();
auto richer=output.As<std::uint32_t>();
std::cout<<"Party "<<richer<<" is the richest party."<<std::endl;
}
I have solved.
The circuit generated by hycc is used to achieve the millionaire problem of parties. It was compiled successfully, but the program crashed when it ran to the 7th line (const auto result{input.Evaluate(millionaires_algorithm)};) . Can you help me point out the error?
The files entered into hycc are as follows: