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

Use Miracl Core instead of AMCL? #6

Open
JayPavlina opened this issue Nov 2, 2019 · 13 comments
Open

Use Miracl Core instead of AMCL? #6

JayPavlina opened this issue Nov 2, 2019 · 13 comments

Comments

@JayPavlina
Copy link

Is it a good idea to use Miracl Core instead of AMCL? They say it has improvements over AMCL and that AMCL will not be further developed, but it will be maintained.

@lovesh
Copy link
Owner

lovesh commented Nov 3, 2019

Miracl Core has AGPL licence and i wanted to keep this wrapper as Apache-2 licensed. My understanding is that this is not possible. But i would like to know if I am wrong and i can somehow use Miracl Core and still be Apache-2 licensed. Is there a dual license possibility and would that dual license propagate to dependent codebases?

@RuralDependencies
Copy link

There is no problem using both, just make sure your main program isn't Miracl Core, you are just using it in the background which is entirely fine, this applies to you if your whole program is only using an AGPL software, but in your case you are actually using "pieces of it".

@burdges
Copy link

burdges commented Nov 4, 2019

It appears the current improvements only available in miracl core include code that makes more curve parameters work correctly, as well as any effort to conform to the IRTF standards effort.

We've no consensus yet about conservative curve parameters, so.. AMCL might never include the future curves designed people who cannot easily upgrade their protocol. It's a fast moving field..

As an aside, the AGPL should not harm public blockchain use cases because (a) security demands the code be open sourced anyways, but (b) validator operators and wallet users do not modify the program, so they cannot be asked to redistribute under the AGPL.

@lovesh
Copy link
Owner

lovesh commented Nov 4, 2019

There is no problem using both, just make sure your main program isn't Miracl Core, you are just using it in the background which is entirely fine, this applies to you if your whole program is only using an AGPL software, but in your case you are actually using "pieces of it".

@RuralDependencies I don't understand "in the background" and "pieces of it". You mean if i was using Miracl core' binary or .so or .dylib file, i would be fine but using the crate is not?

@lovesh
Copy link
Owner

lovesh commented Nov 4, 2019

@burdges I agree that using Miracl core is better but the main codebases that this wrapper is supposed to serve are under Hyperledger which only accepts Apache-2 licensed codebases.

@JayPavlina JayPavlina changed the title Use Miracle Core instead of AMCL? Use Miracl Core instead of AMCL? Nov 5, 2019
@JayPavlina
Copy link
Author

They have similar APIs right? Maybe it wouldn't be much extra work to maintain a fork that runs on Miracl Core?

@lovesh
Copy link
Owner

lovesh commented Nov 5, 2019

Do you think it is legally correct to make this wrapper dual-licensed such that depending on the compile-time feature, amcl or Miracl Core is used as a dependency so that we only have a single codebase for this wrapper?
The answer may be negative. A relevant link.

@JayPavlina
Copy link
Author

I know of a library called Game Music Emu that uses a dual license. It's a collection of emulators, and depending on which you compile, the license changes. I think it's ok to do it, but if you're concerned, we could ask the developer of Miracl Core about it.

@lovesh
Copy link
Owner

lovesh commented Nov 12, 2019

I asked the author of AMCL and he said that having such a flag and a dual license would be ok.

@LimitlessCloud
Copy link

LimitlessCloud commented Nov 13, 2019

Thanks you Lovesh to care so much! I can't imagine how many people are watching this issue right now for you to make the switch.

Do you have an estimated time already of when you'll be able to migrate the core to Miracl?

@lovesh
Copy link
Owner

lovesh commented Nov 13, 2019

You are welcome. It will probably be a couple of weeks before I can get to it. It's not straightforward as Miracl Core does not have a Rust crate (no Cargo.toml) and some script needs to be run to have working rust code. Maybe that is intentional by Miracl. So first we need to see if we host a separate repo for the crate or something else needs to be done. The relevant API of Core and AMCL look same but there might be some surprises there.

@JayPavlina
Copy link
Author

The generated rust crate could be in a workspace within the same repository.

@lovesh
Copy link
Owner

lovesh commented May 4, 2020

I just found out that Miracl Core has been released as Apache-2. I am delighted :). Time to replace miracl/amcl with miracl/core.

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

5 participants