-
Notifications
You must be signed in to change notification settings - Fork 68
chacha20: rand_core v0.10.0-rc.4 + set_stream()/get_block_pos() change
#500
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
Conversation
…e tests, made some changes to get_block_pos()
|
rand_core 0.10.0-rc-4 released this morning, any chance to get this out of draft status? |
|
I can look shortly |
|
@baloo you mean this evening! See rust-random/rand#1712. I'll try to resolve the rand_chacha test failure in the morning, though I think you already did for chacha20. |
|
If you take the last commit from #502, and push it over their branch, I think it's ready to merge (and that could probably use an rc-release after that) |
|
I am here. But I see there were some changes involving a |
|
I still want to clean up that test where I did a bunch of manual debugging when troubleshooting |
|
Thanks. I was working on it but found that one of the tests had a (very minor) breaking change. I've never used trait objects in that manner and it has an easy fix, but I'm also pretty sure that the trait objects test is pretty new anyway |
chore(deps): bump `rand_core` to `0.10.0-rc-4`
|
It'd be great if we can get something out quickly as this blocks updating everything else. (I also have a green branch locally as it were, based on @nstilt1's, but I feel like I'm duplicating effort here) |
chacha20 - rng - rand_core preview, minor set_stream() change and get_block_pos() changerand_core v0.10.0-rc.4 + set_stream()/get_block_pos() change
tarcieri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gonna release this since we use chacha20 as a dependency in several places
|
Okay. Gonna get started on #476 |
|
@nstilt1 sweet, thanks! |
|
It's released: https://crates.io/crates/chacha20/0.10.0-rc.7 |
It does not build because it requires one change to
rand_core#44, and theCargo.tomlneeds to be updated.Changes
rand_coreto a preview from Revise index / reset / skip methods rust-random/rand_core#44Cargo.tomlonce that PR makes it throughset_stream()to reset theblock_pos+indexto 0. Before, callingset_stream()would basically behave like this:set_stream()calls and the only way to replicate it was to manually find theword_posthat resulted from each call. We can remove this test or at the very least reduce the test, since I had to add more assertions to figure out what was going on in the previous implementation.get_block_pos()to return the currentblock_posinstead of returningblock_pos + 4due togenerate()calls incrementing the pos by 4.get_block_pos()was not implemented forrand_chacha, but it is a breaking change for anyone who was usingget_block_pos()from the prerelease versions.set_stream()nullifies any calls made toset_word_pos()orset_block_pos().Regarding #438