Skip to content

Feat: Add BLS signature scheme - #314

Open
yelhousni wants to merge 15 commits into
masterfrom
feat/bls-sig
Open

Feat: Add BLS signature scheme#314
yelhousni wants to merge 15 commits into
masterfrom
feat/bls-sig

Conversation

@yelhousni

Copy link
Copy Markdown
Collaborator

No description provided.

@yelhousni

Copy link
Copy Markdown
Collaborator Author

Needs #312 and #313 to be merged

@sandritis2

Copy link
Copy Markdown

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

samlaf commented Aug 25, 2023

Copy link
Copy Markdown

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

@yelhousni

Copy link
Copy Markdown
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

samlaf commented Sep 16, 2023

Copy link
Copy Markdown

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

dB2510 commented Mar 5, 2025

Copy link
Copy Markdown

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

@yelhousni

Copy link
Copy Markdown
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
@ivokub
ivokub removed their request for review April 15, 2026 21:15
@gbotrel

gbotrel commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Review pass from 2026-05-07.

Findings:

Verification run locally:

  • go test ./signature/... (top-level signature packages have no tests)
  • go test ./ecc/.../signature/...

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