encryptogroup / ABY

ABY - A Framework for Efficient Mixed-protocol Secure Two-party Computation
GNU Lesser General Public License v3.0
463 stars 132 forks source link

PutFPGate with ieee flag gives errors #143

Open mayank0403 opened 5 years ago

mayank0403 commented 5 years ago

In the floating point example, present in examples/float/abyfloat.cpp, changing the last parameter of PutFPGate from no_status to ieee gives either SIGFPE or SIGSEGV.

The situation is like this:

  1. If FP ADD is used, then I get SIGFPE. Backtracing shows the errors stems from PutNonLinearVectorGate().
  2. If FP MUL is used, then I get SIGSEGV. Backtracing this shows the error coming from PutPrimitiveGate().

With no_status, the example runs fine without any issues.

dd23 commented 5 years ago

I can confirm that there is an issue with the IEEE versions of the FP circuits.

This is due to some extra input and output bits that are included in the circuits, that are used for signaling exceptions in the FP calculation (e.g. overflows, divisions by zero, etc.). These are currently not handled correctly. Unless you really need these extra bits, please use the no_status FP gates for now.