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

Update range proof to match the paper #26

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Update range proof to match the paper #26

wants to merge 4 commits into from

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