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

Add Value Commitment operator #125

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

Conversation

OBrezhniev
Copy link
Member

Value Commitment allows to commit to a specific value and then reveal it later or use such a commitment in another circuits to prove that multiple circuits work with the same value without revealing it.

Todo:

  • unit tests

circuits/lib/linked/linkId.circom Outdated Show resolved Hide resolved

signal isNonceZero <== IsZero()(commitNonce);

signal commit <== Poseidon(2)([value, commitNonce]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like I can receive the same commitment if I have another field with the same value and provide the same commitment outside. (I want to prove that I have the same date of birth in the different creds, but I can hack and prove that some another date that I have in other credential is equal to expected, but it is not the same meaning.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not a hack. Maybe user wants to prove to verifier that on his day of birth there was a sun eclipse. It's ok.
We don't have a way to check meaning of fields and we shouldn't. User needs to check what verifier asks from him - does it make sense.

Base automatically changed from feature/multi-query-arr-size to develop February 26, 2024 13:10
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.

3 participants