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

Add BLS compression support #13

Open
JayPavlina opened this issue Nov 6, 2019 · 3 comments
Open

Add BLS compression support #13

JayPavlina opened this issue Nov 6, 2019 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@JayPavlina
Copy link
Contributor

JayPavlina commented Nov 6, 2019

These are the expected sizes according to the BLS specification:

  • private key: 32 bytes
  • public key: 48 bytes
  • signature: 96 bytes

When I call to_bytes on each type, I get these sizes:

  • private key (SigKey): 48 bytes
  • public key (VerKey): 97 bytes
  • signature: 192 bytes

Edit: It looks like the sizes match the ones described here, except for the public key which is 97 instead of 96. So I guess this means they are uncompressed. Is there a way to compress them so they match the other sizes?

@lovesh
Copy link
Owner

lovesh commented Nov 6, 2019

Points in G1 can be compressed but points in G2 cannot be using amcl. But Miracl Core does support compression of G2. I don't know if copying the compression code from Miracl Core and submitting in amcl is acceptable. But if we do that, then we move compression feature to GroupElement trait.

@JayPavlina JayPavlina changed the title Serializing results in wrong sizes Add BLS compression support Nov 9, 2019
@lovesh
Copy link
Owner

lovesh commented Nov 13, 2019

The author of AMCL is willing to make an exception for point compression and willing to allow moving Miracl Core's code over to AMCL provided we make the change for all languages. I started the work on this here and the code works for Rust as i checked here. Would appreciate help doing it for other languages.

@lovesh lovesh added the help wanted Extra attention is needed label Nov 20, 2019
@lovesh
Copy link
Owner

lovesh commented May 4, 2020

I just found out that Miracl Core has been released as Apache-2. So no point maintaining miracl/amcl. Need to replace miracl/amcl in https://github.com/lovesh/amcl_rust_wrapper with miracl/core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants