Skip to content

deps: bump ed25519-dalek to 3 - #257

Merged
ademariag merged 1 commit into
kapicorp:mainfrom
Moep90:deps/ed25519-dalek-3
Oct 27, 2026
Merged

ademariag merged 1 commit into
kapicorp:mainfrom
Moep90:deps/ed25519-dalek-3

Conversation

@Moep90

@Moep90 Moep90 commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Supersedes #249, which fails to compile in the clippy, MSRV and both test jobs:

error[E0277]: the trait bound `OsRng: ed25519_dalek::rand_core::CryptoRng` is not satisfied
error[E0599]: the function or associated item `from_pkcs8_pem` exists for struct `ed25519_dalek::SigningKey`, but its trait bounds were not satisfied

ed25519-dalek 3 moved to rand_core 0.10 and pkcs8 0.11 (changelog). rand 0.8 and rsa 0.9 stay on rand_core 0.6 and pkcs8 0.10: RsaPrivateKey::new needs a rand_core 0.6 RNG, and rsa has no stable release on the newer stack yet (0.10 is still a release candidate).

The ed25519 ref function now fills the 32-byte secret key from rand's OsRng instead of calling SigningKey::generate, which does exactly that. That drops the rand_core feature, so the tree keeps a single rand_core. The route the dalek docs show, SigningKey::generate(&mut UnwrapErr(getrandom::SysRng)), would add getrandom 0.4 and rand_core 0.10 next to the versions rand 0.8 and rsa use. The output format is unchanged: PKCS#8 v1 without the public key, as cryptography writes it.

public_key_pem used to resolve SigningKey::from_pkcs8_pem through the DecodePrivateKey imported from rsa, which was the same pkcs8 0.10 trait until now. The Ed25519 branch brings ed25519-dalek's own DecodePrivateKey and LineEnding into scope.

keys_and_public_keys now also pins the RFC 8410 key pair (private key from section 10.3, public key from 10.1), so parsing a PKCS#8 key and encoding its public key stay byte-identical. The assertion passes on main with 2.2.0 too.

New duplicate crate versions, which cargo-deny reports as warnings: der, pem-rfc7468, pkcs8, sha2, signature, spki. They go away once rsa and the workspace sha2 move to the same stack.

Test plan

Left out on purpose

Moving the workspace sha2 to 0.11 and rsa to 0.10 would remove the duplicates, but rsa 0.10 is not released and sha2 is used across crates; both are separate changes.

@Moep90

Moep90 commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Workflow lint fails on the existing dtolnay/rust-toolchain pin in ci.yml, which this PR does not touch: zizmor reports ref-version-mismatch because the action's master branch moved to 683b588. The open Dependabot PRs fail the same way. #258 updates the pin; all other jobs here pass.

@Moep90
Moep90 force-pushed the deps/ed25519-dalek-3 branch 3 times, most recently from 226bcc9 to 8c4cffb Compare October 27, 2026 19:10
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 27, 2026
Supersedes the Dependabot bump, which fails to compile because
ed25519-dalek 3 moved to rand_core 0.10 and pkcs8 0.11 while rand 0.8
and rsa 0.9 stay on rand_core 0.6 and pkcs8 0.10.

The ed25519 ref function fills the 32-byte secret key from rand's OsRng
instead of calling SigningKey::generate, which does exactly that. This
drops the rand_core feature, so the tree keeps a single rand_core.
public_key_pem brings ed25519-dalek's own DecodePrivateKey and
LineEnding into scope for the Ed25519 branch.

A test pins the RFC 8410 key pair, so parsing a PKCS#8 key and encoding
its public key stay byte-identical to the previous version.

Signed-off-by: moep90 <3042152+Moep90@users.noreply.github.com>
@Moep90
Moep90 force-pushed the deps/ed25519-dalek-3 branch from 8c4cffb to 3f0991c Compare October 27, 2026 19:29
@ademariag
ademariag merged commit f931811 into kapicorp:main Oct 27, 2026
10 checks passed
Moep90 pushed a commit to Moep90/krab that referenced this pull request Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: compile Compile, input and output types, manifest area: packaging Crates, release binaries, CI documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants