News for hackers. Stuff that matters.
Re:Thoughts on Rust bloat by vunie on Wednesday August 21, 2019 @09:20PM (#20763755)
SHA2 is not designed to be used as a RNG. SHA3 might be a little bit better with its "streaming" modes, but there are many far better and faster ways to get random bits.
Re:Thoughts on Rust bloat by Dylan16807 on Wednesday August 21, 2019 @09:31PM (#20763808)
It doesn't have to be the absolute fastest, it just has to work.

What is far better and faster than SHA3?

And while SHA2 wasn't designed for that use, it's easy to make simple and provably correct constructs that turn a secure hash into a secure RNG.

Re:Thoughts on Rust bloat by heavenlyblue on Thursday August 22, 2019 @05:39AM (#20766247)
You’re speculating to prove a point.

I would definitely not want my std to be designed this way.

Re:Thoughts on Rust bloat by Dylan16807 on Thursday August 22, 2019 @01:22PM (#20770363)
1. It was just an example.

2. You definitely don't want your std to be designed with a simple API to a fast, secure, and popular crypto primitive? Pretend I named your favorite one, to avoid bikeshedding issues.

Re:Thoughts on Rust bloat by edflsafoiewq on Thursday August 22, 2019 @10:09AM (#20768233)
ChaCha20 is widely used for CSRNG.
Re:Thoughts on Rust bloat by Dylan16807 on Thursday August 22, 2019 @01:28PM (#20770430)
Agreed, that would work fine. But for a generic RNG function, I feel like the difference between 3 and 7 cycles per byte isn't too impactful.