9 ms·
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 fo
by tptacek 5y ago
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.
- jcranmer 5y agoFrom 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.
- masklinn 5y agoI 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.
- deleted 5y ago[deleted]
- sobriquet9 5y agoI 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.
- zokier 5y agoSeems 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-551841670 https://github.com/rust-random/rand/issues/905#issuecomment-...
- omoikane 5y agoI wish that issue would also link to the rebuttal: https://www.pcg-random.org/posts/on-vignas-pcg-critique.html https://www.pcg-random.org/posts/on-vignas-pcg-critique.html
- tptacek 5y agoDo 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.
- omoikane 5y agoMy 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.
- ttybird2 5y agohttps://www.pcg-random.org/ https://www.pcg-random.org/ PCG's statistical quality is "excellent" but chacha20's just "good"?
- loeg 5y agoI agree that the motivation is pretty confused. One of the straightforward goals is to be faster than PCG-64 or xoshiro256++ -- that seems reasonable.