snwagh/securenn-public

some tiny questions about funcPrivateCompareMPC() and debugPC()

zzz130981 opened this issue · 3 comments

Hello, I have used debugPC() and I get:
2020-02-15 22-09-37 的屏幕截图
I have serval tiny questions, hoping for your respond:
1.Is my terminal's output right?

2.What values are stored in the vector share_m? I know that each 64 bit of it represents a number, so in my opinion, the values of it is:
1 2 4 8 16 32 64 128 256 512

  1. What is the meaning of "1"?Does it mean that the ith number of share_m <= r?If so, I should understand my terminal's output one by one as follow:
    1:1 <= 5
    0: 2 > 6
    1: 4 <= 7
    1: 8 <= 8
    1: 16 <= 9
    0: 32 > 10
    1: 64 <= 11
    0: 128 > 12
    0: 256 > 13
    1: 512 <= 14
    This is obviously wrong. Could you tell where I am wrong, thank you!

PC functionality has a blinding factor betaPrime. The actual comparison answer should be faithful to beta XOR betaPrime.

It seems useless.
I have make beta XOR betaPrime , namely changed the following line

cout << (int) beta[i] << endl;
to be:

cout << (int) (beta[i]^betaPrime[i]) << endl; 

After the invocation of debugPC(), the terminal still outputs:
2020-02-18 12-23-47 的屏幕截图

Please print all the values and see if the debugging leads you anywhere. Be careful in every step. Note that these are shares (you can't just print them, you've to reconstruct them).