noble-bls12-381 icon indicating copy to clipboard operation
noble-bls12-381 copied to clipboard

Add support for G2 public keys with G1 signatures

Open alejo-acevedo-deel opened this issue 2 years ago • 3 comments

Not working with DFinity bls

Description

When I tried to use this library instead of BLS_verify implementation into agent-js library I cannot make it work. I only obtained Error: Invalid G1 point: not on curve Fp. Going into agent-rs library to watch what the original implementation does, I realize that in DFinity libraries PublicKey is G2 point and signature is a G1 point. So, there is anyway to fix this problem?

agent-rs library where implement bls verify https://github.com/dfinity/agent-rs/blob/88606ecc8288592a7bcc1c8d23e877914b3b31da/ic-agent/src/bls/bls12381/bls.rs#L137-L171

alejo-acevedo-deel avatar Dec 06 '21 21:12 alejo-acevedo-deel

DFinity libraries PublicKey is G2 point and signature is a G1 point

The point is described in our README. We only support G1 pubkeys. So, that's it. Contributions are welcome.

paulmillr avatar Dec 06 '21 21:12 paulmillr

The point is described in our README. We only support G1 pubkeys. So, that's it. Contributions are welcome.

I'd like to check if there are updates on this. I'm writing a TypeScript BBS signatures implementation, and using your (great!) library for the BLS support, but BBS fixes sig in G1 and keys in G2. I'm hoping to contribute that underlying code here; unless work in already underway... (?)

christianpaquin avatar May 20 '22 17:05 christianpaquin

No work has been done on this

paulmillr avatar May 21 '22 01:05 paulmillr

the repo got merged into paulmillr/noble-curves and is now deprecated.

paulmillr avatar Feb 20 '23 22:02 paulmillr