Coder Social home page Coder Social logo

Comments (9)

omershlo avatar omershlo commented on June 19, 2024

Enabling only a single curve is by design. No cryptographic system should use multiple curves simultaneously.
About the aliases: maybe, I think it's a matter of personal taste :)

from curv.

djc avatar djc commented on June 19, 2024

There is an established idiom for naming things in Rust libraries, though:

https://rust-lang-nursery.github.io/api-guidelines/naming.html

IMO following that consistently should generally be preferred over personal taste (though obviously there are backwards compatibility concerns at this stage).

from curv.

omershlo avatar omershlo commented on June 19, 2024

I think that because of the backwards compatibility issue it will not be possible to change it now. But we should definitely follow the established idiom . Thanks!

from curv.

omershlo avatar omershlo commented on June 19, 2024

having said that - I would love to see an additive feature version of Curv library. It would be really interesting and useful (we get this request a lot)

from curv.

djc avatar djc commented on June 19, 2024

One version to do this would be to split this repository into five separate crates, one per curve + one base crate that only holds the common traits. This would make things more obvious. Then you could keep the shared curv crate as a high-level interface that depends on all of these others.

Still, this adds quite a bit of extra complexity. IMO it would be better to bite the bullet and simply stop providing the top-level types. With some reorganization, this means that dependencies add an extra path component to their imports (use curv::GE -> use curv::secp256k1::GE).

from curv.

omershlo avatar omershlo commented on June 19, 2024

cc: @oleiba exactly what we have talking about.
Another bonus is that we will be able to put some of the crates at crates.io

from curv.

oleiba avatar oleiba commented on June 19, 2024

We worked around this issue, by having the depending library to use curv of different tag, and if needed a different package alias in Cargo.toml.

For example, we have https://github.com/KZen-networks/gotham-city which depends both on https://github.com/KZen-networks/curv directly with feature ec_secp256k1, and on https://github.com/KZen-networks/multi-party-eddsa which depends on curv with feature ec_ed25519.

So we added an additional tag on curv e.g. v0.2.0-ed25519 (on the same commit as v0.2.0), and https://github.com/KZen-networks/multi-party-eddsa uses this tag with feature ed_25519. That way https://github.com/KZen-networks/gotham-city does not break and is able to import both features of curv.

from curv.

djc avatar djc commented on June 19, 2024

So if you use that as a backwards compatibility shim for now, then it should also be fine to change things to not have the top-level exports in a 0.3 release?

from curv.

oleiba avatar oleiba commented on June 19, 2024

Yes, we now follow semver semantics so you can break backwards compatibility and update the version accordingly, e.g. 0.2.0 -> 0.3.0.

from curv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.