-
Notifications
You must be signed in to change notification settings - Fork 55
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
chore: update crypto deps #204
Conversation
Hi there! I can answer some of your questions:
The https://github.com/dalek-cryptography/curve25519-dalek/#backends
The changes you're looking for are on the FWIW, I was able to upgrade the Here's a tracking issue to release some prerelease crate versions of And here's an overall tracking issue for an |
@tarcieri thanks for the feedback. I tried to switch to the not-yet release of These are the changes I did to our diff --git a/Cargo.toml b/Cargo.toml
index b725e5dfdc..9f939dbf1e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -49,7 +49,9 @@ ecdsa = { version = "0.15", features = [ "pkcs8", "digest", "der" ] }
digest = "0.10.3"
signature = { version = "2.0" }
ed25519 = { version = "2", features = [ "alloc" ] }
-ed25519-dalek-fiat = "0.1.0"
+ed25519-dalek = { git = "https://github.com/dalek-cryptography/ed25519-dalek", branch = "release/2.0" }
+
rsa = "0.8"
pkcs1 = "0.4.0"
reqwest = { version = "0.11", default-features = false, features = ["json", "multipart"] }
``
Unfortunately `cargo check` fails immediately because of a dependency/feature issue:
```console
╰─ cargo check
Updating crates.io index
Updating git repository `https://github.com/dalek-cryptography/ed25519-dalek`
error: failed to select a version for `curve25519-dalek`.
... required by package `ed25519-dalek v1.0.1 (https://github.com/dalek-cryptography/ed25519-dalek?branch=release/2.0#928d6d15)`
... which satisfies git dependency `ed25519-dalek` of package `sigstore v0.6.0 (/home/flavio/hacking/sigstore/sigstore-rs)`
versions that meet the requirements `=4.0.0-pre.5` are: 4.0.0-pre.5
the package `ed25519-dalek` depends on `curve25519-dalek`, with features: `precomputed-tables` but `curve25519-dalek` does not have these features.
failed to select a version for `curve25519-dalek` which could resolve this conflict It looks like I wonder if I'm doing something stupid, or if that's work a bug opened against |
@flavio that seems like you're pulling Anyway, there's another forthcoming crate release which should help take care of these problems: dalek-cryptography/curve25519-dalek#501 |
@flavio ed25519-dalek v2.0.0-pre.0 has been released: https://crates.io/crates/ed25519-dalek/2.0.0-pre.0 |
Update tons of cryptographic libraries: * ecdsa * ed25519 * p256 * p384 * signature The majority of these libraries broke their API during the upgrade, hence quite some fixes were needed. Signed-off-by: Flavio Castelli <fcastelli@suse.com>
0d473d4
to
1cf6679
Compare
@tarcieri thanks for the update, now everything seems to be working. I'm changing this PR from draft to "ready to be reviewed". Please, please.... take a look at that and make sure I didn't do anything stupid 🙏 |
Hi @flavio , great to see the updates for the cryptos! When I was working on replace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks and sorry for the delay. There are still some another test needs to be added as convert_ed25519_subject_public_key_to_cosign_verification_key
, which I will add in another PR.
Update "tons" of cryptographic libraries:
The majority of these libraries broke their API during the upgrade, hence quite some fixes were needed.
Open issues
The code currently doesn't compile because of these errors:
The main issue is caused by the ed25519-dalek-fiat crate requiring an older version of the ed25519 crate (this PR switches to v2).
I think we are in trouble, the
ed25519-dalek-fiat
crate has not been maintained in the last 2 years (no new releases). The company behind it, Novi, ceased to exist on Sept 1, 2022 (note the link is a direct redirect from https://novi.com/).The ed25519-dalek crate hasn't seen a release in 2 years, but it seems to have some activity on GitHub. Unfortunately, even on the
main
branch this crate depends on version1
ofed25519
. I've tried to update it, but I ended up in a rabbit hole.@tarcieri : I see you contributed to
ed25519-dalek
and you're a maintainer of the majority of these crypto libraries that we're attempting to update. Can you help a bit please?CC @Xynnn007 who worked on this code