-
Notifications
You must be signed in to change notification settings - Fork 14
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
base: develop
Are you sure you want to change the base?
Conversation
|
||
signal isNonceZero <== IsZero()(commitNonce); | ||
|
||
signal commit <== Poseidon(2)([value, commitNonce]); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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: