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

IS DIVISION supported by ABY? #42

Open shao-hua-li opened 6 years ago

shao-hua-li commented 6 years ago

I would like to ask if there is any solution to division using ABY framework :)

weikengchen commented 6 years ago

Consider this: https://bitbucket.org/jackdoerner/absentminded-crypto-kit

dd23 commented 6 years ago

There is currently no native Integer-Division built into ABY.

However, we have Integer- and Floating-Point (FP) division from circuits that are read from file. Here's an example how to use FP gates in general: https://github.com/encryptogroup/ABY/blob/public/src/examples/float/abyfloat.cpp The Integer-Division circuits are int_div_<bitlen>.aby in bin/circ. You can use them with PutGateFromFile().

If you want to convert Integer values to Floaing-Point, have a look at PutConvTypeGate().

Floating-Point to Integer conversion is not yet implemented.