encryptogroup / MOTION

An efficient, user-friendly, modular, and extensible framework for mixed-protocol secure multi-party computation with two or more parties
MIT License
85 stars 40 forks source link

'party->Run( repetitions )' problem #33

Open scg258 opened 2 years ago

scg258 commented 2 years ago

The following circuit will have an error of exceeding the boundary, but if the parameter is removed, the circuit can operate successfully.

suint v1=party->In\<mo::MpcProtocol::kBooleanGmw>(mo::ToInput(value),0); suint v2=party->In\<mo::MpcProtocol::kBooleanGmw>(mo::ToInput(value),1); suint c=v1+v2;

party->Run(2);

The error is: terminate called after throwing an instance of 'std::out_of_range' what(): Accessing positions 159 to 477 of 159

Oleksandr-Tkachenko commented 2 years ago

Party::Run currently doesn't work well with repetitions > 1. If you're trying to benchmark multiple runs, one option would be to do something like this: https://github.com/encryptogroup/MOTION/blob/56fa049e4e90b298c984db6b9ce5fc380f03e551/src/examples/aes128/aes128_main.cpp#L60-L85.

scg258 commented 2 years ago

Thank you!