Comments (13)
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.
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.
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.
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.
Yeah, there's a PR to add it here: dalek-cryptography/curve25519-dalek#473
from elliptic-curves.
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.
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.
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.
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.
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.
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.
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.
Closing this
from elliptic-curves.
Related Issues (20)
- Update crates to the newtype `fiat-crypto` codegen
- Request: Instructions to reproduce fiat-crypto files HOT 2
- Using ECDSA key pair for ECDH HOT 1
- Prepend the TapSigHash tag when doing k256 Schnorr signatures? HOT 1
- bp256+bp384: tracking issue for `arithmetic` feature HOT 3
- Numerous unused variable cause Rust difficulties HOT 3
- Bug(deps) p521 crate requires ecdsa 16.8 HOT 2
- BIP340 Schnorr should accept arbitrary length messages HOT 6
- p256::Scalar: implement Reduce<U512> HOT 1
- Surprisingly slow constant time selection HOT 6
- Batch Conversion of Projective -> Affine Points HOT 19
- p521: field arithmetic implementation not working correctly HOT 8
- 256 bit Field Operation: 64 bit * 4 vs 52 bit * 5 HOT 4
- P521 `FieldElement` conversions can panic HOT 3
- k256: Linear Combanation over Dynamically Allocated Slices
- primeorder 0.13.4 update breaks p384 0.13.0 builds HOT 4
- k256 disrepency in secp256k1 key recover HOT 12
- How to convert a VerifyingKey of type FieldElement10x26 to a FieldElement5x52 type
- k256: v0.13.2 breaking verification HOT 9
- Bitwise operations for scalars HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elliptic-curves.