Skip to content

update: Bump rand 0.8 -> 0.9#177

Merged
inureyes merged 1 commit into
mainfrom
update/rand-0.9
Apr 13, 2026
Merged

update: Bump rand 0.8 -> 0.9#177
inureyes merged 1 commit into
mainfrom
update/rand-0.9

Conversation

@inureyes
Copy link
Copy Markdown
Member

Summary

Aligns our root crate with `bssh-russh` which already depends on rand 0.9, eliminating a duplicate `rand`/`rand_core` copy from the dependency tree.

rand 0.9's `ThreadRng` does not implement rand_core 0.6 traits, which is what `ssh-key::PrivateKey::random` still requires. Key-generation call sites (`src/keygen/{ed25519,rsa}.rs`, `src/bin/bssh_server.rs`) now use `ssh_key::rand_core::OsRng` — OS entropy is the correct source for long-lived key material anyway, and `thread_rng` added no value there.

Why not rand 0.10?

`bssh-russh` pins `rand_core = "=0.10.0-rc-3"` (pre-release) via its crypto chain. Stable rand 0.10 requires stable `rand_core 0.10.0`, which conflicts with that pin. Revisit once the upstream `ssh-key` / `rsa` / `ed25519-dalek` chain stabilizes on rand_core 0.10.

Test plan

  • `cargo build` clean
  • `cargo clippy --all-targets` clean

bssh-russh already depends on rand 0.9; our root crate was the last
holdout on 0.8. Bumping to 0.9 removes a duplicate crate version from
the tree and aligns with the vendored russh fork.

rand 0.9's ThreadRng does not implement rand_core 0.6 traits, which is
what ssh-key::PrivateKey::random requires. Switch key-generation call
sites to ssh_key::rand_core::OsRng — OS entropy is the correct source
for long-lived key material anyway, and thread_rng added no value.

rand 0.10 is blocked: bssh-russh pins rand_core = "=0.10.0-rc-3"
(pre-release) via its crypto chain, which conflicts with stable
rand_core 0.10.0 required by rand 0.10. Revisit once the upstream
ssh-key / rsa / ed25519-dalek chain stabilizes on rand_core 0.10.
@inureyes inureyes added the type:dependency Dependency updates label Apr 13, 2026
@inureyes inureyes merged commit 90235ee into main Apr 13, 2026
2 checks passed
@inureyes inureyes deleted the update/rand-0.9 branch April 13, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:dependency Dependency updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant