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

feat add random mask to groth16 commitment #1245

Merged
merged 7 commits into from
Aug 22, 2024
Merged

Conversation

Tabaie
Copy link
Contributor

@Tabaie Tabaie commented Aug 13, 2024

This PR adds a random mask to the BSB22 commitments in order to make them hiding.

It is achieved simply by randomizing a new variable and adding it to the commitment.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • golangci-lint does not output errors locally
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Tabaie Tabaie requested a review from ivokub August 13, 2024 20:46
@Tabaie
Copy link
Contributor Author

Tabaie commented Aug 13, 2024

@ivokub TestNoCommitmentVariable is failing because no commitment is truly empty anymore. Is that a desired feature or can we just remove the test?

@Tabaie Tabaie marked this pull request as ready for review August 16, 2024 18:14
@ivokub
Copy link
Collaborator

ivokub commented Aug 22, 2024

@ivokub TestNoCommitmentVariable is failing because no commitment is truly empty anymore. Is that a desired feature or can we just remove the test?

I made the test to expect provers success instead. It can be useful in the future to catch regressions. I think it is useful that we can have prover assigned random commitment if we don't commit to anything.

Copy link
Collaborator

@ivokub ivokub left a comment

Choose a reason for hiding this comment

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

I think it makes all sense! I added a regression test also.

@ivokub ivokub added the bug Something isn't working label Aug 22, 2024
@ivokub ivokub merged commit afda68a into master Aug 22, 2024
7 checks passed
@ivokub ivokub deleted the feat/g16-bsb22-hiding branch August 22, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants