Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got Wrong distance result from ABY examples : euclidean_distance_test #182

Open
suiguangye opened this issue Oct 25, 2021 · 0 comments
Open

Comments

@suiguangye
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant