News for hackers. Stuff that matters.
Re:Designing a New PRNG by tptacek on Monday December 20, 2021 @03:02PM (#29629482)
This is all pretty confusing to me, because it's discussing a non-cryptographic RNG but talking about invertibility and "having been cracked" as a motivation for replacing that RNG. If you need a secure RNG, you use a CSPRNG. For all other cases: why is "having been cracked" motivating?

This was always my complaint with PCG, that it talked about "difficulty to predict" and its suitability for... some kinds? of security applications? I don't know what those applications are, but somehow PCG targets them? If you care about this stuff, you should simply be using getrandom(2).

For what it's worth: I get why you'd want a high-quality generator of insecure random data (for simulations and stuff), and that there's an interesting discussion to have about what generator does the best job at handling that workload. I'm just saying it seems to have nothing to do with invertibility and crackability.

Re:Designing a New PRNG by zokier on Monday December 20, 2021 @04:17PM (#29630398)
Seems that vigna (author of the xoshiro family of rngs) mostly agrees with you

> Personally, I don't believe in the "middle ground" of "difficult-to-predict-but-not-crypto": usually it just means it is so easy to break that nobody

https://github.com/rust-random/rand/issues/905#issuecomment-...

Re:Designing a New PRNG by omoikane on Monday December 20, 2021 @05:37PM (#29631349)
I wish that issue would also link to the rebuttal: https://www.pcg-random.org/posts/on-vignas-pcg-critique.html
Re:Designing a New PRNG by ttybird2 on Monday December 20, 2021 @09:46PM (#29633216)
https://www.pcg-random.org/

PCG's statistical quality is "excellent" but chacha20's just "good"?

Re:Designing a New PRNG by loeg on Tuesday December 21, 2021 @01:16AM (#29634547)
It is a bit odd. I think the PCG authors are talking about reduced-round variants below 8[1] re: statistical quality. I agree it doesn't belong in a row labeled "ChaCha20." It seems obvious that chacha below 4 rounds is total garbage[2] but I don't know much about 4-7 rounds. The Too Much Crypto guy likes 8 rounds for cryptographic purposes.

[1]: https://www.pcg-random.org/other-rngs.html#id7

[2]: https://cr.yp.to/snuffle/diffusion.html

Re:Designing a New PRNG by tptacek on Monday December 20, 2021 @09:29PM (#29633126)
Do you find that rebuttal persuasive? For someone who doesn't care at all about anyone's "tone", and just wants to know what the hell is going on with these constructions, I didn't find much there.
Re:Designing a New PRNG by omoikane on Monday December 20, 2021 @11:28PM (#29633879)
My reading of both:

- Vigna claims small differences in internal states don't have avalanche effects, and the rebuttal says those small differences in internal states don't occur normally, not with the proper seeding steps.

- Vigna claims to be able to predict one particular variant of PCG, and the rebuttal said that that was one of the weaker variants that specifically has "insecure" in the name.

It's persuasive to me in suggesting that Vigna's claims are perhaps not that clear cut.

I am not an expert in PRNG and I wouldn't say this makes PCG win over Xorshiro or not, I just think it's unfortunate that the issue above linked only one side of the argument, especially since I find the other side more pleasant to read.

Re:Designing a New PRNG by sobriquet9 on Monday December 20, 2021 @03:45PM (#29630060)
I think the allure here is the same as with ciphers. Everyone can create a cipher they cannot break, but cryptographers can break easily.

Likewise, it's easy to invent another PRNG, but not so easy to figure out that, say, its output always falls on one of seventeen parallel planes when treated as consecutive (x, y, z) coordinates.

If you want random numbers that are fast and almost-cryptographically-strong, you can take some ARX block cipher and reduce number of rounds as you see fit. But it's not nearly as much fun.

Re:Designing a New PRNG by jcranmer on Monday December 20, 2021 @03:34PM (#29629953)
From what I understand of the matter, the crux of it is that there are two modern PRNG families whose creators are running around telling you to use their PRNG over the other's because <technical reasons>, where a) both of them are correct, and b) the <technical reasons> don't elucidate the tradeoffs being made to people whose prior understanding amounts to "I just want a source of random numbers!" This is contrast to something like a linear congruential generator, where the failure mode of the random data is pretty easy to explain.
Re:Designing a New PRNG by masklinn on Monday December 20, 2021 @03:50PM (#29630111)
I think you misread tptacek's line of questioning. It's not about the quality / superiority of what over what, but the initial motivation for rand switching away from PCG:

> This was done after some concerns were raised by the author of xoshiro, who posted a blog entry on PCG and also raised an issue on the possibility of PCG being invertible.

PCG and the XOR family are both non-cryptographic RNGs, how is predictability or invertibility relevant then? If those are concerns, surely a CSPRNG should be used?

The "quality" of randomness is very much a concern in non-secure contexts e.g. patterns in an RNG can bias your simulation, but it doesn't seem like it'd matter if somebody can recover even your simulation seed.

Re:Designing a New PRNG by loeg on Monday December 20, 2021 @05:26PM (#29631194)
I agree that the motivation is pretty confused. One of the straightforward goals is to be faster than PCG-64 or xoshiro256++ -- that seems reasonable.