Got Wrong distance result from ABY examples : euclidean_distance_test
Dear Friend:
I test ABY library on ubuntu 18.04. my g++ version is 8.4.0. I install ABY library everything is OK.
but when I run the example euclidean_distance_test, I found that when I use Yao sharing or ARITH sharing , the Distance result is wrong. For example in the result below Circuit result: 153.701, but Verification: 184.166. but when I use Bool sharing the result is correct.
I face same problem when I test threshold-euclidean_distance_test example. the distance caculation in threshold-euclidean_distance_test example is also wrong.
I did not change any line of code, but run the example directly。
could you please let me know where is the porblem!! thank you verey much!!
crypto@crypto-VirtualBox:~/Downloads/ABY/build/bin$ ./euclidean_distance_test -r 0 -n 3 Testing Euclidean Distance in , out_bitlen=32 and out_nvals=3: x1: 196, y1: 249; x2: 95, y2: 95 Circuit result: 153.701 Verification: 184.166 x1: 86, y1: 157; x2: 4, y2: 97 Circuit result: 31.4006 Verification: 101.607 x1: 92, y1: 50; x2: 126, y2: 3 Circuit result: 160.44 Verification: 58.0086 Testing Euclidean Distance in Bool sharing, out_bitlen=32 and out_nvals=3: x1: 0, y1: 66; x2: 201, y2: 94 Circuit result: 202.941 Verification: 202.941 x1: 247, y1: 35; x2: 28, y2: 65 Circuit result: 221.045 Verification: 221.045 x1: 173, y1: 15; x2: 28, y2: 99 Circuit result: 167.574 Verification: 167.574