aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-llcrypto/src/rng.rs
Commit message (Collapse)AuthorAgeFilesLines
* llcrypto: Use rdrand on aarch64 too.Nick Mathewson2026-07-011-2/+1
| | | | Starting with rdrand 0.9, the crate supports aarch64.
* Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-121-34/+50
| | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* Remove unnecessary `doc(cfg(...))` attributesNeel Chauhan2025-12-041-1/+0
| | | | | | | | | Fixes part of #2193. (Edits from nickm: I selected the cases here that I could verify were correct from immediate context.) Edited-by: Nick Mathewson <[email protected]>
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-1/+1
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* tor-llcrypto: Removed dependency on `once_cell`hashcatHitman2025-06-141-2/+2
| | | | | | - Replaced `once_cell::sync::Lazy` with `std::sync::LazyLock`. Signed-off-by: hashcatHitman <[email protected]>
* tor-llcrypto: fix feature name typoSteven Engler2025-06-091-1/+1
|
* llcrypto: Document some design choices from CautiousRng.Nick Mathewson2025-03-241-1/+12
|
* Use an EntropicRng trait to enforce key generation rules.Nick Mathewson2025-03-241-1/+44
| | | | | | | | | | | We want to require that whenever we generate a key that's persistent (stored in KeyMgr), it's going to be made from a stronger-than-usual Rng. This trait helps us enforce that. We also add a FakeEntropicRng struct to use for testing. Note that this turned up a case that we'd missed, which required an internal change in tor-hsservice.
* llcrypto: new CautiousRng for constructing long-lived keysNick Mathewson2025-03-241-0/+142
This Rng combines inputs from several sources, including OsRng, to minimize the likelihood of falling to a vulnerability in any particular one.