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 only BOB getting the answer? #6

Closed
lemire opened this issue Mar 26, 2019 · 5 comments
Closed

Is only BOB getting the answer? #6

lemire opened this issue Mar 26, 2019 · 5 comments

Comments

@lemire
Copy link

lemire commented Mar 26, 2019

Thanks for making the code and the paper available for this project.

For our own research, we are trying to build upon your work.

Following your instructions and examples, we run the following code on both BOB and ALICE's server.

        C2PC twopc(io, party, &cf);
        twopc.function_independent();
        twopc.function_dependent();
        twopc.online(in, out);

However, looking at ALICE's code path in the online function, we find that ALICE is not computing the circuit and getting the result of the circuit: only BOB does the computation and only BOB gets the answer. So, effectively, in ALICE's case, running the above code sequence, leads to have no result written to out.

Looking at some of the tests you published, it does appear that you check that the output matches your expectations, but only when the user is BOB. That is, we cannot find evidence that you expect ALICE to get the result of the circuit.


	if(party == BOB){ // why only BOB????????????
	        string res = "";
		for(int i = 0; i < 160; ++i)
			res += (out[i]?"1":"0");
		cout << (res == hex_to_binary(string(out3))? "GOOD!":"BAD!")<<endl;
	}

Evidently, we could modify this code so that BOB sends the answer back to ALICE but this implies that ALICE trusts BOB. Another obvious fix is to run the exchange twice, flipping the role of BOB and ALICE, but that does not seem correct.

What if we wish that both parties get the output of the circuit? Could we modify your code, or the way we use your code, to get this desired result?

cc @owenkaser

@wangxiao1254
Copy link
Member

wangxiao1254 commented Mar 26, 2019 via email

@lemire
Copy link
Author

lemire commented Mar 26, 2019

Thanks.

It seems that what you are saying is that BOB can send back data to ALICE from which ALICE can compute the answer and verify that it must be correct. But ALICE still has to trust that BOB will do so, right? Am I correct in thinking that this implies that BOB acts in good faith. If BOB interrupts the communication, then BOB can be left with the answer while ALICE has nothing.

Suppose that the result of the circuit is the winning numbers for tomorrow's lottery tickets. BOB gets the numbers, then stops communicating and buys the lottery ticket. ALICE has nothing.

So ALICE must trust that BOB will complete the protocol out of good faith.

@wangxiao1254
Copy link
Member

wangxiao1254 commented Mar 26, 2019 via email

@lemire
Copy link
Author

lemire commented Mar 26, 2019

@wangxiao1254 This clears things out for me. Thanks.

@lemire
Copy link
Author

lemire commented Mar 26, 2019

Closing.

@lemire lemire closed this as completed Mar 26, 2019
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