Git Product home page Git Product logo

Comments (13)

daxpedda avatar daxpedda commented on July 22, 2024 3

This is amazing to hear!

I've already done some preliminary work here dalek-cryptography/curve25519-dalek#375 and am willing to go all the way, as much as I'm capable of at least.

Another issue that has to be discussed, for this to work long-term, is that if these traits are to be implemented in curve25519-dalek, and not in a wrapper crate like ed25519, we need a good dependency update policy. This issue has come up with rand for example, currently all downstream users have to pull in two different versions. In the case of implementing traits, it will simply be impossible to be useful unless the dependencies are up-to-date.

I am willing to help in any way @isislovecruft, sadly IANA cryptographer, so my capabilities are limited, but if there is anything I can do to minimize your maintenance burden, please feel free to hit me up :).

from elliptic-curves.

jplatte avatar jplatte commented on July 22, 2024 2

Being able to use actively maintained, trusted forks of {curve,ed,x}25519-dalek would be a big quality-of-life improvement for vodozemac, used primarily for end-to-end encryption in the matrix-rust-sdk.

I think the Signal folk would also be happy about this, they seem to be using at least one of these crates: https://github.com/signalapp/libsignal/blob/2c32fb802d1f8d6739ade32901a3f5d84e7ec19b/rust/attest/Cargo.toml#L26.

from elliptic-curves.

decathorpe avatar decathorpe commented on July 22, 2024 2

Speaking as the primary maintainer of Rust crates on Fedora Linux, I would be interested in actually maintained RustCrypto-backed forks of these crates, as well.

We are trying to package some of the *-dalek crates, but doing that currently forces us to make old versions of some crates available (or keep them available even though they're outdated and not used by other crates any longer), and this blowing up of the dependency tree results in a lot of unnecessary work and resource use on Fedora server infrastructure.

from elliptic-curves.

kayabaNerve avatar kayabaNerve commented on July 22, 2024 1

It's not a new crate, just a wrapper around dalek, and I think we have about the same amount of unimplemented code :p Though we may have differences in what is unimplemented. I will note I have yet to bother with sqrt, so that would be mutual.

I also took the easy route for some of it, which may make it technically improper according to expectations, and don't mean to disparage or end the work that was happening with curve25519-dalek. Solely to allow people to use dalek without further abstractions in modular code today, as I myself frequently need.

In the past, I wrote a CryptEngine type, with a FfGroupEngine, Ed25519Engine, and RistrettoEngine behind it (as dalek doesn't even offer a DalekPoint trait enabling DalekEngine<P>, unfortunately). I've seen other parties not use ff/group, yet manually redefine all the arithmetic relationships needed, and then manually fill out the rest per-curve. Now, I'm just trying to use ff/group as intended, and I didn't feel like waiting through the dalek bureaucracy, even if I respect it and hope I can eventually deprecate my work.

EDIT: I'd also like to clarify this does use modern dependencies, and I'll continue to update them as feasible (ff/group and this repo updating). I'd also like to clarify the "easy route" was over some CtOption and similar handling. I don't believe anything breaks specs, and will take any PRs increasing correctness.

from elliptic-curves.

tarcieri avatar tarcieri commented on July 22, 2024 1

Yeah, there's a PR to add it here: dalek-cryptography/curve25519-dalek#473

from elliptic-curves.

daxpedda avatar daxpedda commented on July 22, 2024 1

Now that dalek-cryptography/curve25519-dalek#562 was merged, I believe this can be closed. I think any further compatibility with the RustCrypto ecosystem is covered by RustCrypto/traits#1177.

from elliptic-curves.

tarcieri avatar tarcieri commented on July 22, 2024

It's something we can potentially discuss with the upstream dalek maintainers. This hasn't been the first request for this sort of thing.

from elliptic-curves.

isislovecruft avatar isislovecruft commented on July 22, 2024

Hi @tarcieri and @daxpedda! Switching to implementing the the elliptic curves traits is not something I've yet had time to look into, so I can't speak to the feasibility of it at the moment, but in principle is something we would be happy to support.

from elliptic-curves.

kayabaNerve avatar kayabaNerve commented on July 22, 2024

I recently published dalek-ff-group, wrapping the Ed25519 prime subgroup and Ristretto into the ff/group APIs. While a few functions remain unimplemented, blocking dalek's PR yet not a new crate, it's usable now and will do its best to maintain parity with modern dependency versions.

I'm currently working on the PrimeFieldBits API, and also have an eye on CofactorCurve.

from elliptic-curves.

daxpedda avatar daxpedda commented on July 22, 2024

Wow! Amazing stuff!

In the meantime I have just stopped using curve25519-dalek completely 😆. Especially with the recent introduction of P-384 arithmetic.

So the next step is to either close my PR or update it. Updating it at least is realistic now as I can learn from the work you have done @kayabaNerve! In any case I'm glad to have the work split up like this, as it decreases the maintenance burden on isislovecruft.

Last problem that would have to be addressed is to actually update dependencies of curve25519-dalek.

from elliptic-curves.

kayabaNerve avatar kayabaNerve commented on July 22, 2024

As a slight update, dalek-ff-group, while not containing any optimizations, no longer has unimplemented code and is fully correct under the ff/group API. While I personally advocate for RustCrypto taking over dalek, and natively offering the ff/group API, a modern dependency view (with a standardized API) can be offered by it. Not that it helps too much with the dependency tree :/

Also happy to transfer dalek-ff-group/its API bindings to RustCrypto, though I'd see that as pointless compared to forking dalek and...

EDIT: I see this has effectively happened, just still under the dalek-cryptography org.

from elliptic-curves.

ycscaly avatar ycscaly commented on July 22, 2024

Yeah, there's a PR to add it here: dalek-cryptography/curve25519-dalek#473

Can we count on it being merged in the future?
And if it will, can we count on either an actively-maintained forks here or the original crates supporting the elliptic-curve traits?

I am writing code that needs to generically work over group-arithemetics for both secp256k1 and curve25519, and want to know whether to use ff and group as my underlying traits, or the elliptic-curve ones (which I prefer)

from elliptic-curves.

tarcieri avatar tarcieri commented on July 22, 2024

Closing this

from elliptic-curves.

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.