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

My Mac fails because NETWORK_BUFFER_SIZE not sufficient for sha256 in emp-m2pc #7

Closed
weikengchen opened this issue Oct 29, 2017 · 7 comments

Comments

@weikengchen
Copy link

OK:) this is not an easy debug. I found the reason why my Mac always fails for sha256 in emp-m2pc due to res4=1 and Alice cheat=1, showing WRONG_ANS.

It seems that my Mac has a terrible loopback network (or I guess too fast?). The standard NETWORK_BUFFER_SIZE in emp_tool/utils/constants.h will make buffer insufficient and cause data loss -- the result is that Bob 'cheats' and the result for sha256 in emp-m2pc is wrong in my specific case.

My question is:
During the EUROCRYPT'17 paper and previous works on emp-toolkit, will a very high NETWORK_BUFFER_SIZE obviously hurts the performance (due to the loss of locality?)? If this performance change is not obvious, maybe the default value for NETWORK_BUFFER_SIZE in emp-tool/utils/constants.h can be changed to a larger one.

(I see the comment nearby said that this value should be adjusted for the specific network. I feel that this value should increase for emp-m2pc because the evaluation is slower, the network can be too fast.)

@weikengchen
Copy link
Author

And Thanks to Xiao Wang!

@weikengchen
Copy link
Author

An alternative way is to give a boosting for emp-m2pc on NETWORK_BUFFER_SIZE?

Note that the value of NETWORK_BUFFER_SIZE would be hardcoded into the binary of emp-tool.

@wangxiao1254
Copy link
Member

wangxiao1254 commented Oct 29, 2017 via email

@weikengchen
Copy link
Author

will double check

@weikengchen
Copy link
Author

The real reason found. will send a PR.

@weikengchen
Copy link
Author

emp-toolkit/emp-tool#34

@weikengchen
Copy link
Author

weikengchen commented Oct 29, 2017

It turns out that my Mac adopts boost. I will submit another PR to let Mac use socket.

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

2 participants