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

Wrapper around C++ BLS #6

Closed
wavepacket0 opened this issue Aug 18, 2022 · 4 comments
Closed

Wrapper around C++ BLS #6

wavepacket0 opened this issue Aug 18, 2022 · 4 comments

Comments

@wavepacket0
Copy link

Hi guys!

first of all, really good idea to create a Go port of the BLS Chia lib, this could open further possibilities Go side.

Why did you decide to do a complete port (I understand a native Go implementation was missing) instead of using CGO/SWIG and create an interface to the offcial C++ BLS lib?
This could avoid the need for code updates to be on par with the official lib and also use all the speedups due to GMP.

I would also suggest to keep the same naming convention as the official lib, for example using G1Element/G2Element

@chuwt
Copy link
Owner

chuwt commented Aug 18, 2022

Hi friend @wavepacket0.

Thank you for reaching out to me.

And I didn't think about it too much about this repo. I just want to write a pure a lib for go developers to use (including me). I'm glad if this repo helps others. I'll be happy too if others can give more advice and more PRs.

@wavepacket0
Copy link
Author

wavepacket0 commented Aug 18, 2022

thank you for the answer @chuwt

I would like to see a somewhat complete chia-bls implementation in go, so we have a common goal!
My primary language is not Go, nor im experienced in the field of cryptography, but let's try ;)

As of now Im comparing different bls12-381 Go implementations: kilic's one (the one you're using, CIRCL (Cloudflare's crypo Go toolkit, more or less like Relic Toolkit) and go-ethereum implementation (updated, security audited version forked from kilic repo).

What I see is that no one uses minimum public key sizes (MPL) as Chia does for G1/G2 elements. Given the fact kilic's original repo seems without recent activity and the updated version of it is inside go-ethereum, I think im gonna use that as a base, updating G1/G2 to use MPL as Chia uses and then base your lib on top of that. What do you think?

@chuwt
Copy link
Owner

chuwt commented Aug 19, 2022

@wavepacket0 Sounds great. Also here is the implementation written by Coinbase. Hope it will help.

@wavepacket0
Copy link
Author

Thank you for the Coibase impl, missed that. I think i will stick with go-ethereum or Coinbase one as both have passed audit phase @chuwt

@chuwt chuwt closed this as completed Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants