Is it an internal PRNG? Is it fed from
/dev/urandom? How secure is it? If I have a hardware (TRNG) plugged in feeding my
/dev/random will this source of entropy get used by
As others mentioned Bitcoin core uses OpenSSL random sources.
This means that it uses any random source available, like:
- the operation system, i.e. interrupts
- random sources of the CPU or the chip set
- dedicated hardware for entropy generation
So in order to make sure your hardware random generator works with Bitcoin you must make sure it works with OpenSSL.
It uses RAND_bytes from OpenSSL. The relevant call is
getnewaddress is in rpcwallet.cpp. It tries to get a key from the pool, and if the pool is empty it allocates a new one which is populated using RAND_bytes.