Uh oh!
There was an error while loading. Please reload this page.
Remove CryptoGenerator - #69
Conversation
dhardy
commented
Jan 29, 2026
@tarcieri this PR requires using code like the following to implement zeroization. Do you approve? block_rng.core.zeroize();
block_rng.clear();
zeroize::optimization_barrier(&block_rng) |
tarcieri
commented
Jan 29, 2026
Has anyone inspected the generated assembly to confirm zeroization is actually working correctly? |
I haven't. If we don't get confirmation this works before Sunday, I guess I'll only remove |
tarcieri
commented
Jan 29, 2026
I would prefer to avoid delays if possible |
newpavlov
commented
Jan 29, 2026
@tarcieri |
5978a5e to
d8d93feCompareUh oh!
There was an error while loading. Please reload this page.
dhardy
commented
Feb 1, 2026
I opted to remove the commits replacing fn /// Clear the results buffer////// This overwrites all bits of the results buffer, and thus may be useful/// in conjunction with [`zeroize`](https://docs.rs/zeroize/).#[inline]pubfnclear(&mutself){self.results = [W::default();N];self.results[0] = W::from_usize(N);} |
CHANGELOG.mdentryMotivation
Removes
CryptoGeneratorsince rust-random/rand#1722 makes it useless.Removes fn
Generator::dropsince it can be confusing.Adds fn
BlockRng::clearexplicitly for use with zeroize, since it is clear we do need to care about that and an explicit method appears to be the best solution (without actually depending on the zeroize crate).Soft-blocker: chacha20 will need a new zeroize release to use
clearcorrectly.