Re: [hackers] [PATCH 1/2] Add libutil/random.c for fast PCG-based PRNG

From: NRK <nrk_AT_disroot.org>
Date: Sat, 21 Dec 2024 08:17:06 +0000

> +#ifdef OpenBSD
> +
> +uint32_t
> +rng32(void)
> +{
> + return arc4random();
> +}
> +
> +void
> +rng32_randomseed()
> +{
> + return;
> +}
> +
> +#else /* standalone, PCG construction */

I don't really understand this ifdef. What does this get? Since you
don't need cryptographic guarantees, it gets you pretty much nothing
(while it does have costs since CSPRNG are often slower due to
cryptographic nature).

So this is just more code to get nothing in return. Not very suckless.
And not sensible in general either IMO.

- NRK
Received on Sat Dec 21 2024 - 09:17:06 CET

This archive was generated by hypermail 2.3.0 : Sat Dec 21 2024 - 09:24:41 CET