MPC-SoK / frameworks

Sample code and build environments for MPC frameworks
Other
487 stars 111 forks source link

ABY innerproduct does not match expected results. #19

Open marsella opened 4 years ago

marsella commented 4 years ago

I noticed some mismatch when running the innerprod example for ABY. Occasionally the expected value returned after running python ~/ABY/src/examples/geninput.py -e innerprod doesn't match the circuit result from running ./ABY/build/bin/innerprod_test -r 0 & ./ABY/build/bin/innerprod_test -r 1.

Reported by PFW, verified by me.

Possible fix: update to the latest ABY version.

marsella commented 4 years ago

Got another report of this problem from MB and RI.

It seems we are already using the most up-to-date version of ABY.

The error happens in both my modified inner product and their inner product examples. This implies it is not an issue with our method of input generation (Also, in retrospect, it was an awful idea to name the two versions "innerprod" and "innerproduct').

The bug probably lies in the BuildInnerProductCircuit function. Since this is a straightforward implementation, there is probably a bug in the library somewhere.

locomotive-crypto commented 3 years ago

I have the same problem.