Skip to content

Update range proof to match the paper#26

Open
survived wants to merge 4 commits intomasterfrom
fix-25
Open

Update range proof to match the paper#26
survived wants to merge 4 commits intomasterfrom
fix-25

Conversation

@survived
Copy link
Contributor

While investigating #25, I found that some bounds check is inclusive in the paper, and exclusive in implementation. I fixed this, and test from #25 has never failed again.

Fixes #25

} else if secret_x + &data.w1[i] > range_scaled_third
&& secret_x + &data.w1[i] < range_scaled_two_thirds
} else if secret_x + &data.w1[i] >= range_scaled_third
&& secret_x + &data.w1[i] <= range_scaled_two_thirds
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See Lindell 17 paper, appendix A, step 4b:

image

|| (*w1 >= BigInt::zero()
&& *w1 <= range_scaled_third
&& *w2 >= range_scaled_third
&& *w2 <= range_scaled_two_thirds);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See Lindell 17 paper, appendix A, "V's output", step 1:

image

@survived survived marked this pull request as draft August 10, 2021 12:45
@survived survived marked this pull request as ready for review August 10, 2021 12:51
@survived survived requested a review from omershlo August 10, 2021 12:51
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

Successfully merging this pull request may close these issues.

The problem of scope proof failure

1 participant