Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rand_core::block #656

Closed
dhardy opened this issue Nov 27, 2018 · 3 comments
Closed

rand_core::block #656

dhardy opened this issue Nov 27, 2018 · 3 comments

Comments

@dhardy
Copy link
Member

dhardy commented Nov 27, 2018

Related to #655 and #648, I have been considering whether we should remove the "block" stuff from rand_core to another crate, say rand_block.

  • Rationale: it's a significant amount of extra code that not all users need, and rand_core is supposed to be a minimal interface crate.
  • Against: the main users wanting a minimal interface are likely to want CSPRNGs anyway.
@dhardy
Copy link
Member Author

dhardy commented Nov 27, 2018

Note: this is in part motivated to prepare rand_core for 1.0 stabilisation, but it may be best to wait until we have resolved #648 / have a "secure random" function within std, since this may have consequences for our core traits or error types.

@burdges
Copy link
Contributor

burdges commented Nov 27, 2018

Almost all PRNGs work this way, so the issue is providing the right block stuff. There is no harm in folks who want only OsRng importing the block stuff but simply not using it. If you want iterators then you pull in iterator adapters too.

@dhardy
Copy link
Member Author

dhardy commented Nov 28, 2018

No, simple non-crypto PRNGs generally don't use a buffer. But even so it seems common enough code to be worth keeping in rand_core.

@dhardy dhardy closed this as completed Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants