Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove ReseedingRng#1722

Merged
dhardy merged 9 commits intomasterfrom
push-rnuvnspmkpts
Feb 2, 2026
Merged

Remove ReseedingRng#1722
dhardy merged 9 commits intomasterfrom
push-rnuvnspmkpts

Conversation

Copy link
Member

dhardy commented Jan 28, 2026

  • Added a CHANGELOG.md entry

Summary

Removes ReseedingRng, then reduces the remaining code. Closes #1721.

Motivation

This generic type appears to have little or no real use outside of ThreadRng. Removing it allows for several simplifications (also in rand_core).

Details

(This has a number of little commits so should ultimately be squashed.)

dhardy requested review from newpavlov and vks January 28, 2026 15:48
dhardy marked this pull request as ready for review January 28, 2026 15:48
newpavlov approved these changes Jan 28, 2026
Copy link
Member

newpavlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth to also remove bytes_until_reseed and use block counter stored in the ChaCha core as part of this PR.

- Pub export `Xoshiro128PlusPlus`, `Xoshiro256PlusPlus` prngs (#1649)
- Pub export `ChaCha8Rng`, `ChaCha12Rng`, `ChaCha20Rng` behind `chacha` feature (#1659)

### Removals
Copy link
Member

newpavlov Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keepchangelog recommends to use Added/Changed/Removed.

Copy link
Member Author

dhardy Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the other recent titles match that... a job for another PR.

Copy link
Member Author

dhardy commented Jan 28, 2026

Aha, #1686 uses rng_core.block_pos(). I don't see that method and get_block_pos() is only on the RNG, so I think we need to add a method (we don't use the cipher feature).

Copy link
Member

newpavlov commented Jan 28, 2026

Yes. You can add it as part of RustCrypto/stream-ciphers#512.

Copy link
Member Author

dhardy commented Jan 28, 2026

Ironically such a method would be one use for keeping the ChaCha*Core types.

Copy link
Member

newpavlov commented Jan 28, 2026 *
edited
Loading

The difference is that it's not a "core RNG" type. It's a chacha20-specific type which we expose either way for potential cryptographic applications with inherent methods useful for ThreadRng implementation.

dhardy mentioned this pull request Jan 29, 2026
1 task
dhardy force-pushed the push-rnuvnspmkpts branch from 3bee446 to cc88b38 Compare February 1, 2026 09:57
Copy link
Member Author

dhardy commented Feb 2, 2026

I think it's worth to also remove bytes_until_reseed and use block counter stored in the ChaCha core as part of this PR.

This requires bumping chacha20; I'd prefer to use a new PR for that.

dhardy force-pushed the push-rnuvnspmkpts branch from cc88b38 to 76b5b90 Compare February 2, 2026 08:17
dhardy merged commit bfa14ab into master Feb 2, 2026
16 checks passed
dhardy deleted the push-rnuvnspmkpts branch February 2, 2026 08:30
boquan-fang mentioned this pull request Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

newpavlov newpavlov approved these changes

vks Awaiting requested review from vks

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Remove ReseedingRng?

2 participants