kilic / bls12-381

High-speed BLS12-381 implementation in Go
Apache License 2.0
124 stars 47 forks source link

Make certain functions and variables public #13

Open mikelodder7 opened 4 years ago

mikelodder7 commented 4 years ago

Is there any reason why we can't use fe, modulus, and q directly? For example, I want to implement the BBS+ signature scheme using this library and it involves operations on fe like add, sub, inverse all mod q.

I'd rather not do it in BigInt and duplicate the code you have written here. I don't mind submitting a PR to do so.

kilic commented 4 years ago

As far as I understand from BBS+ signature scheme you need to do arithmetic in scalar field instead of base field fe. Is that right?

At this current version, big.Int is already used for scalar fields. And we are planning to implement optimized scalar field operations soon and make it publicly available.

I agree on q that it should be used directly however for now you can reach it using g1.Q() or g2.Q().