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

Replace kilic/bls12-381 with gnark-crypto/ecc/bls12-381 #2629

Open
wants to merge 17 commits into
base: gligneul/fix-update-gethpin-v1.14.0
Choose a base branch
from

Conversation

amsanghi
Copy link
Contributor

@amsanghi amsanghi commented Sep 3, 2024

Fixes : NIT-2721

@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Sep 3, 2024
@amsanghi amsanghi marked this pull request as ready for review September 3, 2024 14:48
@amsanghi amsanghi changed the title Replace bls Replace kilic/bls12-381 with gnark-crypto/ecc/bls12-381 Sep 3, 2024
blsSignatures/blsSignatures.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@PlasmaPower PlasmaPower left a comment

Choose a reason for hiding this comment

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

This looks correct to me, but I have a few recommended simplifications and test cases

blsSignatures/blsSignatures.go Outdated Show resolved Hide resolved
blsSignatures/blsSignatures.go Outdated Show resolved Hide resolved
blsSignatures/blsSignatures.go Show resolved Hide resolved
blsSignatures/blsSignatures.go Outdated Show resolved Hide resolved
blsSignatures/blsSignatures.go Outdated Show resolved Hide resolved
blsSignatures/blsSignatures.go Outdated Show resolved Hide resolved
blsSignatures/blsSignatures.go Show resolved Hide resolved
blsSignatures/blsSignatures.go Outdated Show resolved Hide resolved
blsSignatures/blsSignatures.go Outdated Show resolved Hide resolved
blsSignatures/blsSignatures.go Outdated Show resolved Hide resolved
@amsanghi amsanghi changed the base branch from update-gethpin-v1.14.0 to gligneul/fix-update-gethpin-v1.14.0 October 11, 2024 13:05
@PlasmaPower
Copy link
Collaborator

I pushed up a fuzzer for the new impl vs the old impl to the new-bls-impl-fuzzer branch. It's currently failing, I believe because the new impl accepts compressed points but the old impl does not. For the public key and signature deserialization in the new impl we should ensure the compressed bit (I think the most significant bit from the docs) is not set. Private key deserialization isn't relevant to this though, as it's only done with local trusted input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants