Time to make jrand48 and friends available again?

You aren't missing anything, we don't have truly random numbers, and truly random numbers aren't desirable for almost any use-case anyway.

Also, despite my concerns raised in Clarify the cryptographic properties of SystemRandomNumberGenerator, it's been made explicitly clear that SystemRandomNumberGenerator is not required to be a CSPRNG. That means that the RandomNumberGenerator protocol does not imply a CSPRNG either, and so we don't really need a new protocol for non-cryptographically secure random number generators.

We could have a protocol for a sendable random number generator, but I doubt that's very useful. The only thing it adds is a init(seed:) method to RandomNumberGenerator, and given that the whole point of having seedable generators is that they're replayable, I can't imagine a world where you care what the seed is, but not what the RNG is.

3 Likes