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

is the Euclidean Distance result right? #172

Open
L-coder148 opened this issue Jan 14, 2021 · 5 comments
Open

is the Euclidean Distance result right? #172

L-coder148 opened this issue Jan 14, 2021 · 5 comments

Comments

@L-coder148
Copy link

Hello,it seems that the circuit result is not equal to verification when testing the Euclidean Distance using YAO sharing, is that right? but the circuit result is equal to verification when testing it using Bool sharing.
a
aa

@suiguangye
Copy link

I got exactly the same problem with you. I try ARITH and YAO sharing , the result is wrong, but when I tryed BOOL sharing , the result is right. Did you solve your problem? Do you know why? Thank you very much!!

@L-coder148
Copy link
Author

I do not solve the problem,Is it convenient for you to contact me on wechat?my wechat ID is f_freely.

@L-coder148
Copy link
Author

You can see the issuehttps://github.com/encryptogroup/ABY/issues/172, I think the author's answer refers to change the seed of the srand(time(NULL)) from random into a fixed value. such as follows, then the YAO sharing and the BOOl sharing are all right, the author do not test the Euclidean Distance using ARITH sharing.

//srand(time(NULL));
srand(1);

@Cabbache
Copy link

You could run both roles at the same time like so:
./euclidean_distance_test -r 1 & (./euclidean_distance_test -r 0 2>&1 > /dev/null)

@tur11ng
Copy link

tur11ng commented Sep 1, 2022

You can see the issuehttps://github.com/encryptogroup/ABY/issues/172, I think the author's answer refers to change the seed of the srand(time(NULL)) from random into a fixed value. such as follows, then the YAO sharing and the BOOl sharing are all right, the author do not test the Euclidean Distance using ARITH sharing.

//srand(time(NULL));
srand(1);

The provided link to the issue is incorrect, this is the correct one

Floating point is not supported in arithmetic (ARITH) sharing by ABY.

There is an instability of the floating point unit, that is mentioned in this paper and you may have bumped into such issues. Quoting from when I read the paper, ABY doesn't conform to IEEE754 standard for floating point while the library you are using to compare the results is highly likely that is conforms to the standard, so you may bump on such an issue.

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

4 participants