std.random suggestions

Denis Feklushkin feklushkin.denis at gmail.com
Mon Sep 22 09:43:20 UTC 2025


On Monday, 22 September 2025 at 09:37:28 UTC, Denis Feklushkin 
wrote:

>> At system level, there might be multiple options available — 
>> depending on factors like the OS version (like Linux kernels 
>> older than the `getrandom` syscall, or Windows that has two 
>> crypto APIs where the supported parameters have also changed 
>> over time) or the runtime environment (think of chroots 
>> without `/dev/`).

Forgot to add: these options should not be selected automatically 
based on some heuristics. Because we know exactly the minimum 
level of quality of random numbers that we are willing to agree 
to.

> Yes, I mentioned this: if TRNG isn't available, proposed 
> functions simply won't be available. So user will either be 
> forced to agree insecure pseudo-random sequences or be forced 
> to find another way to achieve randomness.




More information about the Digitalmars-d mailing list