-
Notifications
You must be signed in to change notification settings - Fork 185
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
Create util to verify KZG commitment by generation and comparison #1042
Conversation
Signed-off-by: litt3 <[email protected]>
Signed-off-by: litt3 <[email protected]>
Signed-off-by: litt3 <[email protected]>
Signed-off-by: litt3 <[email protected]>
Signed-off-by: litt3 <[email protected]>
Signed-off-by: litt3 <[email protected]>
Signed-off-by: litt3 <[email protected]>
return fmt.Errorf("compute commitment: %w", err) | ||
} | ||
|
||
if claimedCommitment.X.Equal(&computedCommitment.X) && |
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.
i was going to say we'd need to check if claimedCommitment is on the curve but since its checked against what's computed locally, its fine.
|
||
// GenerateBlobCommitment computes a kzg-bn254 commitment of blob data using SRS | ||
func GenerateBlobCommitment( | ||
kzgVerifier *verifier.Verifier, |
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.
Curious: why didn’t you make these methods on the verifier?
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.
Unconscious hesitancy to modify an existing utility, I suppose.
You're right, it's where the methods belong. I will fix this in an upcoming PR
Why are these changes needed?
Checks