attestantio / dirk

Apache License 2.0
75 stars 22 forks source link

Support for bn254 curve #66

Open shrimalmadhur opened 4 weeks ago

shrimalmadhur commented 4 weeks ago

I was looking into Dirk for BLS on bn254 curve keys support. I saw that the library you use here have support for bn254 keys.

I was wondering what would it take for dirk to fully support BLS on bn254?

mcdee commented 4 weeks ago

Initial support would require adding support in the libraries used by Dirk and extending the existing https://eips.ethereum.org/EIPS/eip-2335 to allow for different curves. A lot depends on support within https://github.com/herumi/bls-eth-go-binary as to what would be available for us to use.

The big one would be distributed key generation and threshold signing; I haven't looked at this for bn254 but it would likely be where most work would take place.

Given how the BLS library works, with a global init, there would be issues around a single Dirk instance supporting both BLS12-381 and b254. It's unlikely that this is fixable without being addressed in the dependency.