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

mulVec is not exposed #10

Closed
jochem-brouwer opened this issue Jun 20, 2020 · 5 comments
Closed

mulVec is not exposed #10

jochem-brouwer opened this issue Jun 20, 2020 · 5 comments

Comments

@jochem-brouwer
Copy link

jochem-brouwer commented Jun 20, 2020

At EthereumJS-VM we are using this library in order to get the BLS12-381 EIP in our library.

This EIP also needs access to multi scalar multiplication, i.e. the mclBnG1_mulVec and mclBnG2_mulVec functions from mcl. They do not seem to be (directly (?)) exposed. Can this function be exposed?

@herumi
Copy link
Owner

herumi commented Jun 21, 2020

Yes, I can expose those functions. There are many functions to be exported for BLS12-381. But is it better to expose them from bls-eth-wasm?
What features do you need?

@jochem-brouwer
Copy link
Author

jochem-brouwer commented Jun 25, 2020

See EIP 2537. Thanks a lot so far =)

I thus need:

  • G1/G2 addition (this is available)
  • G1/G2 multiplication (this is also available)
  • G1/G2 multiexponentation (this is not readily available, but I think this can be implemented indirectly by using addition/multiplication)
  • G1/G2 pairing (this looks like it is available, yet I did not test this)
  • Map Fp to G1/G2 (this looks available, although the G1 implementation might not yield the expected results; see this mcl issue)

@herumi
Copy link
Owner

herumi commented Jun 25, 2020

I see. To expose mclBnG1_mulVec is an easy task. I'm studying the spec of the map-to-g1 function.

@herumi
Copy link
Owner

herumi commented Jul 1, 2020

I've exported mclBnG1_mulVec and mclBnG2_mulVec.
774d276

@jochem-brouwer
Copy link
Author

Thanks a lot @herumi, this works like a charm! 😄

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