Skip to content

Conversation

@yelhousni
Copy link
Collaborator

No description provided.

@yelhousni
Copy link
Collaborator Author

Needs #312 and #313 to be merged

@yelhousni yelhousni self-assigned this Apr 5, 2023
@yelhousni yelhousni added type: new feature type: consolidate strengthen an existing feature labels Apr 5, 2023
@yelhousni yelhousni added this to the v0.10.0 milestone Apr 5, 2023
@yelhousni yelhousni requested a review from ivokub April 5, 2023 14:12
@sandritis2
Copy link

@gbotrel gbotrel changed the base branch from develop to master August 22, 2023 21:08
@samlaf
Copy link

samlaf commented Aug 25, 2023

Any ETA on when you guys think this is going to get merged?

@yelhousni
Copy link
Collaborator Author

Any ETA on when you guys think this is going to get merged?

The scheme is pretty much implemented (just need to be rebased on top of last master). The PR review was delayed because of other high priority work (Linea related) popped up. I hope we can go back to this soon!

@samlaf
Copy link

samlaf commented Sep 16, 2023

Been playing with this library a bit. I'm curious, why is there no aggregation function on PublicKey and Signature structs? The only way I could find to do aggregation was this clumsy way:

func main() {
	msg := []byte("testing BLS aggregation")

	sk1, _ := bls.GenerateKey(rand.Reader)
	pk1 := sk1.PublicKey
	sig1Bytes, _ := sk1.Sign(msg, nil)
	sig1 := new(bls.Signature)
	_, err := sig1.SetBytes(sig1Bytes)
	if err != nil {
		panic(err)
	}

	sk2, _ := bls.GenerateKey(rand.Reader)
	pk2 := sk2.PublicKey
	sig2Bytes, _ := sk2.Sign(msg, nil)
	sig2 := new(bls.Signature)
	_, err = sig2.SetBytes(sig2Bytes)
	if err != nil {
		panic(err)
	}

	aggPk := new(bls.PublicKey)
	aggPk.A.Set(pk1.A.Add(&pk1.A, &pk2.A))
	aggSig := new(bls.Signature)
	aggSig.S.Set(sig1.S.Add(&sig1.S, &sig2.S))

	ok, err := aggPk.Verify(aggSig.Bytes(), msg, nil)
	if err != nil {
		panic(err)
	}
	fmt.Println("Signature verified?", ok)
}

Am I doing something wrong?

@dB2510
Copy link

dB2510 commented Mar 5, 2025

@yelhousni is this PR abandoned? if not any ETA when will it get merged?

@yelhousni
Copy link
Collaborator Author

@yelhousni is this PR abandoned? if not any ETA when will it get merged?

Sorry we forgot about this PR because of other prioritized work. Is it something that you guys are using? Would someone be willing to contribute rebasing and cleaning it in gnark-crypto?

@ivokub ivokub removed this from the v0.10.0 milestone Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: consolidate strengthen an existing feature type: new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants