Can't load /root/.rnd into RNG : where can I find it, or how to create it?

even though I get this error, the RSA private key IS generated by the script

The file doesn't need to exist; OpenSSL creates it on its own after the first time.

I just fear that it is not random, since it lacks a seed.

The OS provides the seed using its own RNG through /dev/urandom or through system calls such as getentropy() or CryptGenRandom(). There's no need for you to provide anything extra.

I would guess that the .rnd file is more or less a leftover from the days when the OS lacked a good CSPRNG, possibly when the Linux /dev/urandom was considered poor-quality (and /dev/random produced data very slowly due to "entropy accounting"). Now it is no longer the case, and relying entirely on a seed stored on some file in your homedir would actually be less secure.


Create one in expected path

cd ~/; openssl rand -writerand .rnd

OpenSSL creates it on its own after the first time.

Actually, it doesn't, no matter how many times I launch the script or if I just try to use the openssl rand command directly, it is never created.

But you were right : I generated two keys to check if they were different and they were.

Thank you for your help.